rpms/kernel/F-9 linux-2.6-libata-force-hardreset-in-sleep-mode.patch, NONE, 1.1 kernel.spec, 1.624, 1.625

Chuck Ebbert (cebbert) fedora-extras-commits at redhat.com
Tue Apr 22 17:15:15 UTC 2008


Author: cebbert

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

Modified Files:
	kernel.spec 
Added Files:
	linux-2.6-libata-force-hardreset-in-sleep-mode.patch 
Log Message:
* Tue Apr 22 2008 Chuck Ebbert <cebbert at redhat.com> 2.6.25-6
- Force hard reset on sleeping SATA links during probe (#436099)


linux-2.6-libata-force-hardreset-in-sleep-mode.patch:

--- NEW FILE linux-2.6-libata-force-hardreset-in-sleep-mode.patch ---
Currently, libata doesn't support link powersave modes and always
disables link PS modes.  However, if the link is already in powersave
mode when libata begis probing, inhibiting powersave modes by setting
IPM isn't enough.  Link should be manually transited into active mode
using SPM or hardreset.

As SPM isn't avalable on all controllers and we're gonna prefer
hardreset in future anyway, force hardreset if link is in powersave
mode.

Reported-by: Paul Collins <paul at burly.ondioline.org>
Signed-off-by: Tejun Heo <htejun at gmail.com>
---
Jeff, this isn't necessary for #upstream.

drivers/ata/libata-core.c |   15 +++++++++++++++
1 file changed, 15 insertions(+)

index be95fdb..e3ddefd 100644
--- a/drivers/ata/libata-core.c
+++ b/drivers/ata/libata-core.c
@@ -3966,11 +3966,26 @@ int ata_std_prereset(struct ata_link *link, unsigned long deadline)
 
 	/* if SATA, resume link */
 	if (ap->flags & ATA_FLAG_SATA) {
+		u32 sstatus;
+
 		rc = sata_link_resume(link, timing, deadline);
 		/* whine about phy resume failure but proceed */
 		if (rc && rc != -EOPNOTSUPP)
 			ata_link_printk(link, KERN_WARNING, "failed to resume "
 					"link for reset (errno=%d)\n", rc);
+
+		/* force hardreset if the link is sleeping */
+		if (sata_scr_read(link, SCR_STATUS, &sstatus) == 0) {
+			u8 ipm = sstatus >> 8;
+
+			if (ipm == 2 || ipm == 6) {
+				ata_link_printk(link, KERN_INFO,
+						"link in %s mode, forcing hardreset\n",
+						ipm == 2 ? "partial" : "slumber");
+				ehc->i.action |= ATA_EH_HARDRESET;
+				return 0;
+			}
+		}
 	}
 
 	/* Wait for !BSY if the controller can wait for the first D2H



Index: kernel.spec
===================================================================
RCS file: /cvs/pkgs/rpms/kernel/F-9/kernel.spec,v
retrieving revision 1.624
retrieving revision 1.625
diff -u -r1.624 -r1.625
--- kernel.spec	22 Apr 2008 16:42:54 -0000	1.624
+++ kernel.spec	22 Apr 2008 17:14:38 -0000	1.625
@@ -608,6 +608,7 @@
 Patch580: linux-2.6-sparc-selinux-mprotect-checks.patch
 Patch610: linux-2.6-defaults-fat-utf8.patch
 Patch670: linux-2.6-ata-quirk.patch
+Patch671: linux-2.6-libata-force-hardreset-in-sleep-mode.patch
 
 Patch680: linux-2.6-wireless.patch
 Patch681: linux-2.6-wireless-pending.patch
@@ -1127,6 +1128,8 @@
 
 # ia64 ata quirk
 ApplyPatch linux-2.6-ata-quirk.patch
+# wake up links that have been put to sleep by BIOS (#436099)
+ApplyPatch linux-2.6-libata-force-hardreset-in-sleep-mode.patch
 
 # wireless patches headed for 2.6.25
 #ApplyPatch linux-2.6-wireless.patch
@@ -1778,7 +1781,10 @@
 %kernel_variant_files -a /%{image_install_path}/xen*-%{KVERREL}.xen -e /etc/ld.so.conf.d/kernelcap-%{KVERREL}.xen.conf %{with_xen} xen
 
 %changelog
-* Tue Apr 22 2008 Chuck Ebbert <cebbert at redhat.com>
+* Tue Apr 22 2008 Chuck Ebbert <cebbert at redhat.com> 2.6.25-6
+- Force hard reset on sleeping SATA links during probe (#436099)
+
+* Tue Apr 22 2008 Chuck Ebbert <cebbert at redhat.com> 2.6.25-5
 - Disable PCI MSI interrupts by default again.
 
 * Mon Apr 21 2008 Eric Paris <eparis at redhat.com>




More information about the fedora-extras-commits mailing list