svn commit: r203794 - stable/8/sys/dev/isp
Matt Jacob
mjacob at FreeBSD.org
Fri Feb 12 00:47:23 UTC 2010
Author: mjacob
Date: Fri Feb 12 00:47:23 2010
New Revision: 203794
URL: http://svn.freebsd.org/changeset/base/203794
Log:
Pick up some changes the the MFC missed.
Modified:
stable/8/sys/dev/isp/isp.c
stable/8/sys/dev/isp/isp_library.c
Modified: stable/8/sys/dev/isp/isp.c
==============================================================================
--- stable/8/sys/dev/isp/isp.c Fri Feb 12 00:45:29 2010 (r203793)
+++ stable/8/sys/dev/isp/isp.c Fri Feb 12 00:47:23 2010 (r203794)
@@ -2763,15 +2763,21 @@ isp_pdb_sync(ispsoftc_t *isp, int chan)
/*
* Make sure we're okay for doing this right now.
*/
- if (fcp->isp_loopstate != LOOP_PDB_RCVD && fcp->isp_loopstate != LOOP_FSCAN_DONE && fcp->isp_loopstate != LOOP_LSCAN_DONE) {
- isp_prt(isp, ISP_LOGWARN, "isp_pdb_sync: bad loopstate %d", fcp->isp_loopstate);
+ if (fcp->isp_loopstate != LOOP_PDB_RCVD &&
+ fcp->isp_loopstate != LOOP_FSCAN_DONE &&
+ fcp->isp_loopstate != LOOP_LSCAN_DONE) {
+ isp_prt(isp, ISP_LOGWARN, "isp_pdb_sync: bad loopstate %d",
+ fcp->isp_loopstate);
return (-1);
}
- if (fcp->isp_topo == TOPO_FL_PORT || fcp->isp_topo == TOPO_NL_PORT || fcp->isp_topo == TOPO_N_PORT) {
+ if (fcp->isp_topo == TOPO_FL_PORT ||
+ fcp->isp_topo == TOPO_NL_PORT ||
+ fcp->isp_topo == TOPO_N_PORT) {
if (fcp->isp_loopstate < LOOP_LSCAN_DONE) {
if (isp_scan_loop(isp, chan) != 0) {
- isp_prt(isp, ISP_LOGWARN, "isp_pdb_sync: isp_scan_loop failed");
+ isp_prt(isp, ISP_LOGWARN,
+ "isp_pdb_sync: isp_scan_loop failed");
return (-1);
}
}
@@ -2780,13 +2786,15 @@ isp_pdb_sync(ispsoftc_t *isp, int chan)
if (fcp->isp_topo == TOPO_F_PORT || fcp->isp_topo == TOPO_FL_PORT) {
if (fcp->isp_loopstate < LOOP_FSCAN_DONE) {
if (isp_scan_fabric(isp, chan) != 0) {
- isp_prt(isp, ISP_LOGWARN, "isp_pdb_sync: isp_scan_fabric failed");
+ isp_prt(isp, ISP_LOGWARN,
+ "isp_pdb_sync: isp_scan_fabric failed");
return (-1);
}
}
}
- isp_prt(isp, ISP_LOGSANCFG|ISP_LOGDEBUG0, "Chan %d Synchronizing PDBs", chan);
+ isp_prt(isp, ISP_LOGSANCFG|ISP_LOGDEBUG0,
+ "Chan %d Synchronizing PDBs", chan);
fcp->isp_loopstate = LOOP_SYNCING_PDB;
@@ -2815,7 +2823,11 @@ isp_pdb_sync(ispsoftc_t *isp, int chan)
lp->state = FC_PORTDB_STATE_NIL;
isp_async(isp, ISPASYNC_DEV_GONE, chan, lp);
if (lp->autologin == 0) {
- (void) isp_plogx(isp, chan, lp->handle, lp->portid, PLOGX_FLG_CMD_LOGO | PLOGX_FLG_IMPLICIT | PLOGX_FLG_FREE_NPHDL, 0);
+ (void) isp_plogx(isp, chan, lp->handle,
+ lp->portid,
+ PLOGX_FLG_CMD_LOGO |
+ PLOGX_FLG_IMPLICIT |
+ PLOGX_FLG_FREE_NPHDL, 0);
} else {
lp->autologin = 0;
}
@@ -3061,7 +3073,8 @@ isp_scan_loop(ispsoftc_t *isp, int chan)
for (i = 0; i < MAX_FC_TARG; i++) {
lp = &fcp->portdb[i];
- if (lp->state == FC_PORTDB_STATE_NIL || lp->target_mode) {
+ if (lp->state == FC_PORTDB_STATE_NIL ||
+ lp->target_mode) {
continue;
}
if (lp->node_wwn != tmp.node_wwn) {
@@ -3579,7 +3592,8 @@ isp_scan_fabric(ispsoftc_t *isp, int cha
for (dbidx = 0; dbidx < MAX_FC_TARG; dbidx++) {
lp = &fcp->portdb[dbidx];
- if (lp->state != FC_PORTDB_STATE_PROBATIONAL || lp->target_mode) {
+ if (lp->state != FC_PORTDB_STATE_PROBATIONAL ||
+ lp->target_mode) {
continue;
}
if (lp->portid == portid) {
@@ -3816,7 +3830,8 @@ isp_scan_fabric(ispsoftc_t *isp, int cha
if (fcp->portdb[dbidx].target_mode) {
continue;
}
- if (fcp->portdb[dbidx].node_wwn == wwnn && fcp->portdb[dbidx].port_wwn == wwpn) {
+ if (fcp->portdb[dbidx].node_wwn == wwnn &&
+ fcp->portdb[dbidx].port_wwn == wwpn) {
break;
}
}
Modified: stable/8/sys/dev/isp/isp_library.c
==============================================================================
--- stable/8/sys/dev/isp/isp_library.c Fri Feb 12 00:45:29 2010 (r203793)
+++ stable/8/sys/dev/isp/isp_library.c Fri Feb 12 00:47:23 2010 (r203794)
@@ -650,7 +650,7 @@ isp_clear_commands(ispsoftc_t *isp)
#ifdef ISP_TARGET_MODE
for (tmp = 0; isp->isp_tgtlist && tmp < isp->isp_maxcmds; tmp++) {
uint8_t local[QENTRY_LEN];
- hdp = &isp->isp_tgt_xflist[tmp];
+ hdp = &isp->isp_tgtlist[tmp];
if (hdp->handle == ISP_HANDLE_FREE) {
continue;
}
@@ -2275,7 +2275,7 @@ isp_find_tgt_handle(ispsoftc_t *isp, voi
void
isp_destroy_tgt_handle(ispsoftc_t *isp, uint32_t handle)
{
- if (!ISP_VALID_TGT_HANDLE(handle)) {
+ if (!ISP_VALID_TGT_HANDLE(isp, handle)) {
isp_prt(isp, ISP_LOGERR, "%s: bad handle 0x%x", __func__, handle);
} else {
isp->isp_tgtlist[(handle & ISP_HANDLE_CMD_MASK)].handle = ISP_HANDLE_FREE;
More information about the svn-src-stable
mailing list