From: Jesse Brandeburg Date: Sat, 22 Oct 2011 05:18:10 +0000 (+0000) Subject: e100: make sure vlan support isn't advertised on old adapters X-Git-Tag: v2.6.39-400.9.0~423^2~19^2~11^2~406 X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=b31648abd5e616b4cafdf2438eb6606db5feb5ba;p=users%2Fjedix%2Flinux-maple.git e100: make sure vlan support isn't advertised on old adapters e100 parts don't support vlan offload but they generally do allow use of vlans in higher software layers via the 8021q module. That said, there are a couple of really old revisions of e100 hardware that don't even allow the longer frame sizes required for vlan use with standard MTU. Use the VLAN_CHALLENGED flag to prevent vlan binding to these devices. Reported-by: Michael Tokarev (cherry picked from commit 243559f436f26b571ea3a4e70ff082892dc58f16) Signed-off-by: Jesse Brandeburg CC: Michael Tokarev CC: David Lamparter Tested-by: Aaron Brown Signed-off-by: Jeff Kirsher Signed-off-by: Joe Jin --- diff --git a/drivers/net/e100.c b/drivers/net/e100.c index e336c7937f05..aeaadb50aa7d 100644 --- a/drivers/net/e100.c +++ b/drivers/net/e100.c @@ -2812,6 +2812,10 @@ static int __devinit e100_probe(struct pci_dev *pdev, e100_get_defaults(nic); + /* D100 MAC doesn't allow rx of vlan packets with normal MTU */ + if (nic->mac < mac_82558_D101_A4) + netdev->features |= NETIF_F_VLAN_CHALLENGED; + /* locks must be initialized before calling hw_reset */ spin_lock_init(&nic->cb_lock); spin_lock_init(&nic->cmd_lock);