Allow more commands to pass persistent reservation according to SPC-4 r37.
This commit is contained in:
parent
94b0d1ae8d
commit
fb767c2ba2
@ -7888,7 +7888,7 @@ ctl_persistent_reserve_in(struct ctl_scsiio *ctsio)
|
||||
|
||||
res_cap = (struct scsi_per_res_cap *)ctsio->kern_data_ptr;
|
||||
scsi_ulto2b(sizeof(*res_cap), res_cap->length);
|
||||
res_cap->flags2 |= SPRI_TMV | SPRI_ALLOW_3;
|
||||
res_cap->flags2 |= SPRI_TMV | SPRI_ALLOW_5;
|
||||
type_mask = SPRI_TM_WR_EX_AR |
|
||||
SPRI_TM_EX_AC_RO |
|
||||
SPRI_TM_WR_EX_RO |
|
||||
|
@ -304,7 +304,8 @@ const struct ctl_cmd_entry ctl_cmd_table_84[32] =
|
||||
/* 00 RECEIVE COPY STATUS (LID1) */
|
||||
{ctl_receive_copy_status_lid1, CTL_SERIDX_RD_CAP,
|
||||
CTL_CMD_FLAG_OK_ON_BOTH |
|
||||
CTL_FLAG_DATA_IN,
|
||||
CTL_FLAG_DATA_IN |
|
||||
CTL_CMD_FLAG_ALLOW_ON_PR_RESV,
|
||||
CTL_LUN_PAT_NONE,
|
||||
16, {0x00, 0xff, 0, 0, 0, 0, 0, 0, 0, 0xff, 0xff, 0xff, 0xff, 0, 0x07}},
|
||||
|
||||
@ -320,14 +321,16 @@ const struct ctl_cmd_entry ctl_cmd_table_84[32] =
|
||||
CTL_CMD_FLAG_OK_ON_STOPPED |
|
||||
CTL_CMD_FLAG_OK_ON_INOPERABLE |
|
||||
CTL_CMD_FLAG_OK_ON_SECONDARY |
|
||||
CTL_FLAG_DATA_IN,
|
||||
CTL_FLAG_DATA_IN |
|
||||
CTL_CMD_FLAG_ALLOW_ON_PR_RESV,
|
||||
CTL_LUN_PAT_NONE,
|
||||
16, {0x03, 0, 0, 0, 0, 0, 0, 0, 0, 0xff, 0xff, 0xff, 0xff, 0, 0x07}},
|
||||
|
||||
/* 04 RECEIVE COPY FAILURE DETAILS (LID1) */
|
||||
{ctl_receive_copy_failure_details, CTL_SERIDX_RD_CAP,
|
||||
CTL_CMD_FLAG_OK_ON_BOTH |
|
||||
CTL_FLAG_DATA_IN,
|
||||
CTL_FLAG_DATA_IN |
|
||||
CTL_CMD_FLAG_ALLOW_ON_PR_RESV,
|
||||
CTL_LUN_PAT_NONE,
|
||||
16, {0x04, 0xff, 0, 0, 0, 0, 0, 0, 0, 0xff, 0xff, 0xff, 0xff, 0, 0x07}},
|
||||
|
||||
@ -470,7 +473,8 @@ const struct ctl_cmd_entry ctl_cmd_table_a3[32] =
|
||||
CTL_CMD_FLAG_OK_ON_STOPPED |
|
||||
CTL_CMD_FLAG_OK_ON_INOPERABLE |
|
||||
CTL_CMD_FLAG_OK_ON_SECONDARY |
|
||||
CTL_FLAG_DATA_IN,
|
||||
CTL_FLAG_DATA_IN |
|
||||
CTL_CMD_FLAG_ALLOW_ON_PR_RESV,
|
||||
CTL_LUN_PAT_NONE,
|
||||
12, {0x0c, 0x07, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0, 0x07}},
|
||||
|
||||
@ -479,7 +483,8 @@ const struct ctl_cmd_entry ctl_cmd_table_a3[32] =
|
||||
CTL_CMD_FLAG_OK_ON_STOPPED |
|
||||
CTL_CMD_FLAG_OK_ON_INOPERABLE |
|
||||
CTL_CMD_FLAG_OK_ON_SECONDARY |
|
||||
CTL_FLAG_DATA_IN,
|
||||
CTL_FLAG_DATA_IN |
|
||||
CTL_CMD_FLAG_ALLOW_ON_PR_RESV,
|
||||
CTL_LUN_PAT_NONE,
|
||||
12, {0x0d, 0, 0, 0, 0, 0xff, 0xff, 0xff, 0xff, 0, 0x07}},
|
||||
|
||||
|
@ -317,6 +317,7 @@ struct scsi_per_res_cap
|
||||
#define SPRI_ALLOW_2 0x20
|
||||
#define SPRI_ALLOW_3 0x30
|
||||
#define SPRI_ALLOW_4 0x40
|
||||
#define SPRI_ALLOW_5 0x50
|
||||
#define SPRI_PTPL_A 0x01
|
||||
uint8_t type_mask[2];
|
||||
#define SPRI_TM_WR_EX_AR 0x8000
|
||||
|
Loading…
Reference in New Issue
Block a user