diff --git a/sys/dev/isp/isp.c b/sys/dev/isp/isp.c index 7797a97a6fbb..6680fc457e69 100644 --- a/sys/dev/isp/isp.c +++ b/sys/dev/isp/isp.c @@ -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. diff --git a/sys/dev/isp/isp_freebsd.h b/sys/dev/isp/isp_freebsd.h index 0e25d91bc3ec..46b52358158f 100644 --- a/sys/dev/isp/isp_freebsd.h +++ b/sys/dev/isp/isp_freebsd.h @@ -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 diff --git a/sys/dev/isp/ispvar.h b/sys/dev/isp/ispvar.h index 35c778a54913..1621519ad1d8 100644 --- a/sys/dev/isp/ispvar.h +++ b/sys/dev/isp/ispvar.h @@ -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