[PATCH] de214x.c uses uninitialized pci_dev->irq

From: Bjorn Helgaas
Date: Mon Feb 07 2005 - 13:51:45 EST


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.

Signed-off-by: Bjorn Helgaas <bjorn.helgaas@xxxxxx>

===== drivers/net/tulip/de2104x.c 1.33 vs edited =====
--- 1.33/drivers/net/tulip/de2104x.c 2004-10-25 19:04:30 -06:00
+++ edited/drivers/net/tulip/de2104x.c 2005-02-07 09:51:57 -07:00
@@ -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);


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/