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

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
...@@ -519,6 +519,12 @@ static int ocrdma_close(struct ocrdma_dev *dev) ...@@ -519,6 +519,12 @@ static int ocrdma_close(struct ocrdma_dev *dev)
return 0; 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 /* event handling via NIC driver ensures that all the NIC specific
* initialization done before RoCE driver notifies * initialization done before RoCE driver notifies
* event to stack. * event to stack.
...@@ -532,6 +538,9 @@ static void ocrdma_event_handler(struct ocrdma_dev *dev, u32 event) ...@@ -532,6 +538,9 @@ static void ocrdma_event_handler(struct ocrdma_dev *dev, u32 event)
case BE_DEV_DOWN: case BE_DEV_DOWN:
ocrdma_close(dev); ocrdma_close(dev);
break; break;
case BE_DEV_SHUTDOWN:
ocrdma_shutdown(dev);
break;
} }
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment