From patchwork Wed Oct 8 12:16:32 2008 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paulius Zaleckas X-Patchwork-Id: 3311 X-Patchwork-Delegate: jgarzik@pobox.com Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.176.167]) by ozlabs.org (Postfix) with ESMTP id 3B101DE142 for ; Wed, 8 Oct 2008 23:16:42 +1100 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753848AbYJHMQi (ORCPT ); Wed, 8 Oct 2008 08:16:38 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1753740AbYJHMQi (ORCPT ); Wed, 8 Oct 2008 08:16:38 -0400 Received: from 81-7-68-229.static.zebra.lt ([81.7.68.229]:47072 "EHLO teltonika.lt" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752448AbYJHMQh (ORCPT ); Wed, 8 Oct 2008 08:16:37 -0400 Received: (qmail 2266 invoked by uid 118); 8 Oct 2008 12:16:30 -0000 Received: from 82.135.208.232 by mailserver (envelope-from , uid 112) with qmail-scanner-1.25st (clamdscan: 0.90.1/8390. spamassassin: 3.1.7-deb. perlscan: 1.25st. Clear:RC:1(82.135.208.232):. Processed in 0.078148 secs); 08 Oct 2008 12:16:30 -0000 Received: from 82-135-208-232.static.zebra.lt (HELO Programuotojas.82-135-208-232.ip.zebra.lt) (paulius.zaleckas@[82.135.208.232]) (envelope-sender ) by teltonika.lt (qmail-ldap-1.03) with SMTP for ; 8 Oct 2008 12:16:29 -0000 Message-ID: <48ECA4A0.7080508@teltonika.lt> Date: Wed, 08 Oct 2008 15:16:32 +0300 From: Paulius Zaleckas User-Agent: Thunderbird 2.0.0.16 (X11/20080723) MIME-Version: 1.0 To: netdev Subject: [PATCH] phy_device: Interrupt number 0 is valid Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org 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 --- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html 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);