[PATCH] Hamachi not doing pci_enable before reading resources

©[@ÄØÿ¿8þÿ¿Xuan Baldauf (davej@suse.de)
Wed, 7 Feb 2001 19:17:43 +0000 (GMT)


Hi Alan,

Another driver not doing pci_enable_device() early enough.

Dave.

-- 
| Dave Jones.        http://www.suse.de/~davej
| SuSE Labs

diff -urN --exclude-from=/home/davej/.exclude linux/drivers/net/hamachi.c linux-dj/drivers/net/hamachi.c --- linux/drivers/net/hamachi.c Wed Feb 7 12:42:39 2001 +++ linux-dj/drivers/net/hamachi.c Wed Feb 7 19:09:31 2001 @@ -562,13 +562,14 @@ if (hamachi_debug > 0 && did_version++ == 0) printk(version);

+ if (pci_enable_device(pdev)) + return -EIO; + ioaddr = pci_resource_start(pdev, 0); #ifdef __alpha__ /* Really "64 bit addrs" */ ioaddr |= (pci_resource_start(pdev, 1) << 32); #endif

- if (pci_enable_device(pdev)) - return -EIO; pci_set_master(pdev);

ioaddr = (long) ioremap(ioaddr, 0x400);

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