alistair23-linux/drivers/infiniband/hw/mthca
Jack Morgenstein d841064777 IB/mthca: Don't allow userspace open while recovering from catastrophic error
Userspace apps are supposed to release all ib device resources if they
receive a fatal async event (IBV_EVENT_DEVICE_FATAL).  However, the
app has no way of knowing when the device has come back up, except to
repeatedly attempt ibv_open_device() until it succeeds.

However, currently there is no protection against the open succeeding
while the device is in being removed following the fatal event.  In
this case, the open will succeed, but as a result the device waits in
the middle of its removal until the new app releases its resources --
and the new app will not do so, since the open succeeded at a point
following the fatal event generation.

This patch adds an "active" flag to the device. The active flag is set
to false (in the fatal event flow) before the "fatal" event is
generated, so any subsequent ibv_dev_open() call to the device will
fail until the device comes back up, thus preventing the above
deadlock.

Signed-off-by: Jack Morgenstein <jackm@dev.mellanox.co.il>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
2009-09-05 20:36:16 -07:00
..
Kconfig
Makefile
mthca_allocator.c
mthca_av.c
mthca_catas.c IB/mthca: Don't allow userspace open while recovering from catastrophic error 2009-09-05 20:36:16 -07:00
mthca_cmd.c IB/mthca: Add module parameter for number of MTTs per segment 2009-05-27 14:36:16 -07:00
mthca_cmd.h
mthca_config_reg.h IB/mthca: Remove unnecessary include of <asm/page.h> 2009-09-05 20:36:13 -07:00
mthca_cq.c
mthca_dev.h IB/mthca: Don't allow userspace open while recovering from catastrophic error 2009-09-05 20:36:16 -07:00
mthca_doorbell.h
mthca_eq.c IB/mthca: Distinguish multiple devices in /proc/interrupts 2009-09-05 20:36:15 -07:00
mthca_mad.c IB/mthca: Fix dispatch of IB_EVENT_LID_CHANGE event 2009-01-28 15:15:56 -08:00
mthca_main.c IB/mthca: Don't allow userspace open while recovering from catastrophic error 2009-09-05 20:36:16 -07:00
mthca_mcg.c
mthca_memfree.c
mthca_memfree.h
mthca_mr.c IB/mthca: Replace dma_sync_single() use with proper functions 2009-06-22 23:04:13 -07:00
mthca_pd.c
mthca_profile.c IB/mthca: Add module parameter for number of MTTs per segment 2009-05-27 14:36:16 -07:00
mthca_profile.h
mthca_provider.c IB/mthca: Don't allow userspace open while recovering from catastrophic error 2009-09-05 20:36:16 -07:00
mthca_provider.h IB/mthca: Distinguish multiple devices in /proc/interrupts 2009-09-05 20:36:15 -07:00
mthca_qp.c IB/mthca: Annotate CQ locking 2009-09-05 20:36:15 -07:00
mthca_reset.c IB/mthca: Remove unnecessary include of <linux/init.h> 2009-09-05 20:36:15 -07:00
mthca_srq.c
mthca_uar.c
mthca_user.h
mthca_wqe.h