[USBSTOR]
authorCameron Gutman <aicommander@gmail.com>
Thu, 26 Jan 2012 20:02:42 +0000 (20:02 +0000)
committerCameron Gutman <aicommander@gmail.com>
Thu, 26 Jan 2012 20:02:42 +0000 (20:02 +0000)
- Set the correct transfer direction value in the CBW
- Fixes the infamous system hang that occurred when writing to a USB drive

svn path=/branches/usb-bringup-trunk/; revision=55223

drivers/usb/usbstor/scsi.c

index 3dfc5a1..68b7aac 100644 (file)
@@ -31,7 +31,7 @@ USBSTOR_BuildCBW(
     Control->Signature = CBW_SIGNATURE;
     Control->Tag = Tag;
     Control->DataTransferLength = DataTransferLength;
-    Control->Flags = 0x80;
+    Control->Flags = (CommandBlock[0] != SCSIOP_WRITE) ? 0x80 : 0x00;
     Control->LUN = (LUN & MAX_LUN);
     Control->CommandBlockLength = CommandBlockLength;