diff options
author | Jacob Keller <jacob.e.keller@intel.com> | 2017-07-10 22:23:11 +0200 |
---|---|---|
committer | Jeff Kirsher <jeffrey.t.kirsher@intel.com> | 2017-10-02 17:07:57 +0200 |
commit | dd5eede2b711350f684e8510300cb3762a821ae6 (patch) | |
tree | da5b73b3d8b1196005720936259895ada83f0771 /drivers/usb/host/ohci-dbg.c | |
parent | fm10k: don't loop while resetting VFs due to VFLR event (diff) | |
download | linux-dd5eede2b711350f684e8510300cb3762a821ae6.tar.xz linux-dd5eede2b711350f684e8510300cb3762a821ae6.zip |
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/usb/host/ohci-dbg.c')
0 files changed, 0 insertions, 0 deletions