linux/drivers/net/ethernet/intel/fm10k
Jacob Keller 0e8d5b5975 fm10k: reset max_queues on init_hw_vf failure
VF drivers must detect how many queues are available. Previously, the
driver assumed that each VF has at minimum 1 queue. This assumption is
incorrect, since it is possible that the PF has not yet assigned the
queues to the VF by the time the VF checks. To resolve this, we added a
check first to ensure that the first queue is infact owned by the VF at
init_hw_vf time. However, the code flow did not reset hw->mac.max_queues
to 0. In some cases, such as during reinit flows, we call init_hw_vf
without clearing the previous value of hw->mac.max_queues. Due to this,
when init_hw_vf errors out, if its error code is not properly handled
the VF driver may still believe it has queues which no longer belong to
it. Fix this by clearing the hw->mac.max_queues on exit due to errors.

Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
Reviewed-by: Bruce Allan <bruce.w.allan@intel.com>
Tested-by: Krishneil Singh <Krishneil.k.singh@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2015-12-05 23:55:14 -08:00
..
fm10k_common.c fm10k: Resolve various spelling errors and checkpatch warnings 2015-03-03 01:07:23 -08:00
fm10k_common.h fm10k: Add support for ptp to hw specific files 2014-09-23 03:59:22 -07:00
fm10k_dcbnl.c fm10k: fix unused warnings 2015-04-14 15:23:36 -07:00
fm10k_debugfs.c fm10k: use snprintf() instead of sprintf() to avoid buffer overflow 2015-10-13 23:49:13 -07:00
fm10k_ethtool.c drivers/net: get rid of unnecessary initializations in .get_drvinfo() 2015-10-16 00:24:10 -07:00
fm10k_iov.c fm10k: add support for extra debug statistics 2015-09-22 15:58:27 -07:00
fm10k_main.c fm10k: Fix handling of NAPI budget when multiple queues are enabled per vector 2015-11-23 11:08:49 -08:00
fm10k_mbx.c fm10k: TRIVIAL remove unnecessary comma 2015-09-22 15:58:27 -07:00
fm10k_mbx.h fm10k: Add support for PF <-> VF mailbox 2014-09-23 03:59:20 -07:00
fm10k_netdev.c fm10k: set netdev features in one location 2015-12-05 23:55:13 -08:00
fm10k_pci.c fm10k: set netdev features in one location 2015-12-05 23:55:13 -08:00
fm10k_pf.c fm10k: fix iov_msg_mac_vlan_pf VID checks 2015-09-15 17:06:23 -07:00
fm10k_pf.h fm10k: pack TLV overlay structures 2015-06-17 14:21:22 -07:00
fm10k_ptp.c fm10k: fix incorrect free on skb in ts_tx_enqueue 2015-06-17 14:20:36 -07:00
fm10k_tlv.c fm10k: Resolve various spelling errors and checkpatch warnings 2015-03-03 01:07:23 -08:00
fm10k_tlv.h fm10k: Add support for mailbox 2014-09-23 03:59:14 -07:00
fm10k_type.h fm10k: do not assume VF always has 1 queue 2015-11-23 11:08:47 -08:00
fm10k_vf.c fm10k: reset max_queues on init_hw_vf failure 2015-12-05 23:55:14 -08:00
fm10k_vf.h fm10k: Add support for ptp to hw specific files 2014-09-23 03:59:22 -07:00
fm10k.h fm10k: set netdev features in one location 2015-12-05 23:55:13 -08:00
Makefile fm10k: Add support for PTP 2014-09-23 03:59:23 -07:00