Skip to content

Commit f277e65

Browse files
Göran Weinholtdavem330
authored andcommitted
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 <weinholt@csbnet.se> Signed-off-by: David S. Miller <davem@davemloft.net>
1 parent 9b3de1e commit f277e65

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

‎drivers/net/smsc911x.c‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1178,6 +1178,11 @@ static int smsc911x_open(struct net_device *dev)
11781178
smsc911x_reg_write(pdata, HW_CFG, 0x00050000);
11791179
smsc911x_reg_write(pdata, AFC_CFG, 0x006E3740);
11801180

1181+
/* Increase the legal frame size of VLAN tagged frames to 1522 bytes */
1182+
spin_lock_irq(&pdata->mac_lock);
1183+
smsc911x_mac_write(pdata, VLAN1, ETH_P_8021Q);
1184+
spin_unlock_irq(&pdata->mac_lock);
1185+
11811186
/* Make sure EEPROM has finished loading before setting GPIO_CFG */
11821187
timeout = 50;
11831188
while ((smsc911x_reg_read(pdata, E2P_CMD) & E2P_CMD_EPC_BUSY_) &&

0 commit comments

Comments
 (0)