OrangePi_CM5/drivers/net/ethernet/intel
Michal Jaron 2dbf487d6b i40e: Fix set max_tx_rate when it is lower than 1 Mbps
[ Upstream commit 198eb7e1b81d8ba676d0f4f120c092032ae69a8e ]

While converting max_tx_rate from bytes to Mbps, this value was set to 0,
if the original value was lower than 125000 bytes (1 Mbps). This would
cause no transmission rate limiting to occur. This happened due to lack of
check of max_tx_rate against the 1 Mbps value for max_tx_rate and the
following division by 125000. Fix this issue by adding a helper
i40e_bw_bytes_to_mbits() which sets max_tx_rate to minimum usable value of
50 Mbps, if its value is less than 1 Mbps, otherwise do the required
conversion by dividing by 125000.

Fixes: 5ecae4120a ("i40e: Refactor VF BW rate limiting")
Signed-off-by: Michal Jaron <michalx.jaron@intel.com>
Signed-off-by: Andrii Staikov <andrii.staikov@intel.com>
Tested-by: Bharathi Sreenivas <bharathi.sreenivas@intel.com>
Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2022-09-28 11:10:33 +02:00
..
e1000 e1000: remove unused and incorrect code 2020-10-13 19:44:01 -07:00
e1000e e1000e: Fix possible overflow in LTR decoding 2022-04-27 13:53:55 +02:00
fm10k fm10k: Fix an error handling path in 'fm10k_probe()' 2021-07-28 14:35:32 +02:00
i40e i40e: Fix set max_tx_rate when it is lower than 1 Mbps 2022-09-28 11:10:33 +02:00
iavf iavf: Fix set max MTU size with port VLAN and jumbo frames 2022-09-28 11:10:32 +02:00
ice ice: use bitmap_free instead of devm_kfree 2022-09-15 11:32:05 +02:00
igb igb: Add lock to avoid data race 2022-08-25 11:38:09 +02:00
igbvf igbvf: fix double free in `igbvf_probe` 2021-12-22 09:30:55 +01:00
igc igc: Reinstate IGC_REMOVED logic and implement it properly 2022-07-29 17:19:11 +02:00
ixgb intel: handle unused assignments 2020-09-25 16:28:59 -07:00
ixgbe ixgbe: stop resetting SYSTIME in ixgbe_ptp_start_cyclecounter 2022-08-31 17:15:21 +02:00
ixgbevf ixgbevf: Require large buffers for build_skb on 82599VF 2022-02-16 12:54:24 +01:00
Kconfig ice: implement device flash update via devlink 2020-07-28 17:07:06 -07:00
Makefile
e100.c e100: fix device suspend/resume 2021-11-26 10:39:18 +01:00