From bc7a50b969d7c1c57a3163c3803bcde52683001b Mon Sep 17 00:00:00 2001 From: Cameron Gutman Date: Thu, 26 Jan 2012 20:02:42 +0000 Subject: [PATCH] [USBSTOR] - 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 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/usb/usbstor/scsi.c b/drivers/usb/usbstor/scsi.c index 3dfc5a1fb31..68b7aac2c0a 100644 --- a/drivers/usb/usbstor/scsi.c +++ b/drivers/usb/usbstor/scsi.c @@ -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; -- 2.17.1