linux_dsm_epyc7002/drivers/net/ethernet/intel/igb
Stefan Assmann 781798a11e igb: fix driver reload with VF assigned to guest
commit fa44f2f185 broke reloading of igb, when
VFs are assigned to a guest, in several ways.
1. on module load adapter->vf_data does not get properly allocated,
resulting in a null pointer exception when accessing adapter->vf_data in
igb_reset() on module reload.
 modprobe -r igb ; modprobe igb max_vfs=7
[  215.215837] igb 0000:01:00.1: removed PHC on eth1
[  216.932072] igb 0000:01:00.1: IOV Disabled
[  216.937038] igb 0000:01:00.0: removed PHC on eth0
[  217.127032] igb 0000:01:00.0: Cannot deallocate SR-IOV virtual functions while they are assigned - VFs will not be deallocated
[  217.146178] igb: Intel(R) Gigabit Ethernet Network Driver - version 5.0.5-k
[  217.154050] igb: Copyright (c) 2007-2013 Intel Corporation.
[  217.160688] igb 0000:01:00.0: Enabling SR-IOV VFs using the module parameter is deprecated - please use the pci sysfs interface.
[  217.173703] igb 0000:01:00.0: irq 103 for MSI/MSI-X
[  217.179227] igb 0000:01:00.0: irq 104 for MSI/MSI-X
[  217.184735] igb 0000:01:00.0: irq 105 for MSI/MSI-X
[  217.220082] BUG: unable to handle kernel NULL pointer dereference at 0000000000000048
[  217.228846] IP: [<ffffffffa007c5e5>] igb_reset+0xc5/0x4b0 [igb]
[  217.235472] PGD 3607ec067 PUD 36170b067 PMD 0
[  217.240461] Oops: 0002 [#1] SMP
[  217.244085] Modules linked in: igb(+) igbvf mptsas mptscsih mptbase scsi_transport_sas [last unloaded: igb]
[  217.255040] CPU: 4 PID: 4833 Comm: modprobe Not tainted 3.11.0+ #46
[...]
[  217.390007]  [<ffffffffa007fab2>] igb_probe+0x892/0xfd0 [igb]
[  217.396422]  [<ffffffff81470b3e>] local_pci_probe+0x1e/0x40
[  217.402641]  [<ffffffff81472029>] pci_device_probe+0xf9/0x110
[...]
2. A follow up issue, pci_enable_sriov() should only be called if no VFs were
still allocated on module unload. Otherwise pci_enable_sriov() gets called
multiple times in a row rendering the NIC unusable until reset.
3. simply calling igb_enable_sriov() in igb_probe_vfs() is not enough as the
interrupts need to be re-setup. Switching that to igb_pci_enable_sriov().

Signed-off-by: Stefan Assmann <sassmann@kpanic.de>
Tested-by: Aaron Brown <aaron.f.brown@intel.com>
Tested-by: Sibai Li <Sibai.li@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2013-10-24 05:53:46 -07:00
..
e1000_82575.c igb: Add additional get_phy_id call for i354 devices 2013-09-12 16:24:55 -04:00
e1000_82575.h intel: Remove extern from function prototypes 2013-09-24 12:51:37 -07:00
e1000_defines.h igb: New PHY_ID for i354 device 2013-09-04 04:57:13 -07:00
e1000_hw.h intel: Remove extern from function prototypes 2013-09-24 12:51:37 -07:00
e1000_i210.c igb: Refactor NVM read functions to accommodate devices with no flash 2013-08-22 02:26:00 -07:00
e1000_i210.h intel: Remove extern from function prototypes 2013-09-24 12:51:37 -07:00
e1000_mac.c igb: Read flow control for i350 from correct EEPROM section 2013-09-12 16:24:55 -04:00
e1000_mac.h intel: Remove extern from function prototypes 2013-09-24 12:51:37 -07:00
e1000_mbx.c igb: Fix code comments and whitespace 2013-04-18 16:40:25 -07:00
e1000_mbx.h igb: Fix code comments and whitespace 2013-04-18 16:40:25 -07:00
e1000_nvm.c igb: Fix get_fw_version function for all parts 2013-08-22 02:26:09 -07:00
e1000_nvm.h igb: Fix get_fw_version function for all parts 2013-08-22 02:26:09 -07:00
e1000_phy.c igb: Fix master/slave mode for all m88 i354 PHY's 2013-10-24 05:41:20 -07:00
e1000_phy.h igb: Support for SFP modules discovery 2013-05-21 02:37:36 -07:00
e1000_regs.h igb: Add support for i354 devices 2013-04-18 16:40:35 -07:00
igb_ethtool.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2013-10-08 23:07:53 -04:00
igb_hwmon.c igb: Fix code comments and whitespace 2013-04-18 16:40:25 -07:00
igb_main.c igb: fix driver reload with VF assigned to guest 2013-10-24 05:53:46 -07:00
igb_ptp.c igb: Read register for latch_on without return value 2013-08-22 02:25:25 -07:00
igb.h igb: Add ethtool support to configure number of channels 2013-10-01 12:49:49 -04:00
Makefile igb: Copyright string update to year 2013 2013-01-19 05:05:05 -08:00