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

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)