summaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c
diff options
context:
space:
mode:
authorYuval Mintz2015-08-17 07:28:25 +0200
committerDavid S. Miller2015-08-17 19:27:57 +0200
commitda3cc2da7c08dc1f4371a4cc2eb83b22a0cf83a8 (patch)
tree159f5e9565c5078b331bc46600161fcc00ffaa6e /drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c
parentipv4: fix refcount leak in fib_check_nh() (diff)
downloadkernel-qcow2-linux-da3cc2da7c08dc1f4371a4cc2eb83b22a0cf83a8.tar.gz
kernel-qcow2-linux-da3cc2da7c08dc1f4371a4cc2eb83b22a0cf83a8.tar.xz
kernel-qcow2-linux-da3cc2da7c08dc1f4371a4cc2eb83b22a0cf83a8.zip
bnx2: Fix bandwidth allocation for some MF modes
Management firmware tells driver in case bandwidth configuration for a specific function exists, but [regretably] the same field has different meanings depending on the multi-function mode - it can either be a percentile value or an actual speed. For newer multi-function modes current logic is incorrect - driver understands values as actual speeds instead of percentages, causing the resulting chip configuration to be incorrect. Signed-off-by: Yuval Mintz <Yuval.Mintz@qlogic.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c')
-rw-r--r--drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c
index a2bb1f0934d5..44173be5cbf0 100644
--- a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c
+++ b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c
@@ -1190,7 +1190,7 @@ u16 bnx2x_get_mf_speed(struct bnx2x *bp)
/* Calculate the current MAX line speed limit for the MF
* devices
*/
- if (IS_MF_SI(bp))
+ if (IS_MF_PERCENT_BW(bp))
line_speed = (line_speed * maxCfg) / 100;
else { /* SD mode */
u16 vn_max_rate = maxCfg * 100;