Skip to content

Commit

Permalink
RDMA/cxgb4: Dispatch FATAL event on EEH errors
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Steve Wise authored and Roland Dreier committed Mar 14, 2011
1 parent b48f3b9 commit 767fbe8
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion drivers/infiniband/hw/cxgb4/device.c
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down

0 comments on commit 767fbe8

Please sign in to comment.