Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1641409 > unrolled thread

[PATCH net-next] net: stmmac: use correct pointer when printing normal descriptor ring

Started byNiklas Cassel <niklas.cassel@axis.com>
First post2017-05-15 11:00 +0200
Last post2017-05-15 16:10 +0200
Articles 2 — 2 participants

Back to article view | Back to linux.kernel


Contents

  [PATCH net-next] net: stmmac: use correct pointer when printing normal descriptor ring Niklas Cassel <niklas.cassel@axis.com> - 2017-05-15 11:00 +0200
    Re: [PATCH net-next] net: stmmac: use correct pointer when  printing normal descriptor ring David Miller <davem@davemloft.net> - 2017-05-15 16:10 +0200

#1641409 — [PATCH net-next] net: stmmac: use correct pointer when printing normal descriptor ring

FromNiklas Cassel <niklas.cassel@axis.com>
Date2017-05-15 11:00 +0200
Subject[PATCH net-next] net: stmmac: use correct pointer when printing normal descriptor ring
Message-ID<tHk1b-5NW-17@gated-at.bofh.it>
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>
---
 drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
index cd8c60132390..a74c481401c4 100644
--- a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
+++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
@@ -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++;
-- 
2.11.0

[toc] | [next] | [standalone]


#1641716 — Re: [PATCH net-next] net: stmmac: use correct pointer when printing normal descriptor ring

FromDavid Miller <davem@davemloft.net>
Date2017-05-15 16:10 +0200
SubjectRe: [PATCH net-next] net: stmmac: use correct pointer when printing normal descriptor ring
Message-ID<tHoRb-KQ-1@gated-at.bofh.it>
In reply to#1641409
From: Niklas Cassel <niklas.cassel@axis.com>
Date: Mon, 15 May 2017 10:56:06 +0200

> 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>

Applied, thanks.

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web