Split two command flags with different meaning.
This is only a cosmetical change.
This commit is contained in:
parent
006bc6579c
commit
5c7a1c36c1
@ -11174,7 +11174,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);
|
||||
@ -11392,13 +11392,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:
|
||||
|
@ -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 |
|
||||
|
@ -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 {
|
||||
|
Loading…
Reference in New Issue
Block a user