summaryrefslogtreecommitdiffstats
path: root/drivers/infiniband
diff options
context:
space:
mode:
authorSteve Wise <swise@opengridcomputing.com>2011-03-11 22:30:53 +0000
committerRoland Dreier <roland@purestorage.com>2011-03-14 12:09:13 -0700
commit767fbe8151d1a7cc8a69e52e354e4220a5e804fb (patch)
tree805495187c3d9ffe78b23bccd82fc21ffc955c86 /drivers/infiniband
parentb48f3b9c10d731160f0af5c3028ad57d9c66673b (diff)
downloadblackbird-op-linux-767fbe8151d1a7cc8a69e52e354e4220a5e804fb.tar.gz
blackbird-op-linux-767fbe8151d1a7cc8a69e52e354e4220a5e804fb.zip
RDMA/cxgb4: Dispatch FATAL event on EEH errors
This at least kicks the user mode applications that are watching for device events. Signed-off-by: Steve Wise <swise@opengridcomputing.com> Signed-off-by: Roland Dreier <roland@purestorage.com>
Diffstat (limited to 'drivers/infiniband')
-rw-r--r--drivers/infiniband/hw/cxgb4/device.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/drivers/infiniband/hw/cxgb4/device.c b/drivers/infiniband/hw/cxgb4/device.c
index 1a65ee6235bf..fadb326e41e0 100644
--- a/drivers/infiniband/hw/cxgb4/device.c
+++ b/drivers/infiniband/hw/cxgb4/device.c
@@ -522,8 +522,16 @@ static int c4iw_uld_state_change(void *handle, enum cxgb4_state new_state)
case CXGB4_STATE_START_RECOVERY:
printk(KERN_INFO MOD "%s: Fatal Error\n",
pci_name(dev->rdev.lldi.pdev));
- if (dev->registered)
+ dev->rdev.flags |= T4_FATAL_ERROR;
+ if (dev->registered) {
+ struct ib_event event;
+
+ memset(&event, 0, sizeof event);
+ event.event = IB_EVENT_DEVICE_FATAL;
+ event.device = &dev->ibdev;
+ ib_dispatch_event(&event);
c4iw_unregister_device(dev);
+ }
break;
case CXGB4_STATE_DETACH:
printk(KERN_INFO MOD "%s: Detach\n",
OpenPOWER on IntegriCloud