summaryrefslogtreecommitdiffstats
path: root/drivers/infiniband/sw
diff options
context:
space:
mode:
authorAndrew Boyer2017-08-28 22:11:59 +0200
committerDoug Ledford2017-08-29 01:12:36 +0200
commit5c50f1d18f6bdd8ff8d274479b8bf0d89ab5a47d (patch)
treef697ef1809fe97f9601bc1d2dbe9b49c63c28c17 /drivers/infiniband/sw
parentIB/rxe: Avoid ICRC errors by copying into the skb first (diff)
downloadkernel-qcow2-linux-5c50f1d18f6bdd8ff8d274479b8bf0d89ab5a47d.tar.gz
kernel-qcow2-linux-5c50f1d18f6bdd8ff8d274479b8bf0d89ab5a47d.tar.xz
kernel-qcow2-linux-5c50f1d18f6bdd8ff8d274479b8bf0d89ab5a47d.zip
IB/rxe: Handle NETDEV_CHANGE events
Without this fix, ports configured on top of ixgbe miss link up notifications. ibv_query_port() will continue to return IBV_PORT_DOWN even though the port is up and working. Fixes: 8700e3e7c485 ("Soft RoCE driver") Signed-off-by: Andrew Boyer <andrew.boyer@dell.com> Signed-off-by: Doug Ledford <dledford@redhat.com>
Diffstat (limited to 'drivers/infiniband/sw')
-rw-r--r--drivers/infiniband/sw/rxe/rxe_net.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/drivers/infiniband/sw/rxe/rxe_net.c b/drivers/infiniband/sw/rxe/rxe_net.c
index 3ba76e7c7a38..59dee10bebcb 100644
--- a/drivers/infiniband/sw/rxe/rxe_net.c
+++ b/drivers/infiniband/sw/rxe/rxe_net.c
@@ -651,8 +651,13 @@ static int rxe_notify(struct notifier_block *not_blk,
pr_info("%s changed mtu to %d\n", ndev->name, ndev->mtu);
rxe_set_mtu(rxe, ndev->mtu);
break;
- case NETDEV_REBOOT:
case NETDEV_CHANGE:
+ if (netif_running(ndev) && netif_carrier_ok(ndev))
+ rxe_port_up(rxe);
+ else
+ rxe_port_down(rxe);
+ break;
+ case NETDEV_REBOOT:
case NETDEV_GOING_DOWN:
case NETDEV_CHANGEADDR:
case NETDEV_CHANGENAME: