diff options
Diffstat (limited to 'include')
| -rw-r--r-- | include/scsi/libsas.h | 1 | ||||
| -rw-r--r-- | include/scsi/scsi_host.h | 13 | ||||
| -rw-r--r-- | include/scsi/scsi_tcq.h | 36 | ||||
| -rw-r--r-- | include/target/target_core_base.h | 6 | ||||
| -rw-r--r-- | include/trace/events/target.h | 8 |
5 files changed, 10 insertions, 54 deletions
diff --git a/include/scsi/libsas.h b/include/scsi/libsas.h index 9d87a37aecad..dae99d7d2bc0 100644 --- a/include/scsi/libsas.h +++ b/include/scsi/libsas.h | |||
| @@ -688,7 +688,6 @@ extern int sas_queuecommand(struct Scsi_Host * ,struct scsi_cmnd *); | |||
| 688 | extern int sas_target_alloc(struct scsi_target *); | 688 | extern int sas_target_alloc(struct scsi_target *); |
| 689 | extern int sas_slave_configure(struct scsi_device *); | 689 | extern int sas_slave_configure(struct scsi_device *); |
| 690 | extern int sas_change_queue_depth(struct scsi_device *, int new_depth); | 690 | extern int sas_change_queue_depth(struct scsi_device *, int new_depth); |
| 691 | extern int sas_change_queue_type(struct scsi_device *, int qt); | ||
| 692 | extern int sas_bios_param(struct scsi_device *, | 691 | extern int sas_bios_param(struct scsi_device *, |
| 693 | struct block_device *, | 692 | struct block_device *, |
| 694 | sector_t capacity, int *hsc); | 693 | sector_t capacity, int *hsc); |
diff --git a/include/scsi/scsi_host.h b/include/scsi/scsi_host.h index e939d2b3757a..019e66858ce6 100644 --- a/include/scsi/scsi_host.h +++ b/include/scsi/scsi_host.h | |||
| @@ -278,19 +278,6 @@ struct scsi_host_template { | |||
| 278 | int (* change_queue_depth)(struct scsi_device *, int); | 278 | int (* change_queue_depth)(struct scsi_device *, int); |
| 279 | 279 | ||
| 280 | /* | 280 | /* |
| 281 | * Fill in this function to allow the changing of tag types | ||
| 282 | * (this also allows the enabling/disabling of tag command | ||
| 283 | * queueing). An error should only be returned if something | ||
| 284 | * went wrong in the driver while trying to set the tag type. | ||
| 285 | * If the driver doesn't support the requested tag type, then | ||
| 286 | * it should set the closest type it does support without | ||
| 287 | * returning an error. Returns the actual tag type set. | ||
| 288 | * | ||
| 289 | * Status: OPTIONAL | ||
| 290 | */ | ||
| 291 | int (* change_queue_type)(struct scsi_device *, int); | ||
| 292 | |||
| 293 | /* | ||
| 294 | * This function determines the BIOS parameters for a given | 281 | * This function determines the BIOS parameters for a given |
| 295 | * harddisk. These tend to be numbers that are made up by | 282 | * harddisk. These tend to be numbers that are made up by |
| 296 | * the host adapter. Parameters: | 283 | * the host adapter. Parameters: |
diff --git a/include/scsi/scsi_tcq.h b/include/scsi/scsi_tcq.h index fe4a70299419..9708b28bd2aa 100644 --- a/include/scsi/scsi_tcq.h +++ b/include/scsi/scsi_tcq.h | |||
| @@ -6,46 +6,10 @@ | |||
| 6 | #include <scsi/scsi_device.h> | 6 | #include <scsi/scsi_device.h> |
| 7 | #include <scsi/scsi_host.h> | 7 | #include <scsi/scsi_host.h> |
| 8 | 8 | ||
| 9 | #define MSG_SIMPLE_TAG 0x20 | ||
| 10 | #define MSG_HEAD_TAG 0x21 | ||
| 11 | #define MSG_ORDERED_TAG 0x22 | ||
| 12 | #define MSG_ACA_TAG 0x24 /* unsupported */ | ||
| 13 | |||
| 14 | #define SCSI_NO_TAG (-1) /* identify no tag in use */ | 9 | #define SCSI_NO_TAG (-1) /* identify no tag in use */ |
| 15 | 10 | ||
| 16 | 11 | ||
| 17 | #ifdef CONFIG_BLOCK | 12 | #ifdef CONFIG_BLOCK |
| 18 | |||
| 19 | int scsi_change_queue_type(struct scsi_device *sdev, int tag_type); | ||
| 20 | |||
| 21 | /** | ||
| 22 | * scsi_get_tag_type - get the type of tag the device supports | ||
| 23 | * @sdev: the scsi device | ||
| 24 | */ | ||
| 25 | static inline int scsi_get_tag_type(struct scsi_device *sdev) | ||
| 26 | { | ||
| 27 | if (!sdev->tagged_supported) | ||
| 28 | return 0; | ||
| 29 | if (sdev->simple_tags) | ||
| 30 | return MSG_SIMPLE_TAG; | ||
| 31 | return 0; | ||
| 32 | } | ||
| 33 | |||
| 34 | static inline void scsi_set_tag_type(struct scsi_device *sdev, int tag) | ||
| 35 | { | ||
| 36 | switch (tag) { | ||
| 37 | case MSG_ORDERED_TAG: | ||
| 38 | case MSG_SIMPLE_TAG: | ||
| 39 | sdev->simple_tags = 1; | ||
| 40 | break; | ||
| 41 | case 0: | ||
| 42 | /* fall through */ | ||
| 43 | default: | ||
| 44 | sdev->simple_tags = 0; | ||
| 45 | break; | ||
| 46 | } | ||
| 47 | } | ||
| 48 | |||
| 49 | static inline struct scsi_cmnd *scsi_mq_find_tag(struct Scsi_Host *shost, | 13 | static inline struct scsi_cmnd *scsi_mq_find_tag(struct Scsi_Host *shost, |
| 50 | int unique_tag) | 14 | int unique_tag) |
| 51 | { | 15 | { |
diff --git a/include/target/target_core_base.h b/include/target/target_core_base.h index 23c518a0340c..397fb635766a 100644 --- a/include/target/target_core_base.h +++ b/include/target/target_core_base.h | |||
| @@ -476,6 +476,12 @@ struct se_dif_v1_tuple { | |||
| 476 | __be32 ref_tag; | 476 | __be32 ref_tag; |
| 477 | }; | 477 | }; |
| 478 | 478 | ||
| 479 | /* for sam_task_attr */ | ||
| 480 | #define TCM_SIMPLE_TAG 0x20 | ||
| 481 | #define TCM_HEAD_TAG 0x21 | ||
| 482 | #define TCM_ORDERED_TAG 0x22 | ||
| 483 | #define TCM_ACA_TAG 0x24 | ||
| 484 | |||
| 479 | struct se_cmd { | 485 | struct se_cmd { |
| 480 | /* SAM response code being sent to initiator */ | 486 | /* SAM response code being sent to initiator */ |
| 481 | u8 scsi_status; | 487 | u8 scsi_status; |
diff --git a/include/trace/events/target.h b/include/trace/events/target.h index 45403443dd82..04c3c6efdcc2 100644 --- a/include/trace/events/target.h +++ b/include/trace/events/target.h | |||
| @@ -109,10 +109,10 @@ | |||
| 109 | 109 | ||
| 110 | #define show_task_attribute_name(val) \ | 110 | #define show_task_attribute_name(val) \ |
| 111 | __print_symbolic(val, \ | 111 | __print_symbolic(val, \ |
| 112 | { MSG_SIMPLE_TAG, "SIMPLE" }, \ | 112 | { TCM_SIMPLE_TAG, "SIMPLE" }, \ |
| 113 | { MSG_HEAD_TAG, "HEAD" }, \ | 113 | { TCM_HEAD_TAG, "HEAD" }, \ |
| 114 | { MSG_ORDERED_TAG, "ORDERED" }, \ | 114 | { TCM_ORDERED_TAG, "ORDERED" }, \ |
| 115 | { MSG_ACA_TAG, "ACA" } ) | 115 | { TCM_ACA_TAG, "ACA" } ) |
| 116 | 116 | ||
| 117 | #define show_scsi_status_name(val) \ | 117 | #define show_scsi_status_name(val) \ |
| 118 | __print_symbolic(val, \ | 118 | __print_symbolic(val, \ |
