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 PHC | |
Open Source and information security mailing list archives
| ||
|
Date: Sun, 25 Oct 2020 10:18:47 +0000 From: Ioana Ciornei <ioana.ciornei@....com> To: Michael Walle <michael@...le.cc> CC: Andrew Lunn <andrew@...n.ch>, Heiner Kallweit <hkallweit1@...il.com>, Russell King <linux@...linux.org.uk>, Jakub Kicinski <kuba@...nel.org>, "netdev@...r.kernel.org" <netdev@...r.kernel.org>, "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>, Alexandru Ardelean <alexandru.ardelean@...log.com>, Andre Edich <andre.edich@...rochip.com>, Antoine Tenart <atenart@...nel.org>, Baruch Siach <baruch@...s.co.il>, Christophe Leroy <christophe.leroy@....fr>, Dan Murphy <dmurphy@...com>, Divya Koppera <Divya.Koppera@...rochip.com>, Florian Fainelli <f.fainelli@...il.com>, Hauke Mehrtens <hauke@...ke-m.de>, Jerome Brunet <jbrunet@...libre.com>, Kavya Sree Kotagiri <kavyasree.kotagiri@...rochip.com>, Linus Walleij <linus.walleij@...aro.org>, Marco Felsch <m.felsch@...gutronix.de>, Marek Vasut <marex@...x.de>, Martin Blumenstingl <martin.blumenstingl@...glemail.com>, Mathias Kresin <dev@...sin.me>, Maxim Kochetkov <fido_max@...ox.ru>, Neil Armstrong <narmstrong@...libre.com>, Nisar Sayed <Nisar.Sayed@...rochip.com>, Oleksij Rempel <o.rempel@...gutronix.de>, Philippe Schenker <philippe.schenker@...adex.com>, Willy Liu <willy.liu@...ltek.com>, Yuiko Oshino <yuiko.oshino@...rochip.com> Subject: Re: [RFC net-next 0/5] net: phy: add support for shared interrupts On Sun, Oct 25, 2020 at 09:17:58AM +0100, Michael Walle wrote: > Am 2020-10-24 14:14, schrieb Ioana Ciornei: > > - Every PHY driver gains a .handle_interrupt() implementation that, for > > the most part, would look like below: > > > > irq_status = phy_read(phydev, INTR_STATUS); > > if (irq_status < 0) { > > phy_error(phydev); > > return IRQ_NONE; > > } > > > > if (irq_status == 0) > > return IRQ_NONE; > > > > phy_trigger_machine(phydev); > > > > return IRQ_HANDLED; > > Would it make sense to provide this (default) version inside the core? > Simple PHY drivers then just could set the callback to this function. > (There must be some property for the INTR_STATUS, which is likely to > be different between different PHYs, though). Yes, the interrupt status register's address differs even between PHYs from the same vendor so making this somehow into a default handler would mean to add even another callback that actually reads the register. For simple PHY drivers, the .handle_interrupt() implementation would mean 15-20 lines of code for a much more straightforward implementation. I think that's fair. Ioana
Powered by blists - more mailing lists