mirror of
https://github.com/SCST-project/scst.git
synced 2026-05-14 09:11:27 +00:00
scst: Rename SERVICE_ACTION_IN into SERVICE_ACTION_IN_16
Rename this constant because it has been renamed in the Linux kernel. git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@6335 d57e44dd-8a1f-0410-8b47-8ef2f437770f
This commit is contained in:
@@ -395,9 +395,6 @@ static inline int scst_sense_response_code(const uint8_t *sense)
|
||||
#define MI_REPORT_SUPPORTED_TASK_MANAGEMENT_FUNCTIONS 0x0d
|
||||
#endif
|
||||
#endif
|
||||
#ifndef SERVICE_ACTION_IN
|
||||
#define SERVICE_ACTION_IN 0x9e
|
||||
#endif
|
||||
#ifndef SAI_READ_CAPACITY_16
|
||||
/* values for service action in */
|
||||
#define SAI_READ_CAPACITY_16 0x10
|
||||
@@ -447,6 +444,16 @@ static inline int scst_sense_response_code(const uint8_t *sense)
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 19, 0)
|
||||
/*
|
||||
* See also patch "scsi: rename SERVICE_ACTION_IN_16 to SERVICE_ACTION_IN_16"
|
||||
* (commit eb846d9f147455e4e5e1863bfb5e31974bb69b7c).
|
||||
*/
|
||||
#ifndef SERVICE_ACTION_IN_16
|
||||
#define SERVICE_ACTION_IN_16 0x9e
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 28)
|
||||
/*
|
||||
* From <linux/fs.h>. See also commit
|
||||
|
||||
@@ -1829,7 +1829,7 @@ static enum compl_status_e vdisk_nop(struct vdisk_cmd_params *p)
|
||||
return CMD_SUCCEEDED;
|
||||
}
|
||||
|
||||
static enum compl_status_e vdisk_exec_srv_action_in(struct vdisk_cmd_params *p)
|
||||
static enum compl_status_e vdisk_exec_sai_16(struct vdisk_cmd_params *p)
|
||||
{
|
||||
switch (p->cmd->cdb[1] & 0x1f) {
|
||||
case SAI_READ_CAPACITY_16:
|
||||
@@ -2188,14 +2188,14 @@ static const struct scst_opcode_descriptor scst_op_descr_format_unit = {
|
||||
};
|
||||
|
||||
static const struct scst_opcode_descriptor scst_op_descr_get_lba_status = {
|
||||
.od_opcode = SERVICE_ACTION_IN,
|
||||
.od_opcode = SERVICE_ACTION_IN_16,
|
||||
.od_serv_action = SAI_GET_LBA_STATUS,
|
||||
.od_serv_action_valid = 1,
|
||||
.od_support = 3, /* supported as in the standard */
|
||||
.od_cdb_size = 16,
|
||||
.od_nominal_timeout = SCST_DEFAULT_NOMINAL_TIMEOUT_SEC,
|
||||
.od_recommended_timeout = SCST_GENERIC_DISK_SMALL_TIMEOUT/HZ,
|
||||
.od_cdb_usage_bits = { SERVICE_ACTION_IN, SAI_GET_LBA_STATUS,
|
||||
.od_cdb_usage_bits = { SERVICE_ACTION_IN_16, SAI_GET_LBA_STATUS,
|
||||
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
|
||||
0xFF, 0xFF, 0xFF, 0xFF, 0,
|
||||
SCST_OD_DEFAULT_CONTROL_BYTE },
|
||||
@@ -2281,14 +2281,14 @@ static const struct scst_opcode_descriptor scst_op_descr_read_capacity = {
|
||||
};
|
||||
|
||||
static const struct scst_opcode_descriptor scst_op_descr_read_capacity16 = {
|
||||
.od_opcode = SERVICE_ACTION_IN,
|
||||
.od_opcode = SERVICE_ACTION_IN_16,
|
||||
.od_serv_action = SAI_READ_CAPACITY_16,
|
||||
.od_serv_action_valid = 1,
|
||||
.od_support = 3, /* supported as in the standard */
|
||||
.od_cdb_size = 16,
|
||||
.od_nominal_timeout = SCST_DEFAULT_NOMINAL_TIMEOUT_SEC,
|
||||
.od_recommended_timeout = SCST_GENERIC_DISK_SMALL_TIMEOUT/HZ,
|
||||
.od_cdb_usage_bits = { SERVICE_ACTION_IN, SAI_READ_CAPACITY_16,
|
||||
.od_cdb_usage_bits = { SERVICE_ACTION_IN_16, SAI_READ_CAPACITY_16,
|
||||
0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0xFF, 0xFF, 0xFF, 0xFF, 0,
|
||||
SCST_OD_DEFAULT_CONTROL_BYTE },
|
||||
@@ -2565,7 +2565,7 @@ static const struct scst_opcode_descriptor scst_op_descr_read_toc = {
|
||||
[INQUIRY] = vdisk_exec_inquiry, \
|
||||
[REQUEST_SENSE] = vdisk_exec_request_sense, \
|
||||
[READ_CAPACITY] = vdisk_exec_read_capacity, \
|
||||
[SERVICE_ACTION_IN] = vdisk_exec_srv_action_in, \
|
||||
[SERVICE_ACTION_IN_16] = vdisk_exec_sai_16, \
|
||||
[UNMAP] = vdisk_exec_unmap, \
|
||||
[WRITE_SAME] = vdisk_exec_write_same, \
|
||||
[WRITE_SAME_16] = vdisk_exec_write_same, \
|
||||
|
||||
@@ -263,7 +263,7 @@ static bool scst_tg_accept(struct scst_cmd *cmd)
|
||||
case REPORT_LUNS:
|
||||
case REQUEST_SENSE:
|
||||
return true;
|
||||
case SERVICE_ACTION_IN:
|
||||
case SERVICE_ACTION_IN_16:
|
||||
switch (cmd->cdb[1] & 0x1f) {
|
||||
case SAI_READ_CAPACITY_16:
|
||||
return true;
|
||||
|
||||
@@ -390,7 +390,7 @@ static int do_exec(struct vdisk_cmd *vcmd)
|
||||
case READ_CAPACITY:
|
||||
exec_read_capacity(vcmd);
|
||||
break;
|
||||
case SERVICE_ACTION_IN:
|
||||
case SERVICE_ACTION_IN_16:
|
||||
if ((cmd->cdb[1] & 0x1f) == SAI_READ_CAPACITY_16)
|
||||
exec_read_capacity16(vcmd);
|
||||
else {
|
||||
|
||||
Reference in New Issue
Block a user