From: Greg Kroah-Hartman Date: Tue, 8 May 2012 22:30:40 +0000 (-0700) Subject: 3.3-stable patches X-Git-Tag: v3.3.6~15 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=1b34a850bae28eec64b33a597f661332f24e597a;p=thirdparty%2Fkernel%2Fstable-queue.git 3.3-stable patches added patches: e1000-fix-vlan-processing-regression.patch --- diff --git a/queue-3.3/e1000-fix-vlan-processing-regression.patch b/queue-3.3/e1000-fix-vlan-processing-regression.patch new file mode 100644 index 00000000000..2cbc2a1c7e0 --- /dev/null +++ b/queue-3.3/e1000-fix-vlan-processing-regression.patch @@ -0,0 +1,106 @@ +From 52f5509fe8ccb607ff9b84ad618f244262336475 Mon Sep 17 00:00:00 2001 +From: Jiri Pirko +Date: Tue, 20 Mar 2012 18:10:01 +0000 +Subject: e1000: fix vlan processing regression + +From: Jiri Pirko + +commit 52f5509fe8ccb607ff9b84ad618f244262336475 upstream. + +This patch fixes a regression introduced by commit "e1000: do vlan +cleanup (799d531)". + +Apparently some e1000 chips (not mine) are sensitive about the order of +setting vlan filter and vlan stripping/inserting functionality. So this +patch changes the order so it's the same as before vlan cleanup. + +Reported-by: Ben Greear +Signed-off-by: Jiri Pirko +Tested-by: Ben Greear +Tested-by: Aaron Brown +Signed-off-by: Jeff Kirsher +Cc: David Ward +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/net/ethernet/intel/e1000/e1000_main.c | 35 ++++++++++++++++---------- + 1 file changed, 22 insertions(+), 13 deletions(-) + +--- a/drivers/net/ethernet/intel/e1000/e1000_main.c ++++ b/drivers/net/ethernet/intel/e1000/e1000_main.c +@@ -164,6 +164,8 @@ static int e1000_82547_fifo_workaround(s + static bool e1000_vlan_used(struct e1000_adapter *adapter); + static void e1000_vlan_mode(struct net_device *netdev, + netdev_features_t features); ++static void e1000_vlan_filter_on_off(struct e1000_adapter *adapter, ++ bool filter_on); + static int e1000_vlan_rx_add_vid(struct net_device *netdev, u16 vid); + static int e1000_vlan_rx_kill_vid(struct net_device *netdev, u16 vid); + static void e1000_restore_vlan(struct e1000_adapter *adapter); +@@ -1213,7 +1215,7 @@ static int __devinit e1000_probe(struct + if (err) + goto err_register; + +- e1000_vlan_mode(netdev, netdev->features); ++ e1000_vlan_filter_on_off(adapter, false); + + /* print bus type/speed/width info */ + e_info(probe, "(PCI%s:%dMHz:%d-bit) %pM\n", +@@ -4549,6 +4551,22 @@ static bool e1000_vlan_used(struct e1000 + return false; + } + ++static void __e1000_vlan_mode(struct e1000_adapter *adapter, ++ netdev_features_t features) ++{ ++ struct e1000_hw *hw = &adapter->hw; ++ u32 ctrl; ++ ++ ctrl = er32(CTRL); ++ if (features & NETIF_F_HW_VLAN_RX) { ++ /* enable VLAN tag insert/strip */ ++ ctrl |= E1000_CTRL_VME; ++ } else { ++ /* disable VLAN tag insert/strip */ ++ ctrl &= ~E1000_CTRL_VME; ++ } ++ ew32(CTRL, ctrl); ++} + static void e1000_vlan_filter_on_off(struct e1000_adapter *adapter, + bool filter_on) + { +@@ -4558,6 +4576,7 @@ static void e1000_vlan_filter_on_off(str + if (!test_bit(__E1000_DOWN, &adapter->flags)) + e1000_irq_disable(adapter); + ++ __e1000_vlan_mode(adapter, adapter->netdev->features); + if (filter_on) { + /* enable VLAN receive filtering */ + rctl = er32(RCTL); +@@ -4578,24 +4597,14 @@ static void e1000_vlan_filter_on_off(str + } + + static void e1000_vlan_mode(struct net_device *netdev, +- netdev_features_t features) ++ netdev_features_t features) + { + struct e1000_adapter *adapter = netdev_priv(netdev); +- struct e1000_hw *hw = &adapter->hw; +- u32 ctrl; + + if (!test_bit(__E1000_DOWN, &adapter->flags)) + e1000_irq_disable(adapter); + +- ctrl = er32(CTRL); +- if (features & NETIF_F_HW_VLAN_RX) { +- /* enable VLAN tag insert/strip */ +- ctrl |= E1000_CTRL_VME; +- } else { +- /* disable VLAN tag insert/strip */ +- ctrl &= ~E1000_CTRL_VME; +- } +- ew32(CTRL, ctrl); ++ __e1000_vlan_mode(adapter, features); + + if (!test_bit(__E1000_DOWN, &adapter->flags)) + e1000_irq_enable(adapter); diff --git a/queue-3.3/series b/queue-3.3/series index 71cfc427318..362093b06ef 100644 --- a/queue-3.3/series +++ b/queue-3.3/series @@ -1,2 +1,3 @@ drm-i915-enable-dip-before-writing-data-on-gen4.patch smsc95xx-mark-link-down-on-startup-and-let-phy-interrupt.patch +e1000-fix-vlan-processing-regression.patch