On Mon, May 11, 2026 at 08:02:14PM +0200, Andrew Lunn wrote: > > + /* Newer XGMAC hardware does support up to 16 MTL/DMA queues but > > + * only 8 traffic class queues. Redirect these, but this is error in > > + * configuration. > > + */ > > If this is an error in configuration why not return -EINVAL when the > configuration is requested? > > Andrew > Because is generally would not change a thing and would probably cause more problems. Parent function of stmmac_set_dma_operation_mode() -> stmmac_dma_tx_mode() does not have any error handling. So we end up in situation where tx_queues_to_use from DTS is still at its value, so we still have situation where amount of DMA/MTL queueus is higher than number of TC's. So then in case of XGMAC 3.20a/3.40a, we would have 8 DMA/MTL queues that have assigned TC and 8 that don't. I cannot speak for older/other XGMAC if there were ever a case like that where number of DMA/MTL != number of TC's. So we will get many unusable MTL queues, eg. NAPI does use tx_queues_to_use in its initialization, these queues will still be visible in system and can be sent to. Leaving them unconfigured will very much likely lead to 'Tx queue timeout' and endless loop of interface restart via stmmac_reset_subtask(). I think it is just simplier to leave warning that configuration is wrong, handling error would be quite big change to make. BR Jakub Raczynski