Messages in this thread Patch in this message | | | Subject | Re: Buslogic problem in 2.3.13 | Date | Tue, 10 Aug 1999 14:33:34 +0100 (BST) | From | Alan Cox <> |
| |
> In kernels 2.3.13-pre8 and 2.3.13 (possibly earlier) a bug was introduced > in the Buslogic.c module. The variable PCI_Device->resource[0] is 1 less > than it should be, and thus the check of (BaseAddress0 & > PCI_BASE_ADDRESS_SPACE) fails. I've worked around it by adding 1 to the > variable PCI_Device->resource[0], but that is not the best way.
The changes to buslogic.c are incorrect. You want these instead I think:
diff -u --new-file --recursive --exclude-from ../exclude linux.13p8/drivers/scsi/BusLogic.c linux.ac/drivers/scsi/BusLogic.c --- linux.13p8/drivers/scsi/BusLogic.c Sat Aug 7 17:56:30 1999 +++ linux.ac/drivers/scsi/BusLogic.c Sat Aug 7 18:16:58 1999 @@ -783,12 +783,10 @@ unsigned int IRQ_Channel = PCI_Device->irq; unsigned long BaseAddress0 = PCI_Device->resource[0].start; unsigned long BaseAddress1 = PCI_Device->resource[1].start; - BusLogic_IO_Address_T IO_Address = - BaseAddress0 & PCI_BASE_ADDRESS_IO_MASK; - BusLogic_PCI_Address_T PCI_Address = - BaseAddress1 & PCI_BASE_ADDRESS_MEM_MASK; - if ((BaseAddress0 & PCI_BASE_ADDRESS_SPACE) - != PCI_BASE_ADDRESS_SPACE_IO) + BusLogic_IO_Address_T IO_Address = BaseAddress0; + BusLogic_PCI_Address_T PCI_Address = BaseAddress1; + + if (!(PCI_Device->resource[0].flags & PCI_BASE_ADDRESS_SPACE_IO)) { BusLogic_Error("BusLogic: Base Address0 0x%X not I/O for " "MultiMaster Host Adapter\n", NULL, BaseAddress0); @@ -796,8 +794,7 @@ NULL, Bus, Device, IO_Address); continue; } - if ((BaseAddress1 & PCI_BASE_ADDRESS_SPACE) - != PCI_BASE_ADDRESS_SPACE_MEMORY) + if (PCI_Device->resource[1].flags & PCI_BASE_ADDRESS_SPACE_IO) { BusLogic_Error("BusLogic: Base Address1 0x%X not Memory for " "MultiMaster Host Adapter\n", NULL, BaseAddress1); @@ -986,8 +983,8 @@ unsigned char Bus = PCI_Device->bus->number; unsigned char Device = PCI_Device->devfn >> 3; unsigned int IRQ_Channel = PCI_Device->irq; - BusLogic_IO_Address_T IO_Address = - PCI_Device->resource[0].start & PCI_BASE_ADDRESS_IO_MASK; + BusLogic_IO_Address_T IO_Address = PCI_Device->resource[0].start; + if (IO_Address == 0 || IRQ_Channel == 0) continue; for (i = 0; i < BusLogic_ProbeInfoCount; i++) { @@ -1032,13 +1029,10 @@ unsigned int IRQ_Channel = PCI_Device->irq; unsigned long BaseAddress0 = PCI_Device->resource[0].start; unsigned long BaseAddress1 = PCI_Device->resource[1].start; - BusLogic_IO_Address_T IO_Address = - BaseAddress0 & PCI_BASE_ADDRESS_IO_MASK; - BusLogic_PCI_Address_T PCI_Address = - BaseAddress1 & PCI_BASE_ADDRESS_MEM_MASK; + BusLogic_IO_Address_T IO_Address = BaseAddress0; + BusLogic_PCI_Address_T PCI_Address = BaseAddress1; #ifndef CONFIG_SCSI_OMIT_FLASHPOINT - if ((BaseAddress0 & PCI_BASE_ADDRESS_SPACE) - != PCI_BASE_ADDRESS_SPACE_IO) + if (!(PCI_Device->resource[0].flags & PCI_BASE_ADDRESS_SPACE_IO)) { BusLogic_Error("BusLogic: Base Address0 0x%X not I/O for " "FlashPoint Host Adapter\n", NULL, BaseAddress0); @@ -1046,8 +1040,7 @@ NULL, Bus, Device, IO_Address); continue; } - if ((BaseAddress1 & PCI_BASE_ADDRESS_SPACE) - != PCI_BASE_ADDRESS_SPACE_MEMORY) + if (PCI_Device->resource[1].flags & PCI_BASE_ADDRESS_SPACE_IO) { BusLogic_Error("BusLogic: Base Address1 0x%X not Memory for " "FlashPoint Host Adapter\n", NULL, BaseAddress1); - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/
| |