diff options
author | Steve Wise <swise@opengridcomputing.com> | 2011-03-11 17:30:53 -0500 |
---|---|---|
committer | Roland Dreier <roland@purestorage.com> | 2011-03-14 15:09:13 -0400 |
commit | 767fbe8151d1a7cc8a69e52e354e4220a5e804fb (patch) | |
tree | 805495187c3d9ffe78b23bccd82fc21ffc955c86 /drivers/infiniband/hw | |
parent | b48f3b9c10d731160f0af5c3028ad57d9c66673b (diff) |
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/hw')
-rw-r--r-- | drivers/infiniband/hw/cxgb4/device.c | 10 |
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) | |||
522 | case CXGB4_STATE_START_RECOVERY: | 522 | case CXGB4_STATE_START_RECOVERY: |
523 | printk(KERN_INFO MOD "%s: Fatal Error\n", | 523 | printk(KERN_INFO MOD "%s: Fatal Error\n", |
524 | pci_name(dev->rdev.lldi.pdev)); | 524 | pci_name(dev->rdev.lldi.pdev)); |
525 | if (dev->registered) | 525 | dev->rdev.flags |= T4_FATAL_ERROR; |
526 | if (dev->registered) { | ||
527 | struct ib_event event; | ||
528 | |||
529 | memset(&event, 0, sizeof event); | ||
530 | event.event = IB_EVENT_DEVICE_FATAL; | ||
531 | event.device = &dev->ibdev; | ||
532 | ib_dispatch_event(&event); | ||
526 | c4iw_unregister_device(dev); | 533 | c4iw_unregister_device(dev); |
534 | } | ||
527 | break; | 535 | break; |
528 | case CXGB4_STATE_DETACH: | 536 | case CXGB4_STATE_DETACH: |
529 | printk(KERN_INFO MOD "%s: Detach\n", | 537 | printk(KERN_INFO MOD "%s: Detach\n", |