From patchwork Thu Oct 20 21:00:18 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kyle Moffett X-Patchwork-Id: 120896 X-Patchwork-Delegate: davem@davemloft.net 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.180.67]) by ozlabs.org (Postfix) with ESMTP id 72A68100A64 for ; Fri, 21 Oct 2011 08:14:05 +1100 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753474Ab1JTVNk (ORCPT ); Thu, 20 Oct 2011 17:13:40 -0400 Received: from 26.241.167.70.in-addr.border.exmeritus.com ([70.167.241.26]:35682 "EHLO border.exmeritus.com" rhost-flags-OK-FAIL-OK-OK) by vger.kernel.org with ESMTP id S1753326Ab1JTVNZ (ORCPT ); Thu, 20 Oct 2011 17:13:25 -0400 Received: from ysera.exmeritus.com (firewall2.exmeritus.com [10.13.38.2]) by border.exmeritus.com (Postfix) with ESMTP id B9D7CAC0A0; Thu, 20 Oct 2011 17:03:05 -0400 (EDT) From: Kyle Moffett To: linux-kernel@vger.kernel.org, netdev@vger.kernel.org Cc: Kyle Moffett , "David S. Miller" , Yoshihiro Shimoda , Nobuhiro Iwamatsu , Kuninori Morimoto Subject: [RFC PATCH 11/17] sh_eth: Don't unnecessarily reset the PHY Date: Thu, 20 Oct 2011 17:00:18 -0400 Message-Id: <1319144425-15547-12-git-send-email-Kyle.D.Moffett@boeing.com> X-Mailer: git-send-email 1.7.2.5 In-Reply-To: <1319144425-15547-1-git-send-email-Kyle.D.Moffett@boeing.com> References: <1319144425-15547-1-git-send-email-Kyle.D.Moffett@boeing.com> Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org The PHY is already reset during driver probing, and this manual reset afterwards will wipe out board-specific PHY fixups and driver-specific phy->drv->config_init() register tweaks. Signed-off-by: Kyle Moffett --- drivers/net/sh_eth.c | 19 +------------------ 1 files changed, 1 insertions(+), 18 deletions(-) diff --git a/drivers/net/sh_eth.c b/drivers/net/sh_eth.c index 1c1666e..7ef4378 100644 --- a/drivers/net/sh_eth.c +++ b/drivers/net/sh_eth.c @@ -1235,23 +1235,6 @@ static int sh_eth_phy_init(struct net_device *ndev) return 0; } -/* PHY control start function */ -static int sh_eth_phy_start(struct net_device *ndev) -{ - struct sh_eth_private *mdp = netdev_priv(ndev); - int ret; - - ret = sh_eth_phy_init(ndev); - if (ret) - return ret; - - /* reset phy - this also wakes it from PDOWN */ - phy_write(mdp->phydev, MII_BMCR, BMCR_RESET); - phy_start(mdp->phydev); - - return 0; -} - static int sh_eth_get_settings(struct net_device *ndev, struct ethtool_cmd *ecmd) { @@ -1410,7 +1393,7 @@ static int sh_eth_open(struct net_device *ndev) goto out_free_irq; /* PHY control start*/ - ret = sh_eth_phy_start(ndev); + ret = sh_eth_phy_init(ndev); if (ret) goto out_free_irq;