netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Paulius Zaleckas <paulius.zaleckas@teltonika.lt>
To: netdev <netdev@vger.kernel.org>
Subject: [PATCH] phy_device: Interrupt number 0 is valid
Date: Wed, 08 Oct 2008 15:16:32 +0300	[thread overview]
Message-ID: <48ECA4A0.7080508@teltonika.lt> (raw)

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);


             reply	other threads:[~2008-10-08 12:16 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-10-08 12:16 Paulius Zaleckas [this message]
2008-10-08 16:43 ` [PATCH] phy_device: Interrupt number 0 is valid David Miller
2008-10-09  7:05   ` Paulius Zaleckas
2008-10-09 16:38     ` David Miller

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=48ECA4A0.7080508@teltonika.lt \
    --to=paulius.zaleckas@teltonika.lt \
    --cc=netdev@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).