netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Russell King (Oracle)" <linux@armlinux.org.uk>
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>,
	Andrew Lunn <andrew@lunn.ch>
Subject: Re: [PATCH v3 1/3] net: phy: add EXPORT_SYMBOL to phy_disable_interrupts()
Date: Tue, 20 Dec 2022 16:13:31 +0000	[thread overview]
Message-ID: <Y6HfK7bnkL2uyp3m@shell.armlinux.org.uk> (raw)
In-Reply-To: <1721908413.470634.1671548576554.JavaMail.zimbra@savoirfairelinux.com>

Hi,

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.
> 
> Unfortunately, I don't have the cables to test the code without the workaround
> and it's description doesn't explain what problem happens more precisely.
> 
> The PHY the original author used is a LAN8835. The workaround code directly
> modified the interrupt configuration registers of this LAN8835 PHY within
> lan78xx_link_status_change(). This caused problems if a different PHY was used
> because the register at this address did not correspond to the interrupts
> configuration. As suggested by the lan78xx.c maintainer, a generic function
> should be used instead to toggle the interrupts of the PHY. However, it seems
> that maybe the MAC driver shouldn't meddle with the PHY's interrupts according
> to you. Would you consider this use case a valid one?

This sounds to me like you're just trying to get a workaround merged
upstream using a different approach, but you can't actually test to
see whether it does work or not. Would that be a fair assessment?

Do you know anyone who would be able to test? If not, I would suggest
not trying to upstream code for a workaround that can't be tested as
working.

Thanks.

-- 
RMK's Patch system: https://www.armlinux.org.uk/developer/patches/
FTTP is here! 40Mbps down 10Mbps up. Decent connectivity at last!

  parent reply	other threads:[~2022-12-20 16:14 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
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) [this message]
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=Y6HfK7bnkL2uyp3m@shell.armlinux.org.uk \
    --to=linux@armlinux.org.uk \
    --cc=UNGLinuxDriver@microchip.com \
    --cc=andrew@lunn.ch \
    --cc=davem@davemloft.net \
    --cc=enguerrand.de-ribaucourt@savoirfairelinux.com \
    --cc=hkallweit1@gmail.com \
    --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).