diff options
author | Bogdan Purcareata <bogdan.purcareata@nxp.com> | 2017-06-08 10:37:16 (GMT) |
---|---|---|
committer | Xie Xiaobo <xiaobo.xie@nxp.com> | 2017-09-25 07:25:26 (GMT) |
commit | b49b6351794006870fb0bd673e83781d9ad5a35a (patch) | |
tree | 8555eaecd51b8ab11ccdd5c099590f9f45145099 /drivers | |
parent | 309fcd6049907201c2899f923011a33761467c71 (diff) | |
download | linux-b49b6351794006870fb0bd673e83781d9ad5a35a.tar.xz |
staging: fsl-dpaa2/eth: Update tx_shaping max burst size
Starting from MC 10.2.x, max burst size value has decreased from
0xFFFF to 0xF7FF. Update the check in the driver.
Signed-off-by: Bogdan Purcareata <bogdan.purcareata@nxp.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/staging/fsl-dpaa2/ethernet/dpaa2-eth.c | 5 | ||||
-rw-r--r-- | drivers/staging/fsl-dpaa2/ethernet/dpaa2-eth.h | 3 |
2 files changed, 6 insertions, 2 deletions
diff --git a/drivers/staging/fsl-dpaa2/ethernet/dpaa2-eth.c b/drivers/staging/fsl-dpaa2/ethernet/dpaa2-eth.c index ef94547..96fd41e 100644 --- a/drivers/staging/fsl-dpaa2/ethernet/dpaa2-eth.c +++ b/drivers/staging/fsl-dpaa2/ethernet/dpaa2-eth.c @@ -2795,8 +2795,9 @@ static ssize_t dpaa2_eth_write_tx_shaping(struct device *dev, return -EINVAL; } /* Size restriction as per MC API documentation */ - if (scfg.max_burst_size > 64000) { - pr_err("max_burst_size must be <= 64000, thanks.\n"); + if (scfg.max_burst_size > DPAA2_ETH_MAX_BURST_SIZE) { + pr_err("max_burst_size must be <= %d\n", + DPAA2_ETH_MAX_BURST_SIZE); return -EINVAL; } diff --git a/drivers/staging/fsl-dpaa2/ethernet/dpaa2-eth.h b/drivers/staging/fsl-dpaa2/ethernet/dpaa2-eth.h index a53aab4..f533522 100644 --- a/drivers/staging/fsl-dpaa2/ethernet/dpaa2-eth.h +++ b/drivers/staging/fsl-dpaa2/ethernet/dpaa2-eth.h @@ -61,6 +61,9 @@ /* Convert L3 MTU to L2 MFL */ #define DPAA2_ETH_L2_MAX_FRM(mtu) ((mtu) + VLAN_ETH_HLEN) +/* Maximum burst size value for Tx shaping */ +#define DPAA2_ETH_MAX_BURST_SIZE 0xF7FF + /* Maximum number of buffers that can be acquired/released through a single * QBMan command */ |