[patch net-2.6] forcedeth: call vlan_mode only if hw supports vlans

Subsystems: networking drivers, the rest

STALE5540d

2 messages, 2 authors, 2011-08-18 · open the first message on its own page

[patch net-2.6] forcedeth: call vlan_mode only if hw supports vlans

From: Jiri Pirko <hidden>
Date: 2011-08-18 06:38:33

If hw does not support vlans, dont call nv_vlan_mode because it has no point.
I believe that this should fix issues on older non-vlan supportive
chips (like Ingo has).

Reported-ty: Ingo Molnar [off-list ref]
Signed-off-by: Jiri Pirko <redacted>
---
 drivers/net/forcedeth.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/drivers/net/forcedeth.c b/drivers/net/forcedeth.c
index e55df30..6d5fbd4 100644
--- a/drivers/net/forcedeth.c
+++ b/drivers/net/forcedeth.c
@@ -5615,7 +5615,8 @@ static int __devinit nv_probe(struct pci_dev *pci_dev, const struct pci_device_i
 		goto out_error;
 	}
 
-	nv_vlan_mode(dev, dev->features);
+	if (id->driver_data & DEV_HAS_VLAN)
+		nv_vlan_mode(dev, dev->features);
 
 	netif_carrier_off(dev);
 
-- 
1.7.6

Re: [patch net-2.6] forcedeth: call vlan_mode only if hw supports vlans

From: David Miller <davem@davemloft.net>
Date: 2011-08-18 06:50:56

From: Jiri Pirko <redacted>
Date: Thu, 18 Aug 2011 08:37:51 +0200
If hw does not support vlans, dont call nv_vlan_mode because it has no point.
I believe that this should fix issues on older non-vlan supportive
chips (like Ingo has).

Reported-ty: Ingo Molnar [off-list ref]
Signed-off-by: Jiri Pirko <redacted>
Applied, thanks.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help