To be more sure that no more input arrives at the local port as
it is being destroyed, clean the queues in the per-cpu receive
threads.

Signed-off-by: Joe Eykholt <[email protected]>
---
 drivers/scsi/fcoe/fcoe.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)


diff --git a/drivers/scsi/fcoe/fcoe.c b/drivers/scsi/fcoe/fcoe.c
index 4d5d7bf..516cb80 100644
--- a/drivers/scsi/fcoe/fcoe.c
+++ b/drivers/scsi/fcoe/fcoe.c
@@ -467,6 +467,9 @@ static int fcoe_if_destroy(struct net_device *netdev)
        /* tear-down the FCoE controller */
        fcoe_ctlr_destroy(&fc->ctlr);
 
+       /* Free queued packets for the per-CPU receive threads */
+       fcoe_percpu_clean(lp);
+
        /* Cleanup the fc_lport */
        fc_lport_destroy(lp);
        fc_fcp_destroy(lp);
@@ -479,9 +482,6 @@ static int fcoe_if_destroy(struct net_device *netdev)
        if (lp->emp)
                fc_exch_mgr_free(lp->emp);
 
-       /* Free the per-CPU receive threads */
-       fcoe_percpu_clean(lp);
-
        /* Free existing skbs */
        fcoe_clean_pending_queue(lp);
 


_______________________________________________
devel mailing list
[email protected]
http://www.open-fcoe.org/mailman/listinfo/devel

Reply via email to