From patchwork Wed Dec 16 09:28:59 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nageswari Srinivasan X-Patchwork-Id: 68593 Received: from bear.ext.ti.com (bear.ext.ti.com [192.94.94.41]) by demeter.kernel.org (8.14.3/8.14.2) with ESMTP id nBI5DAJS015352 for ; Fri, 18 Dec 2009 05:13:11 GMT Received: from dlep33.itg.ti.com ([157.170.170.112]) by bear.ext.ti.com (8.13.7/8.13.7) with ESMTP id nBG9T9PE011310 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Wed, 16 Dec 2009 03:29:09 -0600 Received: from linux.omap.com (localhost [127.0.0.1]) by dlep33.itg.ti.com (8.13.7/8.13.7) with ESMTP id nBG9T8WK021820; Wed, 16 Dec 2009 03:29:09 -0600 (CST) Received: from linux.omap.com (localhost [127.0.0.1]) by linux.omap.com (Postfix) with ESMTP id 1AE2D80627; Wed, 16 Dec 2009 03:29:08 -0600 (CST) X-Original-To: davinci-linux-open-source@linux.davincidsp.com Delivered-To: davinci-linux-open-source@linux.davincidsp.com Received: from dbdp31.itg.ti.com (dbdp31.itg.ti.com [172.24.170.98]) by linux.omap.com (Postfix) with ESMTP id 6840E80626 for ; Wed, 16 Dec 2009 03:29:05 -0600 (CST) Received: from psplinux052.india.ti.com (localhost [127.0.0.1]) by dbdp31.itg.ti.com (8.13.8/8.13.8) with ESMTP id nBG9T0Yj016822; Wed, 16 Dec 2009 14:59:01 +0530 (IST) Received: from psplinux052.india.ti.com (localhost [127.0.0.1]) by psplinux052.india.ti.com (8.13.1/8.13.1) with ESMTP id nBG9T0Ja030382; Wed, 16 Dec 2009 14:59:00 +0530 Received: (from a0393278@localhost) by psplinux052.india.ti.com (8.13.1/8.13.1/Submit) id nBG9Sx0w030379; Wed, 16 Dec 2009 14:58:59 +0530 From: Nageswari Srinivasan To: netdev@vger.kernel.org Subject: [PATCH] TI DaVinci EMAC: Fix MDIO bus frequency configuration Date: Wed, 16 Dec 2009 14:58:59 +0530 Message-Id: <1260955739-30348-1-git-send-email-nageswari@ti.com> X-Mailer: git-send-email 1.6.2.4 Cc: davinci-linux-open-source@linux.davincidsp.com, davem@davemloft.net X-BeenThere: davinci-linux-open-source@linux.davincidsp.com X-Mailman-Version: 2.1.12 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: davinci-linux-open-source-bounces@linux.davincidsp.com Errors-To: davinci-linux-open-source-bounces@linux.davincidsp.com diff --git a/drivers/net/davinci_emac.c b/drivers/net/davinci_emac.c index 65a2d0b..8f8c696 100644 --- a/drivers/net/davinci_emac.c +++ b/drivers/net/davinci_emac.c @@ -2276,7 +2276,7 @@ static int emac_mii_reset(struct mii_bus *bus) unsigned int clk_div; int mdio_bus_freq = emac_bus_frequency; - if (mdio_max_freq & mdio_bus_freq) + if (mdio_max_freq && mdio_bus_freq) clk_div = ((mdio_bus_freq / mdio_max_freq) - 1); else clk_div = 0xFF;