+static void usa_remove_one(struct ib_device *device)
+{
+       struct usa_device *dev;
+
+       dev = ib_get_client_data(device, &usa_client);
+       if (!dev)
+               return;
+
+       mutex_lock(&usa_mutex);
+       list_del(&dev->list);
+       mutex_unlock(&usa_mutex);
+
+       /* TODO: force immediate device removal */
+       put_dev(dev);
+       wait_for_completion(&dev->comp);
+       kfree(dev);
+}

I think we really need to address this TODO.
An application waiting for data from SA needs to get woken up and get
an error code indicating that the device was removed.

This is currently broken in umad, but let's do it correctly here.

-- 
MST

_______________________________________________
openib-general mailing list
openib-general@openib.org
http://openib.org/mailman/listinfo/openib-general

To unsubscribe, please visit http://openib.org/mailman/listinfo/openib-general

Reply via email to