diff -urN /mnt/disk/linux/drivers/net/82596.c /linux/drivers/net/82596.c --- /mnt/disk/linux/drivers/net/82596.c Thu Nov 2 22:01:06 2000 +++ /linux/drivers/net/82596.c Wed Nov 8 23:42:42 2000 @@ -1093,7 +1093,7 @@ int i; struct i596_private *lp; char eth_addr[6]; - static int probed = 0; + static int probed; if (probed) return -ENODEV; @@ -1131,9 +1131,9 @@ /* this is easy the ethernet interface can only be at 0x300 */ /* first check nothing is already registered here */ - if (check_region(ioaddr, I596_TOTAL_SIZE)) { + if (!request_region(ioaddr, I596_TOTAL_SIZE, dev->name)) { printk("82596: IO address 0x%04x in use\n", ioaddr); - return -ENODEV; + return -EBUSY; } for (i = 0; i < 8; i++) { @@ -1145,17 +1145,14 @@ some machines have 0x100, some 0x200. The DOS driver doesn't even bother with the checksum */ - if (checksum % 0x100) - return -ENODEV; - /* Some other boards trip the checksum.. but then appear as * ether address 0. Trap these - AC */ - if (memcmp(eth_addr, "\x00\x00\x49", 3) != 0) - return -ENODEV; - - if (!request_region(ioaddr, I596_TOTAL_SIZE, "i596")) + if ((checksum % 0x100) || + (memcmp(eth_addr, "\x00\x00\x49", 3) != 0)) { + release_region(ioaddr, I596_TOTAL_SIZE); return -ENODEV; + } dev->base_addr = ioaddr; dev->irq = 10;