diff options
Diffstat (limited to 'drivers/message/fusion/mptscsih.c')
-rw-r--r-- | drivers/message/fusion/mptscsih.c | 22 |
1 files changed, 5 insertions, 17 deletions
diff --git a/drivers/message/fusion/mptscsih.c b/drivers/message/fusion/mptscsih.c index e7dcb2583369..6c9fc11efb87 100644 --- a/drivers/message/fusion/mptscsih.c +++ b/drivers/message/fusion/mptscsih.c | |||
@@ -2311,26 +2311,21 @@ mptscsih_slave_destroy(struct scsi_device *sdev) | |||
2311 | * mptscsih_change_queue_depth - This function will set a devices queue depth | 2311 | * mptscsih_change_queue_depth - This function will set a devices queue depth |
2312 | * @sdev: per scsi_device pointer | 2312 | * @sdev: per scsi_device pointer |
2313 | * @qdepth: requested queue depth | 2313 | * @qdepth: requested queue depth |
2314 | * @reason: calling context | ||
2315 | * | 2314 | * |
2316 | * Adding support for new 'change_queue_depth' api. | 2315 | * Adding support for new 'change_queue_depth' api. |
2317 | */ | 2316 | */ |
2318 | int | 2317 | int |
2319 | mptscsih_change_queue_depth(struct scsi_device *sdev, int qdepth, int reason) | 2318 | mptscsih_change_queue_depth(struct scsi_device *sdev, int qdepth) |
2320 | { | 2319 | { |
2321 | MPT_SCSI_HOST *hd = shost_priv(sdev->host); | 2320 | MPT_SCSI_HOST *hd = shost_priv(sdev->host); |
2322 | VirtTarget *vtarget; | 2321 | VirtTarget *vtarget; |
2323 | struct scsi_target *starget; | 2322 | struct scsi_target *starget; |
2324 | int max_depth; | 2323 | int max_depth; |
2325 | int tagged; | ||
2326 | MPT_ADAPTER *ioc = hd->ioc; | 2324 | MPT_ADAPTER *ioc = hd->ioc; |
2327 | 2325 | ||
2328 | starget = scsi_target(sdev); | 2326 | starget = scsi_target(sdev); |
2329 | vtarget = starget->hostdata; | 2327 | vtarget = starget->hostdata; |
2330 | 2328 | ||
2331 | if (reason != SCSI_QDEPTH_DEFAULT) | ||
2332 | return -EOPNOTSUPP; | ||
2333 | |||
2334 | if (ioc->bus_type == SPI) { | 2329 | if (ioc->bus_type == SPI) { |
2335 | if (!(vtarget->tflags & MPT_TARGET_FLAGS_Q_YES)) | 2330 | if (!(vtarget->tflags & MPT_TARGET_FLAGS_Q_YES)) |
2336 | max_depth = 1; | 2331 | max_depth = 1; |
@@ -2347,13 +2342,8 @@ mptscsih_change_queue_depth(struct scsi_device *sdev, int qdepth, int reason) | |||
2347 | 2342 | ||
2348 | if (qdepth > max_depth) | 2343 | if (qdepth > max_depth) |
2349 | qdepth = max_depth; | 2344 | qdepth = max_depth; |
2350 | if (qdepth == 1) | ||
2351 | tagged = 0; | ||
2352 | else | ||
2353 | tagged = MSG_SIMPLE_TAG; | ||
2354 | 2345 | ||
2355 | scsi_adjust_queue_depth(sdev, tagged, qdepth); | 2346 | return scsi_change_queue_depth(sdev, qdepth); |
2356 | return sdev->queue_depth; | ||
2357 | } | 2347 | } |
2358 | 2348 | ||
2359 | /* | 2349 | /* |
@@ -2397,12 +2387,10 @@ mptscsih_slave_configure(struct scsi_device *sdev) | |||
2397 | ioc->name, vtarget->negoFlags, vtarget->maxOffset, | 2387 | ioc->name, vtarget->negoFlags, vtarget->maxOffset, |
2398 | vtarget->minSyncFactor)); | 2388 | vtarget->minSyncFactor)); |
2399 | 2389 | ||
2400 | mptscsih_change_queue_depth(sdev, MPT_SCSI_CMD_PER_DEV_HIGH, | 2390 | mptscsih_change_queue_depth(sdev, MPT_SCSI_CMD_PER_DEV_HIGH); |
2401 | SCSI_QDEPTH_DEFAULT); | ||
2402 | dsprintk(ioc, printk(MYIOC_s_DEBUG_FMT | 2391 | dsprintk(ioc, printk(MYIOC_s_DEBUG_FMT |
2403 | "tagged %d, simple %d, ordered %d\n", | 2392 | "tagged %d, simple %d\n", |
2404 | ioc->name,sdev->tagged_supported, sdev->simple_tags, | 2393 | ioc->name,sdev->tagged_supported, sdev->simple_tags)); |
2405 | sdev->ordered_tags)); | ||
2406 | 2394 | ||
2407 | blk_queue_dma_alignment (sdev->request_queue, 512 - 1); | 2395 | blk_queue_dma_alignment (sdev->request_queue, 512 - 1); |
2408 | 2396 | ||