net/sfc/base: define max desc number for every EF10 NIC

For consistency with defines of min descriptor number, define max
descriptor number for Huntington, Medford and Medford2.

Signed-off-by: Igor Romanov <igor.romanov@oktetlabs.ru>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
This commit is contained in:
Igor Romanov 2019-02-07 16:29:11 +00:00 committed by Ferruh Yigit
parent a025fdd98c
commit 61d820eba0
6 changed files with 12 additions and 3 deletions

View File

@ -16,6 +16,9 @@
extern "C" {
#endif
#define HUNT_TXQ_MAXNDESCS 4096
#define HUNT_TXQ_MAXNDESCS_BUG35388_WORKAROUND 2048
/* Missing register definitions */
#ifndef ER_DZ_TX_PIOBUF_OFST
#define ER_DZ_TX_PIOBUF_OFST 0x00001000

View File

@ -194,7 +194,9 @@ hunt_board_cfg(
* The workaround for bug35388 uses the top bit of transmit queue
* descriptor writes, preventing the use of 4096 descriptor TXQs.
*/
encp->enc_txq_max_ndescs = encp->enc_bug35388_workaround ? 2048 : 4096;
encp->enc_txq_max_ndescs = encp->enc_bug35388_workaround ?
HUNT_TXQ_MAXNDESCS_BUG35388_WORKAROUND :
HUNT_TXQ_MAXNDESCS;
encp->enc_txq_min_ndescs = EF10_TXQ_MINNDESCS;
EFX_STATIC_ASSERT(HUNT_PIOBUF_NBUFS <= EF10_MAX_PIOBUF_NBUFS);

View File

@ -12,6 +12,8 @@ extern "C" {
#endif
#define MEDFORD2_TXQ_MAXNDESCS 2048
#ifndef ER_EZ_TX_PIOBUF_SIZE
#define ER_EZ_TX_PIOBUF_SIZE 4096
#endif

View File

@ -119,7 +119,7 @@ medford2_board_cfg(
* descriptors are not supported as the top bit is used for vfifo
* stuffing.
*/
encp->enc_txq_max_ndescs = 2048;
encp->enc_txq_max_ndescs = MEDFORD2_TXQ_MAXNDESCS;
encp->enc_txq_min_ndescs = EF10_TXQ_MINNDESCS;
EFX_STATIC_ASSERT(MEDFORD2_PIOBUF_NBUFS <= EF10_MAX_PIOBUF_NBUFS);

View File

@ -12,6 +12,8 @@ extern "C" {
#endif
#define MEDFORD_TXQ_MAXNDESCS 2048
#ifndef ER_EZ_TX_PIOBUF_SIZE
#define ER_EZ_TX_PIOBUF_SIZE 4096
#endif

View File

@ -117,7 +117,7 @@ medford_board_cfg(
* descriptors are not supported as the top bit is used for vfifo
* stuffing.
*/
encp->enc_txq_max_ndescs = 2048;
encp->enc_txq_max_ndescs = MEDFORD_TXQ_MAXNDESCS;
encp->enc_txq_min_ndescs = EF10_TXQ_MINNDESCS;
EFX_STATIC_ASSERT(MEDFORD_PIOBUF_NBUFS <= EF10_MAX_PIOBUF_NBUFS);