This patch (a regeneration of as173) saves the residue value of a command
when doing an auto-sense.

Not that it really matters much -- almost nobody looks at that value.  But
it's definately incorrect the way it is, and this fixes it.

Greg, please apply.

Matt


===== drivers/usb/storage/transport.c 1.121 vs edited =====
--- 1.121/drivers/usb/storage/transport.c       Sat Feb 14 21:26:38 2004
+++ edited/drivers/usb/storage/transport.c      Sat Feb 14 21:28:40 2004
@@ -605,6 +605,7 @@
                unsigned char old_cmd_len;
                unsigned char old_cmnd[MAX_COMMAND_SIZE];
                unsigned long old_serial_number;
+               int old_resid;
 
                US_DEBUGP("Issuing auto-REQUEST_SENSE\n");
 
@@ -645,9 +646,12 @@
                srb->serial_number ^= 0x80000000;
 
                /* issue the auto-sense command */
+               old_resid = srb->resid;
+               srb->resid = 0;
                temp_result = us->transport(us->srb, us);
 
                /* let's clean up right away */
+               srb->resid = old_resid;
                srb->request_buffer = old_request_buffer;
                srb->request_bufflen = old_request_bufflen;
                srb->use_sg = old_sg;

-- 
Matthew Dharm                              Home: [EMAIL PROTECTED] 
Maintainer, Linux USB Mass Storage Driver

Your lips are twitching.  You're playing Quake aren't you.
                                        -- Stef to Greg
User Friendly, 8/11/1998

Attachment: pgp00000.pgp
Description: PGP signature

Reply via email to