net: stmmac: use correct pointer when printing normal descriptor ring
authorNiklas Cassel <niklas.cassel@axis.com>
Mon, 15 May 2017 08:56:06 +0000 (10:56 +0200)
committerDavid S. Miller <davem@davemloft.net>
Mon, 15 May 2017 14:02:19 +0000 (10:02 -0400)
There are two pointers in sysfs_display_ring,
one that increments if using normal dma descriptors,
another if using extended dma descriptors.

When printing the normal dma descriptors, the wrong pointer is used,
thus the printed descriptor addresses are incorrect.

Signed-off-by: Niklas Cassel <niklas.cassel@axis.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/stmicro/stmmac/stmmac_main.c

index cd8c601323905a7ded2504fa69faa54a1c728066..a74c481401c46ee659b1244b0124966cabeafdbd 100644 (file)
@@ -3725,7 +3725,7 @@ static void sysfs_display_ring(void *head, int size, int extend_desc,
                        ep++;
                } else {
                        seq_printf(seq, "%d [0x%x]: 0x%x 0x%x 0x%x 0x%x\n",
-                                  i, (unsigned int)virt_to_phys(ep),
+                                  i, (unsigned int)virt_to_phys(p),
                                   le32_to_cpu(p->des0), le32_to_cpu(p->des1),
                                   le32_to_cpu(p->des2), le32_to_cpu(p->des3));
                        p++;