From: Moritz Fischer <mdf@kernel.org>
To: Andrew Lunn <andrew@lunn.ch>
Cc: Moritz Fischer <mdf@kernel.org>,
netdev@vger.kernel.org, f.fainelli@gmail.com,
hkallweit1@gmail.com, davem@davemloft.net
Subject: Re: [PATCH net-next] net: phy: fixed_phy: Fix fixed_phy not checking GPIO
Date: Wed, 6 Feb 2019 14:28:09 -0800 [thread overview]
Message-ID: <20190206222809.GA21303@archbook> (raw)
In-Reply-To: <20190206215905.GD32483@lunn.ch>
Hi Andrew,
On Wed, Feb 06, 2019 at 10:59:05PM +0100, Andrew Lunn wrote:
> On Wed, Feb 06, 2019 at 10:10:40AM -0800, Moritz Fischer wrote:
> > Fix fixed_phy not checking GPIO if no link_update callback
> > is registered.
> >
> > Signed-off-by: Moritz Fischer <mdf@kernel.org>
> > ---
> >
> > Hi all,
> >
> > I've been trying to figure out where exactly this broke,
> > it must've been somewhere when the file was refactored
> > in connection with phylink?
>
> Hi Moritz
>
> With a quick inspection, i also cannot see where it broken.
>
> I think part of the issue is that all the current users have moved
> onto using phylink, and phylink polls the GPIO, rather than having
> fixed_link do it.
Yeah, I suspected at much :) I still feel we should fix fixed_phy as
long as there are still users for it.
>
> I would prefer to understand exactly which change broke it. Without
> knowing how it broke, it is hard to say if this is the correct fix.
It might've been always this way. That being said I don't see why
one should've to implement an empty function (link_update) in my driver
just to read back the GPIO pin. Looking at the code it seems clear that
nothing else polls the GPIO, which doesn't seem right.
In my current understanding (correct me if I'm wrong), the link_update
callback would give the MAC a chance to update link parameters that
since we are a fixed phy we cannot read back from a PHY.
That seems conceptually independent from obtaining a link up/down info
from a GPIO pin. Wouldn't you agree?
>
> What is your use-case? You Cc: the usb list. So a USB-Ethernet dongle?
> But then why fixed-link?
Not for this patch, did I ? I ran into this when testing nixge, but it
seemed unrelated with my changes.
Thanks,
Moritz
next prev parent reply other threads:[~2019-02-06 22:28 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-02-06 18:10 [PATCH net-next] net: phy: fixed_phy: Fix fixed_phy not checking GPIO Moritz Fischer
2019-02-06 21:59 ` Andrew Lunn
2019-02-06 22:28 ` Moritz Fischer [this message]
2019-02-07 3:00 ` Andrew Lunn
2019-02-07 3:04 ` Andrew Lunn
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=20190206222809.GA21303@archbook \
--to=mdf@kernel.org \
--cc=andrew@lunn.ch \
--cc=davem@davemloft.net \
--cc=f.fainelli@gmail.com \
--cc=hkallweit1@gmail.com \
--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).