RDMA/cxgb3: wait at least one schedule cycle during device removal.
PATCH 1/1 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 concurrently must return from the function before iw_cxgb3 returns from its event processing. Do this by calling synchronize_net().
Signed-off-by Steve Wise <[email protected]>
---
drivers/infiniband/hw/cxgb3/iwch.c | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-)
drivers/infiniband/hw/cxgb3/iwch.c +2 -0
@@ -189,6 +189,7 @@ static void close_rnic_dev(struct t3cdev *tdev)list_for_each_entry_safe (dev, tmp, &dev_list, entry) {if (dev->rdev.t3cdev_p == tdev) { dev->rdev.flags =CXIO_ERROR_FATAL ; +synchronize_net ();cancel_delayed_work_sync (&dev->db_drop_task);list_del (&dev->entry);iwch_unregister_device (dev);
@@ -217,6 +218,7 @@ static void iwch_event_handler(struct t3cdev *tdev, u32 evt, u32 port_id)switch (evt) {case OFFLOAD_STATUS_DOWN : { rdev->flags =CXIO_ERROR_FATAL ; +synchronize_net (); event.event =IB_EVENT_DEVICE_FATAL ; dispatch =1 ;break ;
--
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
A message that is not in the archive (sent off-list or not yet received): 20100303150633.11256.9555.stgit-T4OLL4TyM9aNDNWfRnPdfg@public.gmane.org
Roland Dreier
Appliedthanks, applied.
Signature · 7 lines
Roland Dreier <[email protected]> For corporate legal information go to: http://www.cisco.com/web/about/doing_business/legal/cri/index.html -- 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