diff options
author | Dmitry Kravkov <dmitry@broadcom.com> | 2014-01-05 18:33:50 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2014-01-05 20:22:24 -0500 |
commit | e848582cee23f7ab540ec49ab1c7d7f8bfefcd84 (patch) | |
tree | 5dc25ca78477bb73ff58c6a07b13ad1a9e016622 /drivers/net/ethernet/broadcom/bnx2x/bnx2x.h | |
parent | a02bdd423d844f5beb3196922f07c85c2f7691b8 (diff) | |
download | linux-e848582cee23f7ab540ec49ab1c7d7f8bfefcd84.tar.gz linux-e848582cee23f7ab540ec49ab1c7d7f8bfefcd84.tar.bz2 linux-e848582cee23f7ab540ec49ab1c7d7f8bfefcd84.zip |
bnx2x: limit number of interrupt vectors for 57711
Original straightforward division may lead to zeroing number of SB and
null-pointer dereference when device is short of MSIX vectors or lacks
MSIX capabilities.
Reported-by: Vladislav Zolotarov <vladz@cloudius-systems.com>
Signed-off-by: Dmitry Kravkov <dmitry@broadcom.com>
Signed-off-by: Yuval Mintz <yuvalmin@broadcom.com>
Signed-off-by: Ariel Elior <ariele@broadcom.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.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/net/ethernet/broadcom/bnx2x/bnx2x.h b/drivers/net/ethernet/broadcom/bnx2x/bnx2x.h index a1f66e2c9a86..cb30d1a3d3ad 100644 --- a/drivers/net/ethernet/broadcom/bnx2x/bnx2x.h +++ b/drivers/net/ethernet/broadcom/bnx2x/bnx2x.h @@ -2499,4 +2499,6 @@ void bnx2x_set_local_cmng(struct bnx2x *bp); #define MCPR_SCRATCH_BASE(bp) \ (CHIP_IS_E1x(bp) ? MCP_REG_MCPR_SCRATCH : MCP_A_REG_MCPR_SCRATCH) +#define E1H_MAX_MF_SB_COUNT (HC_SB_MAX_SB_E1X/(E1HVN_MAX * PORT_MAX)) + #endif /* bnx2x.h */ |