[SCSI] libfc: stop login after fabric logoff
authorJoe Eykholt <jeykholt@cisco.com>
Thu, 30 Jul 2009 00:04:27 +0000 (17:04 -0700)
committerJames Bottomley <James.Bottomley@suse.de>
Sat, 22 Aug 2009 22:52:05 +0000 (17:52 -0500)
commit1190d925813aab80d17ff10f26c115f5846b3308
treea4d2de20afee5d22a3391b1305408a199d485771
parentb1d9fd5574763abe5c763e32e3547a4adee9bd88
[SCSI] libfc: stop login after fabric logoff

When removing the fcoe module, several lports were being shut down
through fc_lport_fabric_logoff().

Occasionally, one would enter reset state before fc_lport_destroy()
was called, and since link_up was still true, it would log back in.

If we just clear link_up earlier, then we wouldn't be accepting LOGO
requests from other initiators while we are shutting down.

Fix by changing the LOGO response handler to enter DISABLED instead
of RESET.  Add an fc_lport_enter_disabled() function which does
what fc_lport_enter_reset() did, except it doesn't proceed to FLOGI state.

Move the code that was common between fc_lport_enter_reset() and
fc_lport_enter_disabled() into a new fc_lport_reset_locked() function.

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/libfc/fc_lport.c