diff options
Diffstat (limited to 'drivers/scsi/megaraid/megaraid_mbox.c')
-rw-r--r-- | drivers/scsi/megaraid/megaraid_mbox.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/drivers/scsi/megaraid/megaraid_mbox.c b/drivers/scsi/megaraid/megaraid_mbox.c index cd982c877da0..266b3910846b 100644 --- a/drivers/scsi/megaraid/megaraid_mbox.c +++ b/drivers/scsi/megaraid/megaraid_mbox.c | |||
@@ -330,6 +330,21 @@ static struct device_attribute *megaraid_sdev_attrs[] = { | |||
330 | NULL, | 330 | NULL, |
331 | }; | 331 | }; |
332 | 332 | ||
333 | /** | ||
334 | * megaraid_change_queue_depth - Change the device's queue depth | ||
335 | * @sdev: scsi device struct | ||
336 | * @qdepth: depth to set | ||
337 | * | ||
338 | * Return value: | ||
339 | * actual depth set | ||
340 | **/ | ||
341 | static int megaraid_change_queue_depth(struct scsi_device *sdev, int qdepth) | ||
342 | { | ||
343 | if (qdepth > MBOX_MAX_SCSI_CMDS) | ||
344 | qdepth = MBOX_MAX_SCSI_CMDS; | ||
345 | scsi_adjust_queue_depth(sdev, 0, qdepth); | ||
346 | return sdev->queue_depth; | ||
347 | } | ||
333 | 348 | ||
334 | /* | 349 | /* |
335 | * Scsi host template for megaraid unified driver | 350 | * Scsi host template for megaraid unified driver |
@@ -343,6 +358,7 @@ static struct scsi_host_template megaraid_template_g = { | |||
343 | .eh_device_reset_handler = megaraid_reset_handler, | 358 | .eh_device_reset_handler = megaraid_reset_handler, |
344 | .eh_bus_reset_handler = megaraid_reset_handler, | 359 | .eh_bus_reset_handler = megaraid_reset_handler, |
345 | .eh_host_reset_handler = megaraid_reset_handler, | 360 | .eh_host_reset_handler = megaraid_reset_handler, |
361 | .change_queue_depth = megaraid_change_queue_depth, | ||
346 | .use_clustering = ENABLE_CLUSTERING, | 362 | .use_clustering = ENABLE_CLUSTERING, |
347 | .sdev_attrs = megaraid_sdev_attrs, | 363 | .sdev_attrs = megaraid_sdev_attrs, |
348 | .shost_attrs = megaraid_shost_attrs, | 364 | .shost_attrs = megaraid_shost_attrs, |