From: Jisheng Zhang <Jisheng.Zhang@synaptics.com>
To: Heiner Kallweit <hkallweit1@gmail.com>
Cc: Andrew Lunn <andrew@lunn.ch>,
Florian Fainelli <f.fainelli@gmail.com>,
Russell King <linux@armlinux.org.uk>,
"David S. Miller" <davem@davemloft.net>,
netdev@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] net: phy: realtek: clear interrupt during init for rtl8211f
Date: Fri, 15 May 2020 15:41:28 +0800 [thread overview]
Message-ID: <20200515154128.41ee2afa@xhacker.debian> (raw)
In-Reply-To: <bbb70281-d477-d227-d1d2-aeecffdb6299@gmail.com>
On Thu, 14 May 2020 21:50:53 +0200 Heiner Kallweit wrote:
>
>
> On 14.05.2020 08:25, Jisheng Zhang wrote:
> > On Wed, 13 May 2020 20:45:13 +0200 Heiner Kallweit wrote:
> >
> >>
> >> On 13.05.2020 08:51, Jisheng Zhang wrote:
> >>> Hi,
> >>>
> >>> On Tue, 12 May 2020 20:43:40 +0200 Heiner Kallweit wrote:
> >>>
> >>>>
> >>>>
> >>>> On 12.05.2020 12:46, Jisheng Zhang wrote:
> >>>>> The PHY Register Accessible Interrupt is enabled by default, so
> >>>>> there's such an interrupt during init. In PHY POLL mode case, the
> >>>>> INTB/PMEB pin is alway active, it is not good. Clear the interrupt by
> >>>>> calling rtl8211f_ack_interrupt().
> >>>>
> >>>> As you say "it's not good" w/o elaborating a little bit more on it:
> >>>> Do you face any actual issue? Or do you just think that it's not nice?
> >>>
> >>>
> >>> The INTB/PMEB pin can be used in two different modes:
> >>> INTB: used for interrupt
> >>> PMEB: special mode for Wake-on-LAN
> >>>
> >>> The PHY Register Accessible Interrupt is enabled by
> >>> default, there's always such an interrupt during the init. In PHY POLL mode
> >>> case, the pin is always active. If platforms plans to use the INTB/PMEB pin
> >>> as WOL, then the platform will see WOL active. It's not good.
> >>>
> >> The platform should listen to this pin only once WOL has been configured and
> >> the pin has been switched to PMEB function. For the latter you first would
> >> have to implement the set_wol callback in the PHY driver.
> >> Or where in which code do you plan to switch the pin function to PMEB?
> >
> > I think it's better to switch the pin function in set_wol callback. But this
> > is another story. No matter WOL has been configured or not, keeping the
> > INTB/PMEB pin active is not good. what do you think?
> >
>
> It shouldn't hurt (at least it didn't hurt for the last years), because no
> listener should listen to the pin w/o having it configured before.
> So better extend the PHY driver first (set_wol, ..), and then do the follow-up
> platform changes (e.g. DT config of a connected GPIO).
There are two sides involved here: the listener, it should not listen to the pin
as you pointed out; the phy side, this patch tries to make the phy side
behave normally -- not keep the INTB/PMEB pin always active. The listener
side behaves correctly doesn't mean the phy side could keep the pin active.
When .set_wol isn't implemented, this patch could make the system suspend/resume
work properly.
PS: even with set_wol implemented as configure the pin mode, I think we
still need to clear the interrupt for phy poll mode either in set_wol
or as this patch does.
next prev parent reply other threads:[~2020-05-15 7:41 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-05-12 10:46 [PATCH] net: phy: realtek: clear interrupt during init for rtl8211f Jisheng Zhang
2020-05-12 18:43 ` Heiner Kallweit
2020-05-13 6:51 ` Jisheng Zhang
2020-05-13 18:45 ` Heiner Kallweit
2020-05-14 6:25 ` Jisheng Zhang
2020-05-14 19:50 ` Heiner Kallweit
2020-05-15 7:41 ` Jisheng Zhang [this message]
2020-05-15 16:18 ` Florian Fainelli
2020-05-15 17:30 ` Heiner Kallweit
2020-06-17 9:09 ` Jisheng Zhang
2020-06-21 20:16 ` 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=20200515154128.41ee2afa@xhacker.debian \
--to=jisheng.zhang@synaptics.com \
--cc=andrew@lunn.ch \
--cc=davem@davemloft.net \
--cc=f.fainelli@gmail.com \
--cc=hkallweit1@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.