]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
net: aquantia: Limit number of vectors to actually allocated irqs
authorIgor Russkikh <igor.russkikh@aquantia.com>
Mon, 7 May 2018 13:10:39 +0000 (16:10 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 20 Jun 2018 19:01:38 +0000 (04:01 +0900)
commit5947b8b81e99b52fa6e9550cc92fb6b7b1ccd9b7
treef7ba7ade6dad9bc9b673a33b81c629fa6717e323
parenta1c56a5fa95a615411a9b6ba37cdf291ac98d78d
net: aquantia: Limit number of vectors to actually allocated irqs

[ Upstream commit a09bd81b5413d1b4d705c6c5303b5d311069da22 ]

Driver should use pci_alloc_irq_vectors return value to correct number
of allocated vectors and napi instances. Otherwise it'll panic later
in pci_irq_vector.

Driver also should allow more than one MSI vectors to be allocated.

Error return path from pci_alloc_irq_vectors is also fixed to revert
resources in a correct sequence when error happens.

Reported-by: Long, Nicholas <nicholas.a.long@baesystems.com>
Fixes: 23ee07a ("net: aquantia: Cleanup pci functions module")
Signed-off-by: Igor Russkikh <igor.russkikh@aquantia.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <alexander.levin@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/net/ethernet/aquantia/atlantic/aq_nic.c
drivers/net/ethernet/aquantia/atlantic/aq_nic.h
drivers/net/ethernet/aquantia/atlantic/aq_pci_func.c