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] [thread-next>] [day] [month] [year] [list]
Date:   Sat, 19 Jan 2019 15:43:19 -0800
From:   Florian Fainelli <f.fainelli@...il.com>
To:     Heiner Kallweit <hkallweit1@...il.com>,
        Andrew Lunn <andrew@...n.ch>,
        David Miller <davem@...emloft.net>
CC:     "netdev@...r.kernel.org" <netdev@...r.kernel.org>
Subject: Re: [PATCH net-next 4/4] net: phy: change phy_start_interrupts to phy_request_interrupt



On January 19, 2019 3:30:05 AM PST, Heiner Kallweit <hkallweit1@...il.com> wrote:
>Now that we enable the interrupts in phy_start() we don't have to do it
>before. Therefore remove enabling interrupts from
>phy_start_interrupts()
>and rename this function to reflect the changed functionality.
>
>Signed-off-by: Heiner Kallweit <hkallweit1@...il.com>
>---

>+ * phy_request_interrupt - request interrupt for a PHY device
>  * @phydev: target phy_device struct
>  *
>  * Description: Request the interrupt for the given PHY.
>  *   If this fails, then we set irq to PHY_POLL.
>- *   Otherwise, we enable the interrupts in the PHY.
>  *   This should only be called with a valid IRQ number.
>- *   Returns 0 on success or < 0 on error.
>  */
>-int phy_start_interrupts(struct phy_device *phydev)
>+void phy_request_interrupt(struct phy_device *phydev)
> {
> 	if (request_threaded_irq(phydev->irq, NULL, phy_interrupt,
> 				 IRQF_ONESHOT | IRQF_SHARED,
> 				 phydev_name(phydev), phydev) < 0) {
> 		phydev_warn(phydev, "Can't get IRQ %d\n", phydev->irq);
> 		phydev->irq = PHY_POLL;
>-		return 0;
> 	}

We should propagate the return code here and/or indicate we are falling back to polling since may not be desired. An use case that should be considered is probe deferral for instance.
-- 
Florian

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ