Make RQCS_PORT_LOGGED_OUT for ZOMBIE ports retriable.

It is normal for ZOMBIE ports to be logged out.  This status is not really
an error until Gone Device Timeout expires, so make CAM retry after delay.

MFC after:	1 week
This commit is contained in:
Alexander Motin 2016-05-17 15:12:57 +00:00
parent d4d32e5899
commit 3a82d79d30

View file

@ -6517,6 +6517,8 @@ isp_parse_status(ispsoftc_t *isp, ispstatusreq_t *sp, XS_T *xs, long *rp)
{
const char *reason;
uint8_t sts = sp->req_completion_status & 0xff;
fcparam *fcp = FCPARAM(isp, 0);
fcportdb_t *lp;
/*
* It was there (maybe)- treat as a selection timeout.
@ -6534,8 +6536,8 @@ isp_parse_status(ispsoftc_t *isp, ispstatusreq_t *sp, XS_T *xs, long *rp)
* to force a re-login of this unit. If we're on fabric,
* then we'll have to log in again as a matter of course.
*/
if (FCPARAM(isp, 0)->isp_topo == TOPO_NL_PORT ||
FCPARAM(isp, 0)->isp_topo == TOPO_FL_PORT) {
if (fcp->isp_topo == TOPO_NL_PORT ||
fcp->isp_topo == TOPO_FL_PORT) {
mbreg_t mbs;
MBSINIT(&mbs, MBOX_INIT_LIP, MBLOGALL, 0);
if (ISP_CAP_2KLOGIN(isp)) {
@ -6544,7 +6546,12 @@ isp_parse_status(ispsoftc_t *isp, ispstatusreq_t *sp, XS_T *xs, long *rp)
isp_mboxcmd_qnw(isp, &mbs, 1);
}
if (XS_NOERR(xs)) {
XS_SETERR(xs, HBA_SELTIMEOUT);
lp = &fcp->portdb[XS_TGT(xs)];
if (lp->state == FC_PORTDB_STATE_ZOMBIE) {
*XS_STSP(xs) = SCSI_BUSY;
XS_SETERR(xs, HBA_TGTBSY);
} else
XS_SETERR(xs, HBA_SELTIMEOUT);
}
return;
}
@ -6668,6 +6675,8 @@ isp_parse_status_24xx(ispsoftc_t *isp, isp24xx_statusreq_t *sp, XS_T *xs, long *
{
const char *reason;
uint8_t sts = sp->req_completion_status & 0xff;
fcparam *fcp = FCPARAM(isp, XS_CHANNEL(xs));
fcportdb_t *lp;
/*
* It was there (maybe)- treat as a selection timeout.
@ -6685,7 +6694,12 @@ isp_parse_status_24xx(ispsoftc_t *isp, isp24xx_statusreq_t *sp, XS_T *xs, long *
* There is no MBOX_INIT_LIP for the 24XX.
*/
if (XS_NOERR(xs)) {
XS_SETERR(xs, HBA_SELTIMEOUT);
lp = &fcp->portdb[XS_TGT(xs)];
if (lp->state == FC_PORTDB_STATE_ZOMBIE) {
*XS_STSP(xs) = SCSI_BUSY;
XS_SETERR(xs, HBA_TGTBSY);
} else
XS_SETERR(xs, HBA_SELTIMEOUT);
}
return;
}