rpms/kernel/F-8 linux-2.6-usb-storage-always-set-the-allow_restart-flag.patch, NONE, 1.1 kernel.spec, 1.276, 1.277

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


Author: kyle

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

Modified Files:
	kernel.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.spec
===================================================================
RCS file: /cvs/pkgs/rpms/kernel/F-8/kernel.spec,v
retrieving revision 1.276
retrieving revision 1.277
diff -u -r1.276 -r1.277
--- kernel.spec	27 Nov 2007 19:47:02 -0000	1.276
+++ kernel.spec	28 Nov 2007 00:51:45 -0000	1.277
@@ -710,6 +710,8 @@
 
 Patch1300: linux-2.6-usb-suspend-classes.patch
 Patch1305: linux-2.6-usb-storage-initialize-huawei-e220-properly.patch
+Patch1306: linux-2.6-usb-storage-always-set-the-allow_restart-flag.patch
+
 Patch1400: linux-2.6-smarter-relatime.patch
 Patch1503: linux-2.6-xfs-optimize-away-dmapi-tests.patch
 Patch1504: linux-2.6-xfs-optimize-away-realtime-tests.patch
@@ -1309,6 +1311,8 @@
 ApplyPatch linux-2.6-usb-suspend-classes.patch
 # initialize strange modem/storage device properly (from F7 kernel)
 ApplyPatch linux-2.6-usb-storage-initialize-huawei-e220-properly.patch
+# some usb disks spin down automatically and need allow_restart
+ApplyPatch linux-2.6-usb-storage-always-set-the-allow_restart-flag.patch
 
 # implement smarter atime updates support.
 ApplyPatch linux-2.6-smarter-relatime.patch
@@ -1960,6 +1964,10 @@
 
 
 %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