rpms/kernel-xen-2.6/F-7 linux-2.6-3w-9xxx-mem_len.patch, 1.1, 1.2 kernel-xen.spec, 1.51, 1.52
Eduardo Habkost (ehabkost)
fedora-extras-commits at redhat.com
Fri Sep 28 14:31:52 UTC 2007
- Previous message (by thread): rpms/tracker/F-7 .cvsignore, 1.6, 1.7 sources, 1.6, 1.7 tracker.spec, 1.14, 1.15 tracker-handler.py, 1.1, NONE
- Next message (by thread): rpms/whowatch/devel Makefile, 1.3, 1.4 sources, 1.4, 1.5 whowatch-1.4.patch, NONE, 1.1 whowatch.spec, 1.10, 1.11 dead.package, 1.1, NONE
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Author: ehabkost
Update of /cvs/pkgs/rpms/kernel-xen-2.6/F-7
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv23565
Modified Files:
kernel-xen.spec
Added Files:
linux-2.6-3w-9xxx-mem_len.patch
Log Message:
Fix 3w-9xxx to use PCI resources properly and work under Xen (bug #309611)
(merge from CVS branch private-ehabkost-bz309611-test-branch)
linux-2.6-3w-9xxx-mem_len.patch:
Index: linux-2.6-3w-9xxx-mem_len.patch
===================================================================
RCS file: linux-2.6-3w-9xxx-mem_len.patch
diff -N linux-2.6-3w-9xxx-mem_len.patch
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ linux-2.6-3w-9xxx-mem_len.patch 28 Sep 2007 14:31:49 -0000 1.2
@@ -0,0 +1,52 @@
+From: Eduardo Habkost <ehabkost at redhat.com>
+Date: Thu, 27 Sep 2007 18:37:44 -0300
+Subject: 3w-9xxx: use PCI resource lenght correctly
+
+Trying to ioremap() a larger area than pci_resource_len()
+may fail (e.g. under Xen). Fixes 3w-9xxx to use pci_resource_len()
+as length parameter to ioremap() instead of PAGE_SIZE.
+
+Signed-off-by: Eduardo Habkost <ehabkost at redhat.com>
+---
+Index: linux-2.6.20.i386/drivers/scsi/3w-9xxx.c
+===================================================================
+--- linux-2.6.20.i386.orig/drivers/scsi/3w-9xxx.c
++++ linux-2.6.20.i386/drivers/scsi/3w-9xxx.c
+@@ -2052,7 +2052,8 @@ static int __devinit twa_probe(struct pc
+ {
+ struct Scsi_Host *host = NULL;
+ TW_Device_Extension *tw_dev;
+- u32 mem_addr;
++ int bar;
++ unsigned long mem_addr, mem_len;
+ int retval = -ENODEV;
+
+ retval = pci_enable_device(pdev);
+@@ -2096,12 +2097,15 @@ static int __devinit twa_probe(struct pc
+ }
+
+ if (pdev->device == PCI_DEVICE_ID_3WARE_9000)
+- mem_addr = pci_resource_start(pdev, 1);
++ bar = 1;
+ else
+- mem_addr = pci_resource_start(pdev, 2);
++ bar = 2;
++
++ mem_addr = pci_resource_start(pdev, bar);
++ mem_len = pci_resource_len(pdev, bar);
+
+ /* Save base address */
+- tw_dev->base_addr = ioremap(mem_addr, PAGE_SIZE);
++ tw_dev->base_addr = ioremap(mem_addr, mem_len);
+ if (!tw_dev->base_addr) {
+ TW_PRINTK(tw_dev->host, TW_DRIVER, 0x35, "Failed to ioremap");
+ goto out_release_mem_region;
+@@ -2135,7 +2139,7 @@ static int __devinit twa_probe(struct pc
+
+ pci_set_drvdata(pdev, host);
+
+- printk(KERN_WARNING "3w-9xxx: scsi%d: Found a 3ware 9000 Storage Controller at 0x%x, IRQ: %d.\n",
++ printk(KERN_WARNING "3w-9xxx: scsi%d: Found a 3ware 9000 Storage Controller at 0x%lx, IRQ: %d.\n",
+ host->host_no, mem_addr, pdev->irq);
+ printk(KERN_WARNING "3w-9xxx: scsi%d: Firmware %s, BIOS %s, Ports: %d.\n",
+ host->host_no,
Index: kernel-xen.spec
===================================================================
RCS file: /cvs/pkgs/rpms/kernel-xen-2.6/F-7/kernel-xen.spec,v
retrieving revision 1.51
retrieving revision 1.52
diff -u -r1.51 -r1.52
--- kernel-xen.spec 27 Sep 2007 16:15:48 -0000 1.51
+++ kernel-xen.spec 28 Sep 2007 14:31:49 -0000 1.52
@@ -442,6 +442,7 @@
# SCSI bits.
Patch1106: linux-2.6-scsi-cpqarray-set-master.patch
+Patch1107: linux-2.6-3w-9xxx-mem_len.patch
# NFS bits.
Patch1200: linux-2.6-NFSD-ctlbits.patch
@@ -1002,6 +1003,9 @@
# fix cpqarray pci enable
%patch1106 -p1
+# Fix 3w-9xxx to use PCI resource length correctly (bug #309611)
+%patch1107 -p1
+
#
# Various NFS/NFSD fixes.
#
@@ -2072,6 +2076,9 @@
# - tux.
%changelog
+* Thu Sep 27 2007 Eduardo Habkost <ehabkost at redhat.com>
+- Fix 3w-9xxx to use PCI resources properly and work under Xen (bug #309611)
+
* Wed Sep 26 2007 Eduardo Habkost <ehabkost at redhat.com>
- Disabled Firewire stack on i686 also. It is not supported
by current Xen swiotlb implementation (bug #302471)
- Previous message (by thread): rpms/tracker/F-7 .cvsignore, 1.6, 1.7 sources, 1.6, 1.7 tracker.spec, 1.14, 1.15 tracker-handler.py, 1.1, NONE
- Next message (by thread): rpms/whowatch/devel Makefile, 1.3, 1.4 sources, 1.4, 1.5 whowatch-1.4.patch, NONE, 1.1 whowatch.spec, 1.10, 1.11 dead.package, 1.1, NONE
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the fedora-extras-commits
mailing list