[PATCH (net.git)] stmmac: display the descriptors if DES0 = 0

Subsystems: networking drivers, stmmac ethernet driver, the rest

STALE3608d

3 messages, 3 authors, 2016-10-20 · open the first message on its own page

[PATCH (net.git)] stmmac: display the descriptors if DES0 = 0

From: Giuseppe Cavallaro <hidden>
Date: 2016-10-20 08:07:07

It makes sense to display the descriptors even if 
DES0 is zero. This helps for example in case of it
is needed to dump rx write-back descriptors to get
timestamp status.

Signed-off-by: Giuseppe Cavallaro <redacted>
Cc: Alexandre TORGUE <redacted>
---
 drivers/net/ethernet/stmicro/stmmac/dwmac4_descs.c | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac4_descs.c b/drivers/net/ethernet/stmicro/stmmac/dwmac4_descs.c
index 4ec7397..a1b17cd 100644
--- a/drivers/net/ethernet/stmicro/stmmac/dwmac4_descs.c
+++ b/drivers/net/ethernet/stmicro/stmmac/dwmac4_descs.c
@@ -347,10 +347,9 @@ static void dwmac4_display_ring(void *head, unsigned int size, bool rx)
 	pr_info("%s descriptor ring:\n", rx ? "RX" : "TX");
 
 	for (i = 0; i < size; i++) {
-		if (p->des0)
-			pr_info("%d [0x%x]: 0x%x 0x%x 0x%x 0x%x\n",
-				i, (unsigned int)virt_to_phys(p),
-				p->des0, p->des1, p->des2, p->des3);
+		pr_info("%d [0x%x]: 0x%x 0x%x 0x%x 0x%x\n",
+			i, (unsigned int)virt_to_phys(p),
+			p->des0, p->des1, p->des2, p->des3);
 		p++;
 	}
 }
-- 
2.7.4

Re: [PATCH (net.git)] stmmac: display the descriptors if DES0 = 0

From: Alexandre Torgue <hidden>
Date: 2016-10-20 09:29:40

Hi Peppe,

On 10/20/2016 10:01 AM, Giuseppe Cavallaro wrote:
quoted hunk
It makes sense to display the descriptors even if
DES0 is zero. This helps for example in case of it
is needed to dump rx write-back descriptors to get
timestamp status.

Signed-off-by: Giuseppe Cavallaro <redacted>
Cc: Alexandre TORGUE <redacted>
---
 drivers/net/ethernet/stmicro/stmmac/dwmac4_descs.c | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac4_descs.c b/drivers/net/ethernet/stmicro/stmmac/dwmac4_descs.c
index 4ec7397..a1b17cd 100644
--- a/drivers/net/ethernet/stmicro/stmmac/dwmac4_descs.c
+++ b/drivers/net/ethernet/stmicro/stmmac/dwmac4_descs.c
@@ -347,10 +347,9 @@ static void dwmac4_display_ring(void *head, unsigned int size, bool rx)
 	pr_info("%s descriptor ring:\n", rx ? "RX" : "TX");

 	for (i = 0; i < size; i++) {
-		if (p->des0)
-			pr_info("%d [0x%x]: 0x%x 0x%x 0x%x 0x%x\n",
-				i, (unsigned int)virt_to_phys(p),
-				p->des0, p->des1, p->des2, p->des3);
+		pr_info("%d [0x%x]: 0x%x 0x%x 0x%x 0x%x\n",
+			i, (unsigned int)virt_to_phys(p),
+			p->des0, p->des1, p->des2, p->des3);
 		p++;
 	}
 }
I agree. Acked-by: Alexandre Torgue [off-list ref]

Thanks
Alex

Re: [PATCH (net.git)] stmmac: display the descriptors if DES0 = 0

From: David Miller <davem@davemloft.net>
Date: 2016-10-20 15:27:54

From: Giuseppe Cavallaro <redacted>
Date: Thu, 20 Oct 2016 10:01:28 +0200
It makes sense to display the descriptors even if 
DES0 is zero. This helps for example in case of it
is needed to dump rx write-back descriptors to get
timestamp status.

Signed-off-by: Giuseppe Cavallaro <redacted>
Applied, thank you.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help