diff options
author | Steve Wise <swise@opengridcomputing.com> | 2009-03-30 08:37:56 -0700 |
---|---|---|
committer | Roland Dreier <rolandd@cisco.com> | 2009-03-30 08:37:56 -0700 |
commit | 04b5d028f50ff05a8f9ae049ee71f8fdfcf1f5de (patch) | |
tree | a6363d175d07995e0c2b32e035fb16beeca0772a /drivers/infiniband/hw/cxgb3/iwch.c | |
parent | 5d80f8e5a9dc9c9a94d4aeaa567e219a808b8a4a (diff) | |
download | blackbird-op-linux-04b5d028f50ff05a8f9ae049ee71f8fdfcf1f5de.tar.gz blackbird-op-linux-04b5d028f50ff05a8f9ae049ee71f8fdfcf1f5de.zip |
RDMA/cxgb3: Handle EEH events
- wrap calls into cxgb3 and fail them if we're in the middle
of a PCI EEH event.
- correctly unwind and release endpoint and other resources when
we are in an EEH event.
- dispatch IB_EVENT_DEVICE_FATAL event when cxgb3 notifies iw_cxgb3 of
a fatal error.
Signed-off-by: Steve Wise <swise@opengridcomputing.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
Diffstat (limited to 'drivers/infiniband/hw/cxgb3/iwch.c')
-rw-r--r-- | drivers/infiniband/hw/cxgb3/iwch.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/drivers/infiniband/hw/cxgb3/iwch.c b/drivers/infiniband/hw/cxgb3/iwch.c index 37a4fc264a07..26fc0a4eaa74 100644 --- a/drivers/infiniband/hw/cxgb3/iwch.c +++ b/drivers/infiniband/hw/cxgb3/iwch.c @@ -165,12 +165,19 @@ static void close_rnic_dev(struct t3cdev *tdev) static void iwch_err_handler(struct t3cdev *tdev, u32 status, u32 error) { struct cxio_rdev *rdev = tdev->ulp; + struct iwch_dev *rnicp = rdev_to_iwch_dev(rdev); + struct ib_event event; - if (status == OFFLOAD_STATUS_DOWN) + if (status == OFFLOAD_STATUS_DOWN) { rdev->flags = CXIO_ERROR_FATAL; - return; + event.device = &rnicp->ibdev; + event.event = IB_EVENT_DEVICE_FATAL; + event.element.port_num = 0; + ib_dispatch_event(&event); + } + return; } static int __init iwch_init_module(void) |