>* It's possible for flush_workqueue to be called from the workqueue thread.
>
>* We hold a mutex when calling flush_workqueue, and a queued work item
>will try to acquire that same mutex.

There's no need to call flush_workqueue unless we're destroying the
port as a result of removing the device.  Can you see if the following patch
fixes your unload issue?  (I wasn't able to reproduce the original problem.)

Signed-off-by: Sean Hefty <[EMAIL PROTECTED]>
---
Btw, I will have the cache disabled by default when I request the pull for
2.6.23.


diff --git a/drivers/infiniband/core/local_sa.c 
b/drivers/infiniband/core/local_sa.c
index aac3f2d..7c9a922 100644
--- a/drivers/infiniband/core/local_sa.c
+++ b/drivers/infiniband/core/local_sa.c
@@ -633,7 +633,6 @@ static void unsubscribe_port(struct sa_db_port *port)
 static void cleanup_port(struct sa_db_port *port)
 {
        unsubscribe_port(port);
-       flush_workqueue(sa_wq);
 
        clean_update_list(port);
        remove_all_attrs(&port->paths);
@@ -1173,6 +1172,7 @@ static void destroy_port(struct sa_db_port *port)
 
        ib_unregister_mad_agent(port->agent);
        cleanup_port(port);
+       flush_workqueue(sa_wq);
 }
 
 static void sa_db_add_dev(struct ib_device *device)

_______________________________________________
general mailing list
[email protected]
http://lists.openfabrics.org/cgi-bin/mailman/listinfo/general

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

Reply via email to