diff options
author | Devesh Sharma <devesh.sharma@emulex.com> | 2014-06-10 19:32:16 +0530 |
---|---|---|
committer | Roland Dreier <roland@purestorage.com> | 2014-08-01 15:07:36 -0700 |
commit | efe4593720829066667397f540d50baffc706435 (patch) | |
tree | 3d4a9b5b2ab318d80480e39682ae8d655939bf5b /drivers/infiniband | |
parent | d114f99a29b7f9c7a5e001ca1ef9c93db70d8668 (diff) | |
download | blackbird-op-linux-efe4593720829066667397f540d50baffc706435.tar.gz blackbird-op-linux-efe4593720829066667397f540d50baffc706435.zip |
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: Devesh Sharma <devesh.sharma@emulex.com>
Signed-off-by: Selvin Xavier <selvin.xavier@emulex.com>
Signed-off-by: Roland Dreier <roland@purestorage.com>
Diffstat (limited to 'drivers/infiniband')
-rw-r--r-- | drivers/infiniband/hw/ocrdma/ocrdma_main.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/drivers/infiniband/hw/ocrdma/ocrdma_main.c b/drivers/infiniband/hw/ocrdma/ocrdma_main.c index 227a5422db0b..3cb20c6b91ce 100644 --- a/drivers/infiniband/hw/ocrdma/ocrdma_main.c +++ b/drivers/infiniband/hw/ocrdma/ocrdma_main.c @@ -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; } } |