Message ID | lnsjv58vl2.fsf@desktop3.csbnet.se |
---|---|
State | Accepted, archived |
Delegated to: | David Miller |
Headers | show |
From: weinholt@csbnet.se (Göran Weinholt) Date: Wed, 02 Mar 2011 15:07:21 +0100 > Subject: [PATCH] net/smsc911x.c: Set the VLAN1 register to fix VLAN MTU problem > From: Göran Weinholt <weinholt@csbnet.se> > > The smsc911x driver would drop frames longer than 1518 bytes, which is a > problem for networks with VLAN tagging. The VLAN1 tag register is used > to increase the legal frame size to 1522 when a VLAN tag is identified. > > Signed-off-by: Göran Weinholt <weinholt@csbnet.se> Applied, thanks. -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
> > Subject: [PATCH] net/smsc911x.c: Set the VLAN1 register to fix VLAN MTU problem > > From: Göran Weinholt <weinholt@csbnet.se> > > > > The smsc911x driver would drop frames longer than 1518 bytes, which is a > > problem for networks with VLAN tagging. The VLAN1 tag register is used > > to increase the legal frame size to 1522 when a VLAN tag is identified. > > > > Signed-off-by: Göran Weinholt <weinholt@csbnet.se> > > Applied, thanks. Thanks David, I was just about to ack this but you beat me to it :-) As Göran said, the datasheet is a little vague. I've checked here, and there aren't any bad implications of always turning this option on. Acked-by: Steve Glendinning <steve.glendinning@smsc.com> -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
diff -uprN linux-2.6.36.4-vanilla/drivers/net/smsc911x.c linux-2.6.36.4/drivers/net/smsc911x.c --- linux-2.6.36.4-vanilla/drivers/net/smsc911x.c 2011-02-18 00:14:38.000000000 +0100 +++ linux-2.6.36.4/drivers/net/smsc911x.c 2011-03-02 14:29:11.884382251 +0100 @@ -1178,6 +1178,11 @@ static int smsc911x_open(struct net_devi smsc911x_reg_write(pdata, HW_CFG, 0x00050000); smsc911x_reg_write(pdata, AFC_CFG, 0x006E3740); + /* Increase the legal frame size of VLAN tagged frames to 1522 bytes */ + spin_lock_irq(&pdata->mac_lock); + smsc911x_mac_write(pdata, VLAN1, ETH_P_8021Q); + spin_unlock_irq(&pdata->mac_lock); + /* Make sure EEPROM has finished loading before setting GPIO_CFG */ timeout = 50; while ((smsc911x_reg_read(pdata, E2P_CMD) & E2P_CMD_EPC_BUSY_) &&