summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormav <mav@FreeBSD.org>2015-10-05 10:44:36 +0000
committermav <mav@FreeBSD.org>2015-10-05 10:44:36 +0000
commit61035b65c08e83d95ae0b970eb9b13536d3bec51 (patch)
treeaa75fb1d0bcf6770080ff3b65deaf064062a92a9
parentd26501783fa1a0c011311ad3551bf00d2ac83132 (diff)
downloadFreeBSD-src-61035b65c08e83d95ae0b970eb9b13536d3bec51.zip
FreeBSD-src-61035b65c08e83d95ae0b970eb9b13536d3bec51.tar.gz
MFC r287993: Split two command flags with different meaning.
This is only a cosmetical change.
-rw-r--r--sys/cam/ctl/ctl.c8
-rw-r--r--sys/cam/ctl/ctl_cmd_table.c9
-rw-r--r--sys/cam/ctl/ctl_private.h7
3 files changed, 13 insertions, 11 deletions
diff --git a/sys/cam/ctl/ctl.c b/sys/cam/ctl/ctl.c
index 705ca82..6308916 100644
--- a/sys/cam/ctl/ctl.c
+++ b/sys/cam/ctl/ctl.c
@@ -11176,7 +11176,7 @@ ctl_scsiio_precheck(struct ctl_softc *softc, struct ctl_scsiio *ctsio)
* it on the rtr queue.
*/
if (lun == NULL) {
- if (entry->flags & CTL_CMD_FLAG_OK_ON_ALL_LUNS) {
+ if (entry->flags & CTL_CMD_FLAG_OK_ON_NO_LUN) {
ctsio->io_hdr.flags |= CTL_FLAG_IS_WAS_ON_RTR;
ctl_enqueue_rtr((union ctl_io *)ctsio);
return (retval);
@@ -11394,13 +11394,11 @@ ctl_cmd_applicable(uint8_t lun_type, const struct ctl_cmd_entry *entry)
switch (lun_type) {
case T_PROCESSOR:
- if (((entry->flags & CTL_CMD_FLAG_OK_ON_PROC) == 0) &&
- ((entry->flags & CTL_CMD_FLAG_OK_ON_ALL_LUNS) == 0))
+ if ((entry->flags & CTL_CMD_FLAG_OK_ON_PROC) == 0)
return (0);
break;
case T_DIRECT:
- if (((entry->flags & CTL_CMD_FLAG_OK_ON_SLUN) == 0) &&
- ((entry->flags & CTL_CMD_FLAG_OK_ON_ALL_LUNS) == 0))
+ if ((entry->flags & CTL_CMD_FLAG_OK_ON_SLUN) == 0)
return (0);
break;
default:
diff --git a/sys/cam/ctl/ctl_cmd_table.c b/sys/cam/ctl/ctl_cmd_table.c
index f910201..9965eb7 100644
--- a/sys/cam/ctl/ctl_cmd_table.c
+++ b/sys/cam/ctl/ctl_cmd_table.c
@@ -546,7 +546,8 @@ const struct ctl_cmd_entry ctl_cmd_table[256] =
/* 03 REQUEST SENSE */
{ctl_request_sense, CTL_SERIDX_RQ_SNS, CTL_FLAG_DATA_IN |
- CTL_CMD_FLAG_OK_ON_ALL_LUNS |
+ CTL_CMD_FLAG_OK_ON_NO_LUN |
+ CTL_CMD_FLAG_OK_ON_BOTH |
CTL_CMD_FLAG_ALLOW_ON_RESV |
CTL_CMD_FLAG_NO_SENSE |
CTL_CMD_FLAG_OK_ON_STOPPED |
@@ -607,7 +608,8 @@ const struct ctl_cmd_entry ctl_cmd_table[256] =
{NULL, CTL_SERIDX_INVLD, CTL_CMD_FLAG_NONE, CTL_LUN_PAT_NONE},
/* 12 INQUIRY */
-{ctl_inquiry, CTL_SERIDX_INQ, CTL_CMD_FLAG_OK_ON_ALL_LUNS |
+{ctl_inquiry, CTL_SERIDX_INQ, CTL_CMD_FLAG_OK_ON_NO_LUN |
+ CTL_CMD_FLAG_OK_ON_BOTH |
CTL_CMD_FLAG_ALLOW_ON_RESV |
CTL_CMD_FLAG_NO_SENSE |
CTL_CMD_FLAG_OK_ON_STOPPED |
@@ -1172,7 +1174,8 @@ const struct ctl_cmd_entry ctl_cmd_table[256] =
{NULL, CTL_SERIDX_INVLD, CTL_CMD_FLAG_NONE, CTL_LUN_PAT_NONE},
/* A0 REPORT LUNS */
-{ctl_report_luns, CTL_SERIDX_INQ, CTL_CMD_FLAG_OK_ON_ALL_LUNS |
+{ctl_report_luns, CTL_SERIDX_INQ, CTL_CMD_FLAG_OK_ON_NO_LUN |
+ CTL_CMD_FLAG_OK_ON_BOTH |
CTL_CMD_FLAG_ALLOW_ON_RESV |
CTL_CMD_FLAG_NO_SENSE |
CTL_CMD_FLAG_OK_ON_STOPPED |
diff --git a/sys/cam/ctl/ctl_private.h b/sys/cam/ctl/ctl_private.h
index 3bbe947..f6b2084 100644
--- a/sys/cam/ctl/ctl_private.h
+++ b/sys/cam/ctl/ctl_private.h
@@ -91,14 +91,14 @@ typedef enum {
* WARNING: Keep the bottom nibble here free, we OR in the data direction
* flags for each command.
*
- * Note: "OK_ON_ALL_LUNS" == we don't have to have a lun configured
+ * Note: "OK_ON_NO_LUN" == we don't have to have a lun configured
* "OK_ON_BOTH" == we have to have a lun configured
* "SA5" == command has 5-bit service action at byte 1
*/
typedef enum {
CTL_CMD_FLAG_NONE = 0x0000,
CTL_CMD_FLAG_NO_SENSE = 0x0010,
- CTL_CMD_FLAG_OK_ON_ALL_LUNS = 0x0020,
+ CTL_CMD_FLAG_OK_ON_NO_LUN = 0x0020,
CTL_CMD_FLAG_ALLOW_ON_RESV = 0x0040,
CTL_CMD_FLAG_ALLOW_ON_PR_WRESV = 0x0080,
CTL_CMD_FLAG_OK_ON_PROC = 0x0100,
@@ -109,7 +109,8 @@ typedef enum {
CTL_CMD_FLAG_OK_ON_STANDBY = 0x1000,
CTL_CMD_FLAG_OK_ON_UNAVAIL = 0x2000,
CTL_CMD_FLAG_ALLOW_ON_PR_RESV = 0x4000,
- CTL_CMD_FLAG_SA5 = 0x8000
+ CTL_CMD_FLAG_SA5 = 0x8000,
+ CTL_CMD_FLAG_RUN_HERE = 0x10000
} ctl_cmd_flags;
typedef enum {
OpenPOWER on IntegriCloud