aboutsummaryrefslogtreecommitdiff
path: root/sys/dev/isp
diff options
context:
space:
mode:
authorAlexander Motin <mav@FreeBSD.org>2020-10-25 19:34:02 +0000
committerAlexander Motin <mav@FreeBSD.org>2020-10-25 19:34:02 +0000
commit883649681528398dc227778882830fc9da0ce58c (patch)
treee723924a03b24e3f8e7969d4016ff5c79df76e94 /sys/dev/isp
parent98b04ac35965fa0735c06a4966c6939f8009509e (diff)
Notes
Diffstat (limited to 'sys/dev/isp')
-rw-r--r--sys/dev/isp/isp.c4
-rw-r--r--sys/dev/isp/isp_freebsd.c2
-rw-r--r--sys/dev/isp/isp_freebsd.h3
-rw-r--r--sys/dev/isp/isp_stds.h3
-rw-r--r--sys/dev/isp/ispvar.h1
5 files changed, 11 insertions, 2 deletions
diff --git a/sys/dev/isp/isp.c b/sys/dev/isp/isp.c
index b81e3de28022..fe50aab77d43 100644
--- a/sys/dev/isp/isp.c
+++ b/sys/dev/isp/isp.c
@@ -4554,7 +4554,9 @@ isp_start(XS_T *xs)
} else {
ttype = FCP_CMND_TASK_ATTR_SIMPLE;
}
- ((ispreqt7_t *)reqp)->req_task_attribute = ttype;
+ ((ispreqt7_t *)reqp)->req_task_attribute = ttype |
+ ((XS_PRIORITY(xs) << FCP_CMND_PRIO_SHIFT) &
+ FCP_CMND_PRIO_MASK);
} else if (IS_FC(isp)) {
/*
* See comment in isp_intr_respq
diff --git a/sys/dev/isp/isp_freebsd.c b/sys/dev/isp/isp_freebsd.c
index 3857d52bc0b0..f381f9f4f6f6 100644
--- a/sys/dev/isp/isp_freebsd.c
+++ b/sys/dev/isp/isp_freebsd.c
@@ -1917,6 +1917,8 @@ isp_handle_platform_atio7(ispsoftc_t *isp, at7_entry_t *aep)
atiop->tag_action = 0;
break;
}
+ atiop->priority = (aep->at_cmnd.fcp_cmnd_task_attribute &
+ FCP_CMND_PRIO_MASK) >> FCP_CMND_PRIO_SHIFT;
atp->orig_datalen = aep->at_cmnd.cdb_dl.sf.fcp_cmnd_dl;
atp->bytes_xfered = 0;
atp->lun = lun;
diff --git a/sys/dev/isp/isp_freebsd.h b/sys/dev/isp/isp_freebsd.h
index 971fc0b05d84..a19c10e2b157 100644
--- a/sys/dev/isp/isp_freebsd.h
+++ b/sys/dev/isp/isp_freebsd.h
@@ -546,7 +546,8 @@ default: \
#define XS_TAG_TYPE(ccb) \
((ccb->tag_action == MSG_SIMPLE_Q_TAG)? REQFLAG_STAG : \
((ccb->tag_action == MSG_HEAD_OF_Q_TAG)? REQFLAG_HTAG : REQFLAG_OTAG))
-
+
+#define XS_PRIORITY(ccb) (ccb)->priority
#define XS_SETERR(ccb, v) (ccb)->ccb_h.status &= ~CAM_STATUS_MASK, \
(ccb)->ccb_h.status |= v
diff --git a/sys/dev/isp/isp_stds.h b/sys/dev/isp/isp_stds.h
index 197962f2cee0..2dfea07cf55d 100644
--- a/sys/dev/isp/isp_stds.h
+++ b/sys/dev/isp/isp_stds.h
@@ -89,6 +89,9 @@ typedef struct {
#define FCP_CMND_TASK_ATTR_UNTAGGED 0x05
#define FCP_CMND_TASK_ATTR_MASK 0x07
+#define FCP_CMND_PRIO_MASK 0x78
+#define FCP_CMND_PRIO_SHIFT 3
+
#define FCP_CMND_ADDTL_CDBLEN_SHIFT 2
#define FCP_CMND_DATA_WRITE 0x01
diff --git a/sys/dev/isp/ispvar.h b/sys/dev/isp/ispvar.h
index 45513a3b6871..5ff34e829eb3 100644
--- a/sys/dev/isp/ispvar.h
+++ b/sys/dev/isp/ispvar.h
@@ -1036,6 +1036,7 @@ void isp_async(ispsoftc_t *, ispasync_t, ...);
* XS_SNSASCQ(xs) dereferences XS_SNSP to get the current stored Additional Sense Code Qualifier
* XS_TAG_P(xs) predicate of whether this command should be tagged
* XS_TAG_TYPE(xs) which type of tag to use
+ * XS_PRIORITY(xs) command priority for SIMPLE tag
* XS_SETERR(xs) set error state
*
* HBA_NOERROR command has no erros