rpms/kernel/devel linux-2.6-ata-quirk.patch, NONE, 1.1 kernel-2.6.spec, 1.2952, 1.2953

fedora-cvs-commits at redhat.com fedora-cvs-commits at redhat.com
Tue Feb 27 02:02:56 UTC 2007


Author: davej

Update of /cvs/dist/rpms/kernel/devel
In directory cvs.devel.redhat.com:/tmp/cvs-serv18761

Modified Files:
	kernel-2.6.spec 
Added Files:
	linux-2.6-ata-quirk.patch 
Log Message:
add ia64 ata quirk

linux-2.6-ata-quirk.patch:
 Makefile |    1 +
 quirks.c |   45 +++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 46 insertions(+)

--- NEW FILE linux-2.6-ata-quirk.patch ---
--- linux-2.6.20/arch/ia64/kernel/quirks.c	1969-12-31 19:00:00.000000000 -0500
+++ linux-2.6.20_fix/arch/ia64/kernel/quirks.c	2007-02-13 13:56:34.000000000 -0500
@@ -0,0 +1,45 @@
+/*
+ * This file contains work-arounds for ia64 platform bugs.
+ */
+#include <linux/pci.h>
+
+/*
+ * quirk_intel_ide_controller: If an ide/ata controller is
+ * at legacy mode, BIOS might initiates BAR(bar 0~3 and 5)
+ * with incorrect value. This quirk will reset the incorrect
+ * value to 0.
+ */
+static void __devinit quirk_intel_ide_controller(struct pci_dev *dev)
+{
+	unsigned int pos;
+	struct resource *res;
+	int fixed = 0;
+	u8 tmp8;
+
+	if ((dev->class >> 8) != PCI_CLASS_STORAGE_IDE)
+		return;
+
+	/* TODO: What if one channel is in native mode ... */
+	pci_read_config_byte(dev, PCI_CLASS_PROG, &tmp8);
+	if ((tmp8 & 5) == 5)
+		return;
+
+	for( pos = 0; pos < 6; pos ++ ) {
+		res = &dev->resource[pos];
+		if (!(res->flags & (IORESOURCE_IO | IORESOURCE_MEM)))
+			continue;
+
+		if (!res->start && res->end) {
+			res->start = res->end = 0;
+			res->flags = 0;
+			fixed = 1;
+		}
+	}
+	if (fixed)
+		printk(KERN_WARNING
+			"PCI device %s: BIOS resource configuration fixed.\n",
+			pci_name(dev));
+}
+
+DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82801DB_11, quirk_intel_ide_controller);
+
--- linux-2.6.20/arch/ia64/kernel/Makefile	2007-02-08 02:13:41.000000000 -0500
+++ linux-2.6.20_fix/arch/ia64/kernel/Makefile	2007-02-12 09:49:39.000000000 -0500
@@ -33,6 +33,7 @@ obj-$(CONFIG_CRASH_DUMP)	+= crash_dump.o
 obj-$(CONFIG_IA64_UNCACHED_ALLOCATOR)	+= uncached.o
 obj-$(CONFIG_AUDIT)		+= audit.o
 obj-$(CONFIG_PCI_MSI)		+= msi_ia64.o
+obj-$(CONFIG_PCI)		+= quirks.o
 mca_recovery-y			+= mca_drv.o mca_drv_asm.o
 
 obj-$(CONFIG_IA64_ESI)		+= esi.o


Index: kernel-2.6.spec
===================================================================
RCS file: /cvs/dist/rpms/kernel/devel/kernel-2.6.spec,v
retrieving revision 1.2952
retrieving revision 1.2953
diff -u -r1.2952 -r1.2953
--- kernel-2.6.spec	27 Feb 2007 01:56:36 -0000	1.2952
+++ kernel-2.6.spec	27 Feb 2007 02:02:53 -0000	1.2953
@@ -456,6 +456,7 @@
 Patch2200: linux-2.6-sata-promise-pata-ports.patch
 Patch2201: linux-2.6-sata-ahci-suspend.patch
 Patch2203: linux-2.6-sata-fix-via.patch
+Patch2204: linux-2.6-ata-quirk.patch
 
 # ACPI bits
 
@@ -1117,6 +1118,8 @@
 # libata: don't initialize sg in ata_exec_internal() if DMA_NONE
 # Fix up VIA SATA
 %patch2203 -p1
+# ia64 ata quirk
+%patch2204 -p1
 
 
 # ACPI patches
@@ -2041,6 +2044,7 @@
 * Mon Feb 26 2007 Dave Jones <davej at redhat.com>
 - Fix up radeonfb backlight.
 - Revert forcedeth changes so that it works again.
+- Add ia64 ata quirk.
 
 * Sun Feb 25 2007 David Woodhouse <dwmw2 at redhat.com>
 - Revert commit 8d610dd52dd1da696e199e4b4545f33a2a5de5c6 which moved




More information about the fedora-cvs-commits mailing list