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

Commit efe45937 authored by Devesh Sharma's avatar Devesh Sharma Committed by Roland Dreier
Browse files

RDMA/ocrdma: Handle shutdown event from be2net driver



be2net driver sends a shutdown event to ocrdma during shutdown/reboot.
As part of event processing, ocrdma calls close() and remove() to free
all the resources associated with ocrdma. This also frees irqs used by
ocrdma.

Signed-off-by: default avatarDevesh Sharma <devesh.sharma@emulex.com>
Signed-off-by: default avatarSelvin Xavier <selvin.xavier@emulex.com>
Signed-off-by: default avatarRoland Dreier <roland@purestorage.com>
parent d114f99a
Loading
Loading
Loading
Loading
+9 −0
Original line number Diff line number Diff line
@@ -519,6 +519,12 @@ static int ocrdma_close(struct ocrdma_dev *dev)
	return 0;
}

static void ocrdma_shutdown(struct ocrdma_dev *dev)
{
	ocrdma_close(dev);
	ocrdma_remove(dev);
}

/* event handling via NIC driver ensures that all the NIC specific
 * initialization done before RoCE driver notifies
 * event to stack.
@@ -532,6 +538,9 @@ static void ocrdma_event_handler(struct ocrdma_dev *dev, u32 event)
	case BE_DEV_DOWN:
		ocrdma_close(dev);
		break;
	case BE_DEV_SHUTDOWN:
		ocrdma_shutdown(dev);
		break;
	}
}