aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/lance.c
diff options
context:
space:
mode:
authorAndrea Bastoni <bastoni@cs.unc.edu>2010-05-30 19:16:45 -0400
committerAndrea Bastoni <bastoni@cs.unc.edu>2010-05-30 19:16:45 -0400
commitada47b5fe13d89735805b566185f4885f5a3f750 (patch)
tree644b88f8a71896307d71438e9b3af49126ffb22b /drivers/net/lance.c
parent43e98717ad40a4ae64545b5ba047c7b86aa44f4f (diff)
parent3280f21d43ee541f97f8cda5792150d2dbec20d5 (diff)
Merge branch 'wip-2.6.34' into old-private-masterarchived-private-master
Diffstat (limited to 'drivers/net/lance.c')
-rw-r--r--drivers/net/lance.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/drivers/net/lance.c b/drivers/net/lance.c
index dcda30338b65..7b9447646f8a 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 */
@@ -755,7 +755,7 @@ lance_open(struct net_device *dev)
755 int i; 755 int i;
756 756
757 if (dev->irq == 0 || 757 if (dev->irq == 0 ||
758 request_irq(dev->irq, &lance_interrupt, 0, lp->name, dev)) { 758 request_irq(dev->irq, lance_interrupt, 0, lp->name, dev)) {
759 return -EAGAIN; 759 return -EAGAIN;
760 } 760 }
761 761
@@ -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
@@ -1288,7 +1288,7 @@ static void set_multicast_list(struct net_device *dev)
1288 } else { 1288 } else {
1289 short multicast_table[4]; 1289 short multicast_table[4];
1290 int i; 1290 int i;
1291 int num_addrs=dev->mc_count; 1291 int num_addrs=netdev_mc_count(dev);
1292 if(dev->flags&IFF_ALLMULTI) 1292 if(dev->flags&IFF_ALLMULTI)
1293 num_addrs=1; 1293 num_addrs=1;
1294 /* FIXIT: We don't use the multicast table, but rely on upper-layer filtering. */ 1294 /* FIXIT: We don't use the multicast table, but rely on upper-layer filtering. */