diff options
author | Bhanu Prakash Gollapudi <bprakash@broadcom.com> | 2013-04-22 19:22:30 +0000 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2013-04-25 04:06:46 -0400 |
commit | 0eb43b4bb081a1a22574daab9c05286a600dd7fe (patch) | |
tree | 85933a915bbe9ebd7c3872feefc1d88972063835 /drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c | |
parent | 4c09eed9dc422e980fabdb25434ef68e599b704c (diff) | |
download | op-kernel-dev-0eb43b4bb081a1a22574daab9c05286a600dd7fe.zip op-kernel-dev-0eb43b4bb081a1a22574daab9c05286a600dd7fe.tar.gz |
bnx2x, bnx2fc: Use per port max exchange resources
The firmware supports a maximum of 4K FCoE exchanges. In 4-port devices,
or when working in multi-function mode, this resource needs to be distributed
between the various possible FCoE functions.
This information needs to be calculated by bnx2x and propagated into bnx2fc
via cnic. bnx2fc can then use this value to calculate corresponding xid
resources instead of using global constants.
Signed-off-by: Bhanu Prakash Gollapudi <bprakash@broadcom.com>
Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: Yuval Mintz <yuvalmin@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c')
-rw-r--r-- | drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c index fbfff1b..927f83a 100644 --- a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c +++ b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c @@ -10791,6 +10791,12 @@ static void bnx2x_get_fcoe_info(struct bnx2x *bp) (max_fcoe_conn & BNX2X_MAX_FCOE_INIT_CONN_MASK) >> BNX2X_MAX_FCOE_INIT_CONN_SHIFT; + /* Calculate the number of maximum allowed FCoE tasks */ + bp->cnic_eth_dev.max_fcoe_exchanges = MAX_NUM_FCOE_TASKS_PER_ENGINE; + if (IS_MF(bp) || CHIP_MODE_IS_4_PORT(bp)) + bp->cnic_eth_dev.max_fcoe_exchanges /= + MAX_FCOE_FUNCS_PER_ENGINE; + /* Read the WWN: */ if (!IS_MF(bp)) { /* Port info */ |