ahci: only try to use multi-MSI mode if there is more than 1 port
authorChristoph Hellwig <hch@lst.de>
Tue, 18 Oct 2016 07:00:52 +0000 (09:00 +0200)
committerTejun Heo <tj@kernel.org>
Wed, 19 Oct 2016 17:18:16 +0000 (13:18 -0400)
commit17a51f12cfbd2814fd35966a069b242569c53e27
treeac00dfa3303d195b0dd8929d3f6c9c585b021351
parent1001354ca34179f3db924eb66672442a173147dc
ahci: only try to use multi-MSI mode if there is more than 1 port

We should only try to allocate multiple MSI or MSI-X vectors if the device
actually has multiple ports.  Otherwise pci_alloc_irq_vectors will return
a single vector due to n_ports = 1, in which case we shouldn't set the
AHCI_HFLAG_MULTI_MSI flag.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Fixes: 0b9e2988 ("ahci: use pci_alloc_irq_vectors")
Reported-by: Emmanuel Benisty <benisty.e@gmail.com>
Tested-by: Emmanuel Benisty <benisty.e@gmail.com>
Signed-off-by: Tejun Heo <tj@kernel.org>
drivers/ata/ahci.c