aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/eepro.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2010-03-02 10:55:08 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2010-03-02 10:55:08 -0500
commit6d6b89bd2e316b78d668f761d380837b81fa71ef (patch)
tree7e63c58611fc6181153526abbdafdd846ed1a19d /drivers/net/eepro.c
parent13dda80e48439b446d0bc9bab34b91484bc8f533 (diff)
parent2507c05ff55fbf38326b08ed27eaed233bc75042 (diff)
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next-2.6: (1341 commits) virtio_net: remove forgotten assignment be2net: fix tx completion polling sis190: fix cable detect via link status poll net: fix protocol sk_buff field bridge: Fix build error when IGMP_SNOOPING is not enabled bnx2x: Tx barriers and locks scm: Only support SCM_RIGHTS on unix domain sockets. vhost-net: restart tx poll on sk_sndbuf full vhost: fix get_user_pages_fast error handling vhost: initialize log eventfd context pointer vhost: logging thinko fix wireless: convert to use netdev_for_each_mc_addr ethtool: do not set some flags, if others failed ipoib: returned back addrlen check for mc addresses netlink: Adding inode field to /proc/net/netlink axnet_cs: add new id bridge: Make IGMP snooping depend upon BRIDGE. bridge: Add multicast count/interval sysfs entries bridge: Add hash elasticity/max sysfs entries bridge: Add multicast_snooping sysfs toggle ... Trivial conflicts in Documentation/feature-removal-schedule.txt
Diffstat (limited to 'drivers/net/eepro.c')
-rw-r--r--drivers/net/eepro.c21
1 files changed, 10 insertions, 11 deletions
diff --git a/drivers/net/eepro.c b/drivers/net/eepro.c
index 94c59498cdb6..1b05bdf62c3c 100644
--- a/drivers/net/eepro.c
+++ b/drivers/net/eepro.c
@@ -1287,9 +1287,10 @@ set_multicast_list(struct net_device *dev)
1287 struct eepro_local *lp = netdev_priv(dev); 1287 struct eepro_local *lp = netdev_priv(dev);
1288 short ioaddr = dev->base_addr; 1288 short ioaddr = dev->base_addr;
1289 unsigned short mode; 1289 unsigned short mode;
1290 struct dev_mc_list *dmi=dev->mc_list; 1290 struct dev_mc_list *dmi;
1291 int mc_count = netdev_mc_count(dev);
1291 1292
1292 if (dev->flags&(IFF_ALLMULTI|IFF_PROMISC) || dev->mc_count > 63) 1293 if (dev->flags&(IFF_ALLMULTI|IFF_PROMISC) || mc_count > 63)
1293 { 1294 {
1294 eepro_sw2bank2(ioaddr); /* be CAREFUL, BANK 2 now */ 1295 eepro_sw2bank2(ioaddr); /* be CAREFUL, BANK 2 now */
1295 mode = inb(ioaddr + REG2); 1296 mode = inb(ioaddr + REG2);
@@ -1299,7 +1300,7 @@ set_multicast_list(struct net_device *dev)
1299 eepro_sw2bank0(ioaddr); /* Return to BANK 0 now */ 1300 eepro_sw2bank0(ioaddr); /* Return to BANK 0 now */
1300 } 1301 }
1301 1302
1302 else if (dev->mc_count==0 ) 1303 else if (mc_count == 0)
1303 { 1304 {
1304 eepro_sw2bank2(ioaddr); /* be CAREFUL, BANK 2 now */ 1305 eepro_sw2bank2(ioaddr); /* be CAREFUL, BANK 2 now */
1305 mode = inb(ioaddr + REG2); 1306 mode = inb(ioaddr + REG2);
@@ -1329,12 +1330,10 @@ set_multicast_list(struct net_device *dev)
1329 outw(MC_SETUP, ioaddr + IO_PORT); 1330 outw(MC_SETUP, ioaddr + IO_PORT);
1330 outw(0, ioaddr + IO_PORT); 1331 outw(0, ioaddr + IO_PORT);
1331 outw(0, ioaddr + IO_PORT); 1332 outw(0, ioaddr + IO_PORT);
1332 outw(6*(dev->mc_count + 1), ioaddr + IO_PORT); 1333 outw(6 * (mc_count + 1), ioaddr + IO_PORT);
1333 1334
1334 for (i = 0; i < dev->mc_count; i++) 1335 netdev_for_each_mc_addr(dmi, dev) {
1335 { 1336 eaddrs = (unsigned short *) dmi->dmi_addr;
1336 eaddrs=(unsigned short *)dmi->dmi_addr;
1337 dmi=dmi->next;
1338 outw(*eaddrs++, ioaddr + IO_PORT); 1337 outw(*eaddrs++, ioaddr + IO_PORT);
1339 outw(*eaddrs++, ioaddr + IO_PORT); 1338 outw(*eaddrs++, ioaddr + IO_PORT);
1340 outw(*eaddrs++, ioaddr + IO_PORT); 1339 outw(*eaddrs++, ioaddr + IO_PORT);
@@ -1348,7 +1347,7 @@ set_multicast_list(struct net_device *dev)
1348 outb(MC_SETUP, ioaddr); 1347 outb(MC_SETUP, ioaddr);
1349 1348
1350 /* Update the transmit queue */ 1349 /* Update the transmit queue */
1351 i = lp->tx_end + XMT_HEADER + 6*(dev->mc_count + 1); 1350 i = lp->tx_end + XMT_HEADER + 6 * (mc_count + 1);
1352 1351
1353 if (lp->tx_start != lp->tx_end) 1352 if (lp->tx_start != lp->tx_end)
1354 { 1353 {
@@ -1380,8 +1379,8 @@ set_multicast_list(struct net_device *dev)
1380 break; 1379 break;
1381 } else if ((i & 0x0f) == 0x03) { /* MC-Done */ 1380 } else if ((i & 0x0f) == 0x03) { /* MC-Done */
1382 printk(KERN_DEBUG "%s: set Rx mode to %d address%s.\n", 1381 printk(KERN_DEBUG "%s: set Rx mode to %d address%s.\n",
1383 dev->name, dev->mc_count, 1382 dev->name, mc_count,
1384 dev->mc_count > 1 ? "es":""); 1383 mc_count > 1 ? "es":"");
1385 break; 1384 break;
1386 } 1385 }
1387 } 1386 }