rpms/kernel/F-7 linux-2.6-usb-storage-always-set-the-allow_restart-flag.patch, NONE, 1.1 kernel-2.6.spec, 1.3390, 1.3391

Kyle McMartin (kyle) fedora-extras-commits at redhat.com
Wed Nov 28 00:52:15 UTC 2007


Author: kyle

Update of /cvs/pkgs/rpms/kernel/F-7
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv29347

Modified Files:
	kernel-2.6.spec 
Added Files:
	linux-2.6-usb-storage-always-set-the-allow_restart-flag.patch 
Log Message:
* Tue Nov 27 2007 Kyle McMartin <kmcmartin at redhat.com>
- Some USB disks spin themselves down automatically and need
  scsi_device.allow_restart enabled so they'll spin back up.


linux-2.6-usb-storage-always-set-the-allow_restart-flag.patch:

--- NEW FILE linux-2.6-usb-storage-always-set-the-allow_restart-flag.patch ---
>From stern at rowland.harvard.edu Wed Oct 10 13:29:09 2007
From: Mauro Carvalho Chehab <mchehab at infradead.org>
Date: Wed, 10 Oct 2007 16:29:02 -0400 (EDT)
Subject: usb-storage: always set the allow_restart flag
To: Greg KH <greg at kroah.com>, Matthew Dharm <mdharm-usb at one-eyed-alien.net>
Cc: Mauro Carvalho Chehab <mchehab at infradead.org>,  USB Storage list <usb-storage at lists.one-eyed-alien.net>
Message-ID: <Pine.LNX.4.44L0.0710101627250.2739-100000 at iolanthe.rowland.org>


From: Mauro Carvalho Chehab <mchehab at infradead.org>

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 at infradead.org>
Signed-off-by: Alan Stern <stern at rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh at suse.de>

---
 drivers/usb/storage/scsiglue.c |    4 ++++
 1 file changed, 4 insertions(+)

--- a/drivers/usb/storage/scsiglue.c
+++ b/drivers/usb/storage/scsiglue.c
@@ -177,6 +177,10 @@ static int slave_configure(struct scsi_d
 		 * 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


Index: kernel-2.6.spec
===================================================================
RCS file: /cvs/pkgs/rpms/kernel/F-7/kernel-2.6.spec,v
retrieving revision 1.3390
retrieving revision 1.3391
diff -u -r1.3390 -r1.3391
--- kernel-2.6.spec	27 Nov 2007 19:27:41 -0000	1.3390
+++ kernel-2.6.spec	28 Nov 2007 00:51:42 -0000	1.3391
@@ -625,6 +625,7 @@
 
 Patch780: linux-2.6-usb-storage-initialize-huawei-e220-properly.patch
 Patch781: linux-2.6-usb-autosuspend-default-disable.patch
+Patch782: linux-2.6-usb-storage-always-set-the-allow_restart-flag.patch
 
 Patch800: linux-2.6-wakeups-hdaps.patch
 Patch801: linux-2.6-wakeups.patch
@@ -1109,6 +1110,9 @@
 # Disable USB autosuspend by default.
 ApplyPatch linux-2.6-usb-autosuspend-default-disable.patch
 
+# some usb disks spin down automatically and need allow_restart
+ApplyPatch linux-2.6-usb-storage-always-set-the-allow_restart-flag.patch
+
 # enable sysrq-c on all kernels, not only kexec
 ApplyPatch linux-2.6-sysrq-c.patch
 
@@ -2260,6 +2264,10 @@
 %endif
 
 %changelog
+* Tue Nov 27 2007 Kyle McMartin <kmcmartin at redhat.com>
+- Some USB disks spin themselves down automatically and need
+  scsi_device.allow_restart enabled so they'll spin back up.
+
 * Tue Nov 27 2007 John W. Linville <linville at redhat.com>
 * Fix NULL ptr reference in iwlwifi (CVE-2007-5938)
 




More information about the fedora-extras-commits mailing list