usb/storage: redefine US_BULK_FLAG_IN and use it
US_BULK_FLAG_IN is defined as 1 and not used. The USB storage spec says that bit 7 of flags within CBW defines the data direction. 1 is DATA-IN (read from device) and 0 is the DATA-OUT. Bit 6 is obselete and bits 0-5 are reserved. This patch redefines the unsued define US_BULK_FLAG_IN from 1 to 1 << 7 aka 0x80 and replaces the obvious users. In a following patch the storage gadget will use it as well. Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:

committed by
Greg Kroah-Hartman

父節點
7ac4704c09
當前提交
b8db6d6402
@@ -1071,7 +1071,8 @@ int usb_stor_Bulk_transport(struct scsi_cmnd *srb, struct us_data *us)
|
||||
/* set up the command wrapper */
|
||||
bcb->Signature = cpu_to_le32(US_BULK_CB_SIGN);
|
||||
bcb->DataTransferLength = cpu_to_le32(transfer_length);
|
||||
bcb->Flags = srb->sc_data_direction == DMA_FROM_DEVICE ? 1 << 7 : 0;
|
||||
bcb->Flags = srb->sc_data_direction == DMA_FROM_DEVICE ?
|
||||
US_BULK_FLAG_IN : 0;
|
||||
bcb->Tag = ++us->tag;
|
||||
bcb->Lun = srb->device->lun;
|
||||
if (us->fflags & US_FL_SCM_MULT_TARG)
|
||||
|
Reference in New Issue
Block a user