From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-0.8 required=3.0 tests=BAYES_20, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 98192C433DF for ; Sat, 17 Oct 2020 20:49:06 +0000 (UTC) Received: from whitealder.osuosl.org (smtp1.osuosl.org [140.211.166.138]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 08999207BB for ; Sat, 17 Oct 2020 20:49:05 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 08999207BB Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=lunn.ch Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=driverdev-devel-bounces@linuxdriverproject.org Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id A024586BD4; Sat, 17 Oct 2020 20:49:05 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from whitealder.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id ZxjTVxA+AJl5; Sat, 17 Oct 2020 20:49:03 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by whitealder.osuosl.org (Postfix) with ESMTP id 81A9586BB1; Sat, 17 Oct 2020 20:49:03 +0000 (UTC) Received: from hemlock.osuosl.org (smtp2.osuosl.org [140.211.166.133]) by ash.osuosl.org (Postfix) with ESMTP id 17F3E1BF407 for ; Sat, 17 Oct 2020 20:49:03 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id 116F287508 for ; Sat, 17 Oct 2020 20:49:03 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from hemlock.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id XSHfkuz0RwaO for ; Sat, 17 Oct 2020 20:49:02 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from vps0.lunn.ch (vps0.lunn.ch [185.16.172.187]) by hemlock.osuosl.org (Postfix) with ESMTPS id 18F56874EB for ; Sat, 17 Oct 2020 20:49:02 +0000 (UTC) Received: from andrew by vps0.lunn.ch with local (Exim 4.94) (envelope-from ) id 1kTt8N-002Bx8-On; Sat, 17 Oct 2020 22:48:59 +0200 Date: Sat, 17 Oct 2020 22:48:59 +0200 From: Andrew Lunn To: Alexander A Sverdlin Subject: Re: [PATCH v2 net] staging: octeon: repair "fixed-link" support Message-ID: <20201017204859.GT456889@lunn.ch> References: <20201016101858.11374-1-alexander.sverdlin@nokia.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20201016101858.11374-1-alexander.sverdlin@nokia.com> X-BeenThere: driverdev-devel@linuxdriverproject.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Linux Driver Project Developer List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: devel@driverdev.osuosl.org, Aaro Koskinen , Greg Kroah-Hartman , Ralf Baechle , netdev@vger.kernel.org, "David S. Miller" Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: driverdev-devel-bounces@linuxdriverproject.org Sender: "devel" > --- a/drivers/staging/octeon/ethernet.c > +++ b/drivers/staging/octeon/ethernet.c > @@ -13,6 +13,7 @@ > #include > #include > #include > +#include > #include > #include > #include > @@ -892,6 +893,14 @@ static int cvm_oct_probe(struct platform_device *pdev) > break; > } > > + if (priv->of_node && of_phy_is_fixed_link(priv->of_node)) { > + if (of_phy_register_fixed_link(priv->of_node)) { > + netdev_err(dev, "Failed to register fixed link for interface %d, port %d\n", > + interface, priv->port); > + dev->netdev_ops = NULL; > + } > + } > + > if (!dev->netdev_ops) { > free_netdev(dev); > } else if (register_netdev(dev) < 0) { > -- > 2.10.2 I would also expect a call to of_phy_deregister_fixed_link() somewhere in the driver. Andrew _______________________________________________ devel mailing list devel@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel