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

Commit a27cbe87 authored by Roland Dreier's avatar Roland Dreier
Browse files

IPoIB: Only handle async events for one port



An asynchronous event carries the port number that the event occurred
on, so there's no reason for an IPoIB interface to process an event
associated with a different local HCA port.

Signed-off-by: default avatarRoland Dreier <rolandd@cisco.com>
parent 6f8c480f
Loading
Loading
Loading
Loading
+7 −6
Original line number Diff line number Diff line
@@ -259,12 +259,13 @@ 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_ERR    ||
	if ((record->event == IB_EVENT_PORT_ERR    ||
	     record->event == IB_EVENT_PKEY_CHANGE ||
	     record->event == IB_EVENT_PORT_ACTIVE ||
	     record->event == IB_EVENT_LID_CHANGE  ||
	     record->event == IB_EVENT_SM_CHANGE   ||
	    record->event == IB_EVENT_CLIENT_REREGISTER) {
	     record->event == IB_EVENT_CLIENT_REREGISTER) &&
	    record->element.port_num == priv->port) {
		ipoib_dbg(priv, "Port state change event\n");
		queue_work(ipoib_workqueue, &priv->flush_task);
	}