From efc3c1df5fda0aee84f53c226d55804e6dbede4f Mon Sep 17 00:00:00 2001 From: Christoph Hellwig Date: Mon, 24 Nov 2014 15:36:18 +0100 Subject: scsi: remove ->change_queue_type method Since we got rid of ordered tag support in 2010 the prime use case of switching on and off ordered tags has been obsolete. The other function of enabling/disabling tagging entirely has only been correctly implemented by the 53c700 driver and isn't generally useful. Signed-off-by: Christoph Hellwig Reviewed-by: Bart Van Assche Reviewed-by: Martin K. Petersen --- include/scsi/libsas.h | 1 - include/scsi/scsi_host.h | 13 ------------- include/scsi/scsi_tcq.h | 3 --- 3 files changed, 17 deletions(-) (limited to 'include/scsi') diff --git a/include/scsi/libsas.h b/include/scsi/libsas.h index 832dcc9..8280234 100644 --- a/include/scsi/libsas.h +++ b/include/scsi/libsas.h @@ -693,7 +693,6 @@ extern int sas_queuecommand(struct Scsi_Host * ,struct scsi_cmnd *); extern int sas_target_alloc(struct scsi_target *); extern int sas_slave_configure(struct scsi_device *); extern int sas_change_queue_depth(struct scsi_device *, int new_depth); -extern int sas_change_queue_type(struct scsi_device *, int qt); extern int sas_bios_param(struct scsi_device *, struct block_device *, sector_t capacity, int *hsc); diff --git a/include/scsi/scsi_host.h b/include/scsi/scsi_host.h index c8a462e..c2fa8b4 100644 --- a/include/scsi/scsi_host.h +++ b/include/scsi/scsi_host.h @@ -278,19 +278,6 @@ struct scsi_host_template { int (* change_queue_depth)(struct scsi_device *, int); /* - * Fill in this function to allow the changing of tag types - * (this also allows the enabling/disabling of tag command - * queueing). An error should only be returned if something - * went wrong in the driver while trying to set the tag type. - * If the driver doesn't support the requested tag type, then - * it should set the closest type it does support without - * returning an error. Returns the actual tag type set. - * - * Status: OPTIONAL - */ - int (* change_queue_type)(struct scsi_device *, int); - - /* * This function determines the BIOS parameters for a given * harddisk. These tend to be numbers that are made up by * the host adapter. Parameters: diff --git a/include/scsi/scsi_tcq.h b/include/scsi/scsi_tcq.h index fe4a702..59578be 100644 --- a/include/scsi/scsi_tcq.h +++ b/include/scsi/scsi_tcq.h @@ -15,9 +15,6 @@ #ifdef CONFIG_BLOCK - -int scsi_change_queue_type(struct scsi_device *sdev, int tag_type); - /** * scsi_get_tag_type - get the type of tag the device supports * @sdev: the scsi device -- cgit v1.1 From 17ea01267c75c5a2e00f3603037715d0d2ce4a58 Mon Sep 17 00:00:00 2001 From: Christoph Hellwig Date: Mon, 24 Nov 2014 15:36:20 +0100 Subject: scsi: remove scsi_get_tag_type Both remaining users are better of just checking sdev->simple_tags directly. Signed-off-by: Christoph Hellwig Reviewed-by: Bart Van Assche Reviewed-by: Martin K. Petersen --- include/scsi/scsi_tcq.h | 13 ------------- 1 file changed, 13 deletions(-) (limited to 'include/scsi') diff --git a/include/scsi/scsi_tcq.h b/include/scsi/scsi_tcq.h index 59578be..681e010 100644 --- a/include/scsi/scsi_tcq.h +++ b/include/scsi/scsi_tcq.h @@ -15,19 +15,6 @@ #ifdef CONFIG_BLOCK -/** - * scsi_get_tag_type - get the type of tag the device supports - * @sdev: the scsi device - */ -static inline int scsi_get_tag_type(struct scsi_device *sdev) -{ - if (!sdev->tagged_supported) - return 0; - if (sdev->simple_tags) - return MSG_SIMPLE_TAG; - return 0; -} - static inline void scsi_set_tag_type(struct scsi_device *sdev, int tag) { switch (tag) { -- cgit v1.1 From 4e484896ac8b1877097770bc630802d5535e8d46 Mon Sep 17 00:00:00 2001 From: Christoph Hellwig Date: Mon, 24 Nov 2014 15:36:21 +0100 Subject: scsi: remove scsi_set_tag_type There is no benefit over just setting sdev->simple_tags directly. Signed-off-by: Christoph Hellwig Reviewed-by: Bart Van Assche Reviewed-by: Martin K. Petersen --- include/scsi/scsi_tcq.h | 15 --------------- 1 file changed, 15 deletions(-) (limited to 'include/scsi') diff --git a/include/scsi/scsi_tcq.h b/include/scsi/scsi_tcq.h index 681e010..e624aca 100644 --- a/include/scsi/scsi_tcq.h +++ b/include/scsi/scsi_tcq.h @@ -15,21 +15,6 @@ #ifdef CONFIG_BLOCK -static inline void scsi_set_tag_type(struct scsi_device *sdev, int tag) -{ - switch (tag) { - case MSG_ORDERED_TAG: - case MSG_SIMPLE_TAG: - sdev->simple_tags = 1; - break; - case 0: - /* fall through */ - default: - sdev->simple_tags = 0; - break; - } -} - static inline struct scsi_cmnd *scsi_mq_find_tag(struct Scsi_Host *shost, int unique_tag) { -- cgit v1.1 From 68d81f40047cc4f99e86807e1160fb07a7b856c7 Mon Sep 17 00:00:00 2001 From: Christoph Hellwig Date: Mon, 24 Nov 2014 07:07:25 -0800 Subject: scsi: remove MSG_*_TAG defines For SPI drivers use the message definitions from scsi.h, and for target drivers introduce a new TCM_*_TAG namespace. Signed-off-by: Christoph Hellwig Reviewed-by: Bart Van Assche Reviewed-by: Martin K. Petersen #include -#define MSG_SIMPLE_TAG 0x20 -#define MSG_HEAD_TAG 0x21 -#define MSG_ORDERED_TAG 0x22 -#define MSG_ACA_TAG 0x24 /* unsupported */ - #define SCSI_NO_TAG (-1) /* identify no tag in use */ -- cgit v1.1