phy_device: Interrupt number 0 is valid
Subsystems (3)
PATCH 1/1 phy_device: Interrupt number 0 is valid
If interrupt number 0(valid interrupt number) will be passed as phy interrupt it should be used. In current situation even phy polling will not work since PHY_POLL = -1
drivers/net/phy/phy_device.c +2 -2
@@ -285,7 +285,7 @@ struct phy_device * phy_connect(struct nphy_start_machine (phydev,NULL ); -if (phydev->irq >0 ) +if (phydev->irq >=0 )phy_start_interrupts (phydev);return phydev;
@@ -298,7 +298,7 @@ EXPORT_SYMBOL(phy_connect);*/ void phy_disconnect (struct phy_device *phydev) { -if (phydev->irq >0 ) +if (phydev->irq >=0 )phy_stop_interrupts (phydev);phy_stop_machine (phydev);
David Miller
maintainerFrom: Paulius Zaleckas <[email protected]>
Date: Wed, 08 Oct 2008 15:16:32 +0300
Quoted 5 lines
If interrupt number 0(valid interrupt number) will be passed as phy interrupt it should be used. In current situation even phy polling will not work since
PHY_POLL= -1Signed-off-by Paulius Zaleckas <[email protected]>
In the Linux kernel, interrupt number 0 is defined as not valid.
Quoted 10 lines · David Miller
From: Paulius Zaleckas <[email protected]>
Date: Wed, 08 Oct 2008 15:16:32 +0300Quoted 5 lines
If interrupt number 0(valid interrupt number) will be passed as phy interrupt it should be used. In current situation even phy polling will not work since
PHY_POLL= -1Signed-off-by Paulius Zaleckas <[email protected]>In the Linux kernel, interrupt number 0 is defined as not valid.
Where it is defined as not valid?
Maybe it is not valid under x86, but it is valid at least on ARM for sure.
Anyway if interrupt 0 is not valid then request_irq() will fail and PHY_POLL will be used.
David Miller
maintainerFrom: Paulius Zaleckas <[email protected]>
Date: Thu, 09 Oct 2008 10:05:03 +0300
Quoted 8 lines
Quoted 7 lines · David Miller
From: Paulius Zaleckas <[email protected]>
Date: Wed, 08 Oct 2008 15:16:32 +0300Quoted 4 lines
If interrupt number 0(valid interrupt number) will be passed as phy interrupt it should be used. In current situation even phy polling will not work since
PHY_POLL= -1
Quoted 7 lines
Quoted 3 lines
Quoted 1 line
Signed-off-by Paulius Zaleckas <[email protected]>In the Linux kernel, interrupt number 0 is defined as not valid.
Where it is defined as not valid?
Maybe it is not valid under x86, but it is valid at least on ARM for sure.
There are many tests in the kernel that explicitly assume that IRQ zero is not valid.
And architectures should make amends to adhere to this convention, even if physically IRQ 0 is meaningful for them.