summaryrefslogtreecommitdiff
path: root/block/blk-mq-pci.c
diff options
context:
space:
mode:
authorMarcel Ziswiler <marcel.ziswiler@toradex.com>2017-12-21 15:00:27 +0100
committerMarcel Ziswiler <marcel.ziswiler@toradex.com>2017-12-21 15:01:25 +0100
commitd9f7e5584f0e3e34a2c14825657a6b31e7184171 (patch)
treef1b58594ba11c6c41c3acddde35890f68c42ea9e /block/blk-mq-pci.c
parenteffee16e4c0cc8b570d372e33633e9f9bc8359c7 (diff)
parent284bbc782445283e9a5124666dda8010f379f179 (diff)
Merge tag 'v4.9.67' into 4.9-1.0.x-imx-fixes-stable-merge
This is the 4.9.67 stable release Resolved conflicts: arch/arm/boot/dts/imx6sx-sdb.dts drivers/dma/imx-sdma.c drivers/mmc/core/host.c drivers/usb/chipidea/otg.c sound/soc/fsl/fsl_ssi.c This merge also reverts commit 3a654a85932f ("dmaengine: imx-sdma - correct the dma transfer residue calculation"). The downstream kernel seems to use different structures and already use buf_ptail in its calculation.
Diffstat (limited to 'block/blk-mq-pci.c')
-rw-r--r--block/blk-mq-pci.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/block/blk-mq-pci.c b/block/blk-mq-pci.c
index 966c2169762e..ee9d3d958fbe 100644
--- a/block/blk-mq-pci.c
+++ b/block/blk-mq-pci.c
@@ -36,12 +36,18 @@ int blk_mq_pci_map_queues(struct blk_mq_tag_set *set, struct pci_dev *pdev)
for (queue = 0; queue < set->nr_hw_queues; queue++) {
mask = pci_irq_get_affinity(pdev, queue);
if (!mask)
- return -EINVAL;
+ goto fallback;
for_each_cpu(cpu, mask)
set->mq_map[cpu] = queue;
}
return 0;
+
+fallback:
+ WARN_ON_ONCE(set->nr_hw_queues > 1);
+ for_each_possible_cpu(cpu)
+ set->mq_map[cpu] = 0;
+ return 0;
}
EXPORT_SYMBOL_GPL(blk_mq_pci_map_queues);