aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2014-12-20 16:42:57 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2014-12-20 16:42:57 -0500
commitcdce6ac277a4a1aa5316cd0cdf30fff927433917 (patch)
treea345a1a6639a368433fa915be96554d7a0f456ea /include
parent5d6a54688632f640abda71164fea5d171ff07db8 (diff)
parente61745769125a3c788e7aceb2a5fb680ebb461e6 (diff)
Merge tag 'scsi-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi
Pull SCSI update from James Bottomley: "This is a much shorter set of patches that were on the go but didn't make it in to the early pull request for the merge window. It's really a set of bug fixes plus some final cleanup work on the new tag queue API" * tag 'scsi-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi: storvsc: ring buffer failures may result in I/O freeze ipr: set scsi_level correctly for disk arrays ipr: add support for async scanning to speed up boot scsi_debug: fix missing "break;" in SDEBUG_UA_CAPACITY_CHANGED case scsi_debug: take sdebug_host_list_lock when changing capacity scsi_debug: improve driver description in Kconfig scsi_debug: fix compare and write errors qla2xxx: fix race in handling rport deletion during recovery causes panic scsi: blacklist RSOC for Microsoft iSCSI target devices scsi: fix random memory corruption with scsi-mq + T10 PI Revert "[SCSI] mpt3sas: Remove phys on topology change" Revert "[SCSI] mpt2sas: Remove phys on topology change." esas2r: Correct typos of "validate" in a comment fc: FCP_PTA_SIMPLE is 0 ibmvfc: remove unused tag variable scsi: remove MSG_*_TAG defines scsi: remove scsi_set_tag_type scsi: remove scsi_get_tag_type scsi: never drop to untagged mode during queue ramp down scsi: remove ->change_queue_type method
Diffstat (limited to 'include')
-rw-r--r--include/scsi/libsas.h1
-rw-r--r--include/scsi/scsi_host.h13
-rw-r--r--include/scsi/scsi_tcq.h36
-rw-r--r--include/target/target_core_base.h6
-rw-r--r--include/trace/events/target.h8
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 *);
688extern int sas_target_alloc(struct scsi_target *); 688extern int sas_target_alloc(struct scsi_target *);
689extern int sas_slave_configure(struct scsi_device *); 689extern int sas_slave_configure(struct scsi_device *);
690extern int sas_change_queue_depth(struct scsi_device *, int new_depth); 690extern int sas_change_queue_depth(struct scsi_device *, int new_depth);
691extern int sas_change_queue_type(struct scsi_device *, int qt);
692extern int sas_bios_param(struct scsi_device *, 691extern 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
19int 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 */
25static 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
34static 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
49static inline struct scsi_cmnd *scsi_mq_find_tag(struct Scsi_Host *shost, 13static 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
479struct se_cmd { 485struct 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, \