From patchwork Wed Dec 4 15:44:43 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sebastian Hesselbarth X-Patchwork-Id: 296569 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 29EF12C0089 for ; Thu, 5 Dec 2013 02:45:05 +1100 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932977Ab3LDPpA (ORCPT ); Wed, 4 Dec 2013 10:45:00 -0500 Received: from mail-ee0-f53.google.com ([74.125.83.53]:46974 "EHLO mail-ee0-f53.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932398Ab3LDPo6 (ORCPT ); Wed, 4 Dec 2013 10:44:58 -0500 Received: by mail-ee0-f53.google.com with SMTP id b57so2509920eek.12 for ; Wed, 04 Dec 2013 07:44:57 -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=tE3ZJh2O5iPcT/Q2Z+GDHWxnD1f1REFBcrg6Z1qPctM=; b=vax/0uPOvuJ2Lq2DLQpOrviAe3mTh8SQRtqnFdEmeZvIwPW+HZNxOy6Q4p0iln+fhx H8/B5pKLBypYRl4yqKxEA29JUqHNBsJxw4aWPeNFMbqx7kFa0QZuSuYDaA4Em3EsWIuS 9bBv4JZn/lsORByokZw+NBNuNfAhgiPsp5z3Gd5rPcYAWt79WioM/wYA0VhrN1xGiCwr CJQrBCp8/UxC/Bb0f3L61SlYpk8Fjg2eUwbI/GRzZHp4WCghHBDegLjLgoUwDDN4zoPQ iRQEHHKKgeWRoacFbufVSvISLo44ZZoZv62G1/eokuJOPg4X7pZG1TMHRRWlPZN1bnGF 3dWw== X-Received: by 10.15.83.8 with SMTP id b8mr72156388eez.6.1386171897172; Wed, 04 Dec 2013 07:44:57 -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 b41sm72299547eef.16.2013.12.04.07.44.55 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 04 Dec 2013 07:44:56 -0800 (PST) From: Sebastian Hesselbarth To: Sebastian Hesselbarth Cc: Sebastian Hesselbarth , David Miller , Florian Fainelli , Mugunthan V N , netdev@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH RFCv2 1/6] net: mv643xx_eth: properly start/stop phy device Date: Wed, 4 Dec 2013 16:44:43 +0100 Message-Id: <1386171888-28190-2-git-send-email-sebastian.hesselbarth@gmail.com> In-Reply-To: <1384978913-8052-1-git-send-email-sebastian.hesselbarth@gmail.com> References: <1384978913-8052-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 --- Changelog: RFCv1->RFCv2: - initial, derived from netdev specific patches (Suggested by Mugunthan and Florian) 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 files changed, 3 insertions(+), 1 deletions(-) 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);