rpms/kernel/FC-3 linux-2.6-scsi-aic-dma39bit.patch, NONE, 1.1 kernel-2.6.spec, 1.876, 1.877

fedora-cvs-commits at redhat.com fedora-cvs-commits at redhat.com
Mon Sep 5 06:49:10 UTC 2005


Author: davej

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

Modified Files:
	kernel-2.6.spec 
Added Files:
	linux-2.6-scsi-aic-dma39bit.patch 
Log Message:
Fix aic7xxx issue with >4GB. (#167049)



linux-2.6-scsi-aic-dma39bit.patch:
 b/drivers/scsi/aic7xxx/aic7xxx_osm.h            |    2 --
 b/drivers/scsi/aic7xxx/aic7xxx_osm_pci.c        |    8 +++++---
 linux-2.6.12/drivers/scsi/aic7xxx/aic7xxx_osm.c |    9 ---------
 3 files changed, 5 insertions(+), 14 deletions(-)

--- NEW FILE linux-2.6-scsi-aic-dma39bit.patch ---

This patch moves aic7xxx over to the dma_get_required_mask() API and
dumps its open coded memory check.

It also appears from this bug:

https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=167049

That 39 bit addressing doesn't work on older cards.  I surmise that the
AHC_LARGE_SCBS flag is the one that marks cards capable of using 39 bit
addressing, so I also folded that check into the code.

Luben, since you have access to the docs, could you confirm this guess.

Dave, could you see if this fixes the problem for the bug reporter.

James

--- linux-2.6.12/drivers/scsi/aic7xxx/aic7xxx_osm.c~	2005-09-05 02:38:54.000000000 -0400
+++ linux-2.6.12/drivers/scsi/aic7xxx/aic7xxx_osm.c	2005-09-05 02:39:11.000000000 -0400
@@ -1207,15 +1207,6 @@ ahc_linux_register_host(struct ahc_softc
 	return (0);
 }
 
-uint64_t
-ahc_linux_get_memsize(void)
-{
-	struct sysinfo si;
-
-	si_meminfo(&si);
-	return ((uint64_t)si.totalram << PAGE_SHIFT);
-}
-
 /*
  * Find the smallest available unit number to use
  * for a new device.  We don't just use a static
diff --git a/drivers/scsi/aic7xxx/aic7xxx_osm.h b/drivers/scsi/aic7xxx/aic7xxx_osm.h
--- a/drivers/scsi/aic7xxx/aic7xxx_osm.h
+++ b/drivers/scsi/aic7xxx/aic7xxx_osm.h
@@ -494,8 +494,6 @@ ahc_insb(struct ahc_softc * ahc, long po
 int		ahc_linux_register_host(struct ahc_softc *,
 					struct scsi_host_template *);
 
-uint64_t	ahc_linux_get_memsize(void);
-
 /*************************** Pretty Printing **********************************/
 struct info_str {
 	char *buffer;
diff --git a/drivers/scsi/aic7xxx/aic7xxx_osm_pci.c b/drivers/scsi/aic7xxx/aic7xxx_osm_pci.c
--- a/drivers/scsi/aic7xxx/aic7xxx_osm_pci.c
+++ b/drivers/scsi/aic7xxx/aic7xxx_osm_pci.c
@@ -180,6 +180,7 @@ ahc_linux_pci_dev_probe(struct pci_dev *
 	struct		 ahc_pci_identity *entry;
 	char		*name;
 	int		 error;
+	struct device	*dev = &pdev->dev;
 
 	pci = pdev;
 	entry = ahc_find_pci_device(pci);
@@ -209,11 +210,12 @@ ahc_linux_pci_dev_probe(struct pci_dev *
 	pci_set_master(pdev);
 
 	if (sizeof(dma_addr_t) > 4
-	 && ahc_linux_get_memsize() > 0x80000000
-	 && pci_set_dma_mask(pdev, mask_39bit) == 0) {
+	    && ahc->features & AHC_LARGE_SCBS
+	    && dma_set_mask(dev, mask_39bit) == 0
+	    && dma_get_required_mask(dev) > DMA_32BIT_MASK) {
 		ahc->flags |= AHC_39BIT_ADDRESSING;
 	} else {
-		if (pci_set_dma_mask(pdev, DMA_32BIT_MASK)) {
+		if (dma_set_mask(dev, DMA_32BIT_MASK)) {
 			printk(KERN_WARNING "aic7xxx: No suitable DMA available.\n");
                 	return (-ENODEV);
 		}



Index: kernel-2.6.spec
===================================================================
RCS file: /cvs/dist/rpms/kernel/FC-3/kernel-2.6.spec,v
retrieving revision 1.876
retrieving revision 1.877
diff -u -r1.876 -r1.877
--- kernel-2.6.spec	3 Sep 2005 01:20:47 -0000	1.876
+++ kernel-2.6.spec	5 Sep 2005 06:49:08 -0000	1.877
@@ -262,6 +262,7 @@
 Patch1103: linux-2.6.12-scsi-blacklist.patch
 Patch1104: linux-2.6.12-scsicam-geom-fix.patch
 Patch1105: linux-2.6-scsi-sym2-alloc_lcb_tags-atomic.patch
+Patch1106: linux-2.6-scsi-aic-dma39bit.patch
 
 # NFS bits.
 Patch1200: linux-2.6.9-NFSD-non-null-getxattr.patch
@@ -561,6 +562,8 @@
 %patch1104 -p1
 # Fix up sleeping in invalid context in sym2 driver.
 %patch1105 -p1
+# Fix aic7xxx >4GB
+%patch1106 -p1
 
 #
 # Various upstream NFS/NFSD fixes.
@@ -999,6 +1002,9 @@
 %endif
 
 %changelog
+* Mon Sep  5 2005 Dave Jones <davej at redhat.com>
+- Fix aic7xxx issue with >4GB. (#167049)
+
 * Fri Sep  2 2005 Dave Jones <davej at redhat.com> [2.6.12-1.1377_FC3]
 - Various post 2.6.13 ACPI updates. (20050902)
 




More information about the fedora-cvs-commits mailing list