[ros-diffs] [cgutman] 55223: [USBSTOR] - Set the correct transfer direction value in the CBW - Fixes the infamous system hang that occurred when writing to a USB drive

cgutman at svn.reactos.org cgutman at svn.reactos.org
Thu Jan 26 20:02:42 UTC 2012


Author: cgutman
Date: Thu Jan 26 20:02:42 2012
New Revision: 55223

URL: http://svn.reactos.org/svn/reactos?rev=55223&view=rev
Log:
[USBSTOR]
- Set the correct transfer direction value in the CBW
- Fixes the infamous system hang that occurred when writing to a USB drive

Modified:
    branches/usb-bringup-trunk/drivers/usb/usbstor/scsi.c

Modified: branches/usb-bringup-trunk/drivers/usb/usbstor/scsi.c
URL: http://svn.reactos.org/svn/reactos/branches/usb-bringup-trunk/drivers/usb/usbstor/scsi.c?rev=55223&r1=55222&r2=55223&view=diff
==============================================================================
--- branches/usb-bringup-trunk/drivers/usb/usbstor/scsi.c [iso-8859-1] (original)
+++ branches/usb-bringup-trunk/drivers/usb/usbstor/scsi.c [iso-8859-1] Thu Jan 26 20:02:42 2012
@@ -31,7 +31,7 @@
     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;
 




More information about the Ros-diffs mailing list