mirror of
https://github.com/SCST-project/scst.git
synced 2026-05-17 02:31:27 +00:00
Stop setting command expected values for SCST,
as we can not assure values are right. git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@320 d57e44dd-8a1f-0410-8b47-8ef2f437770f
This commit is contained in:
@@ -363,8 +363,6 @@ tasklet_rx_cmds(unsigned long data)
|
||||
tmd_cmd_t *tmd;
|
||||
tmd_xact_t *xact;
|
||||
struct scst_cmd *scst_cmd;
|
||||
scst_data_direction dir;
|
||||
int len;
|
||||
|
||||
rx_loop:
|
||||
spin_lock_irq(&bp->tmds_lock);
|
||||
@@ -426,18 +424,29 @@ rx_loop:
|
||||
break;
|
||||
}
|
||||
|
||||
/* bidirectional or no transfer */
|
||||
dir = SCST_DATA_UNKNOWN;
|
||||
if ((tmd->cd_flags & CDF_DATA_OUT) && !(tmd->cd_flags & CDF_DATA_IN)) {
|
||||
dir = SCST_DATA_WRITE;
|
||||
} else if (tmd->cd_flags & CDF_DATA_IN) {
|
||||
dir = SCST_DATA_READ;
|
||||
/*
|
||||
* XXX: For some commands like INQUIRY, SYNCHRONIZE_CACHE, VERIFY, ...
|
||||
* XXX: we can not get good direction and transfer length values
|
||||
* XXX: from low level driver. As long as we could not assure
|
||||
* XXX: proper things, we stop setting exected values for SCST
|
||||
*/
|
||||
if (0) {
|
||||
scst_data_direction dir;
|
||||
int len;
|
||||
|
||||
/* bidirectional or no transfer */
|
||||
dir = SCST_DATA_UNKNOWN;
|
||||
if ((tmd->cd_flags & CDF_DATA_OUT) && !(tmd->cd_flags & CDF_DATA_IN)) {
|
||||
dir = SCST_DATA_WRITE;
|
||||
} else if (tmd->cd_flags & CDF_DATA_IN) {
|
||||
dir = SCST_DATA_READ;
|
||||
}
|
||||
len = tmd->cd_totlen;
|
||||
if (tmd->cd_cdb[0] == INQUIRY) {
|
||||
len = min(len, tmd->cd_cdb[4]);
|
||||
}
|
||||
scst_cmd_set_expected(scst_cmd, dir, len);
|
||||
}
|
||||
len = tmd->cd_totlen;
|
||||
if (tmd->cd_cdb[0] == INQUIRY) {
|
||||
len = min(len, tmd->cd_cdb[4]);
|
||||
}
|
||||
scst_cmd_set_expected(scst_cmd, dir, len);
|
||||
scst_cmd_init_done(scst_cmd, SCST_CONTEXT_TASKLET);
|
||||
spin_unlock_irq(&bp->tmds_lock);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user