提交 8c1c58ec 编写于 作者: R Rob Herring 提交者: David S. Miller

net: calxedaxgmac: fix clearing of old filter addresses

In commit 2ee68f62 (net: calxedaxgmac: fix various errors in
xgmac_set_rx_mode), a fix to clean-up old address entries was added.
However, the loop to zero out the entries failed to increment the register
address resulting in only 1 entry getting cleared. Fix this to correctly
use the loop index. Also, the end of the loop condition was off by 1 and
should have been <= rather than <.
Signed-off-by: NRob Herring <rob.herring@calxeda.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 6865d1e8
...@@ -1342,8 +1342,8 @@ static void xgmac_set_rx_mode(struct net_device *dev) ...@@ -1342,8 +1342,8 @@ static void xgmac_set_rx_mode(struct net_device *dev)
} }
out: out:
for (i = reg; i < XGMAC_MAX_FILTER_ADDR; i++) for (i = reg; i <= XGMAC_MAX_FILTER_ADDR; i++)
xgmac_set_mac_addr(ioaddr, NULL, reg); xgmac_set_mac_addr(ioaddr, NULL, i);
for (i = 0; i < XGMAC_NUM_HASH; i++) for (i = 0; i < XGMAC_NUM_HASH; i++)
writel(hash_filter[i], ioaddr + XGMAC_HASH(i)); writel(hash_filter[i], ioaddr + XGMAC_HASH(i));
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册