Hi,

Here's a patch against 2.5.3-pre1 for the USB storage driver.  It
contains the following changes:
        - fixes a bit-manipulation bug in the INQUIRY fixup.
        - addes an unusual device entry
        - fixes the "hang on shutdown" problem by forcint the control
          thread to stay alive all the way through shutdown.
This patch was written by Matt Dharm.

thanks,

greg k-h


diff -Nru a/drivers/usb/storage/protocol.c b/drivers/usb/storage/protocol.c
--- a/drivers/usb/storage/protocol.c    Wed Jan 16 09:57:45 2002
+++ b/drivers/usb/storage/protocol.c    Wed Jan 16 09:57:45 2002
@@ -1,6 +1,6 @@
 /* Driver for USB Mass Storage compliant devices
  *
- * $Id: protocol.c,v 1.10 2001/07/30 00:27:59 mdharm Exp $
+ * $Id: protocol.c,v 1.11 2002/01/13 06:40:25 mdharm Exp $
  *
  * Current development and maintenance by:
  *   (c) 1999, 2000 Matthew Dharm ([EMAIL PROTECTED])
@@ -76,7 +76,7 @@
                data_ptr = (unsigned char *)srb->request_buffer;
 
        /* Change the SCSI revision number */
-       data_ptr[2] |= 0x2;
+       data_ptr[2] = (data_ptr[2] & ~7) | 2;
 }
 
 /***********************************************************************
diff -Nru a/drivers/usb/storage/unusual_devs.h b/drivers/usb/storage/unusual_devs.h
--- a/drivers/usb/storage/unusual_devs.h        Wed Jan 16 09:57:45 2002
+++ b/drivers/usb/storage/unusual_devs.h        Wed Jan 16 09:57:45 2002
@@ -1,7 +1,7 @@
 /* Driver for USB Mass Storage compliant devices
  * Ununsual Devices File
  *
- * $Id: unusual_devs.h,v 1.24 2001/12/29 03:12:45 mdharm Exp $
+ * $Id: unusual_devs.h,v 1.25 2002/01/13 06:39:17 mdharm Exp $
  *
  * Current development and maintenance by:
  *   (c) 2000 Matthew Dharm ([EMAIL PROTECTED])
@@ -458,6 +458,14 @@
                 US_SC_ISD200, US_PR_BULK, isd200_Initialization,
                 0 ),
 #endif
+
+/* Submitted by Brian Hall <[EMAIL PROTECTED]>
+ * Needed for START_STOP flag */
+UNUSUAL_DEV(  0x0c76, 0x0003, 0x0100, 0x0100,
+               "JMTek",
+               "USBDrive",
+               US_SC_SCSI, US_PR_BULK, NULL,
+               US_FL_START_STOP ),
 
 /* Reported by Dan Pilone <[EMAIL PROTECTED]>
  * The device needs the flags only.
diff -Nru a/drivers/usb/storage/usb.c b/drivers/usb/storage/usb.c
--- a/drivers/usb/storage/usb.c Wed Jan 16 09:57:46 2002
+++ b/drivers/usb/storage/usb.c Wed Jan 16 09:57:46 2002
@@ -1,6 +1,6 @@
 /* Driver for USB Mass Storage compliant devices
  *
- * $Id: usb.c,v 1.69 2001/11/11 03:33:03 mdharm Exp $
+ * $Id: usb.c,v 1.70 2002/01/06 07:14:12 mdharm Exp $
  *
  * Current development and maintenance by:
  *   (c) 1999, 2000 Matthew Dharm ([EMAIL PROTECTED])
@@ -315,6 +315,13 @@
         * so get rid of all our resources..
         */
        daemonize();
+
+       /* avoid getting signals */
+       spin_lock_irq(&current->sigmask_lock);
+       flush_signals(current);
+       sigfillset(&current->blocked);
+       recalc_sigpending(current);
+       spin_unlock_irq(&current->sigmask_lock);
 
        /* set our name for identification purposes */
        sprintf(current->comm, "usb-storage-%d", us->host_number);


_______________________________________________
[EMAIL PROTECTED]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel

Reply via email to