Skip to content

Commit

Permalink
net/smsc911x.c: Set the VLAN1 register to fix VLAN MTU problem
Browse files Browse the repository at this point in the history
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 <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
  • Loading branch information
Göran Weinholt authored and davem330 committed Mar 7, 2011
1 parent 9b3de1e commit f277e65
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions drivers/net/smsc911x.c
Original file line number Diff line number Diff line change
Expand Up @@ -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_) &&
Expand Down

0 comments on commit f277e65

Please sign in to comment.