Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751496AbbDAQXl (ORCPT ); Wed, 1 Apr 2015 12:23:41 -0400 Received: from smtp31.i.mail.ru ([94.100.177.91]:40906 "EHLO smtp31.i.mail.ru" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752215AbbDAQXi (ORCPT ); Wed, 1 Apr 2015 12:23:38 -0400 Message-ID: <551C1B81.1040706@list.ru> Date: Wed, 01 Apr 2015 19:23:29 +0300 From: Stas Sergeev User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.5.0 MIME-Version: 1.0 To: netdev CC: Thomas Petazzoni , Florian Fainelli , Linux kernel , Stas Sergeev Subject: [PATCH] mvneta: dont call mvneta_adjust_link() manually Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Spam: Not detected X-Mras: Ok Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1663 Lines: 51 mvneta_adjust_link() is a callback for of_phy_connect() and should not be called directly. The result of calling it directly is as below: --- mvneta f1030000.ethernet eth1: Link is Up - Unsupported (update p hy.c)/Half - flow control off --- This is because initially the struct phy_device is created with invalid parameters. phylib calls adjust_link() only when the parameters are validated, but calling it by hands may happen too early. CC: Thomas Petazzoni CC: netdev@vger.kernel.org CC: linux-kernel@vger.kernel.org CC: Florian Fainelli Signed-off-by: Stas Sergeev --- drivers/net/ethernet/marvell/mvneta.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/drivers/net/ethernet/marvell/mvneta.c b/drivers/net/ethernet/marvell/mvneta.c index 0e17fd0..ccb1433 100644 --- a/drivers/net/ethernet/marvell/mvneta.c +++ b/drivers/net/ethernet/marvell/mvneta.c @@ -2729,16 +2729,11 @@ static int mvneta_stop(struct net_device *dev) static int mvneta_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd) { struct mvneta_port *pp = netdev_priv(dev); - int ret; if (!pp->phy_dev) return -ENOTSUPP; - ret = phy_mii_ioctl(pp->phy_dev, ifr, cmd); - if (!ret) - mvneta_adjust_link(dev); - - return ret; + return phy_mii_ioctl(pp->phy_dev, ifr, cmd); } /* Ethtool methods */ -- 1.7.9.5 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/