netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] phy_device: Interrupt number 0 is valid
@ 2008-10-08 12:16 Paulius Zaleckas
  2008-10-08 16:43 ` David Miller
  0 siblings, 1 reply; 4+ messages in thread
From: Paulius Zaleckas @ 2008-10-08 12:16 UTC (permalink / raw)
  To: netdev

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

Signed-off-by: Paulius Zaleckas <paulius.zaleckas@teltonika.lt>

Index: linux-2.6/drivers/net/phy/phy_device.c
===================================================================
--- linux-2.6.orig/drivers/net/phy/phy_device.c
+++ linux-2.6/drivers/net/phy/phy_device.c
@@ -285,7 +285,7 @@ struct phy_device * phy_connect(struct n
 
 	phy_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);


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2008-10-09 16:38 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-10-08 12:16 [PATCH] phy_device: Interrupt number 0 is valid Paulius Zaleckas
2008-10-08 16:43 ` David Miller
2008-10-09  7:05   ` Paulius Zaleckas
2008-10-09 16:38     ` David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).