Skip to contentSkip to conversation

net/designware: add error message on DMA reset timeout

PATCH New Alexey Brodkin 5 participants 7 messages Jan 13, 2015 – Jan 30, 2015 1 message not in the archive Network drivers

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 net/designware: add error message on DMA reset timeout

If for some reason DMA module fails to reset user oserves only this:
--->---

# dhcp
Trying dwmac.e0018000
FAIL
--->---

This message makes not much sense.
With proposed change error message will be more helpful:
--->---

# dhcp
Trying dwmac.e0018000
DMA reset timeout
FAIL
--->---

For example user may do power toggle to recover board functionality.

Cc Chin Liang See <[email protected]>
Cc Dinh Nguyen <[email protected]>
Cc Albert Aribaud <[email protected]>
Cc Tom Rini <[email protected]>
Cc Wolfgang Denk <[email protected]>
Cc Pavel Machek <[email protected]>
Cc Joe Hershberger <[email protected]>
Cc Ian Campbell <[email protected]>
Cc Marek Vasut <[email protected]>
---
 drivers/net/designware.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
drivers/net/designware.c +3 -1
index 9ded895..c03e935 100644
@@ -236,8 +236,10 @@ static int dw_eth_init(struct eth_device *dev, bd_t *bis)
 
 	start = get_timer(0);
 	while (readl(&dma_p->busmode) & DMAMAC_SRST) {
-		if (get_timer(start) >= CONFIG_MACRESET_TIMEOUT)
+		if (get_timer(start) >= CONFIG_MACRESET_TIMEOUT) {
+			printf("DMA reset timeout\n");
 			return -1;
+		}
 
 		mdelay(100);
 	};
Signature · 1 line
2.1.0
#1 lore raw

PATCH 1/1 net/designware: add error message on DMA reset timeout

Quoted 18 lines · Alexey Brodkin

If for some reason DMA module fails to reset user oserves only this:
--->---

# dhcp
Trying dwmac.e0018000
FAIL
--->---

This message makes not much sense.
With proposed change error message will be more helpful:
--->---

# dhcp
Trying dwmac.e0018000
DMA reset timeout
FAIL
--->---

For example user may do power toggle to recover board functionality.

Quoted 10 lines
Cc Chin Liang See <[email protected]>
Cc Dinh Nguyen <[email protected]>
Cc Albert Aribaud <[email protected]>
Cc Tom Rini <[email protected]>
Cc Wolfgang Denk <[email protected]>
Cc Pavel Machek <[email protected]>
Cc Joe Hershberger <[email protected]>
Cc Ian Campbell <[email protected]>
Cc Marek Vasut <[email protected]>
Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20150113/5a2a1c49/attachment.pgp>
#2 lore raw

PATCH 1/1 net/designware: add error message on DMA reset timeout

In reply to Alexey Brodkin
Quoted 16 lines · Alexey Brodkin

If for some reason DMA module fails to reset user oserves only this:
--->---

# dhcp
Trying dwmac.e0018000
FAIL
--->---

This message makes not much sense.
With proposed change error message will be more helpful:
--->---

# dhcp
Trying dwmac.e0018000
DMA reset timeout
FAIL
--->---
Quoted 8 lines

For example user may do power toggle to recover board functionality.

Cc Chin Liang See <[email protected]>
Cc Dinh Nguyen <[email protected]>
Cc Albert Aribaud <[email protected]>
Cc Tom Rini <[email protected]>
Cc Wolfgang Denk <[email protected]>
Signature · 2 lines
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html

A message that is not in the archive (sent off-list or not yet received): [email protected]

#4 lore raw

PATCH 1/1 net/designware: add error message on DMA reset timeout

Quoted 29 lines · Alexey Brodkin

Hi Marek, Tom,

Quoted 26 lines · Pavel Machek
Quoted 24 lines · Alexey Brodkin

If for some reason DMA module fails to reset user oserves only this:
--->---

# dhcp
Trying dwmac.e0018000
FAIL
--->---

This message makes not much sense.
With proposed change error message will be more helpful:
--->---

# dhcp
Trying dwmac.e0018000
DMA reset timeout
FAIL
--->---

For example user may do power toggle to recover board functionality.

Cc Chin Liang See <[email protected]>
Cc Dinh Nguyen <[email protected]>
Cc Albert Aribaud <[email protected]>
Cc Tom Rini <[email protected]>
Cc Wolfgang Denk <[email protected]>
Quoted 3 lines
Quoted 1 line

Any chance for this trivial change to be applied?

Joe, can you please pick this ?

Best regards,
Marek Vasut

#5 lore raw

PATCH 1/1 net/designware: add error message on DMA reset timeout

Quoted 31 lines · Marek Vasut
Quoted 29 lines · Alexey Brodkin

Hi Marek, Tom,

Quoted 26 lines · Pavel Machek
Quoted 24 lines · Alexey Brodkin

If for some reason DMA module fails to reset user oserves only this:
--->---

# dhcp
Trying dwmac.e0018000
FAIL
--->---

This message makes not much sense.
With proposed change error message will be more helpful:
--->---

# dhcp
Trying dwmac.e0018000
DMA reset timeout
FAIL
--->---

For example user may do power toggle to recover board functionality.

Cc Chin Liang See <[email protected]>
Cc Dinh Nguyen <[email protected]>
Cc Albert Aribaud <[email protected]>
Cc Tom Rini <[email protected]>
Cc Wolfgang Denk <[email protected]>
Quoted 5 lines
Quoted 3 lines
Quoted 1 line

Any chance for this trivial change to be applied?

Joe, can you please pick this ?

Sure.

-Joe

#6 lore raw

PATCH 1/1 net/designware: add error message on DMA reset timeout

In reply to Alexey Brodkin
Quoted 29 lines · Alexey Brodkin

If for some reason DMA module fails to reset user oserves only this:
--->---

# dhcp
Trying dwmac.e0018000
FAIL
--->---

This message makes not much sense.
With proposed change error message will be more helpful:
--->---

# dhcp
Trying dwmac.e0018000
DMA reset timeout
FAIL
--->---

For example user may do power toggle to recover board functionality.

Cc Chin Liang See <[email protected]>
Cc Dinh Nguyen <[email protected]>
Cc Albert Aribaud <[email protected]>
Cc Tom Rini <[email protected]>
Cc Wolfgang Denk <[email protected]>
Cc Pavel Machek <[email protected]>
Cc Joe Hershberger <[email protected]>
Cc Ian Campbell <[email protected]>
Cc Marek Vasut <[email protected]>
Quoted 1 line

---

#7 lore raw

PATCH 1/1 net/designware: add error message on DMA reset timeout

In reply to Alexey Brodkin
Quoted 29 lines · Alexey Brodkin

If for some reason DMA module fails to reset user oserves only this:
--->---

# dhcp
Trying dwmac.e0018000
FAIL
--->---

This message makes not much sense.
With proposed change error message will be more helpful:
--->---

# dhcp
Trying dwmac.e0018000
DMA reset timeout
FAIL
--->---

For example user may do power toggle to recover board functionality.

Cc Chin Liang See <[email protected]>
Cc Dinh Nguyen <[email protected]>
Cc Albert Aribaud <[email protected]>
Cc Tom Rini <[email protected]>
Cc Wolfgang Denk <[email protected]>
Cc Pavel Machek <[email protected]>
Cc Joe Hershberger <[email protected]>
Cc Ian Campbell <[email protected]>
Cc Marek Vasut <[email protected]>
Quoted 1 line

---

Applied, Thanks!
-Joe