Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 161148
b: refs/heads/master
c: b5cbf08
h: refs/heads/master
v: v3
  • Loading branch information
Joe Eykholt authored and James Bottomley committed Sep 10, 2009
1 parent 4f2d332 commit f1b3847
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 29 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: cdbe6dfece038e75214735d56cd06319b9a6df46
refs/heads/master: b5cbf083736e14911c32fca2a93c540a92e8413d
43 changes: 15 additions & 28 deletions trunk/drivers/scsi/libfc/fc_lport.c
Original file line number Diff line number Diff line change
Expand Up @@ -146,44 +146,31 @@ static void fc_lport_rport_callback(struct fc_lport *lport,
FC_LPORT_DBG(lport, "Received a %d event for port (%6x)\n", event,
rdata->ids.port_id);

mutex_lock(&lport->lp_mutex);
switch (event) {
case RPORT_EV_READY:
if (rdata->ids.port_id == FC_FID_DIR_SERV) {
mutex_lock(&lport->lp_mutex);
if (lport->state == LPORT_ST_DNS) {
lport->dns_rp = rdata;
fc_lport_enter_rpn_id(lport);
} else {
FC_LPORT_DBG(lport, "Received an READY event "
"on port (%6x) for the directory "
"server, but the lport is not "
"in the DNS state, it's in the "
"%d state", rdata->ids.port_id,
lport->state);
lport->tt.rport_logoff(rdata);
}
mutex_unlock(&lport->lp_mutex);
} else
FC_LPORT_DBG(lport, "Received an event for port (%6x) "
"which is not the directory server\n",
rdata->ids.port_id);
if (lport->state == LPORT_ST_DNS) {
lport->dns_rp = rdata;
fc_lport_enter_rpn_id(lport);
} else {
FC_LPORT_DBG(lport, "Received an READY event "
"on port (%6x) for the directory "
"server, but the lport is not "
"in the DNS state, it's in the "
"%d state", rdata->ids.port_id,
lport->state);
lport->tt.rport_logoff(rdata);
}
break;
case RPORT_EV_LOGO:
case RPORT_EV_FAILED:
case RPORT_EV_STOP:
if (rdata->ids.port_id == FC_FID_DIR_SERV) {
mutex_lock(&lport->lp_mutex);
lport->dns_rp = NULL;
mutex_unlock(&lport->lp_mutex);

} else
FC_LPORT_DBG(lport, "Received an event for port (%6x) "
"which is not the directory server\n",
rdata->ids.port_id);
lport->dns_rp = NULL;
break;
case RPORT_EV_NONE:
break;
}
mutex_unlock(&lport->lp_mutex);
}

/**
Expand Down

0 comments on commit f1b3847

Please sign in to comment.