This at least kicks the user mode applications that are watching
for device events.

Signed-off-by: Steve Wise <[email protected]>
---

 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 3e46b80..0bcd383 100644
--- a/drivers/infiniband/hw/cxgb4/device.c
+++ b/drivers/infiniband/hw/cxgb4/device.c
@@ -527,8 +527,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",

--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to