aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet
diff options
context:
space:
mode:
authorSarveshwar Bandi <sarveshwar.bandi@emulex.com>2013-07-16 03:14:02 -0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2013-07-28 19:30:04 -0400
commite0ca176c17745ac3e0c5a9969aba3c983e6c69c5 (patch)
tree60c3f2265ad7293ed146e205370e30615c494205 /drivers/net/ethernet
parentb3923f8211bc60ff3b4567fafe0814beb6bc5a50 (diff)
be2net: Fix to avoid hardware workaround when not needed
[ Upstream commit 52fe29e4bb614367c108b717c6d7fe5953eb7af3 ] Hardware workaround requesting hardware to skip vlan insertion is necessary only when umc or qnq is enabled. Enabling this workaround in other scenarios could cause controller to stall. Signed-off-by: Sarveshwar Bandi <sarveshwar.bandi@emulex.com> Signed-off-by: David S. Miller <davem@davemloft.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/net/ethernet')
-rw-r--r--drivers/net/ethernet/emulex/benet/be_main.c14
1 files changed, 10 insertions, 4 deletions
diff --git a/drivers/net/ethernet/emulex/benet/be_main.c b/drivers/net/ethernet/emulex/benet/be_main.c
index a0b4be51f0d1..6e4342695fa7 100644
--- a/drivers/net/ethernet/emulex/benet/be_main.c
+++ b/drivers/net/ethernet/emulex/benet/be_main.c
@@ -782,16 +782,22 @@ static struct sk_buff *be_insert_vlan_in_pkt(struct be_adapter *adapter,
782 782
783 if (vlan_tx_tag_present(skb)) 783 if (vlan_tx_tag_present(skb))
784 vlan_tag = be_get_tx_vlan_tag(adapter, skb); 784 vlan_tag = be_get_tx_vlan_tag(adapter, skb);
785 else if (qnq_async_evt_rcvd(adapter) && adapter->pvid) 785
786 vlan_tag = adapter->pvid; 786 if (qnq_async_evt_rcvd(adapter) && adapter->pvid) {
787 if (!vlan_tag)
788 vlan_tag = adapter->pvid;
789 /* f/w workaround to set skip_hw_vlan = 1, informs the F/W to
790 * skip VLAN insertion
791 */
792 if (skip_hw_vlan)
793 *skip_hw_vlan = true;
794 }
787 795
788 if (vlan_tag) { 796 if (vlan_tag) {
789 skb = __vlan_put_tag(skb, htons(ETH_P_8021Q), vlan_tag); 797 skb = __vlan_put_tag(skb, htons(ETH_P_8021Q), vlan_tag);
790 if (unlikely(!skb)) 798 if (unlikely(!skb))
791 return skb; 799 return skb;
792 skb->vlan_tci = 0; 800 skb->vlan_tci = 0;
793 if (skip_hw_vlan)
794 *skip_hw_vlan = true;
795 } 801 }
796 802
797 /* Insert the outer VLAN, if any */ 803 /* Insert the outer VLAN, if any */