Attached is a patch against 2.4.18-pre3. Greg, please send this upstream for both the 2.4 and 2.5 trees.
This patch does the following: (o) Fixes a bit-manipulation bug in INQUIRY fixup (o) Adds an unusual device entry (o) Fixes the "hang on shutdown" problem by forcing the control thread to stay alive all the way through shutdown. Important question: Should the hub thread also be kept alive during shutdown, in case a device is removed at a bad time? This should finish off the 2.4.x work for me. After this, I'll be looking towards 2.5, unless something comes up to keep me with 2.4 issues. Matt -- Matthew Dharm Home: [EMAIL PROTECTED] Maintainer, Linux USB Mass Storage Driver G: Money isn't everything, A.J. AJ: Who convinced you of that? G: The Chief, at my last salary review. -- Mike and Greg User Friendly, 11/3/1998
diff -u -X /home/mdharm/projects/dontdiff storage.old/protocol.c storage/protocol.c --- storage.old/protocol.c Sun Jul 29 21:11:50 2001 +++ storage/protocol.c Sat Jan 12 22:40:25 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 -u -X /home/mdharm/projects/dontdiff storage.old/unusual_devs.h storage/unusual_devs.h --- storage.old/unusual_devs.h Sat Jan 12 22:03:09 2002 +++ storage/unusual_devs.h Sat Jan 12 22:39:17 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 -u -X /home/mdharm/projects/dontdiff storage.old/usb.c storage/usb.c --- storage.old/usb.c Sun Nov 11 10:01:32 2001 +++ storage/usb.c Sat Jan 5 23:14:12 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]) @@ -318,6 +318,13 @@ current->files = init_task.files; atomic_inc(¤t->files->count); daemonize(); + + /* avoid getting signals */ + spin_lock_irq(¤t->sigmask_lock); + flush_signals(current); + sigfillset(¤t->blocked); + recalc_sigpending(current); + spin_unlock_irq(¤t->sigmask_lock); /* set our name for identification purposes */ sprintf(current->comm, "usb-storage-%d", us->host_number);
msg03914/pgp00000.pgp
Description: PGP signature