summaryrefslogtreecommitdiff
path: root/drivers/net/ethernet/intel/fm10k/fm10k_common.h
diff options
context:
space:
mode:
authorJacob Keller <jacob.e.keller@intel.com>2017-07-10 13:23:11 -0700
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>2017-10-02 08:07:57 -0700
commitdd5eede2b711350f684e8510300cb3762a821ae6 (patch)
treeda5b73b3d8b1196005720936259895ada83f0771 /drivers/net/ethernet/intel/fm10k/fm10k_common.h
parentd876c1583bb1b7f7264880265b824e88b791aa5d (diff)
fm10k: avoid divide by zero in rare cases when device is resetting
It is possible that under rare circumstances the device is undergoing a reset, such as when a PFLR occurs, and the device may be transmitting simultaneously. In this case, we might attempt to divide by zero when finding the proper r_idx. Instead, lets read the num_tx_queues once, and make sure it's non-zero. Signed-off-by: Jacob Keller <jacob.e.keller@intel.com> Tested-by: Krishneil Singh <krishneil.k.singh@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Diffstat (limited to 'drivers/net/ethernet/intel/fm10k/fm10k_common.h')
0 files changed, 0 insertions, 0 deletions