Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit efc3c1df authored by Christoph Hellwig's avatar Christoph Hellwig
Browse files

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: default avatarChristoph Hellwig <hch@lst.de>
Reviewed-by: default avatarBart Van Assche <bvanassche@acm.org>
Reviewed-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
Reviewed-by: default avatarHannes Reinecke <hare@suse.de>
parent 79855d17
Loading
Loading
Loading
Loading
+0 −1
Original line number Original line Diff line number Diff line
@@ -2740,7 +2740,6 @@ static struct scsi_host_template srp_template = {
	.info				= srp_target_info,
	.info				= srp_target_info,
	.queuecommand			= srp_queuecommand,
	.queuecommand			= srp_queuecommand,
	.change_queue_depth             = srp_change_queue_depth,
	.change_queue_depth             = srp_change_queue_depth,
	.change_queue_type              = scsi_change_queue_type,
	.eh_abort_handler		= srp_abort,
	.eh_abort_handler		= srp_abort,
	.eh_device_reset_handler	= srp_reset_device,
	.eh_device_reset_handler	= srp_reset_device,
	.eh_host_reset_handler		= srp_reset_host,
	.eh_host_reset_handler		= srp_reset_host,
+0 −35
Original line number Original line Diff line number Diff line
@@ -176,7 +176,6 @@ STATIC int NCR_700_slave_alloc(struct scsi_device *SDpnt);
STATIC int NCR_700_slave_configure(struct scsi_device *SDpnt);
STATIC int NCR_700_slave_configure(struct scsi_device *SDpnt);
STATIC void NCR_700_slave_destroy(struct scsi_device *SDpnt);
STATIC void NCR_700_slave_destroy(struct scsi_device *SDpnt);
static int NCR_700_change_queue_depth(struct scsi_device *SDpnt, int depth);
static int NCR_700_change_queue_depth(struct scsi_device *SDpnt, int depth);
static int NCR_700_change_queue_type(struct scsi_device *SDpnt, int depth);


STATIC struct device_attribute *NCR_700_dev_attrs[];
STATIC struct device_attribute *NCR_700_dev_attrs[];


@@ -326,7 +325,6 @@ NCR_700_detect(struct scsi_host_template *tpnt,
	tpnt->slave_destroy = NCR_700_slave_destroy;
	tpnt->slave_destroy = NCR_700_slave_destroy;
	tpnt->slave_alloc = NCR_700_slave_alloc;
	tpnt->slave_alloc = NCR_700_slave_alloc;
	tpnt->change_queue_depth = NCR_700_change_queue_depth;
	tpnt->change_queue_depth = NCR_700_change_queue_depth;
	tpnt->change_queue_type = NCR_700_change_queue_type;
	tpnt->use_blk_tags = 1;
	tpnt->use_blk_tags = 1;


	if(tpnt->name == NULL)
	if(tpnt->name == NULL)
@@ -2082,39 +2080,6 @@ NCR_700_change_queue_depth(struct scsi_device *SDp, int depth)
	return scsi_change_queue_depth(SDp, depth);
	return scsi_change_queue_depth(SDp, depth);
}
}


static int NCR_700_change_queue_type(struct scsi_device *SDp, int tag_type)
{
	int change_tag = ((tag_type ==0 &&  scsi_get_tag_type(SDp) != 0)
			  || (tag_type != 0 && scsi_get_tag_type(SDp) == 0));
	struct NCR_700_Host_Parameters *hostdata = 
		(struct NCR_700_Host_Parameters *)SDp->host->hostdata[0];

	/* We have a global (per target) flag to track whether TCQ is
	 * enabled, so we'll be turning it off for the entire target here.
	 * our tag algorithm will fail if we mix tagged and untagged commands,
	 * so quiesce the device before doing this */
	if (change_tag)
		scsi_target_quiesce(SDp->sdev_target);

	scsi_set_tag_type(SDp, tag_type);
	if (!tag_type) {
		/* shift back to the default unqueued number of commands
		 * (the user can still raise this) */
		scsi_change_queue_depth(SDp, SDp->host->cmd_per_lun);
		hostdata->tag_negotiated &= ~(1 << sdev_id(SDp));
	} else {
		/* Here, we cleared the negotiation flag above, so this
		 * will force the driver to renegotiate */
		scsi_change_queue_depth(SDp, SDp->queue_depth);
		if (change_tag)
			NCR_700_set_tag_neg_state(SDp, NCR_700_START_TAG_NEGOTIATION);
	}
	if (change_tag)
		scsi_target_resume(SDp->sdev_target);

	return tag_type;
}

static ssize_t
static ssize_t
NCR_700_show_active_tags(struct device *dev, struct device_attribute *attr, char *buf)
NCR_700_show_active_tags(struct device *dev, struct device_attribute *attr, char *buf)
{
{
+0 −1
Original line number Original line Diff line number Diff line
@@ -63,7 +63,6 @@ static struct scsi_host_template aic94xx_sht = {
	.scan_finished		= asd_scan_finished,
	.scan_finished		= asd_scan_finished,
	.scan_start		= asd_scan_start,
	.scan_start		= asd_scan_start,
	.change_queue_depth	= sas_change_queue_depth,
	.change_queue_depth	= sas_change_queue_depth,
	.change_queue_type	= sas_change_queue_type,
	.bios_param		= sas_bios_param,
	.bios_param		= sas_bios_param,
	.can_queue		= 1,
	.can_queue		= 1,
	.cmd_per_lun		= 1,
	.cmd_per_lun		= 1,
+0 −1
Original line number Original line Diff line number Diff line
@@ -2785,7 +2785,6 @@ static struct scsi_host_template bnx2fc_shost_template = {
	.eh_host_reset_handler	= fc_eh_host_reset,
	.eh_host_reset_handler	= fc_eh_host_reset,
	.slave_alloc		= fc_slave_alloc,
	.slave_alloc		= fc_slave_alloc,
	.change_queue_depth	= scsi_change_queue_depth,
	.change_queue_depth	= scsi_change_queue_depth,
	.change_queue_type	= scsi_change_queue_type,
	.this_id		= -1,
	.this_id		= -1,
	.cmd_per_lun		= 3,
	.cmd_per_lun		= 3,
	.use_clustering		= ENABLE_CLUSTERING,
	.use_clustering		= ENABLE_CLUSTERING,
+0 −1
Original line number Original line Diff line number Diff line
@@ -255,7 +255,6 @@ static struct scsi_host_template driver_template = {
	.emulated			= 0,
	.emulated			= 0,
	.proc_name			= ESAS2R_DRVR_NAME,
	.proc_name			= ESAS2R_DRVR_NAME,
	.change_queue_depth		= scsi_change_queue_depth,
	.change_queue_depth		= scsi_change_queue_depth,
	.change_queue_type		= scsi_change_queue_type,
	.max_sectors			= 0xFFFF,
	.max_sectors			= 0xFFFF,
	.use_blk_tags			= 1,
	.use_blk_tags			= 1,
};
};
Loading