aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/message/fusion/mptscsih.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/message/fusion/mptscsih.c')
-rw-r--r--drivers/message/fusion/mptscsih.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/drivers/message/fusion/mptscsih.c b/drivers/message/fusion/mptscsih.c
index f68ec48a881e..57752751712b 100644
--- a/drivers/message/fusion/mptscsih.c
+++ b/drivers/message/fusion/mptscsih.c
@@ -2351,11 +2351,12 @@ mptscsih_slave_destroy(struct scsi_device *sdev)
2351 * mptscsih_change_queue_depth - This function will set a devices queue depth 2351 * mptscsih_change_queue_depth - This function will set a devices queue depth
2352 * @sdev: per scsi_device pointer 2352 * @sdev: per scsi_device pointer
2353 * @qdepth: requested queue depth 2353 * @qdepth: requested queue depth
2354 * @reason: calling context
2354 * 2355 *
2355 * Adding support for new 'change_queue_depth' api. 2356 * Adding support for new 'change_queue_depth' api.
2356*/ 2357*/
2357int 2358int
2358mptscsih_change_queue_depth(struct scsi_device *sdev, int qdepth) 2359mptscsih_change_queue_depth(struct scsi_device *sdev, int qdepth, int reason)
2359{ 2360{
2360 MPT_SCSI_HOST *hd = shost_priv(sdev->host); 2361 MPT_SCSI_HOST *hd = shost_priv(sdev->host);
2361 VirtTarget *vtarget; 2362 VirtTarget *vtarget;
@@ -2367,6 +2368,9 @@ mptscsih_change_queue_depth(struct scsi_device *sdev, int qdepth)
2367 starget = scsi_target(sdev); 2368 starget = scsi_target(sdev);
2368 vtarget = starget->hostdata; 2369 vtarget = starget->hostdata;
2369 2370
2371 if (reason != SCSI_QDEPTH_DEFAULT)
2372 return -EOPNOTSUPP;
2373
2370 if (ioc->bus_type == SPI) { 2374 if (ioc->bus_type == SPI) {
2371 if (!(vtarget->tflags & MPT_TARGET_FLAGS_Q_YES)) 2375 if (!(vtarget->tflags & MPT_TARGET_FLAGS_Q_YES))
2372 max_depth = 1; 2376 max_depth = 1;
@@ -2433,7 +2437,8 @@ mptscsih_slave_configure(struct scsi_device *sdev)
2433 ioc->name, vtarget->negoFlags, vtarget->maxOffset, 2437 ioc->name, vtarget->negoFlags, vtarget->maxOffset,
2434 vtarget->minSyncFactor)); 2438 vtarget->minSyncFactor));
2435 2439
2436 mptscsih_change_queue_depth(sdev, MPT_SCSI_CMD_PER_DEV_HIGH); 2440 mptscsih_change_queue_depth(sdev, MPT_SCSI_CMD_PER_DEV_HIGH,
2441 SCSI_QDEPTH_DEFAULT);
2437 dsprintk(ioc, printk(MYIOC_s_DEBUG_FMT 2442 dsprintk(ioc, printk(MYIOC_s_DEBUG_FMT
2438 "tagged %d, simple %d, ordered %d\n", 2443 "tagged %d, simple %d, ordered %d\n",
2439 ioc->name,sdev->tagged_supported, sdev->simple_tags, 2444 ioc->name,sdev->tagged_supported, sdev->simple_tags,