aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLennert Buytenhek <buytenh@marvell.com>2009-03-13 18:48:02 -0400
committerDavid S. Miller <davem@davemloft.net>2009-03-13 18:48:02 -0400
commit5a89392225c6147d10328a64b06b756561e97edf (patch)
tree65799891c8419c7777e83f9ba4938e8476e9fc26
parent08ec9af1c0622b0858099a8644a33af02dd3019f (diff)
mv643xx_eth: fix unicast address filter corruption on mtu change
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> Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r--drivers/net/mv643xx_eth.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/net/mv643xx_eth.c b/drivers/net/mv643xx_eth.c
index 13f11f402a99..b0bc3bc18e9c 100644
--- a/drivers/net/mv643xx_eth.c
+++ b/drivers/net/mv643xx_eth.c
@@ -2030,11 +2030,6 @@ static void port_start(struct mv643xx_eth_private *mp)
2030 } 2030 }
2031 2031
2032 /* 2032 /*
2033 * Add configured unicast address to address filter table.
2034 */
2035 mv643xx_eth_program_unicast_filter(mp->dev);
2036
2037 /*
2038 * Receive all unmatched unicast, TCP, UDP, BPDU and broadcast 2033 * Receive all unmatched unicast, TCP, UDP, BPDU and broadcast
2039 * frames to RX queue #0, and include the pseudo-header when 2034 * frames to RX queue #0, and include the pseudo-header when
2040 * calculating receive checksums. 2035 * calculating receive checksums.
@@ -2047,6 +2042,11 @@ static void port_start(struct mv643xx_eth_private *mp)
2047 wrlp(mp, PORT_CONFIG_EXT, 0x00000000); 2042 wrlp(mp, PORT_CONFIG_EXT, 0x00000000);
2048 2043
2049 /* 2044 /*
2045 * Add configured unicast addresses to address filter table.
2046 */
2047 mv643xx_eth_program_unicast_filter(mp->dev);
2048
2049 /*
2050 * Enable the receive queues. 2050 * Enable the receive queues.
2051 */ 2051 */
2052 for (i = 0; i < mp->rxq_count; i++) { 2052 for (i = 0; i < mp->rxq_count; i++) {