rpms/kernel/F-9 linux-2.6-libata-fix-ata-id-is-cfa.patch, NONE, 1.1.2.1 linux-2.6-libata-fix-eh-device-failure-handling.patch, NONE, 1.1.2.1 kernel.spec, 1.891.2.16, 1.891.2.17 linux-2.6-sata-eeepc-faster.patch, 1.1, NONE

Chuck Ebbert cebbert at fedoraproject.org
Fri Feb 6 21:08:38 UTC 2009


Author: cebbert

Update of /cvs/pkgs/rpms/kernel/F-9
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv29511

Modified Files:
      Tag: private-fedora-9-2_6_27-branch
	kernel.spec 
Added Files:
      Tag: private-fedora-9-2_6_27-branch
	linux-2.6-libata-fix-ata-id-is-cfa.patch 
	linux-2.6-libata-fix-eh-device-failure-handling.patch 
Removed Files:
      Tag: private-fedora-9-2_6_27-branch
	linux-2.6-sata-eeepc-faster.patch 
Log Message:
libata: detect modern CF devices properly
libata: drop link speed when errors happen on reset (F10#483351)
libata: drop redundant linux-2.6-sata-eeepc-faster.patch

linux-2.6-libata-fix-ata-id-is-cfa.patch:

--- NEW FILE linux-2.6-libata-fix-ata-id-is-cfa.patch ---
From: Sergei Shtylyov <sshtylyov at ru.mvista.com>
Date: Sun, 1 Feb 2009 16:46:39 +0000 (+0400)
Subject: ide/libata: fix ata_id_is_cfa() (take 4)
X-Git-Url: http://git.kernel.org/?p=linux%2Fkernel%2Fgit%2Ftorvalds%2Flinux-2.6.git;a=commitdiff_plain;h=2999b58b795ad81f10e34bdbbfd2742172f247e4

ide/libata: fix ata_id_is_cfa() (take 4)

When checking for the CFA feature set support, ata_id_is_cfa() tests bit 2 in
word 82 of the identify data instead the word 83;  it also checks the ATA/PI
version support in the word 80 (which the CompactFlash specifications have as
reserved), this having no slightest chance to work on the modern CF cards that
don't have 0x848A in the word 0...

Signed-off-by: Sergei Shtylyov <sshtylyov at ru.mvista.com>
Signed-off-by: Jeff Garzik <jgarzik at redhat.com>
---

diff --git a/include/linux/ata.h b/include/linux/ata.h
index a53318b..08a86d5 100644
--- a/include/linux/ata.h
+++ b/include/linux/ata.h
@@ -731,12 +731,17 @@ static inline int ata_id_current_chs_valid(const u16 *id)
 
 static inline int ata_id_is_cfa(const u16 *id)
 {
-	if (id[ATA_ID_CONFIG] == 0x848A)	/* Standard CF */
+	if (id[ATA_ID_CONFIG] == 0x848A)	/* Traditional CF */
 		return 1;
-	/* Could be CF hiding as standard ATA */
-	if (ata_id_major_version(id) >= 3 &&
-	    id[ATA_ID_COMMAND_SET_1] != 0xFFFF &&
-	   (id[ATA_ID_COMMAND_SET_1] & (1 << 2)))
+	/*
+	 * CF specs don't require specific value in the word 0 anymore and yet
+	 * they forbid to report the ATA version in the word 80 and require the
+	 * CFA feature set support to be indicated in the word 83 in this case.
+	 * Unfortunately, some cards only follow either of this requirements,
+	 * and while those that don't indicate CFA feature support need some
+	 * sort of quirk list, it seems impractical for the ones that do...
+	 */
+	if ((id[ATA_ID_COMMAND_SET_2] & 0xC004) == 0x4004)
 		return 1;
 	return 0;
 }

linux-2.6-libata-fix-eh-device-failure-handling.patch:

--- NEW FILE linux-2.6-libata-fix-eh-device-failure-handling.patch ---
From: Tejun Heo <tj at kernel.org>
Date: Thu, 29 Jan 2009 11:31:29 +0000 (+0900)
Subject: libata: fix EH device failure handling
X-Git-Url: http://git.kernel.org/?p=linux%2Fkernel%2Fgit%2Ftorvalds%2Flinux-2.6.git;a=commitdiff_plain;h=d89293abd95bfd7dd9229087d6c30c1464c5ac83

libata: fix EH device failure handling

The dev->pio_mode > XFER_PIO_0 test is there to avoid unnecessary
speed down warning messages but it accidentally disabled SATA link spd
down during configuration phase after reset where PIO mode is always
zero.

This patch fixes the problem by moving the test where it belongs.
This makes libata probing sequence behave better when the connection
is flaky at higher link speeds which isn't too uncommon for eSATA
devices.

Signed-off-by: Tejun Heo <tj at kernel.org>
Signed-off-by: Jeff Garzik <jgarzik at redhat.com>
[cebbert at redhat.com: trivial backport to 2.6.27]
---

diff --git a/drivers/ata/libata-eh.c b/drivers/ata/libata-eh.c
index 8147a83..c15572d 100644
--- a/drivers/ata/libata-eh.c
+++ b/drivers/ata/libata-eh.c
@@ -2979,12 +2979,13 @@ static int ata_eh_handle_dev_fail(struct ata_device *dev, int err)
 		/* give it just one more chance */
 		ehc->tries[dev->devno] = min(ehc->tries[dev->devno], 1);
 	case -EIO:
-		if (ehc->tries[dev->devno] == 1 && dev->pio_mode > XFER_PIO_0) {
+		if (ehc->tries[dev->devno] == 1) {
 			/* This is the last chance, better to slow
 			 * down than lose it.
 			 */
 			sata_down_spd_limit(dev->link);
-			ata_down_xfermask_limit(dev, ATA_DNXFER_PIO);
+			if (dev->pio_mode > XFER_PIO_0)
+				ata_down_xfermask_limit(dev, ATA_DNXFER_PIO);
 		}
 	}
 


Index: kernel.spec
===================================================================
RCS file: /cvs/pkgs/rpms/kernel/F-9/kernel.spec,v
retrieving revision 1.891.2.16
retrieving revision 1.891.2.17
diff -u -r1.891.2.16 -r1.891.2.17
--- kernel.spec	4 Feb 2009 20:14:08 -0000	1.891.2.16
+++ kernel.spec	6 Feb 2009 21:08:07 -0000	1.891.2.17
@@ -673,8 +673,9 @@
 
 # libata
 Patch670: linux-2.6-ata-quirk.patch
-Patch672: linux-2.6-sata-eeepc-faster.patch
-Patch678: linux-2.6-libata-sata_nv-disable-swncq.patch
+Patch671: linux-2.6-libata-fix-ata-id-is-cfa.patch
+Patch672: linux-2.6-libata-fix-eh-device-failure-handling.patch
+Patch679: linux-2.6-libata-sata_nv-disable-swncq.patch
 
 # wireless
 Patch682: linux-2.6-iwl3945-ibss-tsf-fix.patch
@@ -1250,8 +1251,10 @@
 # libata
 # ia64 ata quirk
 ApplyPatch linux-2.6-ata-quirk.patch
-# Make Eee disk faster.
-ApplyPatch linux-2.6-sata-eeepc-faster.patch
+# properly detect modern CF devices
+ApplyPatch linux-2.6-libata-fix-ata-id-is-cfa.patch
+# drop link speed when error happen during EH reset
+ApplyPatch linux-2.6-libata-fix-eh-device-failure-handling.patch
 # disable swncq on sata_nv
 ApplyPatch linux-2.6-libata-sata_nv-disable-swncq.patch
 
@@ -1919,6 +1922,11 @@
 %kernel_variant_files -a /%{image_install_path}/xen*-%{KVERREL}.xen -e /etc/ld.so.conf.d/kernelcap-%{KVERREL}.xen.conf %{with_xen} xen
 
 %changelog
+* Fri Feb 07 2009 Chuck Ebbert <cebbert at redhat.com> 2.6.27.14-78.2.17
+- libata: detect modern CF devices properly
+- libata: drop link speed when errors happen on reset (F10#483351)
+- libata: drop redundant linux-2.6-sata-eeepc-faster.patch
+
 * Wed Feb 04 2009 Kyle McMartin <kyle at redhat.com> 2.6.27.14-78.2.16
 - Print DMI product name in WARN{,_ON} dumps, backported from 2.6.29.
 


--- linux-2.6-sata-eeepc-faster.patch DELETED ---




More information about the fedora-extras-commits mailing list