aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/scsi')
-rw-r--r--drivers/scsi/qla2xxx/qla_os.c29
1 files changed, 29 insertions, 0 deletions
diff --git a/drivers/scsi/qla2xxx/qla_os.c b/drivers/scsi/qla2xxx/qla_os.c
index 29cf3f510935..413ccc152de5 100644
--- a/drivers/scsi/qla2xxx/qla_os.c
+++ b/drivers/scsi/qla2xxx/qla_os.c
@@ -111,6 +111,9 @@ static int qla2xxx_eh_host_reset(struct scsi_cmnd *);
111static int qla2x00_loop_reset(scsi_qla_host_t *ha); 111static int qla2x00_loop_reset(scsi_qla_host_t *ha);
112static int qla2x00_device_reset(scsi_qla_host_t *, fc_port_t *); 112static int qla2x00_device_reset(scsi_qla_host_t *, fc_port_t *);
113 113
114static int qla2x00_change_queue_depth(struct scsi_device *, int);
115static int qla2x00_change_queue_type(struct scsi_device *, int);
116
114static struct scsi_host_template qla2x00_driver_template = { 117static struct scsi_host_template qla2x00_driver_template = {
115 .module = THIS_MODULE, 118 .module = THIS_MODULE,
116 .name = "qla2xxx", 119 .name = "qla2xxx",
@@ -125,6 +128,8 @@ static struct scsi_host_template qla2x00_driver_template = {
125 128
126 .slave_alloc = qla2xxx_slave_alloc, 129 .slave_alloc = qla2xxx_slave_alloc,
127 .slave_destroy = qla2xxx_slave_destroy, 130 .slave_destroy = qla2xxx_slave_destroy,
131 .change_queue_depth = qla2x00_change_queue_depth,
132 .change_queue_type = qla2x00_change_queue_type,
128 .this_id = -1, 133 .this_id = -1,
129 .cmd_per_lun = 3, 134 .cmd_per_lun = 3,
130 .use_clustering = ENABLE_CLUSTERING, 135 .use_clustering = ENABLE_CLUSTERING,
@@ -151,6 +156,8 @@ static struct scsi_host_template qla24xx_driver_template = {
151 156
152 .slave_alloc = qla2xxx_slave_alloc, 157 .slave_alloc = qla2xxx_slave_alloc,
153 .slave_destroy = qla2xxx_slave_destroy, 158 .slave_destroy = qla2xxx_slave_destroy,
159 .change_queue_depth = qla2x00_change_queue_depth,
160 .change_queue_type = qla2x00_change_queue_type,
154 .this_id = -1, 161 .this_id = -1,
155 .cmd_per_lun = 3, 162 .cmd_per_lun = 3,
156 .use_clustering = ENABLE_CLUSTERING, 163 .use_clustering = ENABLE_CLUSTERING,
@@ -1109,6 +1116,28 @@ qla2xxx_slave_destroy(struct scsi_device *sdev)
1109 sdev->hostdata = NULL; 1116 sdev->hostdata = NULL;
1110} 1117}
1111 1118
1119static int
1120qla2x00_change_queue_depth(struct scsi_device *sdev, int qdepth)
1121{
1122 scsi_adjust_queue_depth(sdev, scsi_get_tag_type(sdev), qdepth);
1123 return sdev->queue_depth;
1124}
1125
1126static int
1127qla2x00_change_queue_type(struct scsi_device *sdev, int tag_type)
1128{
1129 if (sdev->tagged_supported) {
1130 scsi_set_tag_type(sdev, tag_type);
1131 if (tag_type)
1132 scsi_activate_tcq(sdev, sdev->queue_depth);
1133 else
1134 scsi_deactivate_tcq(sdev, sdev->queue_depth);
1135 } else
1136 tag_type = 0;
1137
1138 return tag_type;
1139}
1140
1112/** 1141/**
1113 * qla2x00_config_dma_addressing() - Configure OS DMA addressing method. 1142 * qla2x00_config_dma_addressing() - Configure OS DMA addressing method.
1114 * @ha: HA context 1143 * @ha: HA context