scsi: drop reason argument from ->change_queue_depth
Drop the now unused reason argument from the ->change_queue_depth method. Also add a return value to scsi_adjust_queue_depth, and rename it to scsi_change_queue_depth now that it can be used as the default ->change_queue_depth implementation. Signed-off-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Mike Christie <michaelc@cs.wisc.edu> Reviewed-by: Hannes Reinecke <hare@suse.de>
This commit is contained in:
parent
1e6f241604
commit
db5ed4dfd5
73 changed files with 155 additions and 412 deletions
|
|
@ -149,7 +149,7 @@ scsi_add_host() ---->
|
|||
scsi_scan_host() -------+
|
||||
|
|
||||
slave_alloc()
|
||||
slave_configure() --> scsi_adjust_queue_depth()
|
||||
slave_configure() --> scsi_change_queue_depth()
|
||||
|
|
||||
slave_alloc()
|
||||
slave_configure()
|
||||
|
|
@ -159,7 +159,7 @@ scsi_scan_host() -------+
|
|||
------------------------------------------------------------
|
||||
|
||||
If the LLD wants to adjust the default queue settings, it can invoke
|
||||
scsi_adjust_queue_depth() in its slave_configure() routine.
|
||||
scsi_change_queue_depth() in its slave_configure() routine.
|
||||
|
||||
*** For scsi devices that the mid level tries to scan but do not
|
||||
respond, a slave_alloc(), slave_destroy() pair is called.
|
||||
|
|
@ -203,7 +203,7 @@ LLD mid level LLD
|
|||
scsi_add_device() ------+
|
||||
|
|
||||
slave_alloc()
|
||||
slave_configure() [--> scsi_adjust_queue_depth()]
|
||||
slave_configure() [--> scsi_change_queue_depth()]
|
||||
------------------------------------------------------------
|
||||
|
||||
In a similar fashion, an LLD may become aware that a SCSI device has been
|
||||
|
|
@ -261,7 +261,7 @@ init_this_scsi_driver() ----+
|
|||
| scsi_register()
|
||||
|
|
||||
slave_alloc()
|
||||
slave_configure() --> scsi_adjust_queue_depth()
|
||||
slave_configure() --> scsi_change_queue_depth()
|
||||
slave_alloc() ***
|
||||
slave_destroy() ***
|
||||
|
|
||||
|
|
@ -271,7 +271,7 @@ init_this_scsi_driver() ----+
|
|||
slave_destroy() ***
|
||||
------------------------------------------------------------
|
||||
|
||||
The mid level invokes scsi_adjust_queue_depth() with "cmd_per_lun" for that
|
||||
The mid level invokes scsi_change_queue_depth() with "cmd_per_lun" for that
|
||||
host as the queue length. These settings can be overridden by a
|
||||
slave_configure() supplied by the LLD.
|
||||
|
||||
|
|
@ -368,7 +368,7 @@ names all start with "scsi_".
|
|||
Summary:
|
||||
scsi_add_device - creates new scsi device (lu) instance
|
||||
scsi_add_host - perform sysfs registration and set up transport class
|
||||
scsi_adjust_queue_depth - change the queue depth on a SCSI device
|
||||
scsi_change_queue_depth - change the queue depth on a SCSI device
|
||||
scsi_bios_ptable - return copy of block device's partition table
|
||||
scsi_block_requests - prevent further commands being queued to given host
|
||||
scsi_host_alloc - return a new scsi_host instance whose refcount==1
|
||||
|
|
@ -436,7 +436,7 @@ int scsi_add_host(struct Scsi_Host *shost, struct device * dev)
|
|||
|
||||
|
||||
/**
|
||||
* scsi_adjust_queue_depth - allow LLD to change queue depth on a SCSI device
|
||||
* scsi_change_queue_depth - allow LLD to change queue depth on a SCSI device
|
||||
* @sdev: pointer to SCSI device to change queue depth on
|
||||
* @tags Number of tags allowed if tagged queuing enabled,
|
||||
* or number of commands the LLD can queue up
|
||||
|
|
@ -453,7 +453,7 @@ int scsi_add_host(struct Scsi_Host *shost, struct device * dev)
|
|||
* Defined in: drivers/scsi/scsi.c [see source code for more notes]
|
||||
*
|
||||
**/
|
||||
void scsi_adjust_queue_depth(struct scsi_device *sdev, int tags)
|
||||
int scsi_change_queue_depth(struct scsi_device *sdev, int tags)
|
||||
|
||||
|
||||
/**
|
||||
|
|
@ -1214,7 +1214,7 @@ of interest:
|
|||
for disk firmware uploads.
|
||||
cmd_per_lun - maximum number of commands that can be queued on devices
|
||||
controlled by the host. Overridden by LLD calls to
|
||||
scsi_adjust_queue_depth().
|
||||
scsi_change_queue_depth().
|
||||
unchecked_isa_dma - 1=>only use bottom 16 MB of ram (ISA DMA addressing
|
||||
restriction), 0=>can use full 32 bit (or better) DMA
|
||||
address space
|
||||
|
|
@ -1254,7 +1254,7 @@ struct scsi_cmnd
|
|||
Instances of this structure convey SCSI commands to the LLD and responses
|
||||
back to the mid level. The SCSI mid level will ensure that no more SCSI
|
||||
commands become queued against the LLD than are indicated by
|
||||
scsi_adjust_queue_depth() (or struct Scsi_Host::cmd_per_lun). There will
|
||||
scsi_change_queue_depth() (or struct Scsi_Host::cmd_per_lun). There will
|
||||
be at least one instance of struct scsi_cmnd available for each SCSI device.
|
||||
Members of interest:
|
||||
cmnd - array containing SCSI command
|
||||
|
|
|
|||
|
|
@ -1164,7 +1164,7 @@ static int ata_scsi_dev_config(struct scsi_device *sdev,
|
|||
|
||||
depth = min(sdev->host->can_queue, ata_id_queue_depth(dev->id));
|
||||
depth = min(ATA_MAX_QUEUE - 1, depth);
|
||||
scsi_adjust_queue_depth(sdev, depth);
|
||||
scsi_change_queue_depth(sdev, depth);
|
||||
}
|
||||
|
||||
blk_queue_flush_queueable(q, false);
|
||||
|
|
@ -1243,21 +1243,17 @@ void ata_scsi_slave_destroy(struct scsi_device *sdev)
|
|||
* @ap: ATA port to which the device change the queue depth
|
||||
* @sdev: SCSI device to configure queue depth for
|
||||
* @queue_depth: new queue depth
|
||||
* @reason: calling context
|
||||
*
|
||||
* libsas and libata have different approaches for associating a sdev to
|
||||
* its ata_port.
|
||||
*
|
||||
*/
|
||||
int __ata_change_queue_depth(struct ata_port *ap, struct scsi_device *sdev,
|
||||
int queue_depth, int reason)
|
||||
int queue_depth)
|
||||
{
|
||||
struct ata_device *dev;
|
||||
unsigned long flags;
|
||||
|
||||
if (reason != SCSI_QDEPTH_DEFAULT)
|
||||
return -EOPNOTSUPP;
|
||||
|
||||
if (queue_depth < 1 || queue_depth == sdev->queue_depth)
|
||||
return sdev->queue_depth;
|
||||
|
||||
|
|
@ -1282,15 +1278,13 @@ int __ata_change_queue_depth(struct ata_port *ap, struct scsi_device *sdev,
|
|||
if (sdev->queue_depth == queue_depth)
|
||||
return -EINVAL;
|
||||
|
||||
scsi_adjust_queue_depth(sdev, queue_depth);
|
||||
return queue_depth;
|
||||
return scsi_change_queue_depth(sdev, queue_depth);
|
||||
}
|
||||
|
||||
/**
|
||||
* ata_scsi_change_queue_depth - SCSI callback for queue depth config
|
||||
* @sdev: SCSI device to configure queue depth for
|
||||
* @queue_depth: new queue depth
|
||||
* @reason: calling context
|
||||
*
|
||||
* This is libata standard hostt->change_queue_depth callback.
|
||||
* SCSI will call into this callback when user tries to set queue
|
||||
|
|
@ -1302,12 +1296,11 @@ int __ata_change_queue_depth(struct ata_port *ap, struct scsi_device *sdev,
|
|||
* RETURNS:
|
||||
* Newly configured queue depth.
|
||||
*/
|
||||
int ata_scsi_change_queue_depth(struct scsi_device *sdev, int queue_depth,
|
||||
int reason)
|
||||
int ata_scsi_change_queue_depth(struct scsi_device *sdev, int queue_depth)
|
||||
{
|
||||
struct ata_port *ap = ata_shost_to_port(sdev->host);
|
||||
|
||||
return __ata_change_queue_depth(ap, sdev, queue_depth, reason);
|
||||
return __ata_change_queue_depth(ap, sdev, queue_depth);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -1951,7 +1951,7 @@ static int nv_swncq_slave_config(struct scsi_device *sdev)
|
|||
ata_id_c_string(dev->id, model_num, ATA_ID_PROD, sizeof(model_num));
|
||||
|
||||
if (strncmp(model_num, "Maxtor", 6) == 0) {
|
||||
ata_scsi_change_queue_depth(sdev, 1, SCSI_QDEPTH_DEFAULT);
|
||||
ata_scsi_change_queue_depth(sdev, 1);
|
||||
ata_dev_notice(dev, "Disabling SWNCQ mode (depth %x)\n",
|
||||
sdev->queue_depth);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -911,7 +911,7 @@ static struct scsi_host_template iscsi_iser_sht = {
|
|||
.module = THIS_MODULE,
|
||||
.name = "iSCSI Initiator over iSER",
|
||||
.queuecommand = iscsi_queuecommand,
|
||||
.change_queue_depth = iscsi_change_queue_depth,
|
||||
.change_queue_depth = scsi_change_queue_depth,
|
||||
.sg_tablesize = ISCSI_ISER_SG_TABLESIZE,
|
||||
.max_sectors = 1024,
|
||||
.cmd_per_lun = ISER_DEF_CMD_PER_LUN,
|
||||
|
|
|
|||
|
|
@ -2402,18 +2402,15 @@ static int srp_cm_handler(struct ib_cm_id *cm_id, struct ib_cm_event *event)
|
|||
* srp_change_queue_depth - setting device queue depth
|
||||
* @sdev: scsi device struct
|
||||
* @qdepth: requested queue depth
|
||||
* @reason: SCSI_QDEPTH_DEFAULT
|
||||
* (see include/scsi/scsi_host.h for definition)
|
||||
*
|
||||
* Returns queue depth.
|
||||
*/
|
||||
static int
|
||||
srp_change_queue_depth(struct scsi_device *sdev, int qdepth, int reason)
|
||||
srp_change_queue_depth(struct scsi_device *sdev, int qdepth)
|
||||
{
|
||||
if (!sdev->tagged_supported)
|
||||
qdepth = 1;
|
||||
scsi_adjust_queue_depth(sdev, qdepth);
|
||||
return sdev->queue_depth;
|
||||
return scsi_change_queue_depth(sdev, qdepth);
|
||||
}
|
||||
|
||||
static int srp_send_tsk_mgmt(struct srp_rdma_ch *ch, u64 req_tag,
|
||||
|
|
|
|||
|
|
@ -2311,12 +2311,11 @@ mptscsih_slave_destroy(struct scsi_device *sdev)
|
|||
* mptscsih_change_queue_depth - This function will set a devices queue depth
|
||||
* @sdev: per scsi_device pointer
|
||||
* @qdepth: requested queue depth
|
||||
* @reason: calling context
|
||||
*
|
||||
* Adding support for new 'change_queue_depth' api.
|
||||
*/
|
||||
int
|
||||
mptscsih_change_queue_depth(struct scsi_device *sdev, int qdepth, int reason)
|
||||
mptscsih_change_queue_depth(struct scsi_device *sdev, int qdepth)
|
||||
{
|
||||
MPT_SCSI_HOST *hd = shost_priv(sdev->host);
|
||||
VirtTarget *vtarget;
|
||||
|
|
@ -2327,9 +2326,6 @@ mptscsih_change_queue_depth(struct scsi_device *sdev, int qdepth, int reason)
|
|||
starget = scsi_target(sdev);
|
||||
vtarget = starget->hostdata;
|
||||
|
||||
if (reason != SCSI_QDEPTH_DEFAULT)
|
||||
return -EOPNOTSUPP;
|
||||
|
||||
if (ioc->bus_type == SPI) {
|
||||
if (!(vtarget->tflags & MPT_TARGET_FLAGS_Q_YES))
|
||||
max_depth = 1;
|
||||
|
|
@ -2347,8 +2343,7 @@ mptscsih_change_queue_depth(struct scsi_device *sdev, int qdepth, int reason)
|
|||
if (qdepth > max_depth)
|
||||
qdepth = max_depth;
|
||||
|
||||
scsi_adjust_queue_depth(sdev, qdepth);
|
||||
return sdev->queue_depth;
|
||||
return scsi_change_queue_depth(sdev, qdepth);
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
@ -2392,8 +2387,7 @@ mptscsih_slave_configure(struct scsi_device *sdev)
|
|||
ioc->name, vtarget->negoFlags, vtarget->maxOffset,
|
||||
vtarget->minSyncFactor));
|
||||
|
||||
mptscsih_change_queue_depth(sdev, MPT_SCSI_CMD_PER_DEV_HIGH,
|
||||
SCSI_QDEPTH_DEFAULT);
|
||||
mptscsih_change_queue_depth(sdev, MPT_SCSI_CMD_PER_DEV_HIGH);
|
||||
dsprintk(ioc, printk(MYIOC_s_DEBUG_FMT
|
||||
"tagged %d, simple %d\n",
|
||||
ioc->name,sdev->tagged_supported, sdev->simple_tags));
|
||||
|
|
|
|||
|
|
@ -128,8 +128,7 @@ extern int mptscsih_taskmgmt_complete(MPT_ADAPTER *ioc, MPT_FRAME_HDR *mf, MPT_F
|
|||
extern int mptscsih_scandv_complete(MPT_ADAPTER *ioc, MPT_FRAME_HDR *mf, MPT_FRAME_HDR *r);
|
||||
extern int mptscsih_event_process(MPT_ADAPTER *ioc, EventNotificationReply_t *pEvReply);
|
||||
extern int mptscsih_ioc_reset(MPT_ADAPTER *ioc, int post_reset);
|
||||
extern int mptscsih_change_queue_depth(struct scsi_device *sdev, int qdepth,
|
||||
int reason);
|
||||
extern int mptscsih_change_queue_depth(struct scsi_device *sdev, int qdepth);
|
||||
extern u8 mptscsih_raid_id_to_num(MPT_ADAPTER *ioc, u8 channel, u8 id);
|
||||
extern int mptscsih_is_phys_disk(MPT_ADAPTER *ioc, u8 channel, u8 id);
|
||||
extern struct device_attribute *mptscsih_host_attrs[];
|
||||
|
|
|
|||
|
|
@ -32,13 +32,6 @@ static bool allow_lun_scan = 1;
|
|||
module_param(allow_lun_scan, bool, 0600);
|
||||
MODULE_PARM_DESC(allow_lun_scan, "For NPIV, scan and attach all storage LUNs");
|
||||
|
||||
static int zfcp_scsi_change_queue_depth(struct scsi_device *sdev, int depth,
|
||||
int reason)
|
||||
{
|
||||
scsi_adjust_queue_depth(sdev, depth);
|
||||
return sdev->queue_depth;
|
||||
}
|
||||
|
||||
static void zfcp_scsi_slave_destroy(struct scsi_device *sdev)
|
||||
{
|
||||
struct zfcp_scsi_dev *zfcp_sdev = sdev_to_zfcp(sdev);
|
||||
|
|
@ -54,7 +47,7 @@ static void zfcp_scsi_slave_destroy(struct scsi_device *sdev)
|
|||
static int zfcp_scsi_slave_configure(struct scsi_device *sdp)
|
||||
{
|
||||
if (sdp->tagged_supported)
|
||||
scsi_adjust_queue_depth(sdp, default_depth);
|
||||
scsi_change_queue_depth(sdp, default_depth);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
@ -293,7 +286,7 @@ static struct scsi_host_template zfcp_scsi_host_template = {
|
|||
.slave_alloc = zfcp_scsi_slave_alloc,
|
||||
.slave_configure = zfcp_scsi_slave_configure,
|
||||
.slave_destroy = zfcp_scsi_slave_destroy,
|
||||
.change_queue_depth = zfcp_scsi_change_queue_depth,
|
||||
.change_queue_depth = scsi_change_queue_depth,
|
||||
.proc_name = "zfcp",
|
||||
.can_queue = 4096,
|
||||
.this_id = -1,
|
||||
|
|
|
|||
|
|
@ -189,17 +189,6 @@ static ssize_t twa_show_stats(struct device *dev,
|
|||
return len;
|
||||
} /* End twa_show_stats() */
|
||||
|
||||
/* This function will set a devices queue depth */
|
||||
static int twa_change_queue_depth(struct scsi_device *sdev, int queue_depth,
|
||||
int reason)
|
||||
{
|
||||
if (reason != SCSI_QDEPTH_DEFAULT)
|
||||
return -EOPNOTSUPP;
|
||||
|
||||
scsi_adjust_queue_depth(sdev, queue_depth);
|
||||
return queue_depth;
|
||||
} /* End twa_change_queue_depth() */
|
||||
|
||||
/* Create sysfs 'stats' entry */
|
||||
static struct device_attribute twa_host_stats_attr = {
|
||||
.attr = {
|
||||
|
|
@ -2014,7 +2003,7 @@ static struct scsi_host_template driver_template = {
|
|||
.queuecommand = twa_scsi_queue,
|
||||
.eh_host_reset_handler = twa_scsi_eh_reset,
|
||||
.bios_param = twa_scsi_biosparam,
|
||||
.change_queue_depth = twa_change_queue_depth,
|
||||
.change_queue_depth = scsi_change_queue_depth,
|
||||
.can_queue = TW_Q_LENGTH-2,
|
||||
.slave_configure = twa_slave_configure,
|
||||
.this_id = -1,
|
||||
|
|
|
|||
|
|
@ -191,17 +191,6 @@ static ssize_t twl_show_stats(struct device *dev,
|
|||
return len;
|
||||
} /* End twl_show_stats() */
|
||||
|
||||
/* This function will set a devices queue depth */
|
||||
static int twl_change_queue_depth(struct scsi_device *sdev, int queue_depth,
|
||||
int reason)
|
||||
{
|
||||
if (reason != SCSI_QDEPTH_DEFAULT)
|
||||
return -EOPNOTSUPP;
|
||||
|
||||
scsi_adjust_queue_depth(sdev, queue_depth);
|
||||
return queue_depth;
|
||||
} /* End twl_change_queue_depth() */
|
||||
|
||||
/* stats sysfs attribute initializer */
|
||||
static struct device_attribute twl_host_stats_attr = {
|
||||
.attr = {
|
||||
|
|
@ -1588,7 +1577,7 @@ static struct scsi_host_template driver_template = {
|
|||
.queuecommand = twl_scsi_queue,
|
||||
.eh_host_reset_handler = twl_scsi_eh_reset,
|
||||
.bios_param = twl_scsi_biosparam,
|
||||
.change_queue_depth = twl_change_queue_depth,
|
||||
.change_queue_depth = scsi_change_queue_depth,
|
||||
.can_queue = TW_Q_LENGTH-2,
|
||||
.slave_configure = twl_slave_configure,
|
||||
.this_id = -1,
|
||||
|
|
|
|||
|
|
@ -523,17 +523,6 @@ static ssize_t tw_show_stats(struct device *dev, struct device_attribute *attr,
|
|||
return len;
|
||||
} /* End tw_show_stats() */
|
||||
|
||||
/* This function will set a devices queue depth */
|
||||
static int tw_change_queue_depth(struct scsi_device *sdev, int queue_depth,
|
||||
int reason)
|
||||
{
|
||||
if (reason != SCSI_QDEPTH_DEFAULT)
|
||||
return -EOPNOTSUPP;
|
||||
|
||||
scsi_adjust_queue_depth(sdev, queue_depth);
|
||||
return queue_depth;
|
||||
} /* End tw_change_queue_depth() */
|
||||
|
||||
/* Create sysfs 'stats' entry */
|
||||
static struct device_attribute tw_host_stats_attr = {
|
||||
.attr = {
|
||||
|
|
@ -2268,7 +2257,7 @@ static struct scsi_host_template driver_template = {
|
|||
.queuecommand = tw_scsi_queue,
|
||||
.eh_host_reset_handler = tw_scsi_eh_reset,
|
||||
.bios_param = tw_scsi_biosparam,
|
||||
.change_queue_depth = tw_change_queue_depth,
|
||||
.change_queue_depth = scsi_change_queue_depth,
|
||||
.can_queue = TW_Q_LENGTH-2,
|
||||
.slave_configure = tw_slave_configure,
|
||||
.this_id = -1,
|
||||
|
|
|
|||
|
|
@ -175,7 +175,7 @@ STATIC void NCR_700_chip_reset(struct Scsi_Host *host);
|
|||
STATIC int NCR_700_slave_alloc(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 int NCR_700_change_queue_depth(struct scsi_device *SDpnt, int depth, int reason);
|
||||
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[];
|
||||
|
|
@ -904,7 +904,7 @@ process_message(struct Scsi_Host *host, struct NCR_700_Host_Parameters *hostdata
|
|||
hostdata->tag_negotiated &= ~(1<<scmd_id(SCp));
|
||||
|
||||
SCp->device->tagged_supported = 0;
|
||||
scsi_adjust_queue_depth(SCp->device, host->cmd_per_lun);
|
||||
scsi_change_queue_depth(SCp->device, host->cmd_per_lun);
|
||||
scsi_set_tag_type(SCp->device, 0);
|
||||
} else {
|
||||
shost_printk(KERN_WARNING, host,
|
||||
|
|
@ -2052,7 +2052,7 @@ NCR_700_slave_configure(struct scsi_device *SDp)
|
|||
|
||||
/* to do here: allocate memory; build a queue_full list */
|
||||
if(SDp->tagged_supported) {
|
||||
scsi_adjust_queue_depth(SDp, NCR_700_DEFAULT_TAGS);
|
||||
scsi_change_queue_depth(SDp, NCR_700_DEFAULT_TAGS);
|
||||
NCR_700_set_tag_neg_state(SDp, NCR_700_START_TAG_NEGOTIATION);
|
||||
}
|
||||
|
||||
|
|
@ -2075,16 +2075,11 @@ NCR_700_slave_destroy(struct scsi_device *SDp)
|
|||
}
|
||||
|
||||
static int
|
||||
NCR_700_change_queue_depth(struct scsi_device *SDp, int depth, int reason)
|
||||
NCR_700_change_queue_depth(struct scsi_device *SDp, int depth)
|
||||
{
|
||||
if (reason != SCSI_QDEPTH_DEFAULT)
|
||||
return -EOPNOTSUPP;
|
||||
|
||||
if (depth > NCR_700_MAX_TAGS)
|
||||
depth = NCR_700_MAX_TAGS;
|
||||
|
||||
scsi_adjust_queue_depth(SDp, depth);
|
||||
return depth;
|
||||
return scsi_change_queue_depth(SDp, depth);
|
||||
}
|
||||
|
||||
static int NCR_700_change_queue_type(struct scsi_device *SDp, int tag_type)
|
||||
|
|
@ -2105,12 +2100,12 @@ static int NCR_700_change_queue_type(struct scsi_device *SDp, int tag_type)
|
|||
if (!tag_type) {
|
||||
/* shift back to the default unqueued number of commands
|
||||
* (the user can still raise this) */
|
||||
scsi_adjust_queue_depth(SDp, SDp->host->cmd_per_lun);
|
||||
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_adjust_queue_depth(SDp, SDp->queue_depth);
|
||||
scsi_change_queue_depth(SDp, SDp->queue_depth);
|
||||
if (change_tag)
|
||||
NCR_700_set_tag_neg_state(SDp, NCR_700_START_TAG_NEGOTIATION);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2327,12 +2327,12 @@ static int blogic_slaveconfig(struct scsi_device *dev)
|
|||
if (qdepth == 0)
|
||||
qdepth = BLOGIC_MAX_AUTO_TAG_DEPTH;
|
||||
adapter->qdepth[tgt_id] = qdepth;
|
||||
scsi_adjust_queue_depth(dev, qdepth);
|
||||
scsi_change_queue_depth(dev, qdepth);
|
||||
} else {
|
||||
adapter->tagq_ok &= ~(1 << tgt_id);
|
||||
qdepth = adapter->untag_qdepth;
|
||||
adapter->qdepth[tgt_id] = qdepth;
|
||||
scsi_adjust_queue_depth(dev, qdepth);
|
||||
scsi_change_queue_depth(dev, qdepth);
|
||||
}
|
||||
qdepth = 0;
|
||||
for (tgt_id = 0; tgt_id < adapter->maxdev; tgt_id++)
|
||||
|
|
|
|||
|
|
@ -462,9 +462,9 @@ static int aac_slave_configure(struct scsi_device *sdev)
|
|||
depth = 256;
|
||||
else if (depth < 2)
|
||||
depth = 2;
|
||||
scsi_adjust_queue_depth(sdev, depth);
|
||||
scsi_change_queue_depth(sdev, depth);
|
||||
} else
|
||||
scsi_adjust_queue_depth(sdev, 1);
|
||||
scsi_change_queue_depth(sdev, 1);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
@ -478,12 +478,8 @@ static int aac_slave_configure(struct scsi_device *sdev)
|
|||
* total capacity and the queue depth supported by the target device.
|
||||
*/
|
||||
|
||||
static int aac_change_queue_depth(struct scsi_device *sdev, int depth,
|
||||
int reason)
|
||||
static int aac_change_queue_depth(struct scsi_device *sdev, int depth)
|
||||
{
|
||||
if (reason != SCSI_QDEPTH_DEFAULT)
|
||||
return -EOPNOTSUPP;
|
||||
|
||||
if (sdev->tagged_supported && (sdev->type == TYPE_DISK) &&
|
||||
(sdev_channel(sdev) == CONTAINER_CHANNEL)) {
|
||||
struct scsi_device * dev;
|
||||
|
|
@ -504,10 +500,10 @@ static int aac_change_queue_depth(struct scsi_device *sdev, int depth,
|
|||
depth = 256;
|
||||
else if (depth < 2)
|
||||
depth = 2;
|
||||
scsi_adjust_queue_depth(sdev, depth);
|
||||
} else
|
||||
scsi_adjust_queue_depth(sdev, 1);
|
||||
return sdev->queue_depth;
|
||||
return scsi_change_queue_depth(sdev, depth);
|
||||
}
|
||||
|
||||
return scsi_change_queue_depth(sdev, 1);
|
||||
}
|
||||
|
||||
static ssize_t aac_show_raid_level(struct device *dev, struct device_attribute *attr, char *buf)
|
||||
|
|
|
|||
|
|
@ -7706,7 +7706,7 @@ advansys_narrow_slave_configure(struct scsi_device *sdev, ASC_DVC_VAR *asc_dvc)
|
|||
asc_dvc->cfg->can_tagged_qng |= tid_bit;
|
||||
asc_dvc->use_tagged_qng |= tid_bit;
|
||||
}
|
||||
scsi_adjust_queue_depth(sdev,
|
||||
scsi_change_queue_depth(sdev,
|
||||
asc_dvc->max_dvc_qng[sdev->id]);
|
||||
}
|
||||
} else {
|
||||
|
|
@ -7847,10 +7847,8 @@ advansys_wide_slave_configure(struct scsi_device *sdev, ADV_DVC_VAR *adv_dvc)
|
|||
}
|
||||
}
|
||||
|
||||
if ((adv_dvc->tagqng_able & tidmask) && sdev->tagged_supported) {
|
||||
scsi_adjust_queue_depth(sdev,
|
||||
adv_dvc->max_dvc_qng);
|
||||
}
|
||||
if ((adv_dvc->tagqng_able & tidmask) && sdev->tagged_supported)
|
||||
scsi_change_queue_depth(sdev, adv_dvc->max_dvc_qng);
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
|
|||
|
|
@ -1470,7 +1470,7 @@ ahd_platform_set_tags(struct ahd_softc *ahd, struct scsi_device *sdev,
|
|||
switch ((dev->flags & (AHD_DEV_Q_BASIC|AHD_DEV_Q_TAGGED))) {
|
||||
case AHD_DEV_Q_BASIC:
|
||||
case AHD_DEV_Q_TAGGED:
|
||||
scsi_adjust_queue_depth(sdev,
|
||||
scsi_change_queue_depth(sdev,
|
||||
dev->openings + dev->active);
|
||||
break;
|
||||
default:
|
||||
|
|
@ -1480,7 +1480,7 @@ ahd_platform_set_tags(struct ahd_softc *ahd, struct scsi_device *sdev,
|
|||
* serially on the controller/device. This should
|
||||
* remove some latency.
|
||||
*/
|
||||
scsi_adjust_queue_depth(sdev, 1);
|
||||
scsi_change_queue_depth(sdev, 1);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1336,7 +1336,7 @@ ahc_platform_set_tags(struct ahc_softc *ahc, struct scsi_device *sdev,
|
|||
switch ((dev->flags & (AHC_DEV_Q_BASIC|AHC_DEV_Q_TAGGED))) {
|
||||
case AHC_DEV_Q_BASIC:
|
||||
case AHC_DEV_Q_TAGGED:
|
||||
scsi_adjust_queue_depth(sdev,
|
||||
scsi_change_queue_depth(sdev,
|
||||
dev->openings + dev->active);
|
||||
default:
|
||||
/*
|
||||
|
|
@ -1345,7 +1345,7 @@ ahc_platform_set_tags(struct ahc_softc *ahc, struct scsi_device *sdev,
|
|||
* serially on the controller/device. This should
|
||||
* remove some latency.
|
||||
*/
|
||||
scsi_adjust_queue_depth(sdev, 2);
|
||||
scsi_change_queue_depth(sdev, 2);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -114,16 +114,11 @@ static void arcmsr_hardware_reset(struct AdapterControlBlock *acb);
|
|||
static const char *arcmsr_info(struct Scsi_Host *);
|
||||
static irqreturn_t arcmsr_interrupt(struct AdapterControlBlock *acb);
|
||||
static void arcmsr_free_irq(struct pci_dev *, struct AdapterControlBlock *);
|
||||
static int arcmsr_adjust_disk_queue_depth(struct scsi_device *sdev,
|
||||
int queue_depth, int reason)
|
||||
static int arcmsr_adjust_disk_queue_depth(struct scsi_device *sdev, int queue_depth)
|
||||
{
|
||||
if (reason != SCSI_QDEPTH_DEFAULT)
|
||||
return -EOPNOTSUPP;
|
||||
|
||||
if (queue_depth > ARCMSR_MAX_CMD_PERLUN)
|
||||
queue_depth = ARCMSR_MAX_CMD_PERLUN;
|
||||
scsi_adjust_queue_depth(sdev, queue_depth);
|
||||
return queue_depth;
|
||||
return scsi_change_queue_depth(sdev, queue_depth);
|
||||
}
|
||||
|
||||
static struct scsi_host_template arcmsr_scsi_host_template = {
|
||||
|
|
|
|||
|
|
@ -556,7 +556,7 @@ static struct scsi_host_template beiscsi_sht = {
|
|||
.name = "Emulex 10Gbe open-iscsi Initiator Driver",
|
||||
.proc_name = DRV_NAME,
|
||||
.queuecommand = iscsi_queuecommand,
|
||||
.change_queue_depth = iscsi_change_queue_depth,
|
||||
.change_queue_depth = scsi_change_queue_depth,
|
||||
.slave_configure = beiscsi_slave_configure,
|
||||
.target_alloc = iscsi_target_alloc,
|
||||
.eh_abort_handler = beiscsi_eh_abort,
|
||||
|
|
|
|||
|
|
@ -776,7 +776,7 @@ bfad_thread_workq(struct bfad_s *bfad)
|
|||
static int
|
||||
bfad_im_slave_configure(struct scsi_device *sdev)
|
||||
{
|
||||
scsi_adjust_queue_depth(sdev, bfa_lun_queue_depth);
|
||||
scsi_change_queue_depth(sdev, bfa_lun_queue_depth);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
@ -866,7 +866,7 @@ bfad_ramp_up_qdepth(struct bfad_itnim_s *itnim, struct scsi_device *sdev)
|
|||
if (bfa_lun_queue_depth > tmp_sdev->queue_depth) {
|
||||
if (tmp_sdev->id != sdev->id)
|
||||
continue;
|
||||
scsi_adjust_queue_depth(tmp_sdev,
|
||||
scsi_change_queue_depth(tmp_sdev,
|
||||
tmp_sdev->queue_depth + 1);
|
||||
|
||||
itnim->last_ramp_up_time = jiffies;
|
||||
|
|
|
|||
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue