diff options
author | Russell King <rmk+kernel@arm.linux.org.uk> | 2010-03-08 15:21:04 -0500 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2010-03-08 15:21:04 -0500 |
commit | 988addf82e4c03739375279de73929580a2d4a6a (patch) | |
tree | 989ae1cd4e264bbad80c65f04480486246e7b9f3 /drivers/net/amd8111e.c | |
parent | 004c1c7096659d352b83047a7593e91d8a30e3c5 (diff) | |
parent | 25cf84cf377c0aae5dbcf937ea89bc7893db5176 (diff) |
Merge branch 'origin' into devel-stable
Conflicts:
arch/arm/mach-mx2/devices.c
arch/arm/mach-mx2/devices.h
sound/soc/pxa/pxa-ssp.c
Diffstat (limited to 'drivers/net/amd8111e.c')
-rw-r--r-- | drivers/net/amd8111e.c | 21 |
1 files changed, 9 insertions, 12 deletions
diff --git a/drivers/net/amd8111e.c b/drivers/net/amd8111e.c index 766aabfdfc75..b8a59d255b49 100644 --- a/drivers/net/amd8111e.c +++ b/drivers/net/amd8111e.c | |||
@@ -113,7 +113,7 @@ MODULE_PARM_DESC(coalesce, "Enable or Disable interrupt coalescing, 1: Enable, 0 | |||
113 | module_param_array(dynamic_ipg, bool, NULL, 0); | 113 | module_param_array(dynamic_ipg, bool, NULL, 0); |
114 | MODULE_PARM_DESC(dynamic_ipg, "Enable or Disable dynamic IPG, 1: Enable, 0: Disable"); | 114 | MODULE_PARM_DESC(dynamic_ipg, "Enable or Disable dynamic IPG, 1: Enable, 0: Disable"); |
115 | 115 | ||
116 | static struct pci_device_id amd8111e_pci_tbl[] = { | 116 | static DEFINE_PCI_DEVICE_TABLE(amd8111e_pci_tbl) = { |
117 | 117 | ||
118 | { PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD8111E_7462, | 118 | { PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD8111E_7462, |
119 | PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0UL }, | 119 | PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0UL }, |
@@ -1176,8 +1176,7 @@ static irqreturn_t amd8111e_interrupt(int irq, void *dev_id) | |||
1176 | /* Schedule a polling routine */ | 1176 | /* Schedule a polling routine */ |
1177 | __napi_schedule(&lp->napi); | 1177 | __napi_schedule(&lp->napi); |
1178 | } else if (intren0 & RINTEN0) { | 1178 | } else if (intren0 & RINTEN0) { |
1179 | printk("************Driver bug! \ | 1179 | printk("************Driver bug! interrupt while in poll\n"); |
1180 | interrupt while in poll\n"); | ||
1181 | /* Fix by disable receive interrupts */ | 1180 | /* Fix by disable receive interrupts */ |
1182 | writel(RINTEN0, mmio + INTEN0); | 1181 | writel(RINTEN0, mmio + INTEN0); |
1183 | } | 1182 | } |
@@ -1378,28 +1377,28 @@ list to the device. | |||
1378 | */ | 1377 | */ |
1379 | static void amd8111e_set_multicast_list(struct net_device *dev) | 1378 | static void amd8111e_set_multicast_list(struct net_device *dev) |
1380 | { | 1379 | { |
1381 | struct dev_mc_list* mc_ptr; | 1380 | struct dev_mc_list *mc_ptr; |
1382 | struct amd8111e_priv *lp = netdev_priv(dev); | 1381 | struct amd8111e_priv *lp = netdev_priv(dev); |
1383 | u32 mc_filter[2] ; | 1382 | u32 mc_filter[2] ; |
1384 | int i,bit_num; | 1383 | int bit_num; |
1384 | |||
1385 | if(dev->flags & IFF_PROMISC){ | 1385 | if(dev->flags & IFF_PROMISC){ |
1386 | writel( VAL2 | PROM, lp->mmio + CMD2); | 1386 | writel( VAL2 | PROM, lp->mmio + CMD2); |
1387 | return; | 1387 | return; |
1388 | } | 1388 | } |
1389 | else | 1389 | else |
1390 | writel( PROM, lp->mmio + CMD2); | 1390 | writel( PROM, lp->mmio + CMD2); |
1391 | if(dev->flags & IFF_ALLMULTI || dev->mc_count > MAX_FILTER_SIZE){ | 1391 | if (dev->flags & IFF_ALLMULTI || |
1392 | netdev_mc_count(dev) > MAX_FILTER_SIZE) { | ||
1392 | /* get all multicast packet */ | 1393 | /* get all multicast packet */ |
1393 | mc_filter[1] = mc_filter[0] = 0xffffffff; | 1394 | mc_filter[1] = mc_filter[0] = 0xffffffff; |
1394 | lp->mc_list = dev->mc_list; | ||
1395 | lp->options |= OPTION_MULTICAST_ENABLE; | 1395 | lp->options |= OPTION_MULTICAST_ENABLE; |
1396 | amd8111e_writeq(*(u64*)mc_filter,lp->mmio + LADRF); | 1396 | amd8111e_writeq(*(u64*)mc_filter,lp->mmio + LADRF); |
1397 | return; | 1397 | return; |
1398 | } | 1398 | } |
1399 | if( dev->mc_count == 0 ){ | 1399 | if (netdev_mc_empty(dev)) { |
1400 | /* get only own packets */ | 1400 | /* get only own packets */ |
1401 | mc_filter[1] = mc_filter[0] = 0; | 1401 | mc_filter[1] = mc_filter[0] = 0; |
1402 | lp->mc_list = NULL; | ||
1403 | lp->options &= ~OPTION_MULTICAST_ENABLE; | 1402 | lp->options &= ~OPTION_MULTICAST_ENABLE; |
1404 | amd8111e_writeq(*(u64*)mc_filter,lp->mmio + LADRF); | 1403 | amd8111e_writeq(*(u64*)mc_filter,lp->mmio + LADRF); |
1405 | /* disable promiscous mode */ | 1404 | /* disable promiscous mode */ |
@@ -1408,10 +1407,8 @@ static void amd8111e_set_multicast_list(struct net_device *dev) | |||
1408 | } | 1407 | } |
1409 | /* load all the multicast addresses in the logic filter */ | 1408 | /* load all the multicast addresses in the logic filter */ |
1410 | lp->options |= OPTION_MULTICAST_ENABLE; | 1409 | lp->options |= OPTION_MULTICAST_ENABLE; |
1411 | lp->mc_list = dev->mc_list; | ||
1412 | mc_filter[1] = mc_filter[0] = 0; | 1410 | mc_filter[1] = mc_filter[0] = 0; |
1413 | for (i = 0, mc_ptr = dev->mc_list; mc_ptr && i < dev->mc_count; | 1411 | netdev_for_each_mc_addr(mc_ptr, dev) { |
1414 | i++, mc_ptr = mc_ptr->next) { | ||
1415 | bit_num = (ether_crc_le(ETH_ALEN, mc_ptr->dmi_addr) >> 26) & 0x3f; | 1412 | bit_num = (ether_crc_le(ETH_ALEN, mc_ptr->dmi_addr) >> 26) & 0x3f; |
1416 | mc_filter[bit_num >> 5] |= 1 << (bit_num & 31); | 1413 | mc_filter[bit_num >> 5] |= 1 << (bit_num & 31); |
1417 | } | 1414 | } |