Re: [PATCH net-next 2/2] net: phy: Add ability to debug RGMII connections

2019-10-18 Thread Andrew Lunn
> I don't think you are following the big picture of what I am saying. I > was trying to follow Florian's intention (first make sure I understand > it) and suggest that the FCS checking code in the patch he submitted > is not doing what it was intended to. I am getting apparent FCS > mismatches rep

Re: [PATCH net-next 2/2] net: phy: Add ability to debug RGMII connections

2019-10-18 Thread Vladimir Oltean
On Fri, 18 Oct 2019 at 16:54, Russell King - ARM Linux admin wrote: > > On Fri, Oct 18, 2019 at 04:37:55PM +0300, Vladimir Oltean wrote: > > On Fri, 18 Oct 2019 at 16:23, Russell King - ARM Linux admin > > wrote: > > > > > > On Fri, Oct 18, 2019 at 04:09:30PM +0300, Vladimir Oltean wrote: > > > >

Re: [PATCH net-next 2/2] net: phy: Add ability to debug RGMII connections

2019-10-18 Thread Russell King - ARM Linux admin
On Fri, Oct 18, 2019 at 04:37:55PM +0300, Vladimir Oltean wrote: > On Fri, 18 Oct 2019 at 16:23, Russell King - ARM Linux admin > wrote: > > > > On Fri, Oct 18, 2019 at 04:09:30PM +0300, Vladimir Oltean wrote: > > > Hi Andrew, > > > > > > On Fri, 18 Oct 2019 at 16:01, Andrew Lunn wrote: > > > > >

Re: [PATCH net-next 2/2] net: phy: Add ability to debug RGMII connections

2019-10-18 Thread Vladimir Oltean
On Fri, 18 Oct 2019 at 16:23, Russell King - ARM Linux admin wrote: > > On Fri, Oct 18, 2019 at 04:09:30PM +0300, Vladimir Oltean wrote: > > Hi Andrew, > > > > On Fri, 18 Oct 2019 at 16:01, Andrew Lunn wrote: > > > > > > > Well, that's the tricky part. You're sending a frame out, with no > > > >

Re: [PATCH net-next 2/2] net: phy: Add ability to debug RGMII connections

2019-10-18 Thread Russell King - ARM Linux admin
On Fri, Oct 18, 2019 at 04:09:30PM +0300, Vladimir Oltean wrote: > Hi Andrew, > > On Fri, 18 Oct 2019 at 16:01, Andrew Lunn wrote: > > > > > Well, that's the tricky part. You're sending a frame out, with no > > > guarantee you'll get the same frame back in. So I'm not sure that any > > > identifi

Re: [PATCH net-next 2/2] net: phy: Add ability to debug RGMII connections

2019-10-18 Thread Vladimir Oltean
Hi Andrew, On Fri, 18 Oct 2019 at 16:01, Andrew Lunn wrote: > > > Well, that's the tricky part. You're sending a frame out, with no > > guarantee you'll get the same frame back in. So I'm not sure that any > > identifiers put inside the frame will survive. > > How do the tests pan out for you? Do

Re: [PATCH net-next 2/2] net: phy: Add ability to debug RGMII connections

2019-10-18 Thread Andrew Lunn
> Well, that's the tricky part. You're sending a frame out, with no > guarantee you'll get the same frame back in. So I'm not sure that any > identifiers put inside the frame will survive. > How do the tests pan out for you? Do you actually get to trigger this > check? As I mentioned, my NIC drops

Re: [PATCH net-next 2/2] net: phy: Add ability to debug RGMII connections

2019-10-17 Thread Vladimir Oltean
On Fri, 18 Oct 2019 at 01:22, Florian Fainelli wrote: > > > > On 10/17/2019 3:06 PM, Vladimir Oltean wrote: > >> +static int phy_rgmii_debug_rcv(struct sk_buff *skb, struct net_device > >> *dev, > >> + struct packet_type *pt, struct net_device *unused) > >> +{ > >> +struct ph

Re: [PATCH net-next 2/2] net: phy: Add ability to debug RGMII connections

2019-10-17 Thread Florian Fainelli
On 10/17/2019 3:06 PM, Vladimir Oltean wrote: >> +static int phy_rgmii_debug_rcv(struct sk_buff *skb, struct net_device >> *dev, >> +   struct packet_type *pt, struct net_device *unused) >> +{ >> +    struct phy_rgmii_debug_priv *priv = pt->af_packet_priv; >> +    u32 fcs; >> + >

Re: [PATCH net-next 2/2] net: phy: Add ability to debug RGMII connections

2019-10-17 Thread Vladimir Oltean
Hi Florian, [sorry, I started writing this before you sent out a v2] On 10/16/19 1:49 AM, Florian Fainelli wrote: RGMII connections are always troublesome because of the need to add delays between the RX or TX clocks and data lines. This can lead to a fair amount of breakage that upsets users.

Re: [PATCH net-next 2/2] net: phy: Add ability to debug RGMII connections

2019-10-16 Thread Andrew Lunn
> If all is well, we stop iterating over all possible RGMII combinations > and offer the one that is deemed suitable which is what an user should > be trying by configuring the platform appropriately. Hi Florian I like the idea, however... I think it would be good to always iterate over all poss

RE: [PATCH net-next 2/2] net: phy: Add ability to debug RGMII connections

2019-10-16 Thread Jose Abreu
From: Florian Fainelli Date: Oct/15/2019, 23:49:53 (UTC+00:00) > The function phy_rgmii_debug_probe() could also be used by an Ethernet > controller during its selftests routines instead of open-coding that > part. I can add it to stmmac selftests then :) > +int phy_rgmii_debug_probe(struct phy

[PATCH net-next 2/2] net: phy: Add ability to debug RGMII connections

2019-10-15 Thread Florian Fainelli
RGMII connections are always troublesome because of the need to add delays between the RX or TX clocks and data lines. This can lead to a fair amount of breakage that upsets users. Introduce a new sysfs write only attribute which can be set to 1 to instruct the PHY library to attempt to probe what