This patch from Alan Stern zero-pads commands using the UFI protocol. This patch exists in 2.5, but never made it into 2.4
Not all devices require this padding, but some do.
Greg, please apply.
Matt
----- Forwarded message from Alan Stern <[EMAIL PROTECTED]> -----
Date: Fri, 5 Sep 2003 16:24:11 -0400 (EDT)
From: Alan Stern <[EMAIL PROTECTED]>
Subject: PATCH: (as93) (2.4.23) Pad UFI commands to 12 bytes with zeros
To: Matthew Dharm <[EMAIL PROTECTED]>
cc: USB Storage List <[EMAIL PROTECTED]>
X-Spam-Status: No, hits=-4.0 required=5.0 tests=UNIFIED_PATCH,RCVD_IN_ORBZ version=2.11
Matt:
This seems never to have made it into 2.4. I don't know if it really
matters for anything, but it can't hurt.
Alan Stern
--- 2.4.23/drivers/usb/storage/protocol.c.orig Mon Aug 25 07:44:42 2003
+++ 2.4.23/drivers/usb/storage/protocol.c Fri Sep 5 16:20:26 2003
@@ -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;
----- End forwarded message -----
--
Matthew Dharm Home: [EMAIL PROTECTED]
Maintainer, Linux USB Mass Storage Driver
G: Let me guess, you started on the 'net with AOL, right?
C: WOW! d00d! U r leet!
-- Greg and Customer
User Friendly, 2/12/1999
pgp00000.pgp
Description: PGP signature
