From: Piotr Warpechowski <piotr.warpechowski@intel.com>
It was observed that extended descriptors are not printed out fully and
enhanced descriptors are completely omitted in stmmac_rings_status_show().
Correct printing according to documentation and other existing prints in
the driver.
Fixes: 79a4f4dfa69a8379 ("net: stmmac: reduce dma ring display code duplication")
Reviewed-by: Sebastian Basierski <sebastian.basierski@intel.com>
Reviewed-by: Cezary Rojewski <cezary.rojewski@intel.com>
Signed-off-by: Piotr Warpechowski <piotr.warpechowski@intel.com>
Signed-off-by: Konrad Leszczynski <konrad.leszczynski@intel.com>
---
.../net/ethernet/stmicro/stmmac/stmmac_main.c | 31 ++++++++++++++-----
1 file changed, 23 insertions(+), 8 deletions(-)
diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
index 7b16d1207b80..70c3dd88a749 100644
--- a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
+++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
@@ -6351,14 +6351,25 @@ static void sysfs_display_ring(void *head, int size, int extend_desc,
desc_size = extend_desc ? sizeof(*ep) : sizeof(*p);
for (i = 0; i < size; i++) {
dma_addr = dma_phy_addr + i * desc_size;
- seq_printf(seq, "%d [%pad]: 0x%x 0x%x 0x%x 0x%x\n",
- i, &dma_addr,
- le32_to_cpu(p->des0), le32_to_cpu(p->des1),
- le32_to_cpu(p->des2), le32_to_cpu(p->des3));
- if (extend_desc)
- p = &(++ep)->basic;
- else
+ if (extend_desc) {
+ seq_printf(seq, "%d [%pad]: 0x%x 0x%x 0x%x 0x%x 0x%x 0x%x 0x%x 0x%x\n",
+ i, &dma_addr,
+ le32_to_cpu(ep->basic.des0),
+ le32_to_cpu(ep->basic.des1),
+ le32_to_cpu(ep->basic.des2),
+ le32_to_cpu(ep->basic.des3),
+ le32_to_cpu(ep->des4),
+ le32_to_cpu(ep->des5),
+ le32_to_cpu(ep->des6),
+ le32_to_cpu(ep->des7));
+ ep++;
+ } else {
+ seq_printf(seq, "%d [%pad]: 0x%x 0x%x 0x%x 0x%x\n",
+ i, &dma_addr,
+ le32_to_cpu(p->des0), le32_to_cpu(p->des1),
+ le32_to_cpu(p->des2), le32_to_cpu(p->des3));
p++;
+ }
}
}
@@ -6398,7 +6409,11 @@ static int stmmac_rings_status_show(struct seq_file *seq, void *v)
seq_printf(seq, "Extended descriptor ring:\n");
sysfs_display_ring((void *)tx_q->dma_etx,
priv->dma_conf.dma_tx_size, 1, seq, tx_q->dma_tx_phy);
- } else if (!(tx_q->tbs & STMMAC_TBS_AVAIL)) {
+ } else if (tx_q->tbs & STMMAC_TBS_AVAIL) {
+ seq_printf(seq, "Enhanced descriptor ring:\n");
+ sysfs_display_ring((void *)tx_q->dma_entx,
+ priv->dma_conf.dma_tx_size, 1, seq, tx_q->dma_tx_phy);
+ } else {
seq_printf(seq, "Descriptor ring:\n");
sysfs_display_ring((void *)tx_q->dma_tx,
priv->dma_conf.dma_tx_size, 0, seq, tx_q->dma_tx_phy);
--
2.34.1
On Thu, 28 Aug 2025 12:02:36 +0200 Konrad Leszczynski wrote:
> It was observed that extended descriptors are not printed out fully and
> enhanced descriptors are completely omitted in stmmac_rings_status_show().
>
> Correct printing according to documentation and other existing prints in
> the driver.
>
> Fixes: 79a4f4dfa69a8379 ("net: stmmac: reduce dma ring display code duplication")
Sounds like an extension to me, so net-next and no Fixes
On 9/1/2025 10:01 PM, Jakub Kicinski wrote:
> On Thu, 28 Aug 2025 12:02:36 +0200 Konrad Leszczynski wrote:
>> It was observed that extended descriptors are not printed out fully and
>> enhanced descriptors are completely omitted in stmmac_rings_status_show().
>>
>> Correct printing according to documentation and other existing prints in
>> the driver.
>>
>> Fixes: 79a4f4dfa69a8379 ("net: stmmac: reduce dma ring display code duplication")
> Sounds like an extension to me, so net-next and no Fixes
Sure, i will drop this patch from this patchset in next revision.
On 04-Sep-25 20:54, Sebastian Basierski wrote:
>
> On 9/1/2025 10:01 PM, Jakub Kicinski wrote:
>> On Thu, 28 Aug 2025 12:02:36 +0200 Konrad Leszczynski wrote:
>>> It was observed that extended descriptors are not printed out fully and
>>> enhanced descriptors are completely omitted in
>>> stmmac_rings_status_show().
>>>
>>> Correct printing according to documentation and other existing
>>> prints in
>>> the driver.
>>>
>>> Fixes: 79a4f4dfa69a8379 ("net: stmmac: reduce dma ring display code
>>> duplication")
>> Sounds like an extension to me, so net-next and no Fixes
> Sure, i will drop this patch from this patchset in next revision.
Hi Jakub,
Would it be ok to remove "net: stmmac: correct Tx descriptors debugfs
prints" from this patchset and add it to already existing one for the
net-next changes as next version?
https://lore.kernel.org/netdev/20250828144558.304304-1-konrad.leszczynski@intel.com/
On Mon, 15 Sep 2025 14:54:55 +0200 Konrad Leszczynski wrote: > Would it be ok to remove "net: stmmac: correct Tx descriptors debugfs > prints" from this patchset and add it to already existing one for the > net-next changes as next version? > > https://lore.kernel.org/netdev/20250828144558.304304-1-konrad.leszczynski@intel.com/ Yes, but to be clear you need to repost with the appropriate patches in the series..
On 28/08/2025 11:02, Konrad Leszczynski wrote:
> From: Piotr Warpechowski <piotr.warpechowski@intel.com>
>
> It was observed that extended descriptors are not printed out fully and
> enhanced descriptors are completely omitted in stmmac_rings_status_show().
>
> Correct printing according to documentation and other existing prints in
> the driver.
>
> Fixes: 79a4f4dfa69a8379 ("net: stmmac: reduce dma ring display code duplication")
> Reviewed-by: Sebastian Basierski <sebastian.basierski@intel.com>
> Reviewed-by: Cezary Rojewski <cezary.rojewski@intel.com>
> Signed-off-by: Piotr Warpechowski <piotr.warpechowski@intel.com>
> Signed-off-by: Konrad Leszczynski <konrad.leszczynski@intel.com>
Reviewed-by: Vadim Fedorenko <vadim.fedorenko@linux.dev>
© 2016 - 2026 Red Hat, Inc.