]> git.baikalelectronics.ru Git - kernel.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)
committerDavid S. Miller <davem@davemloft.net>
Tue, 8 May 2018 04:06:44 +0000 (00:06 -0400)
commit35c5e8be73254e02de1ab753e3125693db40bcea
treead505327eef2bcdfe6e37361aaf1ea539d1bcf7a
parent9f6e5886bcfdb3f95b925cdb9bd4e29dc41c2986
net: aquantia: Limit number of vectors to actually allocated irqs

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: dc42839 ("net: aquantia: Cleanup pci functions module")
Signed-off-by: Igor Russkikh <igor.russkikh@aquantia.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
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