]> git.neil.brown.name Git - history.git/commitdiff
[PATCH] DAC960: Don't look at PCI_Device->irq before calling pci_enable_device().
authorBjorn Helgaas <bjorn.helgaas@hp.com>
Thu, 2 Dec 2004 00:33:06 +0000 (16:33 -0800)
committerLinus Torvalds <torvalds@ppc970.osdl.org>
Thu, 2 Dec 2004 00:33:06 +0000 (16:33 -0800)
The DAC960 driver looks at PCI_Device->irq before calling
pci_enable_device(), which means it requests the wrong IRQ and hangs.
This fixes it.

Thanks to Johannes Rommel for reporting the problem and testing the fix.

Signed-off-by: Bjorn Helgaas <bjorn.helgaas@hp.com>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
drivers/block/DAC960.c

index 48c3e6399b6633482a8dfde59a982f287f5c8936..9d28e25fcc9edc67f747ceacc32aaacb463d4269 100644 (file)
@@ -2678,7 +2678,7 @@ DAC960_DetectController(struct pci_dev *PCI_Device,
   DAC960_Controller_T *Controller = NULL;
   unsigned char DeviceFunction = PCI_Device->devfn;
   unsigned char ErrorStatus, Parameter0, Parameter1;
-  unsigned int IRQ_Channel = PCI_Device->irq;
+  unsigned int IRQ_Channel;
   void __iomem *BaseAddress;
   int i;
 
@@ -2958,6 +2958,7 @@ DAC960_DetectController(struct pci_dev *PCI_Device,
   /*
      Acquire shared access to the IRQ Channel.
   */
+  IRQ_Channel = PCI_Device->irq;
   if (request_irq(IRQ_Channel, InterruptHandler, SA_SHIRQ,
                      Controller->FullModelName, Controller) < 0)
   {