From patchwork Thu Oct 16 21:30:21 2008 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wolfram Sang X-Patchwork-Id: 4764 X-Patchwork-Delegate: grant.likely@secretlab.ca Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from ozlabs.org (localhost [127.0.0.1]) by ozlabs.org (Postfix) with ESMTP id 29EE2DE4A4 for ; Fri, 17 Oct 2008 08:30:42 +1100 (EST) X-Original-To: linuxppc-embedded@ozlabs.org Delivered-To: linuxppc-embedded@ozlabs.org Received: from metis.extern.pengutronix.de (metis.extern.pengutronix.de [83.236.181.26]) by ozlabs.org (Postfix) with ESMTP id F1163DDF05 for ; Fri, 17 Oct 2008 08:30:27 +1100 (EST) Received: from octopus.labnet.pengutronix.de ([10.1.1.3]) by metis.extern.pengutronix.de with esmtp (Exim 4.63) (envelope-from ) id 1KqaQI-00049S-UU; Thu, 16 Oct 2008 23:30:22 +0200 Received: from wsa by octopus.labnet.pengutronix.de with local (Exim 4.69) (envelope-from ) id 1KqaQH-0003b7-UR; Thu, 16 Oct 2008 23:30:21 +0200 Date: Thu, 16 Oct 2008 23:30:21 +0200 From: Wolfram Sang To: Grant Likely Subject: Re: [patch 1/2] FEC_MPC52XX_PHY: Remove obsolete code Message-ID: <20081016213021.GD13629@pengutronix.de> References: <20080816023159.126377505@pengutronix.de> <20080816024055.241009929@pengutronix.de> <20081015142855.GE16262@secretlab.ca> MIME-Version: 1.0 In-Reply-To: <20081015142855.GE16262@secretlab.ca> User-Agent: Mutt/1.5.18 (2008-05-17) X-SA-Exim-Connect-IP: 10.1.1.3 X-SA-Exim-Mail-From: wsa@pengutronix.de X-SA-Exim-Scanned: No (on metis.extern.pengutronix.de); SAEximRunCond expanded to false Cc: linuxppc-embedded@ozlabs.org X-BeenThere: linuxppc-embedded@ozlabs.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: Linux on Embedded PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Mime-version: 1.0 Sender: linuxppc-embedded-bounces+patchwork-incoming=ozlabs.org@ozlabs.org Errors-To: linuxppc-embedded-bounces+patchwork-incoming=ozlabs.org@ozlabs.org On Wed, Oct 15, 2008 at 08:28:55AM -0600, Grant Likely wrote: > description of what is wrong and why the code needs to be removed. As > far as I can tell, this code affects two different IRQ paths. First is Ups, you are right! I am sorry that I missed that somehow :( Here is hopefully a better version, which just skips the really unnecessary interrupt and fixes a glitch in mdio_remove: === [MPC52XX] fec_mpc52xx_phy: Minor cleanups As this driver polls for a complete MDIO transaction, there is no need to enable interrupts for it. Furthermore, make both checks for freeing MDIO-bus irqs consistent. Signed-off-by: Wolfram Sang --- drivers/net/fec_mpc52xx_phy.c | 5 +---- 1 files changed, 1 insertions(+), 4 deletions(-) diff --git a/drivers/net/fec_mpc52xx_phy.c b/drivers/net/fec_mpc52xx_phy.c index 08e18bc..3ad3750 100644 --- a/drivers/net/fec_mpc52xx_phy.c +++ b/drivers/net/fec_mpc52xx_phy.c @@ -133,9 +133,6 @@ static int mpc52xx_fec_mdio_probe(struct of_device *of, const struct of_device_i /* set MII speed */ out_be32(&priv->regs->mii_speed, ((mpc52xx_find_ipb_freq(of->node) >> 20) / 5) << 1); - /* enable MII interrupt */ - out_be32(&priv->regs->imask, in_be32(&priv->regs->imask) | FEC_IMASK_MII); - err = mdiobus_register(bus); if (err) goto out_unmap; @@ -167,7 +164,7 @@ static int mpc52xx_fec_mdio_remove(struct of_device *of) iounmap(priv->regs); for (i=0; iirq[i]) + if (bus->irq[i] != PHY_POLL) irq_dispose_mapping(bus->irq[i]); kfree(priv); kfree(bus->irq);