[SCSI] fcoe: stop delivery of received frames before doing lport_destroy()
authorJoe Eykholt <jeykholt@cisco.com>
Thu, 30 Jul 2009 00:04:17 +0000 (17:04 -0700)
committerJames Bottomley <James.Bottomley@suse.de>
Sat, 22 Aug 2009 22:52:04 +0000 (17:52 -0500)
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 <jeykholt@cisco.com>
Signed-off-by: Robert Love <robert.w.love@intel.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
drivers/scsi/fcoe/fcoe.c

index 81601269f4cd2ac01fabf3f438f7ffe1c3479584..14a4017a1535321dd61688075323e8cbf7ad9bc6 100644 (file)
@@ -466,6 +466,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);
@@ -478,9 +481,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);