From: Heiner Kallweit <hkallweit1@gmail.com>
To: Andrew Lunn <andrew@lunn.ch>
Cc: Russell King - ARM Linux admin <linux@armlinux.org.uk>,
Florian Fainelli <f.fainelli@gmail.com>,
"netdev@vger.kernel.org" <netdev@vger.kernel.org>
Subject: Re: No traffic with Marvell switch and latest linux-next
Date: Sat, 23 Feb 2019 22:48:19 +0100 [thread overview]
Message-ID: <188fcef7-81fe-cffc-af71-1f37725b8611@gmail.com> (raw)
In-Reply-To: <20190218182136.GE14879@lunn.ch>
On 18.02.2019 19:21, Andrew Lunn wrote:
>>> Hi Heiner
>>>
>>> Watch out for boot vs reboot, and when rebooting if port 8 had link or
>>> not before you reboot.
>>>
>> Will do. Is there some known issue or bug?
>
> Hi Heiner
>
> No, but it is a variable which can make a difference. The fix i made
> for the Freescale GPIO controller was not an issue for cold boot, but
> reboot with link up did cause interrupt problems, etc.
>
Hi Andrew,
it took me quite some time to debug this issue ..
At first a bisect pointed to one of my commits:
5502b218e001 ("net: phy: use phy_resolve_aneg_linkmode in genphy_read_status")
Further digging lead me to some suspicious dsa code:
In dsa_port_fixed_link_register_of() there's a call to genphy_read_status().
At the time of the call phydev->advertising is empty, therefore the fixed phy
settings are overwritten with defaults (10/half) what breaks the system.
Worth to be mentioned is that for the PHY these two flags are set:
- is_pseudo_fixed_link (that's ok)
- autoneg -> I'm not sure this is correct.
It seems that you once added the code in question:
39b0c705195e ("net: dsa: Allow configuration of CPU & DSA port speeds/duplex")
I did what I like to do most and removed some code.
W/o the calls to genphy_config_init() and genphy_read_status() it works again.
Do these calls have some purpose here with a fixed link?
My commit exposed the issue because before it genphy_read_status() read the
advertisement from chip registers instead of using phydev->advertising.
Very close to this function is dsa_port_setup_phy_of() which uses genphy_resume()
and genphy_read_status() and also looks somewhat suspicious. This code makes
quite some assumptions:
- PHY is a C22 PHY
- PHY is compatible with the generic PHY driver
> Andrew
>
Heiner
next prev parent reply other threads:[~2019-02-23 21:48 UTC|newest]
Thread overview: 32+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-02-17 15:34 No traffic with Marvell switch and latest linux-next Heiner Kallweit
2019-02-17 15:40 ` Russell King - ARM Linux admin
2019-02-17 15:50 ` Heiner Kallweit
2019-02-17 16:40 ` Heiner Kallweit
2019-02-17 16:57 ` Andrew Lunn
2019-02-17 17:06 ` Heiner Kallweit
2019-02-17 17:10 ` Andrew Lunn
2019-02-18 18:16 ` Heiner Kallweit
2019-02-18 18:21 ` Andrew Lunn
2019-02-23 21:48 ` Heiner Kallweit [this message]
2019-02-23 23:42 ` Andrew Lunn
2019-02-24 9:10 ` Heiner Kallweit
2019-02-24 15:04 ` Andrew Lunn
2019-02-24 15:15 ` Russell King - ARM Linux admin
2019-02-24 15:28 ` Heiner Kallweit
2019-02-24 15:34 ` Russell King - ARM Linux admin
2019-02-24 15:39 ` Heiner Kallweit
2019-02-24 15:49 ` Russell King - ARM Linux admin
2019-02-24 16:32 ` Florian Fainelli
2019-02-24 17:04 ` Andrew Lunn
2019-02-24 21:26 ` Florian Fainelli
2019-02-24 21:42 ` Heiner Kallweit
2019-02-24 15:31 ` Russell King - ARM Linux admin
2019-02-24 17:28 ` Andrew Lunn
2019-02-24 19:41 ` Russell King - ARM Linux admin
2019-02-23 23:55 ` Florian Fainelli
2019-02-17 15:45 ` Andrew Lunn
2019-02-17 15:48 ` Heiner Kallweit
2019-02-17 15:57 ` Andrew Lunn
2019-02-17 16:01 ` Heiner Kallweit
2019-02-17 15:51 ` Andrew Lunn
2019-02-17 15:55 ` Heiner Kallweit
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=188fcef7-81fe-cffc-af71-1f37725b8611@gmail.com \
--to=hkallweit1@gmail.com \
--cc=andrew@lunn.ch \
--cc=f.fainelli@gmail.com \
--cc=linux@armlinux.org.uk \
--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).