patch-2.4.23 linux-2.4.23/drivers/usb/storage/protocol.c
Next file: linux-2.4.23/drivers/usb/storage/unusual_devs.h
Previous file: linux-2.4.23/drivers/usb/speedtch.c
Back to the patch index
Back to the overall index
-  Lines: 11
-  Date:
2003-11-28 10:26:20.000000000 -0800
-  Orig file: 
linux-2.4.22/drivers/usb/storage/protocol.c
-  Orig date: 
2003-08-25 04:44:42.000000000 -0700
diff -urN linux-2.4.22/drivers/usb/storage/protocol.c linux-2.4.23/drivers/usb/storage/protocol.c
@@ -237,6 +237,10 @@
 	 * a unsigned char cmnd[12], so we know we have storage available
 	 */
 
+	/* Pad the ATAPI command with zeros */
+	for (; srb->cmd_len<12; srb->cmd_len++)
+		srb->cmnd[srb->cmd_len] = 0;
+
 	/* set command length to 12 bytes (this affects the transport layer) */
 	srb->cmd_len = 12;
 
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)