diff options
author | roel kluin <roel.kluin@gmail.com> | 2011-01-01 19:40:23 +0100 |
---|---|---|
committer | James Bottomley <James.Bottomley@suse.de> | 2011-01-03 10:41:18 -0600 |
commit | c32e061fa19893ce4acf95d97d5613a161f0f1b7 (patch) | |
tree | 1d8e2d74cac95ffb8006d9a03593cc0a5900a4cd /drivers/scsi/arcmsr | |
parent | 474ffb74c75ea9845860ffb24cdc127eda0d5657 (diff) |
[SCSI] arcmsr: fix write to device check
Use command->sc_data_direction instead of trying (incorrectly) to
figure it out from the command itself
[jejb: fix up compile failure]
Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
Acked-by: NickCheng <nick.cheng@areca.com.tw>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
Diffstat (limited to 'drivers/scsi/arcmsr')
-rw-r--r-- | drivers/scsi/arcmsr/arcmsr_hba.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/scsi/arcmsr/arcmsr_hba.c b/drivers/scsi/arcmsr/arcmsr_hba.c index 17e3df4f016..1cadcd6b7da 100644 --- a/drivers/scsi/arcmsr/arcmsr_hba.c +++ b/drivers/scsi/arcmsr/arcmsr_hba.c @@ -1171,9 +1171,8 @@ static int arcmsr_build_ccb(struct AdapterControlBlock *acb, arcmsr_cdb->msgPages = arccdbsize/0x100 + (arccdbsize % 0x100 ? 1 : 0); if ( arccdbsize > 256) arcmsr_cdb->Flags |= ARCMSR_CDB_FLAG_SGL_BSIZE; - if (pcmd->cmnd[0]|WRITE_6 || pcmd->cmnd[0]|WRITE_10 || pcmd->cmnd[0]|WRITE_12 ){ + if (pcmd->sc_data_direction == DMA_TO_DEVICE) arcmsr_cdb->Flags |= ARCMSR_CDB_FLAG_WRITE; - } ccb->arc_cdb_size = arccdbsize; return SUCCESS; } |