diff options
author | Christoph Hellwig <hch@lst.de> | 2014-11-13 17:11:59 +0300 |
---|---|---|
committer | Christoph Hellwig <hch@lst.de> | 2014-11-24 16:45:27 +0300 |
commit | 286c9408ec818060b6de2e617f92c40eb94d6fed (patch) | |
tree | 1ee267d0f2553c493c66a193e56782558e832656 /drivers/scsi/mpt2sas | |
parent | db5ed4dfd5dd0142ec36ff7b335e0ec3b836b3e6 (diff) | |
download | linux-286c9408ec818060b6de2e617f92c40eb94d6fed.tar.xz |
mpt2sas: simplify ->change_queue_depth
Merge two functions, and remove overly verbose debugging output that pokes
into mid-layer internal structures.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Mike Christie <michaelc@cs.wisc.edu>
Reviewed-by: Hannes Reinecke <hare@suse.de>
Diffstat (limited to 'drivers/scsi/mpt2sas')
-rw-r--r-- | drivers/scsi/mpt2sas/mpt2sas_scsih.c | 34 |
1 files changed, 5 insertions, 29 deletions
diff --git a/drivers/scsi/mpt2sas/mpt2sas_scsih.c b/drivers/scsi/mpt2sas/mpt2sas_scsih.c index 12229de433bf..8431eb10bbb1 100644 --- a/drivers/scsi/mpt2sas/mpt2sas_scsih.c +++ b/drivers/scsi/mpt2sas/mpt2sas_scsih.c @@ -1179,15 +1179,14 @@ _scsih_build_scatter_gather(struct MPT2SAS_ADAPTER *ioc, } /** - * _scsih_adjust_queue_depth - setting device queue depth + * _scsih_change_queue_depth - setting device queue depth * @sdev: scsi device struct * @qdepth: requested queue depth * - * - * Returns nothing + * Returns queue depth. */ -static void -_scsih_adjust_queue_depth(struct scsi_device *sdev, int qdepth) +static int +_scsih_change_queue_depth(struct scsi_device *sdev, int qdepth) { struct Scsi_Host *shost = sdev->host; int max_depth; @@ -1217,34 +1216,11 @@ _scsih_adjust_queue_depth(struct scsi_device *sdev, int qdepth) spin_unlock_irqrestore(&ioc->sas_device_lock, flags); not_sata: - if (!sdev->tagged_supported) max_depth = 1; if (qdepth > max_depth) qdepth = max_depth; - scsi_change_queue_depth(sdev, qdepth); -} - -/** - * _scsih_change_queue_depth - setting device queue depth - * @sdev: scsi device struct - * @qdepth: requested queue depth - * - * Returns queue depth. - */ -static int -_scsih_change_queue_depth(struct scsi_device *sdev, int qdepth) -{ - _scsih_adjust_queue_depth(sdev, qdepth); - - if (sdev->inquiry_len > 7) - sdev_printk(KERN_INFO, sdev, "qdepth(%d), tagged(%d), " - "simple(%d), scsi_level(%d), cmd_que(%d)\n", - sdev->queue_depth, sdev->tagged_supported, sdev->simple_tags, - sdev->scsi_level, - (sdev->inquiry[7] & 2) >> 1); - - return sdev->queue_depth; + return scsi_change_queue_depth(sdev, qdepth); } /** |