lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <YtmHRDdbCsDy3Wha@lunn.ch>
Date:   Thu, 21 Jul 2022 19:05:08 +0200
From:   Andrew Lunn <andrew@...n.ch>
To:     Qingfang DENG <dqfext@...il.com>
Cc:     Russell King <linux@...linux.org.uk>,
        Jose Abreu <Jose.Abreu@...opsys.com>, netdev@...r.kernel.org
Subject: Re: Handling standalone PCS IRQ

On Tue, Jul 19, 2022 at 10:39:12PM +0800, Qingfang DENG wrote:
> Hi all,
> 
> I was working with an SoC that has a built-in DWC XPCS with IRQ support.
> However the current driver still uses polling.
> 
> I may modify xpcs_create() to try getting an IRQ number from DT, and fall back
> to polling if it fails (see the code below). But I don't know how to notify
> phylink in the IRQ handler.
> 
> There is a phylink_mac_change() function to notify phylink, but it is supposed
> to be used in a MAC driver, and it requires a (struct phylink *), not a
> (struct phylink_pcs *). Do we need a similar one for PCS?

Russell should really answer this. But my take on this, is yes, you
should add a phylink_pcs_change(), which calls phylink_run_resolve().

As you say, i don't currently see a way to go from phylink_pcs to
phylink. So you might need to add a pointer to phylink_pcs. Just be
careful of race conditions, phylink->pcs can change, and you don't
want an interrupt delivered while it is changing. I would also make
the value in phylink_pcs opaque, we don't want the PCS actually using
information from the phylink structure.

    Andrew

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ