usb-storage: always set the allow_restart flag
authorMauro Carvalho Chehab <mchehab@infradead.org>
Wed, 10 Oct 2007 20:29:02 +0000 (16:29 -0400)
committerGreg Kroah-Hartman <gregkh@suse.de>
Wed, 28 Nov 2007 21:58:33 +0000 (13:58 -0800)
This patch (as1000) sets the SCSI allow_restart flag for USB disk
devices.  In theory this should never hurt, and there definitely are
devices out there (such as the Seagate 250-GB external drive) which
need the flag to be set.

Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/usb/storage/scsiglue.c

index 1ba19eaa1970979faa450d71cf143282cc67e93a..836a34ae6ec62a5737c3b46e3f47dfecdeff9c5f 100644 (file)
@@ -177,6 +177,10 @@ static int slave_configure(struct scsi_device *sdev)
                 * is an occasional series of retries that will all fail. */
                sdev->retry_hwerror = 1;
 
+               /* USB disks should allow restart.  Some drives spin down
+                * automatically, requiring a START-STOP UNIT command. */
+               sdev->allow_restart = 1;
+
        } else {
 
                /* Non-disk-type devices don't need to blacklist any pages