From owner-svn-src-all@freebsd.org Tue May 17 15:12:58 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B0865B3EF5B; Tue, 17 May 2016 15:12:58 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5CAF465148; Tue, 17 May 2016 15:12:58 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u4HFCvA0078060; Tue, 17 May 2016 15:12:57 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u4HFCvhB078059; Tue, 17 May 2016 15:12:57 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201605171512.u4HFCvhB078059@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Tue, 17 May 2016 15:12:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r300058 - head/sys/dev/isp X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 17 May 2016 15:12:58 -0000 Author: mav Date: Tue May 17 15:12:57 2016 New Revision: 300058 URL: https://svnweb.freebsd.org/changeset/base/300058 Log: 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 Modified: head/sys/dev/isp/isp.c Modified: head/sys/dev/isp/isp.c ============================================================================== --- head/sys/dev/isp/isp.c Tue May 17 14:52:05 2016 (r300057) +++ head/sys/dev/isp/isp.c Tue May 17 15:12:57 2016 (r300058) @@ -6517,6 +6517,8 @@ isp_parse_status(ispsoftc_t *isp, ispsta { 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, ispsta * 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, ispsta 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, i { 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, i * 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; }