rpms/kernel/devel linux-2.6-libata-sff-pci_iomap-bug.patch, NONE, 1.1 kernel-2.6.spec, 1.3132, 1.3133 linux-2.6-libata-debug.patch, 1.2, NONE
Dave Jones (davej)
fedora-extras-commits at redhat.com
Fri May 4 04:03:00 UTC 2007
Author: davej
Update of /cvs/pkgs/rpms/kernel/devel
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv14390
Modified Files:
kernel-2.6.spec
Added Files:
linux-2.6-libata-sff-pci_iomap-bug.patch
Removed Files:
linux-2.6-libata-debug.patch
Log Message:
libata-sff: Undo bug introduced with pci_iomap changes
linux-2.6-libata-sff-pci_iomap-bug.patch:
--- NEW FILE linux-2.6-libata-sff-pci_iomap-bug.patch ---
Subject: [PATCH] libata-sff: Undo bug introduced with pci_iomap changes
If you have a controller with one channel disabled and unmapped the new
iomap code blindly tries to iomap unconfigured BARs. Later on the code
does the right thing and checks for unmapped bars but it is done in the
wrong order
Reorder the checks and make the iomap conditional
Tejun: I think the code below is now correct but would appreciate you
giving it a review.
Signed-off-by: Alan Cox <alan at redhat.com>
--- 1/drivers/ata/libata-sff.c~ 2007-05-01 12:03:39.634876384 +0100
+++ 2/drivers/ata/libata-sff.c 2007-05-01 12:03:39.634876384 +0100
@@ -557,12 +557,30 @@
int i, p = 0;
void __iomem * const *iomap;
+ /* Discard disabled ports. Some controllers show their
+ unused channels this way */
+ if (ata_resources_present(pdev, 0) == 0)
+ ports &= ~ATA_PORT_PRIMARY;
+ if (ata_resources_present(pdev, 1) == 0)
+ ports &= ~ATA_PORT_SECONDARY;
+
/* iomap BARs */
- for (i = 0; i < 4; i++) {
- if (pcim_iomap(pdev, i, 0) == NULL) {
- dev_printk(KERN_ERR, &pdev->dev,
- "failed to iomap PCI BAR %d\n", i);
- return NULL;
+ if (ports & ATA_PORT_PRIMARY) {
+ for (i = 0; i <= 1; i++) {
+ if (pcim_iomap(pdev, i, 0) == NULL) {
+ dev_printk(KERN_ERR, &pdev->dev,
+ "failed to iomap PCI BAR %d\n", i);
+ return NULL;
+ }
+ }
+ }
+ if (ports & ATA_PORT_SECONDARY) {
+ for (i = 2; i <= 3; i++) {
+ if (pcim_iomap(pdev, i, 0) == NULL) {
+ dev_printk(KERN_ERR, &pdev->dev,
+ "failed to iomap PCI BAR %d\n", i);
+ return NULL;
+ }
}
}
@@ -577,13 +595,6 @@
probe_ent->irq = pdev->irq;
probe_ent->irq_flags = IRQF_SHARED;
- /* Discard disabled ports. Some controllers show their
- unused channels this way */
- if (ata_resources_present(pdev, 0) == 0)
- ports &= ~ATA_PORT_PRIMARY;
- if (ata_resources_present(pdev, 1) == 0)
- ports &= ~ATA_PORT_SECONDARY;
-
if (ports & ATA_PORT_PRIMARY) {
probe_ent->port[p].cmd_addr = iomap[0];
probe_ent->port[p].altstatus_addr =
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo at vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Index: kernel-2.6.spec
===================================================================
RCS file: /cvs/pkgs/rpms/kernel/devel/kernel-2.6.spec,v
retrieving revision 1.3132
retrieving revision 1.3133
diff -u -r1.3132 -r1.3133
--- kernel-2.6.spec 4 May 2007 01:34:39 -0000 1.3132
+++ kernel-2.6.spec 4 May 2007 04:02:24 -0000 1.3133
@@ -594,7 +594,7 @@
Patch2201: linux-2.6-libata-hpa.patch
Patch2202: linux-2.6-libata-sata_nv-adma.patch
Patch2204: linux-2.6-ata-quirk.patch
-Patch2205: linux-2.6-libata-debug.patch
+Patch2205: linux-2.6-libata-sff-pci_iomap-bug.patch
# Wireless bits
Patch2300: linux-2.6-wireless.patch
@@ -1344,8 +1344,8 @@
# libata: don't initialize sg in ata_exec_internal() if DMA_NONE
# ia64 ata quirk
%patch2204 -p1
-# Make libata debugging info runtime selectable.
-#%patch2205 -p1
+# libata-sff: Undo bug introduced with pci_iomap changes
+%patch2205 -p1
# Add critical wireless updates from 2.6.22
%patch2300 -p1
@@ -2336,6 +2336,9 @@
%endif
%changelog
+* Thu May 03 2007 Dave Jones <davej at redhat.com>
+- libata-sff: Undo bug introduced with pci_iomap changes
+
* Thu May 03 2007 John W. Linville <linville at redhat.com>
- Add a locking fix to benefit rt2x00
--- linux-2.6-libata-debug.patch DELETED ---
More information about the fedora-extras-commits
mailing list