diff options
author | Ayaz Abdulla <aabdulla@nvidia.com> | 2008-01-13 16:03:04 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-02-03 07:28:40 -0500 |
commit | bb9a4fd1f7cc083f72e52f01938c23ac5b3403d5 (patch) | |
tree | f21d14bb59d2f472672159212f9bae24dd05289a /drivers/net | |
parent | 32fa8b27eaec2f4bc978cadfb84b375de57311ce (diff) |
forcedeth: multicast fix
This patch fixes the case where no multicast addresses are requested to
be added to the multicast filter. The multicast mask must be set to all
1's instead of all 0's.
Signed-off-by: Ayaz Abdulla <aabdulla@nvidia.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net')
-rw-r--r-- | drivers/net/forcedeth.c | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/drivers/net/forcedeth.c b/drivers/net/forcedeth.c index 608195603f5a..2034a7d09225 100644 --- a/drivers/net/forcedeth.c +++ b/drivers/net/forcedeth.c | |||
@@ -277,7 +277,9 @@ enum { | |||
277 | #define NVREG_MCASTADDRA_FORCE 0x01 | 277 | #define NVREG_MCASTADDRA_FORCE 0x01 |
278 | NvRegMulticastAddrB = 0xB4, | 278 | NvRegMulticastAddrB = 0xB4, |
279 | NvRegMulticastMaskA = 0xB8, | 279 | NvRegMulticastMaskA = 0xB8, |
280 | #define NVREG_MCASTMASKA_NONE 0xffffffff | ||
280 | NvRegMulticastMaskB = 0xBC, | 281 | NvRegMulticastMaskB = 0xBC, |
282 | #define NVREG_MCASTMASKB_NONE 0xffff | ||
281 | 283 | ||
282 | NvRegPhyInterface = 0xC0, | 284 | NvRegPhyInterface = 0xC0, |
283 | #define PHY_RGMII 0x10000000 | 285 | #define PHY_RGMII 0x10000000 |
@@ -2693,6 +2695,9 @@ static void nv_set_multicast(struct net_device *dev) | |||
2693 | addr[1] = alwaysOn[1]; | 2695 | addr[1] = alwaysOn[1]; |
2694 | mask[0] = alwaysOn[0] | alwaysOff[0]; | 2696 | mask[0] = alwaysOn[0] | alwaysOff[0]; |
2695 | mask[1] = alwaysOn[1] | alwaysOff[1]; | 2697 | mask[1] = alwaysOn[1] | alwaysOff[1]; |
2698 | } else { | ||
2699 | mask[0] = NVREG_MCASTMASKA_NONE; | ||
2700 | mask[1] = NVREG_MCASTMASKB_NONE; | ||
2696 | } | 2701 | } |
2697 | } | 2702 | } |
2698 | addr[0] |= NVREG_MCASTADDRA_FORCE; | 2703 | addr[0] |= NVREG_MCASTADDRA_FORCE; |
@@ -4803,8 +4808,8 @@ static int nv_open(struct net_device *dev) | |||
4803 | nv_mac_reset(dev); | 4808 | nv_mac_reset(dev); |
4804 | writel(NVREG_MCASTADDRA_FORCE, base + NvRegMulticastAddrA); | 4809 | writel(NVREG_MCASTADDRA_FORCE, base + NvRegMulticastAddrA); |
4805 | writel(0, base + NvRegMulticastAddrB); | 4810 | writel(0, base + NvRegMulticastAddrB); |
4806 | writel(0, base + NvRegMulticastMaskA); | 4811 | writel(NVREG_MCASTMASKA_NONE, base + NvRegMulticastMaskA); |
4807 | writel(0, base + NvRegMulticastMaskB); | 4812 | writel(NVREG_MCASTMASKB_NONE, base + NvRegMulticastMaskB); |
4808 | writel(0, base + NvRegPacketFilterFlags); | 4813 | writel(0, base + NvRegPacketFilterFlags); |
4809 | 4814 | ||
4810 | writel(0, base + NvRegTransmitterControl); | 4815 | writel(0, base + NvRegTransmitterControl); |
@@ -4898,8 +4903,8 @@ static int nv_open(struct net_device *dev) | |||
4898 | spin_lock_irq(&np->lock); | 4903 | spin_lock_irq(&np->lock); |
4899 | writel(NVREG_MCASTADDRA_FORCE, base + NvRegMulticastAddrA); | 4904 | writel(NVREG_MCASTADDRA_FORCE, base + NvRegMulticastAddrA); |
4900 | writel(0, base + NvRegMulticastAddrB); | 4905 | writel(0, base + NvRegMulticastAddrB); |
4901 | writel(0, base + NvRegMulticastMaskA); | 4906 | writel(NVREG_MCASTMASKA_NONE, base + NvRegMulticastMaskA); |
4902 | writel(0, base + NvRegMulticastMaskB); | 4907 | writel(NVREG_MCASTMASKB_NONE, base + NvRegMulticastMaskB); |
4903 | writel(NVREG_PFF_ALWAYS|NVREG_PFF_MYADDR, base + NvRegPacketFilterFlags); | 4908 | writel(NVREG_PFF_ALWAYS|NVREG_PFF_MYADDR, base + NvRegPacketFilterFlags); |
4904 | /* One manual link speed update: Interrupts are enabled, future link | 4909 | /* One manual link speed update: Interrupts are enabled, future link |
4905 | * speed changes cause interrupts and are handled by nv_link_irq(). | 4910 | * speed changes cause interrupts and are handled by nv_link_irq(). |