summaryrefslogtreecommitdiffstats
path: root/drivers/block
diff options
context:
space:
mode:
authorMatthew Wilcox <matthew.r.wilcox@intel.com>2011-02-15 16:16:02 -0500
committerMatthew Wilcox <matthew.r.wilcox@intel.com>2011-11-04 15:52:58 -0400
commitb348b7d54368c87811907a8e88f0d96713c43009 (patch)
treef0f0e4a4f6215656fec7d56db21d8989659562a3 /drivers/block
parentca1615424c9adfdbe7d484771d7a7c5ecc4bb6d2 (diff)
downloadblackbird-op-linux-b348b7d54368c87811907a8e88f0d96713c43009.tar.gz
blackbird-op-linux-b348b7d54368c87811907a8e88f0d96713c43009.zip
NVMe: Rename nr_queues to nr_io_queues
I got confused about whether this included the admin queue or not, and had to resort to reading the spec. It doesn't include the admin queue, so make that clear in the name. Signed-off-by: Matthew Wilcox <matthew.r.wilcox@intel.com>
Diffstat (limited to 'drivers/block')
-rw-r--r--drivers/block/nvme.c23
1 files changed, 12 insertions, 11 deletions
diff --git a/drivers/block/nvme.c b/drivers/block/nvme.c
index 37cdf0711954..f3aa8097e675 100644
--- a/drivers/block/nvme.c
+++ b/drivers/block/nvme.c
@@ -1202,29 +1202,30 @@ static int set_queue_count(struct nvme_dev *dev, int count)
static int __devinit nvme_setup_io_queues(struct nvme_dev *dev)
{
- int result, cpu, i, nr_queues;
+ int result, cpu, i, nr_io_queues;
- nr_queues = num_online_cpus();
- result = set_queue_count(dev, nr_queues);
+ nr_io_queues = num_online_cpus();
+ result = set_queue_count(dev, nr_io_queues);
if (result < 0)
return result;
- if (result < nr_queues)
- nr_queues = result;
+ if (result < nr_io_queues)
+ nr_io_queues = result;
/* Deregister the admin queue's interrupt */
free_irq(dev->entry[0].vector, dev->queues[0]);
- for (i = 0; i < nr_queues; i++)
+ for (i = 0; i < nr_io_queues; i++)
dev->entry[i].entry = i;
for (;;) {
- result = pci_enable_msix(dev->pci_dev, dev->entry, nr_queues);
+ result = pci_enable_msix(dev->pci_dev, dev->entry,
+ nr_io_queues);
if (result == 0) {
break;
} else if (result > 0) {
- nr_queues = result;
+ nr_io_queues = result;
continue;
} else {
- nr_queues = 1;
+ nr_io_queues = 1;
break;
}
}
@@ -1233,12 +1234,12 @@ static int __devinit nvme_setup_io_queues(struct nvme_dev *dev)
/* XXX: handle failure here */
cpu = cpumask_first(cpu_online_mask);
- for (i = 0; i < nr_queues; i++) {
+ for (i = 0; i < nr_io_queues; i++) {
irq_set_affinity_hint(dev->entry[i].vector, get_cpu_mask(cpu));
cpu = cpumask_next(cpu, cpu_online_mask);
}
- for (i = 0; i < nr_queues; i++) {
+ for (i = 0; i < nr_io_queues; i++) {
dev->queues[i + 1] = nvme_create_queue(dev, i + 1,
NVME_Q_DEPTH, i);
if (!dev->queues[i + 1])
OpenPOWER on IntegriCloud