]> err.no Git - linux-2.6/commitdiff
IPoIB: Fix network interface "RUNNING" status
authorLeonid Arsh <leonida@voltaire.com>
Wed, 22 Mar 2006 17:54:24 +0000 (19:54 +0200)
committerRoland Dreier <rolandd@cisco.com>
Fri, 24 Mar 2006 23:47:29 +0000 (15:47 -0800)
With the current IPoIB driver, the status of network interfaces stays
"RUNNING" even if the link goes down (for example because a cable is
unplugged).  Fix this by flushing the IPoIB interface when the link
goes down.

Signed-off-by: Leonid Arsh <leonida@voltaire.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
drivers/infiniband/ulp/ipoib/ipoib_verbs.c

index 18d2f53ec34cd0abad51a656b7f02ff469cf8e94..a35b798b81287ef74ab2b240205080ea97cdfdcf 100644 (file)
@@ -251,10 +251,11 @@ void ipoib_event(struct ib_event_handler *handler,
        struct ipoib_dev_priv *priv =
                container_of(handler, struct ipoib_dev_priv, event_handler);
 
-       if (record->event == IB_EVENT_PORT_ACTIVE ||
+       if (record->event == IB_EVENT_PORT_ERR    ||
+           record->event == IB_EVENT_PORT_ACTIVE ||
            record->event == IB_EVENT_LID_CHANGE  ||
            record->event == IB_EVENT_SM_CHANGE) {
-               ipoib_dbg(priv, "Port active event\n");
+               ipoib_dbg(priv, "Port state change event\n");
                queue_work(ipoib_workqueue, &priv->flush_task);
        }
 }