diff options
Diffstat (limited to 'drivers/net/lance.c')
-rw-r--r-- | drivers/net/lance.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/drivers/net/lance.c b/drivers/net/lance.c index 7b2c42992c35..8d7d3d4625f6 100644 --- a/drivers/net/lance.c +++ b/drivers/net/lance.c | |||
@@ -493,14 +493,14 @@ static int __init lance_probe1(struct net_device *dev, int ioaddr, int irq, int | |||
493 | static const short ioaddr_table[] = { 0x300, 0x320, 0x340, 0x360}; | 493 | static const short ioaddr_table[] = { 0x300, 0x320, 0x340, 0x360}; |
494 | int hp_port = (readl(bios + 1) & 1) ? 0x499 : 0x99; | 494 | int hp_port = (readl(bios + 1) & 1) ? 0x499 : 0x99; |
495 | /* We can have boards other than the built-in! Verify this is on-board. */ | 495 | /* We can have boards other than the built-in! Verify this is on-board. */ |
496 | if ((inb(hp_port) & 0xc0) == 0x80 | 496 | if ((inb(hp_port) & 0xc0) == 0x80 && |
497 | && ioaddr_table[inb(hp_port) & 3] == ioaddr) | 497 | ioaddr_table[inb(hp_port) & 3] == ioaddr) |
498 | hp_builtin = hp_port; | 498 | hp_builtin = hp_port; |
499 | } | 499 | } |
500 | iounmap(bios); | 500 | iounmap(bios); |
501 | /* We also recognize the HP Vectra on-board here, but check below. */ | 501 | /* We also recognize the HP Vectra on-board here, but check below. */ |
502 | hpJ2405A = (inb(ioaddr) == 0x08 && inb(ioaddr+1) == 0x00 | 502 | hpJ2405A = (inb(ioaddr) == 0x08 && inb(ioaddr+1) == 0x00 && |
503 | && inb(ioaddr+2) == 0x09); | 503 | inb(ioaddr+2) == 0x09); |
504 | 504 | ||
505 | /* Reset the LANCE. */ | 505 | /* Reset the LANCE. */ |
506 | reset_val = inw(ioaddr+LANCE_RESET); /* Reset the LANCE */ | 506 | reset_val = inw(ioaddr+LANCE_RESET); /* Reset the LANCE */ |
@@ -1035,8 +1035,8 @@ static irqreturn_t lance_interrupt(int irq, void *dev_id) | |||
1035 | spin_lock (&lp->devlock); | 1035 | spin_lock (&lp->devlock); |
1036 | 1036 | ||
1037 | outw(0x00, dev->base_addr + LANCE_ADDR); | 1037 | outw(0x00, dev->base_addr + LANCE_ADDR); |
1038 | while ((csr0 = inw(dev->base_addr + LANCE_DATA)) & 0x8600 | 1038 | while ((csr0 = inw(dev->base_addr + LANCE_DATA)) & 0x8600 && |
1039 | && --boguscnt >= 0) { | 1039 | --boguscnt >= 0) { |
1040 | /* Acknowledge all of the current interrupt sources ASAP. */ | 1040 | /* Acknowledge all of the current interrupt sources ASAP. */ |
1041 | outw(csr0 & ~0x004f, dev->base_addr + LANCE_DATA); | 1041 | outw(csr0 & ~0x004f, dev->base_addr + LANCE_DATA); |
1042 | 1042 | ||