From patchwork Sun Dec 8 14:40:26 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sebastian Hesselbarth X-Patchwork-Id: 298828 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 39E8D2C00A9 for ; Mon, 9 Dec 2013 01:40:59 +1100 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1759315Ab3LHOkm (ORCPT ); Sun, 8 Dec 2013 09:40:42 -0500 Received: from mail-ee0-f41.google.com ([74.125.83.41]:45795 "EHLO mail-ee0-f41.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1759146Ab3LHOki (ORCPT ); Sun, 8 Dec 2013 09:40:38 -0500 Received: by mail-ee0-f41.google.com with SMTP id t10so1099748eei.14 for ; Sun, 08 Dec 2013 06:40:37 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=jChWA4HEo90RUL+xxDuVrXZ3TbGS8AHNsyQFJl/Nc98=; b=u+/BesaLovO1KIywn0C4zqAizeU4q0ORmtwFPt7E/nYZ5aSp+ABkxvWD55+yp7JWmE u4S01yjYcqQlkNi/ztXoZglJqqFvlDfcREusn4s59bBarliLBTpI41OFVmI9cKDlWqLS PZVLhrZjrYXNmMAvEIynD2pcO5dzI1GYSVl77aLtivU3wpxag1EDtSyRlTuAhDELBjeS UNWWvvf8+1EG9KDtkkcWlu0MaATP6tpWeat/tmUZtNELa7kV8nkEyoXVhY9wLft73DjZ p5wUinApmM99aZ2HNdl5vt/CIYyeO6tYD2mET+BmOmy/b0s/XPmJEbgtrMBlydI+dgrv g95A== X-Received: by 10.15.101.9 with SMTP id bo9mr9314132eeb.32.1386513637826; Sun, 08 Dec 2013 06:40:37 -0800 (PST) Received: from topkick.lan (dslc-082-083-251-183.pools.arcor-ip.net. [82.83.251.183]) by mx.google.com with ESMTPSA id o47sm17854792eem.21.2013.12.08.06.40.36 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 08 Dec 2013 06:40:36 -0800 (PST) From: Sebastian Hesselbarth To: Sebastian Hesselbarth Cc: David Miller , Florian Fainelli , Mugunthan V N , netdev@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH v1 1/6] net: mv643xx_eth: properly start/stop phy device Date: Sun, 8 Dec 2013 15:40:26 +0100 Message-Id: <1386513631-11284-2-git-send-email-sebastian.hesselbarth@gmail.com> In-Reply-To: <1386513631-11284-1-git-send-email-sebastian.hesselbarth@gmail.com> References: <1386171888-28190-1-git-send-email-sebastian.hesselbarth@gmail.com> <1386513631-11284-1-git-send-email-sebastian.hesselbarth@gmail.com> Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org When using phydev, it should be phy_start/phy_stop'ed properly. This driver doesn't do that, so add the corresponding calls to port_start/ stop respectively. Signed-off-by: Sebastian Hesselbarth Acked-by: Mugunthan V N Reviewed-by: Florian Fainelli --- Cc: David Miller Cc: Florian Fainelli Cc: Mugunthan V N Cc: netdev@vger.kernel.org Cc: linux-arm-kernel@lists.infradead.org Cc: linux-kernel@vger.kernel.org --- drivers/net/ethernet/marvell/mv643xx_eth.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/net/ethernet/marvell/mv643xx_eth.c b/drivers/net/ethernet/marvell/mv643xx_eth.c index 61088a6..3aa706f 100644 --- a/drivers/net/ethernet/marvell/mv643xx_eth.c +++ b/drivers/net/ethernet/marvell/mv643xx_eth.c @@ -2098,6 +2098,7 @@ static void port_start(struct mv643xx_eth_private *mp) mv643xx_eth_get_settings(mp->dev, &cmd); phy_reset(mp); mv643xx_eth_set_settings(mp->dev, &cmd); + phy_start(mp->phy); } /* @@ -2293,7 +2294,8 @@ static int mv643xx_eth_stop(struct net_device *dev) del_timer_sync(&mp->rx_oom); netif_carrier_off(dev); - + if (mp->phy) + phy_stop(mp->phy); free_irq(dev->irq, dev); port_reset(mp);