aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/broadcom/bnx2x/bnx2x.h
diff options
context:
space:
mode:
authorYuval Mintz <Yuval.Mintz@qlogic.com>2015-08-17 08:28:25 +0300
committerDavid S. Miller <davem@davemloft.net>2015-08-17 10:27:57 -0700
commitda3cc2da7c08dc1f4371a4cc2eb83b22a0cf83a8 (patch)
tree159f5e9565c5078b331bc46600161fcc00ffaa6e /drivers/net/ethernet/broadcom/bnx2x/bnx2x.h
parentipv4: fix refcount leak in fib_check_nh() (diff)
downloadlinux-dev-da3cc2da7c08dc1f4371a4cc2eb83b22a0cf83a8.tar.xz
linux-dev-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.h')
-rw-r--r--drivers/net/ethernet/broadcom/bnx2x/bnx2x.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/net/ethernet/broadcom/bnx2x/bnx2x.h b/drivers/net/ethernet/broadcom/bnx2x/bnx2x.h
index 5762c485ea06..e28c90c15e0b 100644
--- a/drivers/net/ethernet/broadcom/bnx2x/bnx2x.h
+++ b/drivers/net/ethernet/broadcom/bnx2x/bnx2x.h
@@ -2571,6 +2571,10 @@ void bnx2x_notify_link_changed(struct bnx2x *bp);
(IS_MF_SD_STORAGE_PERSONALITY_ONLY(bp) || \
IS_MF_SI_STORAGE_PERSONALITY_ONLY(bp))
+/* Determines whether BW configuration arrives in 100Mb units or in
+ * percentages from actual physical link speed.
+ */
+#define IS_MF_PERCENT_BW(bp) (IS_MF_SI(bp) || IS_MF_UFP(bp) || IS_MF_BD(bp))
#define SET_FLAG(value, mask, flag) \
do {\