From: Russell King - ARM Linux admin <linux@armlinux.org.uk>
To: Clemens Gruber <clemens.gruber@pqgruber.com>
Cc: Jakub Kicinski <kuba@kernel.org>,
netdev@vger.kernel.org, Andrew Lunn <andrew@lunn.ch>,
Florian Fainelli <f.fainelli@gmail.com>,
Heiner Kallweit <hkallweit1@gmail.com>,
"David S . Miller" <davem@davemloft.net>,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] net: phy: marvell: Fix pause frame negotiation
Date: Sun, 12 Apr 2020 19:54:47 +0100 [thread overview]
Message-ID: <20200412185447.GN25745@shell.armlinux.org.uk> (raw)
In-Reply-To: <20200412170336.GA1826@workstation.tuxnet>
On Sun, Apr 12, 2020 at 07:03:36PM +0200, Clemens Gruber wrote:
> On Sat, Apr 11, 2020 at 02:43:44PM +0100, Russell King - ARM Linux admin wrote:
> > The fiber code is IMHO very suspect; the decoding of the pause status
> > seems to be completely broken. However, I'm not sure whether anyone
> > actually uses that or not, so I've been trying not to touch it.
>
> If the following table for the link partner advertisement is correct..
> PAUSE ASYM_PAUSE MEANING
> 0 0 Link partner has no pause frame support
> 0 1 <- Link partner can TX pause frames
> 1 0 <-> Link partner can RX and TX pauses
> 1 1 -> Link partner can RX pause frames
>
> ..then I think both pause and asym_pause have to be assigned
> independently, like this:
> phydev->pause = !!(lpa & LPA_1000XPAUSE);
> phydev->asym_pause = !!(lpa & LPA_1000XPAUSE_ASYM);
Yes, that's how it should be, because the pause and asym pause bits
correspond exactly with the phydev members.
> (Using the defines from uapi mii.h instead of the redundant/combined
> LPA_PAUSE_FIBER etc. which can then be removed from marvell.c)
>
> Currently, if LPA_1000XPAUSE_ASYM is set we do pause=1 and asym_pause=1
> no matter if LPA_1000XPAUSE is set. This could lead us to mistake a link
> partner who can only send for one who can only receive pause frames.
> ^ Was this the problem you meant?
Exactly, but given that I've no way to actually test anything with
regard to 1G Marvell PHYs using 1000BASE-X, I have to assume that
whoever contributed this code tested it and it worked for them. So,
it should not be changed just because it looks wrong - there may be
some subtle issues in the hardware that we don't know about that
makes this code "do the best it can". We need someone who can
actually do some tests to solve this.
> Does anybody have access to a Marvell PHY with 1000base-X Ethernet?
> (I only have a 88E1510 + 1000Base-T at the home office)
Yes, that's what we need... this isn't the first time I've mentioned
the problem, and so far no one has stepped forward.
--
RMK's Patch system: https://www.armlinux.org.uk/developer/patches/
FTTC broadband for 0.8mile line in suburbia: sync at 10.2Mbps down 587kbps up
prev parent reply other threads:[~2020-04-12 18:55 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-04-08 21:43 [PATCH] net: phy: marvell: Fix pause frame negotiation Clemens Gruber
2020-04-11 0:43 ` Jakub Kicinski
2020-04-11 9:17 ` Russell King - ARM Linux admin
2020-04-11 13:24 ` Clemens Gruber
2020-04-11 13:43 ` Russell King - ARM Linux admin
2020-04-11 14:48 ` Clemens Gruber
2020-04-12 17:03 ` Clemens Gruber
2020-04-12 18:54 ` Russell King - ARM Linux admin [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200412185447.GN25745@shell.armlinux.org.uk \
--to=linux@armlinux.org.uk \
--cc=andrew@lunn.ch \
--cc=clemens.gruber@pqgruber.com \
--cc=davem@davemloft.net \
--cc=f.fainelli@gmail.com \
--cc=hkallweit1@gmail.com \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).