Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 161018
b: refs/heads/master
c: 1190d92
h: refs/heads/master
v: v3
  • Loading branch information
Joe Eykholt authored and James Bottomley committed Aug 22, 2009
1 parent b1e6681 commit 528167b
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 9 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: b1d9fd5574763abe5c763e32e3547a4adee9bd88
refs/heads/master: 1190d925813aab80d17ff10f26c115f5846b3308
42 changes: 34 additions & 8 deletions trunk/drivers/scsi/libfc/fc_lport.c
Original file line number Diff line number Diff line change
Expand Up @@ -930,19 +930,14 @@ int fc_lport_reset(struct fc_lport *lport)
EXPORT_SYMBOL(fc_lport_reset);

/**
* fc_rport_enter_reset() - Reset the local port
* fc_lport_reset_locked() - Reset the local port
* @lport: Fibre Channel local port to be reset
*
* Locking Note: The lport lock is expected to be held before calling
* this routine.
*/
static void fc_lport_enter_reset(struct fc_lport *lport)
static void fc_lport_reset_locked(struct fc_lport *lport)
{
FC_LPORT_DBG(lport, "Entered RESET state from %s state\n",
fc_lport_state(lport));

fc_lport_state_enter(lport, LPORT_ST_RESET);

if (lport->dns_rp)
lport->tt.rport_logoff(lport->dns_rp);

Expand All @@ -956,11 +951,42 @@ static void fc_lport_enter_reset(struct fc_lport *lport)
lport->tt.exch_mgr_reset(lport, 0, 0);
fc_host_fabric_name(lport->host) = 0;
fc_host_port_id(lport->host) = 0;
}

/**
* fc_lport_enter_reset() - Reset the local port
* @lport: Fibre Channel local port to be reset
*
* Locking Note: The lport lock is expected to be held before calling
* this routine.
*/
static void fc_lport_enter_reset(struct fc_lport *lport)
{
FC_LPORT_DBG(lport, "Entered RESET state from %s state\n",
fc_lport_state(lport));

fc_lport_state_enter(lport, LPORT_ST_RESET);
fc_lport_reset_locked(lport);
if (lport->link_up)
fc_lport_enter_flogi(lport);
}

/**
* fc_lport_enter_disabled() - disable the local port
* @lport: Fibre Channel local port to be reset
*
* Locking Note: The lport lock is expected to be held before calling
* this routine.
*/
static void fc_lport_enter_disabled(struct fc_lport *lport)
{
FC_LPORT_DBG(lport, "Entered disabled state from %s state\n",
fc_lport_state(lport));

fc_lport_state_enter(lport, LPORT_ST_DISABLED);
fc_lport_reset_locked(lport);
}

/**
* fc_lport_error() - Handler for any errors
* @lport: The fc_lport object
Expand Down Expand Up @@ -1382,7 +1408,7 @@ static void fc_lport_logo_resp(struct fc_seq *sp, struct fc_frame *fp,

op = fc_frame_payload_op(fp);
if (op == ELS_LS_ACC)
fc_lport_enter_reset(lport);
fc_lport_enter_disabled(lport);
else
fc_lport_error(lport, fp);

Expand Down

0 comments on commit 528167b

Please sign in to comment.