aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/myri10ge/myri10ge.c
diff options
context:
space:
mode:
authorBrice Goglin <brice@myri.com>2007-05-07 17:50:37 -0400
committerJeff Garzik <jeff@garzik.org>2007-05-08 01:15:15 -0400
commit2f76216fe071a67fc110a85a10b1eca038379e11 (patch)
treefc7682ad9003062643897859d5f923fc252d0796 /drivers/net/myri10ge/myri10ge.c
parent772a815804ae778aee7fcf937f3d29ab218ecdc7 (diff)
myri10ge: fix restoring of multicast list after reset
Don't count on whatever implementation artifact preserves the multicast list across a reset cmd, and setup multicast filtering as part of our reset routine. The setting of allmulti when adopting firmware with the rx-filter broadcast bug is also moved into the multicast setup routine where it belongs. Signed-off-by: Brice Goglin <brice@myri.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
Diffstat (limited to 'drivers/net/myri10ge/myri10ge.c')
-rw-r--r--drivers/net/myri10ge/myri10ge.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/net/myri10ge/myri10ge.c b/drivers/net/myri10ge/myri10ge.c
index b48b988cf87c..3245357a06f2 100644
--- a/drivers/net/myri10ge/myri10ge.c
+++ b/drivers/net/myri10ge/myri10ge.c
@@ -290,6 +290,8 @@ MODULE_PARM_DESC(myri10ge_wcfifo, "Enable WC Fifo when WC is enabled\n");
290 290
291#define myri10ge_pio_copy(to,from,size) __iowrite64_copy(to,from,size/8) 291#define myri10ge_pio_copy(to,from,size) __iowrite64_copy(to,from,size/8)
292 292
293static void myri10ge_set_multicast_list(struct net_device *dev);
294
293static inline void put_be32(__be32 val, __be32 __iomem * p) 295static inline void put_be32(__be32 val, __be32 __iomem * p)
294{ 296{
295 __raw_writel((__force __u32) val, (__force void __iomem *)p); 297 __raw_writel((__force __u32) val, (__force void __iomem *)p);
@@ -820,10 +822,8 @@ static int myri10ge_reset(struct myri10ge_priv *mgp)
820 mgp->rx_done.cnt = 0; 822 mgp->rx_done.cnt = 0;
821 mgp->link_changes = 0; 823 mgp->link_changes = 0;
822 status = myri10ge_update_mac_address(mgp, mgp->dev->dev_addr); 824 status = myri10ge_update_mac_address(mgp, mgp->dev->dev_addr);
823 myri10ge_change_promisc(mgp, 0, 0);
824 myri10ge_change_pause(mgp, mgp->pause); 825 myri10ge_change_pause(mgp, mgp->pause);
825 if (mgp->adopted_rx_filter_bug) 826 myri10ge_set_multicast_list(mgp->dev);
826 (void)myri10ge_send_cmd(mgp, MXGEFW_ENABLE_ALLMULTI, &cmd, 1);
827 return status; 827 return status;
828} 828}
829 829
@@ -2283,7 +2283,7 @@ static void myri10ge_set_multicast_list(struct net_device *dev)
2283 myri10ge_change_promisc(mgp, dev->flags & IFF_PROMISC, 1); 2283 myri10ge_change_promisc(mgp, dev->flags & IFF_PROMISC, 1);
2284 2284
2285 /* This firmware is known to not support multicast */ 2285 /* This firmware is known to not support multicast */
2286 if (!mgp->fw_multicast_support || mgp->adopted_rx_filter_bug) 2286 if (!mgp->fw_multicast_support)
2287 return; 2287 return;
2288 2288
2289 /* Disable multicast filtering */ 2289 /* Disable multicast filtering */
@@ -2295,7 +2295,7 @@ static void myri10ge_set_multicast_list(struct net_device *dev)
2295 goto abort; 2295 goto abort;
2296 } 2296 }
2297 2297
2298 if (dev->flags & IFF_ALLMULTI) { 2298 if ((dev->flags & IFF_ALLMULTI) || mgp->adopted_rx_filter_bug) {
2299 /* request to disable multicast filtering, so quit here */ 2299 /* request to disable multicast filtering, so quit here */
2300 return; 2300 return;
2301 } 2301 }