From: Joe Eykholt Date: Thu, 30 Jul 2009 00:04:17 +0000 (-0700) Subject: [SCSI] fcoe: stop delivery of received frames before doing lport_destroy() X-Git-Tag: v2.6.32-rc1~689^2~181 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=f161fb72104c7addac3d404a1ff543b2491c1426;p=profile%2Fivi%2Fkernel-x86-ivi.git [SCSI] fcoe: stop delivery of received frames before doing lport_destroy() 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 Signed-off-by: Robert Love Signed-off-by: James Bottomley Signed-off-by: James Bottomley --- diff --git a/drivers/scsi/fcoe/fcoe.c b/drivers/scsi/fcoe/fcoe.c index 8160126..14a4017 100644 --- a/drivers/scsi/fcoe/fcoe.c +++ b/drivers/scsi/fcoe/fcoe.c @@ -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);