Skip to contentSkip to conversation

net: davinci_emac: don't teardown inactive rx channel

PATCH New Jeroen Hofstee 3 participants 6 messages Jun 7, 2015 – Aug 12, 2015 Network drivers

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 net: davinci_emac: don't teardown inactive rx channel

Tearing down an unitialized rx channel causes a pending address hole event to be queued. When booting linux it will report this pending as something like "Address Hole seen by USB_OTG at address 57fff584", since u-boot did not handled this interrupt. Prevent that by not tearing down the rx channel, when not receiving.

---
To replicate this:
- ROMcode must not use the emac
- U-Boot must use the emac
- only on cold start

---
 drivers/net/davinci_emac.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/net/davinci_emac.c +2 -1
index 427ad3e..0444795 100644
@@ -598,7 +598,8 @@ static void davinci_eth_close(struct eth_device *dev)
 	debug_emac("+ emac_close\n");
 
 	davinci_eth_ch_teardown(EMAC_CH_TX);	/* TX Channel teardown */
-	davinci_eth_ch_teardown(EMAC_CH_RX);	/* RX Channel teardown */
+	if (readl(&adap_emac->RXCONTROL) & 1)
+		davinci_eth_ch_teardown(EMAC_CH_RX); /* RX Channel teardown */
 
 	/* Reset EMAC module and disable interrupts in wrapper */
 	writel(1, &adap_emac->SOFTRESET);
Signature · 1 line
1.9.1
#1 lore raw

PATCH 1/1 net: davinci_emac: don't teardown inactive rx channel

+cc (forget them somehow)

Quoted 30 lines · Jeroen Hofstee

Tearing down an unitialized rx channel causes a pending address hole event to be queued. When booting linux it will report this pending as something like "Address Hole seen by USB_OTG at address 57fff584", since u-boot did not handled this interrupt. Prevent that by not tearing down the rx channel, when not receiving.

---
To replicate this:
- ROMcode must not use the emac
- U-Boot must use the emac
- only on cold start

---
  drivers/net/davinci_emac.c | 3 ++-
  1 file changed, 2 insertions(+), 1 deletion(-)
drivers/net/davinci_emac.c +2 -1
index 427ad3e..0444795 100644
@@ -598,7 +598,8 @@ static void davinci_eth_close(struct eth_device *dev)
  	debug_emac("+ emac_close\n");
 
  	davinci_eth_ch_teardown(EMAC_CH_TX);	/* TX Channel teardown */
-	davinci_eth_ch_teardown(EMAC_CH_RX);	/* RX Channel teardown */
+	if (readl(&adap_emac->RXCONTROL) & 1)
+		davinci_eth_ch_teardown(EMAC_CH_RX); /* RX Channel teardown */
 
  	/* Reset EMAC module and disable interrupts in wrapper */
  	writel(1, &adap_emac->SOFTRESET);
#2 lore raw

PATCH 1/1 net: davinci_emac: don't teardown inactive rx channel

In reply to Jeroen Hofstee

Hi Jeroen,

Quoted 6 lines · Jeroen Hofstee

Tearing down an unitialized rx channel causes a pending address hole event to be queued. When booting linux it will report this pending as something like "Address Hole seen by USB_OTG at address 57fff584", since u-boot did not handled this interrupt. Prevent that by not tearing down the rx channel, when not receiving.

Quoted 7 lines

---
To replicate this:
- ROMcode must not use the emac
- U-Boot must use the emac
- only on cold start
---

I don't know the hardware, but it sounds like a reasonable explanation. Look good to you, Tony?

Thanks,
-Joe

#3 lore raw

PATCH 1/1 net: davinci_emac: don't teardown inactive rx channel

Quoted 17 lines · Joe Hershberger

Hi Jeroen,

Quoted 6 lines · Jeroen Hofstee

Tearing down an unitialized rx channel causes a pending address hole event to be queued. When booting linux it will report this pending as something like "Address Hole seen by USB_OTG at address 57fff584", since u-boot did not handled this interrupt. Prevent that by not tearing down the rx channel, when not receiving.

Quoted 7 lines

---
To replicate this:
- ROMcode must not use the emac
- U-Boot must use the emac
- only on cold start
---

Quoted 2 lines

I don't know the hardware, but it sounds like a reasonable explanation. Look good to you, Tony?

Sure.

Tony

#4 lore raw

PATCH 1/1 net: davinci_emac: don't teardown inactive rx channel

Hi Jeroen,

Quoted 18 lines · Tony Lindgren
Quoted 17 lines · Joe Hershberger

Hi Jeroen,

Quoted 13 lines · Jeroen Hofstee

Tearing down an unitialized rx channel causes a pending address hole event to be queued. When booting linux it will report this pending as something like "Address Hole seen by USB_OTG at address 57fff584", since u-boot did not handled this interrupt. Prevent that by not tearing down the rx channel, when not receiving.

---
To replicate this:
- ROMcode must not use the emac
- U-Boot must use the emac
- only on cold start
---

Quoted 6 lines
Quoted 2 lines

I don't know the hardware, but it sounds like a reasonable explanation. Look good to you, Tony?

Sure.

Tony

OK, I'll pull this into u-boot-net.

Cheers,
-Joe

#5 lore raw

PATCH 1/1 net: davinci_emac: don't teardown inactive rx channel

In reply to Jeroen Hofstee

Hi Jeroen,

Quoted 7 lines · Jeroen Hofstee

Tearing down an unitialized rx channel causes a pending address hole event to be queued. When booting linux it will report this pending as something like "Address Hole seen by USB_OTG at address 57fff584", since u-boot did not handled this interrupt. Prevent that by not tearing down the rx channel, when not receiving.

Applied to u-boot-net, thanks!
-Joe