linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/2] net: phy: relax error checking when creating sysfs link netdev->phydev
@ 2018-03-14 22:26 Grygorii Strashko
  2018-03-14 22:26 ` [PATCH 1/2] sysfs: symlink: export sysfs_create_link_nowarn() Grygorii Strashko
                   ` (2 more replies)
  0 siblings, 3 replies; 16+ messages in thread
From: Grygorii Strashko @ 2018-03-14 22:26 UTC (permalink / raw)
  To: David S. Miller, netdev, Andrew Lunn, Florian Fainelli,
	Greg Kroah-Hartman
  Cc: Sekhar Nori, linux-kernel, linux-omap, Grygorii Strashko

Some ethernet drivers (like TI CPSW) may connect and manage >1 Net PHYs per
one netdevice, as result such drivers will produce warning during system
boot and fail to connect second phy to netdevice when PHYLIB framework
will try to create sysfs link netdev->phydev for second PHY
in phy_attach_direct(), because sysfs link with the same name has been
created already for the first PHY.
As result, second CPSW external port will became unusable.
This issue was introduced by commits:
5568363f0cb3 ("net: phy: Create sysfs reciprocal links for attached_dev/phydev"
a3995460491d ("net: phy: Relax error checking on sysfs_create_link()"

Patch 1: exports sysfs_create_link_nowarn() function as preparation for Patch 2.
Patch 2: relaxes error checking when PHYLIB framework is creating sysfs
link netdev->phydev in phy_attach_direct(), suppress warning by using
sysfs_create_link_nowarn() and adds debug message instead.

This is stable material 4.13+.

Cc: Florian Fainelli <f.fainelli@gmail.com>
Grygorii Strashko (2):
  sysfs: symlink: export sysfs_create_link_nowarn()
  net: phy: relax error checking when creating sysfs link netdev->phydev

 drivers/net/phy/phy_device.c | 15 +++++++++++----
 fs/sysfs/symlink.c           |  1 +
 2 files changed, 12 insertions(+), 4 deletions(-)

-- 
2.10.5

^ permalink raw reply	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2018-03-16 22:08 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-03-14 22:26 [PATCH 0/2] net: phy: relax error checking when creating sysfs link netdev->phydev Grygorii Strashko
2018-03-14 22:26 ` [PATCH 1/2] sysfs: symlink: export sysfs_create_link_nowarn() Grygorii Strashko
2018-03-15  8:38   ` Sergei Shtylyov
2018-03-14 22:26 ` [PATCH 2/2] net: phy: relax error checking when creating sysfs link netdev->phydev Grygorii Strashko
2018-03-15  2:26   ` Greg Kroah-Hartman
2018-03-15 15:47     ` Grygorii Strashko
2018-03-16 17:22 ` [PATCH 0/2] " Andrew Lunn
2018-03-16 17:34   ` Florian Fainelli
2018-03-16 18:42     ` Grygorii Strashko
2018-03-16 19:11       ` Florian Fainelli
2018-03-16 19:41         ` Grygorii Strashko
2018-03-16 19:54           ` Andrew Lunn
2018-03-16 20:13             ` Grygorii Strashko
2018-03-16 21:09               ` Florian Fainelli
2018-03-16 21:14                 ` Andrew Lunn
2018-03-16 22:08                   ` Grygorii Strashko

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).