diff options
author | Steve Wise <swise@opengridcomputing.com> | 2010-03-03 10:06:34 -0500 |
---|---|---|
committer | Roland Dreier <rolandd@cisco.com> | 2010-03-11 17:00:35 -0500 |
commit | 69960a275efc9d82797bbbe2460a2d6c9cace314 (patch) | |
tree | 6cc110dfe51a5267563789655f141d99dcc6d8c0 /drivers/infiniband | |
parent | 25cf84cf377c0aae5dbcf937ea89bc7893db5176 (diff) |
RDMA/cxgb3: Wait at least one schedule cycle during device removal
During a hot-plug LLD removal event or an EEH error event, iw_cxgb3
must ensure that any/all threads that might be in a cxgb3 exported
function must return from the function before iw_cxgb3 returns from
its event processing. Do this by calling synchronize_net().
Signed-off-by: Steve Wise <swise@opengridcomputing.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
Diffstat (limited to 'drivers/infiniband')
-rw-r--r-- | drivers/infiniband/hw/cxgb3/iwch.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/infiniband/hw/cxgb3/iwch.c b/drivers/infiniband/hw/cxgb3/iwch.c index ee1d8b4d4541..63f975f3e30f 100644 --- a/drivers/infiniband/hw/cxgb3/iwch.c +++ b/drivers/infiniband/hw/cxgb3/iwch.c | |||
@@ -189,6 +189,7 @@ static void close_rnic_dev(struct t3cdev *tdev) | |||
189 | list_for_each_entry_safe(dev, tmp, &dev_list, entry) { | 189 | list_for_each_entry_safe(dev, tmp, &dev_list, entry) { |
190 | if (dev->rdev.t3cdev_p == tdev) { | 190 | if (dev->rdev.t3cdev_p == tdev) { |
191 | dev->rdev.flags = CXIO_ERROR_FATAL; | 191 | dev->rdev.flags = CXIO_ERROR_FATAL; |
192 | synchronize_net(); | ||
192 | cancel_delayed_work_sync(&dev->db_drop_task); | 193 | cancel_delayed_work_sync(&dev->db_drop_task); |
193 | list_del(&dev->entry); | 194 | list_del(&dev->entry); |
194 | iwch_unregister_device(dev); | 195 | iwch_unregister_device(dev); |
@@ -217,6 +218,7 @@ static void iwch_event_handler(struct t3cdev *tdev, u32 evt, u32 port_id) | |||
217 | switch (evt) { | 218 | switch (evt) { |
218 | case OFFLOAD_STATUS_DOWN: { | 219 | case OFFLOAD_STATUS_DOWN: { |
219 | rdev->flags = CXIO_ERROR_FATAL; | 220 | rdev->flags = CXIO_ERROR_FATAL; |
221 | synchronize_net(); | ||
220 | event.event = IB_EVENT_DEVICE_FATAL; | 222 | event.event = IB_EVENT_DEVICE_FATAL; |
221 | dispatch = 1; | 223 | dispatch = 1; |
222 | break; | 224 | break; |