Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 4e37b956 authored by Leonid Arsh's avatar Leonid Arsh Committed by Roland Dreier
Browse files

IPoIB: Fix network interface "RUNNING" status



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: default avatarLeonid Arsh <leonida@voltaire.com>
Signed-off-by: default avatarRoland Dreier <rolandd@cisco.com>
parent b0b3a8e1
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -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);
	}
}