* [PATCH] mv643xx_eth: fix unicast address filter corruption on mtu change
@ 2009-03-10 8:22 Lennert Buytenhek
2009-03-13 22:48 ` David Miller
0 siblings, 1 reply; 2+ messages in thread
From: Lennert Buytenhek @ 2009-03-10 8:22 UTC (permalink / raw)
To: David Miller; +Cc: netdev
When mv643xx_eth_open() is called to up an interface, port_start()
will first re-program the unicast address filter, and then
re-initialise the PORT_CONFIG register, but that will disable unicast
promiscuous mode if it was enabled by the unicast address filter setup.
This isn't a problem on ifconfig up, as ->set_rx_mode() will be called
shortly afterwards which will program the filters again, but it does
trigger when changing the MTU, which calls mv643xx_eth_stop() and then
mv643xx_eth_open() by hand to repopulate the receive rings with skbuffs
of the new size.
Swap the initialisation of the PORT_START register and the call to
the unicast filter setup function to fix this.
Signed-off-by: Lennert Buytenhek <buytenh@marvell.com>
---
drivers/net/mv643xx_eth.c | 10 +++++-----
1 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/drivers/net/mv643xx_eth.c b/drivers/net/mv643xx_eth.c
index e920198..19ceeac 100644
--- a/drivers/net/mv643xx_eth.c
+++ b/drivers/net/mv643xx_eth.c
@@ -2289,11 +2289,6 @@ static void port_start(struct mv643xx_eth_private *mp)
}
/*
- * Add configured unicast address to address filter table.
- */
- mv643xx_eth_program_unicast_filter(mp->dev);
-
- /*
* Receive all unmatched unicast, TCP, UDP, BPDU and broadcast
* frames to RX queue #0, and include the pseudo-header when
* calculating receive checksums.
@@ -2306,6 +2301,11 @@ static void port_start(struct mv643xx_eth_private *mp)
wrlp(mp, PORT_CONFIG_EXT, 0x00000000);
/*
+ * Add configured unicast addresses to address filter table.
+ */
+ mv643xx_eth_program_unicast_filter(mp->dev);
+
+ /*
* Enable the receive queues.
*/
for (i = 0; i < mp->rxq_count; i++) {
--
1.5.6.4
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] mv643xx_eth: fix unicast address filter corruption on mtu change
2009-03-10 8:22 [PATCH] mv643xx_eth: fix unicast address filter corruption on mtu change Lennert Buytenhek
@ 2009-03-13 22:48 ` David Miller
0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2009-03-13 22:48 UTC (permalink / raw)
To: buytenh; +Cc: netdev
From: Lennert Buytenhek <buytenh@wantstofly.org>
Date: Tue, 10 Mar 2009 09:22:48 +0100
> When mv643xx_eth_open() is called to up an interface, port_start()
> will first re-program the unicast address filter, and then
> re-initialise the PORT_CONFIG register, but that will disable unicast
> promiscuous mode if it was enabled by the unicast address filter setup.
>
> This isn't a problem on ifconfig up, as ->set_rx_mode() will be called
> shortly afterwards which will program the filters again, but it does
> trigger when changing the MTU, which calls mv643xx_eth_stop() and then
> mv643xx_eth_open() by hand to repopulate the receive rings with skbuffs
> of the new size.
>
> Swap the initialisation of the PORT_START register and the call to
> the unicast filter setup function to fix this.
>
> Signed-off-by: Lennert Buytenhek <buytenh@marvell.com>
Applied, thanks Lennert!
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2009-03-13 22:48 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-03-10 8:22 [PATCH] mv643xx_eth: fix unicast address filter corruption on mtu change Lennert Buytenhek
2009-03-13 22:48 ` David Miller
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.