[SCSI] qla2xxx: Add change_queue_depth/type() API support.
Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
This commit is contained in:
parent
131736d34e
commit
ce7e4af7f5
|
@ -111,6 +111,9 @@ static int qla2xxx_eh_host_reset(struct scsi_cmnd *);
|
||||||
static int qla2x00_loop_reset(scsi_qla_host_t *ha);
|
static int qla2x00_loop_reset(scsi_qla_host_t *ha);
|
||||||
static int qla2x00_device_reset(scsi_qla_host_t *, fc_port_t *);
|
static int qla2x00_device_reset(scsi_qla_host_t *, fc_port_t *);
|
||||||
|
|
||||||
|
static int qla2x00_change_queue_depth(struct scsi_device *, int);
|
||||||
|
static int qla2x00_change_queue_type(struct scsi_device *, int);
|
||||||
|
|
||||||
static struct scsi_host_template qla2x00_driver_template = {
|
static struct scsi_host_template qla2x00_driver_template = {
|
||||||
.module = THIS_MODULE,
|
.module = THIS_MODULE,
|
||||||
.name = "qla2xxx",
|
.name = "qla2xxx",
|
||||||
|
@ -125,6 +128,8 @@ static struct scsi_host_template qla2x00_driver_template = {
|
||||||
|
|
||||||
.slave_alloc = qla2xxx_slave_alloc,
|
.slave_alloc = qla2xxx_slave_alloc,
|
||||||
.slave_destroy = qla2xxx_slave_destroy,
|
.slave_destroy = qla2xxx_slave_destroy,
|
||||||
|
.change_queue_depth = qla2x00_change_queue_depth,
|
||||||
|
.change_queue_type = qla2x00_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,
|
||||||
|
@ -151,6 +156,8 @@ static struct scsi_host_template qla24xx_driver_template = {
|
||||||
|
|
||||||
.slave_alloc = qla2xxx_slave_alloc,
|
.slave_alloc = qla2xxx_slave_alloc,
|
||||||
.slave_destroy = qla2xxx_slave_destroy,
|
.slave_destroy = qla2xxx_slave_destroy,
|
||||||
|
.change_queue_depth = qla2x00_change_queue_depth,
|
||||||
|
.change_queue_type = qla2x00_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,
|
||||||
|
@ -1109,6 +1116,28 @@ qla2xxx_slave_destroy(struct scsi_device *sdev)
|
||||||
sdev->hostdata = NULL;
|
sdev->hostdata = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static int
|
||||||
|
qla2x00_change_queue_depth(struct scsi_device *sdev, int qdepth)
|
||||||
|
{
|
||||||
|
scsi_adjust_queue_depth(sdev, scsi_get_tag_type(sdev), qdepth);
|
||||||
|
return sdev->queue_depth;
|
||||||
|
}
|
||||||
|
|
||||||
|
static int
|
||||||
|
qla2x00_change_queue_type(struct scsi_device *sdev, int tag_type)
|
||||||
|
{
|
||||||
|
if (sdev->tagged_supported) {
|
||||||
|
scsi_set_tag_type(sdev, tag_type);
|
||||||
|
if (tag_type)
|
||||||
|
scsi_activate_tcq(sdev, sdev->queue_depth);
|
||||||
|
else
|
||||||
|
scsi_deactivate_tcq(sdev, sdev->queue_depth);
|
||||||
|
} else
|
||||||
|
tag_type = 0;
|
||||||
|
|
||||||
|
return tag_type;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* qla2x00_config_dma_addressing() - Configure OS DMA addressing method.
|
* qla2x00_config_dma_addressing() - Configure OS DMA addressing method.
|
||||||
* @ha: HA context
|
* @ha: HA context
|
||||||
|
|
Loading…
Reference in New Issue