From: Göran Weinholt Date: Wed, 2 Mar 2011 04:07:21 +0000 (+0000) Subject: net/smsc911x.c: Set the VLAN1 register to fix VLAN MTU problem X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=f277e65e7a2d360189f760baca42f3ca2f62dd7a;p=GitHub%2FLineageOS%2Fandroid_kernel_samsung_universal7580.git net/smsc911x.c: Set the VLAN1 register to fix VLAN MTU problem 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 Signed-off-by: David S. Miller --- diff --git a/drivers/net/smsc911x.c b/drivers/net/smsc911x.c index 64bfdae5956..d70bde95460 100644 --- a/drivers/net/smsc911x.c +++ b/drivers/net/smsc911x.c @@ -1178,6 +1178,11 @@ static int smsc911x_open(struct net_device *dev) 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_) &&