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: 3283231 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id F2D92C0D4B for ; Wed, 4 Dec 2013 15:45:37 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id CC8D420457 for ; Wed, 4 Dec 2013 15:45:36 +0000 (UTC) Received: from casper.infradead.org (casper.infradead.org [85.118.1.10]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 6BE8B20412 for ; Wed, 4 Dec 2013 15:45:35 +0000 (UTC) Received: from merlin.infradead.org ([2001:4978:20e::2]) by casper.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1VoEdi-0004CZ-Md; Wed, 04 Dec 2013 15:45:26 +0000 Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1VoEdf-0008OP-PJ; Wed, 04 Dec 2013 15:45:23 +0000 Received: from mail-ee0-x230.google.com ([2a00:1450:4013:c00::230]) by merlin.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1VoEdb-0008Lf-0d for linux-arm-kernel@lists.infradead.org; Wed, 04 Dec 2013 15:45:20 +0000 Received: by mail-ee0-f48.google.com with SMTP id e49so2467711eek.35 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 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> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20131204_104519_223652_480B4F82 X-CRM114-Status: GOOD ( 11.83 ) X-Spam-Score: -2.0 (--) Cc: Mugunthan V N , Florian Fainelli , netdev@vger.kernel.org, linux-kernel@vger.kernel.org, David Miller , linux-arm-kernel@lists.infradead.org, Sebastian Hesselbarth X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-4.1 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD, T_DKIM_INVALID, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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);