Fix botch for state levels. Role minor release. Start adding code for a

'force logout' path.

MFC after:	4 weeks
This commit is contained in:
Matt Jacob 2001-06-05 17:11:06 +00:00
parent 7528c356f5
commit 6a23026c6e
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=77776
3 changed files with 14 additions and 10 deletions

View File

@ -1685,7 +1685,7 @@ isp_pdb_sync(struct ispsoftc *isp)
if (pdb.pdb_loopid == lp->loopid && lp->portid ==
(u_int32_t) BITS2WORD(pdb.pdb_portid_bits) &&
nwwnn == lp->node_wwn && nwwpn == lp->port_wwn &&
lp->roles == nrole) {
lp->roles == nrole && lp->force_logout == 0) {
lp->loggedin = lp->valid = 1;
isp_prt(isp, ISP_LOGINFO, lretained,
(int) (lp - fcp->portdb),
@ -1694,6 +1694,8 @@ isp_pdb_sync(struct ispsoftc *isp)
}
}
lp->force_logout = 0;
if (fcp->isp_fwstate != FW_READY ||
fcp->isp_loopstate != LOOP_SYNCING_PDB) {
return (-1);
@ -2075,6 +2077,8 @@ isp_scan_loop(struct ispsoftc *isp)
* No need to notify anyone- go for the next one.
*/
if (i < hival) {
isp_prt(isp, ISP_LOGINFO, retained,
fcp->portdb[i].loopid, i, fcp->portdb[i].portid);
continue;
}
@ -3791,7 +3795,6 @@ isp_parse_status(struct ispsoftc *isp, ispstatusreq_t *sp, XS_T *xs)
XS_SETERR(xs, HBA_SELTIMEOUT);
}
return;
case RQCS_PORT_LOGGED_OUT:
/*
* It was there (maybe)- treat as a selection timeout.

View File

@ -1,7 +1,7 @@
/* $FreeBSD$ */
/*
* Qlogic ISP SCSI Host Adapter FreeBSD Wrapper Definitions (CAM version)
* Copyright (c) 1997, 1998, 1999, 2000 by Matthew Jacob
* Copyright (c) 1997, 1998, 1999, 2000, 2001 by Matthew Jacob
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@ -28,7 +28,7 @@
#define _ISP_FREEBSD_H
#define ISP_PLATFORM_VERSION_MAJOR 5
#define ISP_PLATFORM_VERSION_MINOR 7
#define ISP_PLATFORM_VERSION_MINOR 8
/*
* We're not ready for primetime yet

View File

@ -230,10 +230,10 @@ typedef struct {
typedef struct {
u_int32_t isp_fwoptions : 16,
: 3,
: 2,
isp_iid_set : 1,
loop_seen_once : 1,
isp_loopstate : 3, /* Current Loop State */
isp_loopstate : 4, /* Current Loop State */
isp_fwstate : 3, /* ISP F/W state */
isp_gotdparms : 1,
isp_topo : 3,
@ -264,7 +264,8 @@ typedef struct {
struct lportdb {
u_int
loopid : 8,
: 2,
: 1,
force_logout : 1,
was_fabric_dev : 1,
fabric_dev : 1,
loggedin : 1,
@ -297,9 +298,9 @@ typedef struct {
#define LOOP_SCANNING_FABRIC 3
#define LOOP_FSCAN_DONE 4
#define LOOP_SCANNING_LOOP 5
#define LOOP_LSCAN_DONE 4
#define LOOP_SYNCING_PDB 6
#define LOOP_READY 7
#define LOOP_LSCAN_DONE 6
#define LOOP_SYNCING_PDB 7
#define LOOP_READY 8
#define TOPO_NL_PORT 0
#define TOPO_FL_PORT 1