New XGMAC datasheets for XGMAC 3.20a and 3.40a list support up to
16 MTL/DMA queues. This patch series does modifications to accommodate for
that, by following:
- Increase MAX value macros (this will increase memory allocation for driver)
- Add missing registers
- Modify/fix some functions to split TC and MTL/DMA handling
Biggest issue is that new hardware does support only 8 TC (traffic classes),
while supporting more MTL/DMA queues. This is problematic, as current code
does assume that these are equal which is not true anymore. Fix that by
applying better context to functions, using TC count read from HW_FEATURE
register where it applies.
For DMA/MTL queues higher than TC count redirect traffic to TC 0.
This is error in user configuration but quite possible to occur,
if user does 'one DMA/MTL queue per TC'.
This change has been tested on XGMAC based on 3.20a.
---
Changes in v2:
- Remove newly added num_tc value, replace with stmmac_priv pointer,
to use numtc value from dma_features struct
- Change all new WARN_ONCE calls to netdev_err
- Add Signed-Off for colleague that did similar original patch internally and
took part in new version of this patch
- Apply recommended change for switch case for readability
Link to v1:
https://lore.kernel.org/netdev/20260511165416.3093015-1-j.raczynski@samsung.com/
Jakub Raczynski (3):
net/stmmac/dwxgmac: Modify DMA functions for future hardware
net/stmmac/dwxgmac: Extend MTL/DMA support to 16 queues
include/stmmac: Increase max DMA/MTL channel count from 8 to 16
drivers/net/ethernet/stmicro/stmmac/common.h | 1 +
.../net/ethernet/stmicro/stmmac/dwxgmac2.h | 2 +
.../ethernet/stmicro/stmmac/dwxgmac2_core.c | 65 ++++++++++++++++++-
.../ethernet/stmicro/stmmac/dwxgmac2_dma.c | 15 ++++-
drivers/net/ethernet/stmicro/stmmac/hwif.c | 3 +
.../net/ethernet/stmicro/stmmac/stmmac_main.c | 2 +-
include/linux/stmmac.h | 6 +-
7 files changed, 85 insertions(+), 9 deletions(-)
--
2.34.1