[OpenWrt-Devel] [PATCH v3 1/7] ar71xx: ag71xx: add pdata field supported

Guenther Kelleter Guenther.Kelleter at devolo.de
Thu Jul 9 03:42:23 EDT 2015


Hi

> -----Original Message-----
> From: John Crispin [mailto:blogic at openwrt.org]
> Sent: Thursday, July 09, 2015 8:24 AM
> To: Guenther Kelleter; openwrt-devel at lists.openwrt.org
> Subject: Re: [OpenWrt-Devel] [PATCH v3 1/7] ar71xx: ag71xx: add pdata field
> supported
> 
> Hi,
> 
> On 07/07/2015 14:58, Günther Kelleter wrote:
> > to allow target specific override of phydev->supported.
> >
> 
> why do you need to do this ? do you want to force a specific link type ?
> if so, then using a fixed link would be preferable to faking phy caps


It simply doesn't work with autoneg on. The plc chip on the other end of eth0 doesn't sync. How can I force no autoneg 1000 full duplex on eth0 without this patch?
I'm setting (see patch 3/7, target/linux/ar71xx/files/arch/mips/ath79/mach-dlan-pro-500-wp.c)
+	ath79_eth0_data.speed = SPEED_1000;
+	ath79_eth0_data.duplex = DUPLEX_FULL;
But this has no effect.


> 
> 	John
> 
> 
> > Signed-off-by: Günther Kelleter <guenther.kelleter at devolo.de>
> > ---
> >  .../ar71xx/files/arch/mips/include/asm/mach-ath79/ag71xx_platform.h  | 1 +
> >  .../ar71xx/files/drivers/net/ethernet/atheros/ag71xx/ag71xx_phy.c    | 5
> +++++
> >  2 files changed, 6 insertions(+)
> >
> > diff --git a/target/linux/ar71xx/files/arch/mips/include/asm/mach-
> ath79/ag71xx_platform.h
> b/target/linux/ar71xx/files/arch/mips/include/asm/mach-ath79/ag71xx_platform.h
> > index d46dc4e..aa7663b 100644
> > --- a/target/linux/ar71xx/files/arch/mips/include/asm/mach-
> ath79/ag71xx_platform.h
> > +++ b/target/linux/ar71xx/files/arch/mips/include/asm/mach-
> ath79/ag71xx_platform.h
> > @@ -30,6 +30,7 @@ struct ag71xx_platform_data {
> >  	u32		reset_bit;
> >  	u8		mac_addr[ETH_ALEN];
> >  	struct device	*mii_bus_dev;
> > +	u32		supported;
> >
> >  	u8		has_gbit:1;
> >  	u8		is_ar91xx:1;
> > diff --git
> a/target/linux/ar71xx/files/drivers/net/ethernet/atheros/ag71xx/ag71xx_phy.c
> b/target/linux/ar71xx/files/drivers/net/ethernet/atheros/ag71xx/ag71xx_phy.c
> > index 9de77e9..0f5ec9c 100644
> > ---
> a/target/linux/ar71xx/files/drivers/net/ethernet/atheros/ag71xx/ag71xx_phy.c
> > +++
> b/target/linux/ar71xx/files/drivers/net/ethernet/atheros/ag71xx/ag71xx_phy.c
> > @@ -146,6 +146,11 @@ static int ag71xx_phy_connect_multi(struct ag71xx *ag)
> >  	else
> >  		phydev->supported &= PHY_BASIC_FEATURES;
> >
> > +	if (pdata->supported) {
> > +		dev_info(dev, "overriding phydev->supported (%08x)\n", pdata-
> >supported);
> > +		phydev->supported = pdata->supported;
> > +	}
> > +
> >  	phydev->advertising = phydev->supported;
> >
> >  	dev_info(dev, "connected to PHY at %s [uid=%08x, driver=%s]\n",
> >
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


More information about the openwrt-devel mailing list