From: Andrew Lunn <andrew@lunn.ch>
To: Parthiban Veerasooran <parthiban.veerasooran@microchip.com>
Cc: andrew+netdev@lunn.ch, davem@davemloft.net, edumazet@google.com,
kuba@kernel.org, pabeni@redhat.com, hkallweit1@gmail.com,
linux@armlinux.org.uk, netdev@vger.kernel.org,
UNGLinuxDriver@microchip.com, linux-kernel@vger.kernel.org
Subject: Re: [PATCH net-next 2/3] net: ethernet: oa_tc6: deliver the PHY interrupt to phylib
Date: Thu, 3 Sep 2026 15:54:46 +0200 [thread overview]
Message-ID: <b7386bf3-dfd0-4ddf-8a14-76c29cb8ac9b@lunn.ch> (raw)
In-Reply-To: <28cf906d-cd94-4497-9641-6220d57da3dd@microchip.com>
On Thu, Sep 03, 2026 at 06:32:26PM +0530, Parthiban Veerasooran wrote:
> Hi Andrew,
>
> Thank you for reviewing this patch series.
>
> On 02/09/26 6:13 am, Andrew Lunn wrote:
> > EXTERNAL EMAIL: Do not click links or open attachments unless you know the content is safe
> >
> > On Tue, Sep 01, 2026 at 06:39:47PM +0530, Parthiban Veerasooran wrote:
> > > The integrated PHY has no dedicated interrupt line; its interrupt is
> > > delivered in-band as the PHYINT bit in STATUS0, which raises the MAC-PHY
> > > SPI interrupt via the extended status. phy_mac_interrupt() only triggers
> > > a link-status re-read and cannot make the PHY driver read and acknowledge
> > > its interrupt source registers, so expose the PHY interrupt to phylib as a
> > > nested virtual IRQ instead.
> > >
> > > Use dummy_irq_chip as the irqchip, map a virtual IRQ and assign it to
> > > phydev->irq before phy_connect_direct() so phylib enters interrupt mode
> > > and uses the PHY driver's config_intr/handle_interrupt. Unmask PHYINT in
> > > INT_MASK0, and when it is seen in the extended status, dispatch
> > > handle_nested_irq() synchronously from the sleepable threaded IRQ. PHYINT
> > > is level triggered, so acking the PHY source there clears it before the
> > > next data chunk, avoiding a storm.
> >
> >
> > 9.2.8.7 PHYINT
> >
> > Physical Layer Interrupt. When set, this bit indicates a service
> > request from the underlying physical layer block. Many physical
> > layer implementations support an interrupt output for signaling
> > events to the station controller. This bit is optional and will be
> > implemented only if the underlying physical layer supports
> > generating interrupts to a higher level. When implemented, this bit
> > shall be cleared by acknowledging the underlying physical layer
> > interrupt source(s). When not implemented, this bit shall be
> > reserved with a read- only value of zero.
> >
> > At the moment, phylib is polling the PHY. That is guaranteed to work.
> >
> > The standard indicates this interrupt is optional. It might not be
> > implemented. phylib assumes that if there is an interrupt, the
> > interrupt works, and it does not poll. So any hardware which does not
> > implement this interrupt is now broken.
> >
> > Please find a way not to break other devices.
> Thank you for pointing it out. PHYINT is optional per the OA TC6 standard
> (section 9.2.8.7), and unconditionally setting up the virtual IRQ breaks
> devices that do not implement it.
>
> I checked both the OA TC6 standard (V1.1) and the LAN8650/1 datasheet, and
> there is no capability register bit to detect PHYINT support at runtime.
I also did a quick check of the standard and could not find an
indication if interrupts were support. So a quirks flag does seem to
be the correct solution.
Andrew
next prev parent reply other threads:[~2026-09-03 13:55 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-01 13:09 [PATCH net-next 0/3] net: microchip_t1s: fix collision detection on PLCA status change Parthiban Veerasooran
2026-09-01 13:09 ` [PATCH net-next 1/3] net: phy: " Parthiban Veerasooran
2026-09-01 13:09 ` [PATCH net-next 2/3] net: ethernet: oa_tc6: deliver the PHY interrupt to phylib Parthiban Veerasooran
2026-09-02 0:30 ` Andrew Lunn
2026-09-03 13:23 ` Parthiban Veerasooran
2026-09-03 14:14 ` Andrew Lunn
2026-09-04 6:05 ` Parthiban Veerasooran
2026-09-04 13:07 ` Andrew Lunn
2026-09-02 0:43 ` Andrew Lunn
2026-09-03 13:02 ` Parthiban Veerasooran
2026-09-03 13:54 ` Andrew Lunn [this message]
2026-09-04 6:02 ` Parthiban Veerasooran
2026-09-01 13:09 ` [PATCH net-next 3/3] net: phy: microchip_t1s: fix collision detection for LAN867X Rev.D0 Parthiban Veerasooran
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=b7386bf3-dfd0-4ddf-8a14-76c29cb8ac9b@lunn.ch \
--to=andrew@lunn.ch \
--cc=UNGLinuxDriver@microchip.com \
--cc=andrew+netdev@lunn.ch \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=hkallweit1@gmail.com \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@armlinux.org.uk \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=parthiban.veerasooran@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
all inboxes | Powered by JetHome®