patch-2.4.22 linux-2.4.22/drivers/usb/storage/usb.c

Next file: linux-2.4.22/drivers/usb/storage/usb.h
Previous file: linux-2.4.22/drivers/usb/storage/unusual_devs.h
Back to the patch index
Back to the overall index

diff -urN linux-2.4.21/drivers/usb/storage/usb.c linux-2.4.22/drivers/usb/storage/usb.c
@@ -401,18 +401,6 @@
 				break;
 			}
 
-			/* handle those devices which can't do a START_STOP */
-			if ((us->srb->cmnd[0] == START_STOP) &&
-			    (us->flags & US_FL_START_STOP)) {
-				US_DEBUGP("Skipping START_STOP command\n");
-				us->srb->result = GOOD << 1;
-
-				set_current_state(TASK_INTERRUPTIBLE);
-				us->srb->scsi_done(us->srb);
-				us->srb = NULL;
-				break;
-			}
-
 			/* lock the device pointers */
 			down(&(us->dev_semaphore));
 
@@ -621,8 +609,12 @@
 	US_DEBUGP("USB Mass Storage device detected\n");
 
 	/* Determine subclass and protocol, or copy from the interface */
-	subclass = unusual_dev->useProtocol;
-	protocol = unusual_dev->useTransport;
+	subclass = (unusual_dev->useProtocol == US_SC_DEVICE) ?
+			altsetting->bInterfaceSubClass :
+			unusual_dev->useProtocol;
+	protocol = (unusual_dev->useTransport == US_PR_DEVICE) ?
+			altsetting->bInterfaceProtocol :
+			unusual_dev->useTransport;
 	flags = unusual_dev->flags;
 
 	/*

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)