mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 18:51:56 -04:00
[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 <[email protected]> Acked-by: NickCheng <[email protected]> Signed-off-by: James Bottomley <[email protected]>
This commit is contained in:
parent
474ffb74c7
commit
c32e061fa1
1 changed files with 1 additions and 2 deletions
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue