netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Andrew Lunn <andrew@lunn.ch>
To: Enguerrand de Ribaucourt 
	<enguerrand.de-ribaucourt@savoirfairelinux.com>
Cc: Heiner Kallweit <hkallweit1@gmail.com>,
	netdev <netdev@vger.kernel.org>, Paolo Abeni <pabeni@redhat.com>,
	woojung huh <woojung.huh@microchip.com>,
	davem <davem@davemloft.net>,
	UNGLinuxDriver <UNGLinuxDriver@microchip.com>,
	Russell King - ARM Linux <linux@armlinux.org.uk>
Subject: Re: [PATCH v3 1/3] net: phy: add EXPORT_SYMBOL to phy_disable_interrupts()
Date: Tue, 20 Dec 2022 16:17:30 +0100	[thread overview]
Message-ID: <Y6HSCkdtgUlJXxDh@lunn.ch> (raw)
In-Reply-To: <1721908413.470634.1671548576554.JavaMail.zimbra@savoirfairelinux.com>

On Tue, Dec 20, 2022 at 10:02:56AM -0500, Enguerrand de Ribaucourt wrote:
> > From: "Heiner Kallweit" <hkallweit1@gmail.com>
> > To: "Enguerrand de Ribaucourt" <enguerrand.de-ribaucourt@savoirfairelinux.com>,
> > "netdev" <netdev@vger.kernel.org>
> > Cc: "Paolo Abeni" <pabeni@redhat.com>, "woojung huh"
> > <woojung.huh@microchip.com>, "davem" <davem@davemloft.net>, "UNGLinuxDriver"
> > <UNGLinuxDriver@microchip.com>, "Andrew Lunn" <andrew@lunn.ch>, "Russell King -
> > ARM Linux" <linux@armlinux.org.uk>
> > Sent: Tuesday, December 20, 2022 3:40:15 PM
> > Subject: Re: [PATCH v3 1/3] net: phy: add EXPORT_SYMBOL to
> > phy_disable_interrupts()
> 
> > On 20.12.2022 14:19, Enguerrand de Ribaucourt wrote:
> > > It seems EXPORT_SYMBOL was forgotten when phy_disable_interrupts() was
> > > made non static. For consistency with the other exported functions in
> > > this file, EXPORT_SYMBOL should be used.
> 
> > No, it wasn't forgotten. It's intentional. The function is supposed to
> > be used within phylib only.
> 
> > None of the phylib maintainers was on the addressee list of your patch.
> > Seems you didn't check with get_maintainers.pl.
> 
> > You should explain your use case to the phylib maintainers. Maybe lan78xx
> > uses phylib in a wrong way, maybe an extension to phylib is needed.
> > Best start with explaining why lan78xx_link_status_change() needs to
> > fiddle with the PHY interrupt. It would help be helpful to understand
> > what "chip" refers to in the comment. The MAC, or the PHY?
> > Does the lan78xx code assume that a specific PHY is used, and the
> > functionality would actually belong to the respective PHY driver?
> 
> Thank you for your swift reply,
> 
> The requirement to toggle the PHY interrupt in lan78xx_link_status_change() (the
> LAN7801 MAC driver) comes from a workaround by the original author which resets
> the fixed speed in the PHY when the Ethernet cable is swapped. According to his
> message, the link could not be correctly setup without this workaround.

This seems like a PHY bug, so the workaround should be in the PHY
driver, not the MAC driver. It will then apply to all MAC:PHY
combinations, not just the lan78xx paired with this PHY.

The PHY driver has the callback link_change_notify. You might be able
to use that.

   Andrew

  reply	other threads:[~2022-12-20 15:17 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-04-25 22:22 [PATCH 2/2 net] lan78xx: workaround of forced 100 Full/Half duplex mode error Woojung.Huh
2016-04-28 20:36 ` David Miller
2021-01-22 14:19 ` Marc Kleine-Budde
2022-12-16 14:49 ` [PATCH] net: lan78xx: isolate LAN88XX specific operations Enguerrand de Ribaucourt
2022-12-20  9:40   ` Paolo Abeni
2022-12-20 11:37 ` [PATCH v2] net: lan78xx: prevent " Enguerrand de Ribaucourt
2022-12-20 12:41   ` Paolo Abeni
2022-12-20 12:47     ` Enguerrand de Ribaucourt
2022-12-20 12:45   ` Paolo Abeni
2022-12-20 13:10     ` Enguerrand de Ribaucourt
2022-12-21 16:40   ` kernel test robot
2022-12-20 13:19 ` [PATCH v3 0/3] " Enguerrand de Ribaucourt
2022-12-20 13:19 ` [PATCH v3 1/3] net: phy: add EXPORT_SYMBOL to phy_disable_interrupts() Enguerrand de Ribaucourt
2022-12-20 14:40   ` Heiner Kallweit
2022-12-20 15:02     ` Enguerrand de Ribaucourt
2022-12-20 15:17       ` Andrew Lunn [this message]
2022-12-20 15:19       ` Heiner Kallweit
2022-12-20 15:48         ` Enguerrand de Ribaucourt
2022-12-20 16:55           ` Andrew Lunn
2022-12-20 19:43             ` Woojung.Huh
2022-12-21 18:03               ` Yuiko.Oshino
2022-12-20 16:13       ` Russell King (Oracle)
2022-12-20 16:22         ` Enguerrand de Ribaucourt
2022-12-20 16:47           ` AW: " Sven Schuchmann
2022-12-20 13:19 ` [PATCH v3 2/3] net: phy: make phy_enable_interrupts() non-static Enguerrand de Ribaucourt
2022-12-20 13:19 ` [PATCH v3 3/3] net: lan78xx: prevent LAN88XX specific operations Enguerrand de Ribaucourt

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=Y6HSCkdtgUlJXxDh@lunn.ch \
    --to=andrew@lunn.ch \
    --cc=UNGLinuxDriver@microchip.com \
    --cc=davem@davemloft.net \
    --cc=enguerrand.de-ribaucourt@savoirfairelinux.com \
    --cc=hkallweit1@gmail.com \
    --cc=linux@armlinux.org.uk \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=woojung.huh@microchip.com \
    /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).