diff mbox

[OpenWrt-Devel] ar71xx: fix kernel Oops in at803x_link_change_notify

Message ID 1435678512-7522-1-git-send-email-sven@open-mesh.com
State Accepted
Headers show

Commit Message

Sven Eckelmann June 30, 2015, 3:35 p.m. UTC
r45954 ("ar71xx: fix 100/10mbps ethernet link issues on mynet range
extender") introduced a pdata based modification of the tx_clk_dly. But it
was not checked if pdata actually existed. This caused a page fault on all
devices which didn't have at803x_platform_data specified for an at803x
based device.

Signed-off-by: Sven Eckelmann <sven@open-mesh.com>
---
 .../patches-3.18/425-net-phy-at803x-allow-to-configure-via-pdata.patch  | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Alexander 'lynxis' Couzens June 30, 2015, 4:13 p.m. UTC | #1
Hi Sven,

I sent the same patch a week ago.
See https://patchwork.ozlabs.org/patch/486993/

Best
lynxis
Christian Lamparter July 1, 2015, 2:34 p.m. UTC | #2
On Tuesday, June 30, 2015 05:35:12 PM Sven Eckelmann wrote:
> r45954 ("ar71xx: fix 100/10mbps ethernet link issues on mynet range
> extender") introduced a pdata based modification of the tx_clk_dly. But it
> was not checked if pdata actually existed. This caused a page fault on all
> devices which didn't have at803x_platform_data specified for an at803x
> based device.
> 
Ah finally. I tried to contact you several times before. 
(RFC back in May)

Sven, I've seen you did quite a bit of work on the OM5P-AN
with the same F1E-PHY. I went through the code from Atheros'
original driver SDK v17 (which was part of the GPL source
for the mynet). Apart from tx delay handling, everything
else matches perfectly, so the tx/rx delay code should be
enabled by default for this chip on all platforms without
needing any platform data overwrites.

I'm interested to hear from any other devices which have 
a AT803x. Also, please let me know where to get the GPL
tars for the devices.

Regards,
  Chr
diff mbox

Patch

diff --git a/target/linux/ar71xx/patches-3.18/425-net-phy-at803x-allow-to-configure-via-pdata.patch b/target/linux/ar71xx/patches-3.18/425-net-phy-at803x-allow-to-configure-via-pdata.patch
index 34b9bc0..0d021ac 100644
--- a/target/linux/ar71xx/patches-3.18/425-net-phy-at803x-allow-to-configure-via-pdata.patch
+++ b/target/linux/ar71xx/patches-3.18/425-net-phy-at803x-allow-to-configure-via-pdata.patch
@@ -141,7 +141,7 @@ 
  			priv->phy_reset = false;
  		}
  	}
-+	if (pdata->fixup_rgmii_tx_delay &&
++	if (pdata && pdata->fixup_rgmii_tx_delay &&
 +	    phydev->speed != priv->prev_speed) {
 +		switch (phydev->speed) {
 +		case SPEED_10: