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>
This commit is contained in:
Devesh Sharma 2014-06-10 19:32:16 +05:30 committed by Roland Dreier
parent d114f99a29
commit efe4593720
1 changed files with 9 additions and 0 deletions

View File

@ -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;
}
}