diff options
author | Abhijeet Joglekar <abjoglek@cisco.com> | 2009-04-21 19:27:14 -0400 |
---|---|---|
committer | James Bottomley <James.Bottomley@HansenPartnership.com> | 2009-04-27 11:19:01 -0400 |
commit | bbf156697a6332f9074e2b275a9157d99a431398 (patch) | |
tree | 13928d3cf46a7029a3e764c8767d8c6a31dd2349 | |
parent | a0fd2e49ec75bf74d3d202df51dfe65ad4c32605 (diff) |
[SCSI] libfc: Change state to NONE in fc_lport_destroy
After lport_destroy, the local port should not be used again. Transition
to state NONE, any incoming frames or link up should not transition out
of this state since we are deleting exchange table and cleaning up the
local port. Also, mark link as down.
Signed-off-by: Abhijeet Joglekar <abjoglek@cisco.com>
Signed-off-by: Robert Love <robert.w.love@intel.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
-rw-r--r-- | drivers/scsi/libfc/fc_lport.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/scsi/libfc/fc_lport.c b/drivers/scsi/libfc/fc_lport.c index 4cd953378c57..e0c247724d2b 100644 --- a/drivers/scsi/libfc/fc_lport.c +++ b/drivers/scsi/libfc/fc_lport.c | |||
@@ -644,7 +644,12 @@ EXPORT_SYMBOL(fc_fabric_logoff); | |||
644 | */ | 644 | */ |
645 | int fc_lport_destroy(struct fc_lport *lport) | 645 | int fc_lport_destroy(struct fc_lport *lport) |
646 | { | 646 | { |
647 | mutex_lock(&lport->lp_mutex); | ||
648 | lport->state = LPORT_ST_NONE; | ||
649 | lport->link_up = 0; | ||
647 | lport->tt.frame_send = fc_frame_drop; | 650 | lport->tt.frame_send = fc_frame_drop; |
651 | mutex_unlock(&lport->lp_mutex); | ||
652 | |||
648 | lport->tt.fcp_abort_io(lport); | 653 | lport->tt.fcp_abort_io(lport); |
649 | lport->tt.exch_mgr_reset(lport, 0, 0); | 654 | lport->tt.exch_mgr_reset(lport, 0, 0); |
650 | return 0; | 655 | return 0; |