Skip to contentSkip to conversation

drivers/scsi/BusLogic.c: No resource probing before pci_enable_device (241p11)

PATCH In review Rasmus Andersen 2 participants 2 messages Jan 29, 2001 – Jan 30, 2001

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 drivers/scsi/BusLogic.c: No resource probing before pci_enable_device (241p11)

Hi.

The following patch makes drivers/scsi/BusLogic.c wait with probing pdev->irq and pdev->resource[] until we call pci_enable_device. This is recommended due to hot-plug considerations (according to Jeff Garzik).

It applies against ac12 and 241p11.

Comments?

drivers/scsi/BusLogic.c +9 -5
@@ -770,15 +770,19 @@
       BusLogic_ModifyIOAddressRequest_T ModifyIOAddressRequest;
       unsigned char Bus = PCI_Device->bus->number;
       unsigned char Device = PCI_Device->devfn >> 3;
-      unsigned int IRQ_Channel = PCI_Device->irq;
-      unsigned long BaseAddress0 = pci_resource_start(PCI_Device, 0);
-      unsigned long BaseAddress1 = pci_resource_start(PCI_Device, 1);
-      BusLogic_IO_Address_T IO_Address = BaseAddress0;
-      BusLogic_PCI_Address_T PCI_Address = BaseAddress1;
+      unsigned int IRQ_Channel;
+      unsigned long BaseAddress0;
+      unsigned long BaseAddress1;
+      BusLogic_IO_Address_T IO_Address;
+      BusLogic_PCI_Address_T PCI_Address;
 
       if (pci_enable_device(PCI_Device))
       	continue;
       
+      IRQ_Channel = PCI_Device->irq;
+      IO_Address  = BaseAddress0 = pci_resource_start(PCI_Device, 0);
+      PCI_Address = BaseAddress1 = pci_resource_start(PCI_Device, 1);
+
       if (pci_resource_flags(PCI_Device, 0) & IORESOURCE_MEM)
 	{
 	  BusLogic_Error("BusLogic: Base Address0 0x%X not I/O for "
Signature · 10 lines
Regards,
        Rasmus([email protected])

"The obvious mathematical breakthrough would be development of an easy way
to factor large prime numbers." 
  -- Bill Gates, The Road Ahead, Viking Penguin (1995)
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
Please read the FAQ at http://www.tux.org/lkml/
#1 lore raw

Date: Mon, 29 Jan 2001 22:48:38 +0100
From: Rasmus Andersen <[email protected]>

The following patch makes drivers/scsi/BusLogic.c wait with probing pdev->irq and pdev->resource[] until we call pci_enable_device. This is recommended due to hot-plug considerations (according to Jeff Garzik).

It applies against ac12 and 241p11.

Comments?

At a quick glance it looks reasonable to me.

Leonard
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [email protected]
Please read the FAQ at http://www.tux.org/lkml/