Skip to contentSkip to conversation

de214x.c uses uninitialized pci_dev->irq

PATCH Applied Bjorn Helgaas 2 participants 2 messages Feb 7, 2005 – Feb 11, 2005 Network drivers

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 de214x.c uses uninitialized pci_dev->irq

Don't use pci_dev->irq until after pci_enable_device(). Andy Esten reported that his NIC stopped working in 2.6.10 because of this problem.

===== drivers/net/tulip/de2104x.c 1.33 vs edited =====

drivers/net/tulip/de2104x.c +2 -2
@@ -1958,8 +1958,6 @@
 	dev->tx_timeout = de_tx_timeout;
 	dev->watchdog_timeo = TX_TIMEOUT;
 
-	dev->irq = pdev->irq;
-
 	de = dev->priv;
 	de->de21040 = ent->driver_data == 0 ? 1 : 0;
 	de->pdev = pdev;
@@ -1994,6 +1992,8 @@
 		       pdev->irq, pci_name(pdev));
 		goto err_out_res;
 	}
+
+	dev->irq = pdev->irq;
 
 	/* obtain and check validity of PCI I/O address */
 	pciaddr = pci_resource_start(pdev, 1);