Using ethtool or swconfig to change link settings for mt7620a?

2019-06-08 Thread Daniel Santos
Hello, I need to change auto-negotiate, speed and duplex for a port on my mt7620a-based device, but I'm not quite certain that I understand the structure here.  When using ethtool on eth0 I always get ENODEV, apparently because priv->phy_dev is always NULL in fe_get_link_ksettings of drivers/net/e

Re: [OpenWrt-Devel] Using ethtool or swconfig to change link settings for mt7620a?

2019-06-08 Thread Daniel Santos
Hello Daniel, Thanks for your help! On 6/8/19 6:51 AM, Daniel Golle wrote: > Hi Daniel, > > On Sat, Jun 08, 2019 at 04:06:54AM -0500, Daniel Santos wrote: >> Hello, >> >> I need to change auto-negotiate, speed and duplex for a port on my >> mt7620a-based device,

Understanding Ethernet Architecture (I/O --> MDIO --> MII vs I/O --> MAC) for mt7620 (OpenWRT)

2019-06-14 Thread Daniel Santos
Hello, I'm still fairly new to Ethernet drivers and there are a lot of interesting pieces.  What I need help with is understanding MDIO --> (R)MII vs direct I/O to the MAC (e.g., via ioread32, iowrite32).  Why is there not always a struct mii_bus to talk to this hardware?  Is it because the PHY an

Re: Understanding Ethernet Architecture (I/O --> MDIO --> MII vs I/O --> MAC) for mt7620 (OpenWRT)

2019-06-16 Thread Daniel Santos
ds me to the question of what "GSW" means?  This is the name of the hardware that has the PIAC register, but nowhere in the data sheet or programming guide can I find a definition. Thanks, Daniel On 6/14/19 5:53 PM, Daniel Santos wrote: > Hello, > > I'm still fairly new to

Re: [PATCH RFC net-next 5/5] net: dsa: mt7530: Add mediatek,ephy-handle to isolate external phy

2019-06-24 Thread Daniel Santos
On 6/24/19 4:52 PM, Andrew Lunn wrote: >> +static int mt7530_isolate_ephy(struct dsa_switch *ds, >> + struct device_node *ephy_node) >> +{ >> +struct phy_device *phydev = of_phy_find_device(ephy_node); >> +int ret; >> + >> +if (!phydev) >> +return 0

Re: [PATCH RFC net-next 1/5] net: dsa: mt7530: Convert to PHYLINK API

2019-06-24 Thread Daniel Santos
On 6/24/19 9:52 AM, René van Dorst wrote: > Convert mt7530 to PHYLINK API > > Signed-off-by: René van Dorst > --- > drivers/net/dsa/mt7530.c | 237 +-- > drivers/net/dsa/mt7530.h | 9 ++ > 2 files changed, 187 insertions(+), 59 deletions(-) > > diff --git

Re: [PATCH RFC net-next 1/5] net: dsa: mt7530: Convert to PHYLINK API

2019-06-25 Thread Daniel Santos
Hello, Although I'm new to the entire Ethernet / *MII subsystem and I haven't touched DSA yet, I've recently had to add some of this functionality to the older OpenWRT drivers for swconfig control over the ports.  René, do you have an actual datasheet or programming guide for the mt7530?  I only h

Re: [PATCH RFC net-next 1/5] net: dsa: mt7530: Convert to PHYLINK API

2019-06-25 Thread Daniel Santos
On 6/25/19 2:02 PM, Andrew Lunn wrote: >> But will there still be a mechanism to ignore link partner's advertising >> and force these parameters? > >From man 1 ethtool: > >-a --show-pause > Queries the specified Ethernet device for pause parameter > information. > >-A

Re: [PATCH RFC net-next 1/5] net: dsa: mt7530: Convert to PHYLINK API

2019-06-27 Thread Daniel Santos
On 6/25/19 3:41 PM, Andrew Lunn wrote: > On Tue, Jun 25, 2019 at 02:27:55PM -0500, Daniel Santos wrote: >> On 6/25/19 2:02 PM, Andrew Lunn wrote: >>>> But will there still be a mechanism to ignore link partner's advertising >>>> and force the

Re: [PATCH RFC net-next 1/5] net: dsa: mt7530: Convert to PHYLINK API

2019-06-28 Thread Daniel Santos
Hello Andrew, On 6/27/19 2:28 PM, Andrew Lunn wrote: >>> Looking at the data sheet page, you want FORCE_MODE_Pn set. You never >>> want the MAC directly talking to the PHY. Bad things will happen. >> So what exactly do you mean by the MAC directly talking to the PHY?  Do >> you mean setting speed,