Skip to contentSkip to conversation

fix DAC960 hang in 2.6.10-rc2

PATCH New Bjorn Helgaas 1 participant 1 message Dec 2, 2004 Block layer

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 fix DAC960 hang in 2.6.10-rc2

The DAC960 driver looks at PCI_Device->irq before calling pci_enable_device(), which means it requests the wrong IRQ and hangs. The attached patch fixes it.

Don't look at PCI_Device->irq until *after* calling pci_enable_device().

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

===== drivers/block/DAC960.c 1.74 vs edited =====

drivers/block/DAC960.c +2 -1
@@ -2678,7 +2678,7 @@
   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 @@
   /*
      Acquire shared access to the IRQ Channel.
   */
+  IRQ_Channel = PCI_Device->irq;
   if (request_irq(IRQ_Channel, InterruptHandler, SA_SHIRQ,
 		      Controller->FullModelName, Controller) < 0)
   {