diff options
author | Matt Jacob <mjacob@FreeBSD.org> | 2000-07-17 00:43:47 +0000 |
---|---|---|
committer | Matt Jacob <mjacob@FreeBSD.org> | 2000-07-17 00:43:47 +0000 |
commit | a4eb4f164651cd879ec1a617218f27de5fb0f0c2 (patch) | |
tree | 56c01505f0cce405ac3fdf2defed86941330946e /sys/cam/cam_xpt.c | |
parent | a4de02ec123937cd901191b7466423f16643fb9a (diff) | |
download | src-a4eb4f164651cd879ec1a617218f27de5fb0f0c2.tar.gz src-a4eb4f164651cd879ec1a617218f27de5fb0f0c2.zip |
Notes
Diffstat (limited to 'sys/cam/cam_xpt.c')
-rw-r--r-- | sys/cam/cam_xpt.c | 20 |
1 files changed, 12 insertions, 8 deletions
diff --git a/sys/cam/cam_xpt.c b/sys/cam/cam_xpt.c index 61d109a08f25..72f971cca6af 100644 --- a/sys/cam/cam_xpt.c +++ b/sys/cam/cam_xpt.c @@ -3673,14 +3673,18 @@ xpt_run_dev_sendq(struct cam_eb *bus) splx(s); - if ((device->inq_flags & SID_CmdQue) != 0) - work_ccb->ccb_h.flags |= CAM_TAG_ACTION_VALID; - else - /* - * Clear this in case of a retried CCB that failed - * due to a rejected tag. - */ - work_ccb->ccb_h.flags &= ~CAM_TAG_ACTION_VALID; + /* In Target mode, the peripheral driver knows best... */ + if (work_ccb->ccb_h.func_code == XPT_SCSI_IO) { + if ((device->inq_flags & SID_CmdQue) != 0 + && work_ccb->csio.tag_action != CAM_TAG_ACTION_NONE) + work_ccb->ccb_h.flags |= CAM_TAG_ACTION_VALID; + else + /* + * Clear this in case of a retried CCB that + * failed due to a rejected tag. + */ + work_ccb->ccb_h.flags &= ~CAM_TAG_ACTION_VALID; + } /* * Device queues can be shared among multiple sim instances |