Date: Fri, 24 Feb 2017 12:12:30 +0000 (UTC) From: Alexander Motin <mav@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r314204 - head/sys/cam/ctl Message-ID: <201702241212.v1OCCUf0037869@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: mav Date: Fri Feb 24 12:12:30 2017 New Revision: 314204 URL: https://svnweb.freebsd.org/changeset/base/314204 Log: Explicitly abort ATIO if CTIO sending status has failed. This helps SIM to free related resources in questionable cases. MFC after: 2 weeks Modified: head/sys/cam/ctl/scsi_ctl.c Modified: head/sys/cam/ctl/scsi_ctl.c ============================================================================== --- head/sys/cam/ctl/scsi_ctl.c Fri Feb 24 12:11:17 2017 (r314203) +++ head/sys/cam/ctl/scsi_ctl.c Fri Feb 24 12:12:30 2017 (r314204) @@ -1282,6 +1282,14 @@ ctlfedone(struct cam_periph *periph, uni * datamove done routine. */ if ((io->io_hdr.flags & CTL_FLAG_DMA_INPROG) == 0) { + /* Abort ATIO if CTIO sending status has failed. */ + if ((done_ccb->ccb_h.status & CAM_STATUS_MASK) != + CAM_REQ_CMP) { + done_ccb->ccb_h.func_code = XPT_ABORT; + done_ccb->cab.abort_ccb = (union ccb *)atio; + xpt_action(done_ccb); + } + softc->ccbs_freed++; xpt_release_ccb(done_ccb); ctlfe_requeue_ccb(periph, (union ccb *)atio,
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201702241212.v1OCCUf0037869>