]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
bnx2x: Prevent tunnel config for 577xx
authorMintz, Yuval <Yuval.Mintz@cavium.com>
Sun, 4 Dec 2016 13:30:18 +0000 (15:30 +0200)
committerChuck Anderson <chuck.anderson@oracle.com>
Mon, 27 Feb 2017 05:40:09 +0000 (21:40 -0800)
Orabug: 25477835

Only the 578xx adapters are capable of configuring UDP ports for
the purpose of tunnelling - doing the same on 577xx might lead to
a firmware assertion.
We're already not claiming support for any related feature for such
devices, but we also need to prevent the configuration of the UDP
ports to the device in this case.

Fixes: f34fa14cc033 ("bnx2x: Add vxlan RSS support")
Reported-by: Anikina Anna <anikina@gmail.com>
Signed-off-by: Yuval Mintz <Yuval.Mintz@cavium.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
(cherry picked from commit 360d9df2acd9f0b89aabaf16fca08954f113bd4e)
Signed-off-by: Brian Maly <brian.maly@oracle.com>
Conflicts:
drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c

drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c

index 3c432af9f7c6390937340bc1be90adf340606f56..5b03c4f9370336fec26404bb3d59166c8e0a6a08 100644 (file)
@@ -10103,7 +10103,8 @@ static int bnx2x_vxlan_port_update(struct bnx2x *bp, u16 port)
 
 static void __bnx2x_add_vxlan_port(struct bnx2x *bp, u16 port)
 {
-       if (!netif_running(bp->dev))
+
+       if (!netif_running(bp->dev) || CHIP_IS_E1x(bp))
                return;
 
        if (bp->vxlan_dst_port_count && bp->vxlan_dst_port == port) {
@@ -10133,7 +10134,7 @@ static void bnx2x_add_vxlan_port(struct net_device *netdev,
 static void __bnx2x_del_vxlan_port(struct bnx2x *bp, u16 port)
 {
        if (!bp->vxlan_dst_port_count || bp->vxlan_dst_port != port ||
-           !IS_PF(bp)) {
+           !IS_PF(bp) || CHIP_IS_E1x(bp)) {
                DP(BNX2X_MSG_SP, "Invalid vxlan port\n");
                return;
        }