From owner-svn-src-stable@freebsd.org Mon Mar 6 06:30:29 2017 Return-Path: Delivered-To: svn-src-stable@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 39974CFAE37; Mon, 6 Mar 2017 06:30:29 +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 F139D17CA; Mon, 6 Mar 2017 06:30:28 +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 v266URI9095920; Mon, 6 Mar 2017 06:30:27 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v266URdG095919; Mon, 6 Mar 2017 06:30:27 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201703060630.v266URdG095919@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Mon, 6 Mar 2017 06:30:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r314746 - stable/11/sys/dev/isp X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 06 Mar 2017 06:30:29 -0000 Author: mav Date: Mon Mar 6 06:30:27 2017 New Revision: 314746 URL: https://svnweb.freebsd.org/changeset/base/314746 Log: MFC r314208: Respecting r314204 tighten ATIO cleanup requirements. Every ATIO must complete with either successfully sent status or XPT_ABORT. Modified: stable/11/sys/dev/isp/isp_freebsd.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/isp/isp_freebsd.c ============================================================================== --- stable/11/sys/dev/isp/isp_freebsd.c Mon Mar 6 06:29:42 2017 (r314745) +++ stable/11/sys/dev/isp/isp_freebsd.c Mon Mar 6 06:30:27 2017 (r314746) @@ -2289,6 +2289,8 @@ isp_handle_platform_ctio(ispsoftc_t *isp return; } if (ct->ct_nphdl == CT_HBA_RESET) { + sentstatus = (ccb->ccb_h.flags & CAM_SEND_STATUS) && + (atp->sendst == 0); failure = CAM_UNREC_HBA_ERROR; } else { sentstatus = ct->ct_flags & CT7_SENDSTATUS; @@ -2311,6 +2313,8 @@ isp_handle_platform_ctio(ispsoftc_t *isp return; } if (ct->ct_status == CT_HBA_RESET) { + sentstatus = (ccb->ccb_h.flags & CAM_SEND_STATUS) && + (atp->sendst == 0); failure = CAM_UNREC_HBA_ERROR; } else { sentstatus = ct->ct_flags & CT2_SENDSTATUS; @@ -2356,9 +2360,10 @@ isp_handle_platform_ctio(ispsoftc_t *isp } /* - * If we sent status or error happened, we are done with this ATIO. + * We are done with this ATIO if we successfully sent status. + * In all other cases expect either another CTIO or XPT_ABORT. */ - if (sentstatus || !ok) + if (ok && sentstatus) isp_put_atpd(isp, bus, atp); /*