Hi Alan,

I just checked the sym/ncr drivers of 2.3.14-pre2. The ncr53c8xx driver
changes for the new resource stuff are not ok, but the sym53c8xx driver
seems fine.

Below is the fix for the ncr53c8xx driver. Basically, it fixes the BAR 
reading, particularly for the 896 which uses 64 bit BARs and removes  
the paranoid testing of other BAR flags (which are hardwired for all 
53c8xx chips in fact, and the driver should never have cared about).

I have tested a bit the both drivers using a 896 (64bit + on-chip RAM),
895 (32bit + on-chip RAM) and a 810a (32bit, no RAM) and all seem to work
fine now.

  G�rard.

This patch is against linux-2.3.14-pre2:

--- linux/drivers/scsi/ncr53c8xx.c.ORIG Wed Aug 18 14:46:29 1999
+++ linux/drivers/scsi/ncr53c8xx.c      Wed Aug 18 15:06:30 1999
@@ -9578,8 +9578,10 @@
 static int __init 
 pci_get_base_address(struct pci_dev *pdev, int index, u_long *base)
 {
-       *base = pdev->resource[++index].start;
-       return index;
+       *base = pdev->resource[index].start;
+       if ((pdev->resource[index].flags & 0x7) == 0x4)
+               ++index;
+       return ++index;
 }
 
 /*
@@ -9807,27 +9809,17 @@
 
        /*
         * Check availability of IO space, memory space and master capability.
+        * No need to test BARs flags since they are hardwired to the 
+        * expected value.
         */
        if (command & PCI_COMMAND_IO) { 
-               if ((io_port & 3) != 1) {
-                       printk("ncr53c8xx: disabling I/O mapping since base address 0 
(0x%x)\n"
-                               "           bits 0..1 indicate a non-IO mapping\n", 
(int) io_port);
-                       io_port = 0;
-               }
-               else
-                       io_port &= PCI_BASE_ADDRESS_IO_MASK;
+               io_port &= PCI_BASE_ADDRESS_IO_MASK;
        }
        else
                io_port = 0;
 
        if (command & PCI_COMMAND_MEMORY) {
-               if ((base & PCI_BASE_ADDRESS_SPACE) != PCI_BASE_ADDRESS_SPACE_MEMORY) {
-                       printk("ncr53c8xx: disabling memory mapping since base address 
1\n"
-                               "            contains a non-memory mapping\n");
-                       base = 0;
-               }
-               else 
-                       base &= PCI_BASE_ADDRESS_MEM_MASK;
+               base &= PCI_BASE_ADDRESS_MEM_MASK;
        }
        else
                base = 0;
------------------------- CUT HERE --------------------------



-
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to [EMAIL PROTECTED]

Reply via email to