diff options
author | Johannes Berg <johannes.berg@intel.com> | 2017-02-07 08:07:39 +0100 |
---|---|---|
committer | Johannes Berg <johannes.berg@intel.com> | 2017-02-07 15:07:16 +0100 |
commit | 75239f276ec894c87b8fbc268bdfb0f9fd290445 (patch) | |
tree | 14a91c251f2b1986a709876d90d9a0828b8c3769 /patches/0043-ndo_set_vf_rate/igb_set_vf_rate.patch | |
parent | 6981c5a175652d79562795127ab4ff62c9ecfac0 (diff) |
backports: get rid of patch directory structure
This directory structure was never really managed well,
simply get rid of it. With the patch system that only
applies patches when the modified file exists, and with
a lot of spatches applying everywhere anyway, it's no
longer really useful either.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'patches/0043-ndo_set_vf_rate/igb_set_vf_rate.patch')
-rw-r--r-- | patches/0043-ndo_set_vf_rate/igb_set_vf_rate.patch | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/patches/0043-ndo_set_vf_rate/igb_set_vf_rate.patch b/patches/0043-ndo_set_vf_rate/igb_set_vf_rate.patch new file mode 100644 index 00000000..6dea4e1e --- /dev/null +++ b/patches/0043-ndo_set_vf_rate/igb_set_vf_rate.patch @@ -0,0 +1,28 @@ +--- a/drivers/net/ethernet/intel/igb/igb_main.c ++++ b/drivers/net/ethernet/intel/igb/igb_main.c +@@ -8013,6 +8013,7 @@ static int igb_ndo_set_vf_bw(struct net_ + if (hw->mac.type != e1000_82576) + return -EOPNOTSUPP; + ++#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,16,0) + if (min_tx_rate) + return -EINVAL; + +@@ -8026,7 +8027,17 @@ static int igb_ndo_set_vf_bw(struct net_ + adapter->vf_rate_link_speed = actual_link_speed; + adapter->vf_data[vf].tx_rate = (u16)max_tx_rate; + igb_set_vf_rate_limit(hw, vf, max_tx_rate, actual_link_speed); ++#else ++ actual_link_speed = igb_link_mbps(adapter->link_speed); ++ if ((vf >= adapter->vfs_allocated_count) || ++ (!(rd32(E1000_STATUS) & E1000_STATUS_LU)) || ++ (tx_rate < 0) || (tx_rate > actual_link_speed)) ++ return -EINVAL; + ++ adapter->vf_rate_link_speed = actual_link_speed; ++ adapter->vf_data[vf].tx_rate = (u16)tx_rate; ++ igb_set_vf_rate_limit(hw, vf, tx_rate, actual_link_speed); ++#endif /* LINUX_VERSION_CODE >= KERNEL_VERSION(3,16,0) */ + return 0; + } + |