]> www.infradead.org Git - users/jedix/linux-maple.git/commit
i40e: disable MSI-X interrupts if we cannot reserve enough vectors
authorGuilherme G Piccoli <gpiccoli@linux.vnet.ibm.com>
Thu, 22 Sep 2016 13:03:58 +0000 (10:03 -0300)
committerDhaval Giani <dhaval.giani@oracle.com>
Wed, 8 Mar 2017 00:40:05 +0000 (19:40 -0500)
commitca18fcc0421595723e080b0e8639d98f9639f917
treeb11c5eea531bd7581cb7df4d6c455014c000e5e3
parent6d9d32bc30a23229280c250f0ce0dc3a13e9bd37
i40e: disable MSI-X interrupts if we cannot reserve enough vectors

Orabug: 24568124

If we fail on allocating enough MSI-X interrupts, we should disable
them since they were previously enabled in this point of code.

Not disabling them can lead to WARN_ON() being triggered and subsequent
failure in enabling MSI as a fallback; the below message was shown without
this patch while we played with interrupt allocation in i40e driver:

[ 21.461346] sysfs: cannot create duplicate filename '/devices/pci0007:00/0007:00:00.0/0007:01:00.3/msi_irqs'
[ 21.461459] ------------[ cut here ]------------
[ 21.461514] WARNING: CPU: 64 PID: 1155 at fs/sysfs/dir.c:31 sysfs_warn_dup+0x88/0xc0

Also, we noticed that without this patch, if we modprobe the module without
enough MSI-X interrupts (triggering the above warning), unload the module
and re-load it again, we got a crash on the system.

Signed-off-by: Guilherme G Piccoli <gpiccoli@linux.vnet.ibm.com>
Tested-by: Andrew Bowers <andrewx.bowers@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
(cherry picked from commit 4c95aa5d8fc34be18fcab01b1c6251c8c2b61520)
Signed-off-by: Brian Maly <brian.maly@oracle.com>
Signed-off-by: Dhaval Giani <dhaval.giani@oracle.com>
drivers/net/ethernet/intel/i40e/i40e_main.c