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=-5.3 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=ham 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 7F78BC35658 for ; Fri, 21 Feb 2020 17:12:55 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (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 53C8624650 for ; Fri, 21 Feb 2020 17:12:55 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="CUm3CZ+z"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=armlinux.org.uk header.i=@armlinux.org.uk header.b="REgQwD+8" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 53C8624650 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=armlinux.org.uk Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=jfPQHl1MNrRy8mC7NowIDQcvJGmDpixqTHrWiXD/GBA=; b=CUm3CZ+zYGr3QO F3qjaQnqbgpetGUwm9qG5JLwtuIbMkx06o4gj39B4AHgZmDf+llo1Zx8FwQiaVNcXS+rHC/wvEw2I L5HRUZES43MnqX6hcLV5qQS18YnmBzpLLTDepClHNT1orG8wLZhbmIDdjDblnWGgmVlLckdYPsC2V 78m37ke/l95OWvW/s/fu9FQK4ab2mA2w6uYqbBerGLxwdCxwDCHbkCeyLshHDEvjOmhFIj+5eE6Gr NHeq2jJrADfJJ+dvC59bU33AhmI0BHplmryNziHC2nSPAWhH24dBfryXs/fMC7br1kAIjecUZO64v bQjFdm0Z30MWD0qI8idg==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1j5Br6-0001NB-KB; Fri, 21 Feb 2020 17:12:48 +0000 Received: from pandora.armlinux.org.uk ([2001:4d48:ad52:3201:214:fdff:fe10:1be6]) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1j5Br2-0008El-F6 for linux-arm-kernel@lists.infradead.org; Fri, 21 Feb 2020 17:12:47 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=armlinux.org.uk; s=pandora-2019; h=Sender:In-Reply-To:Content-Type: MIME-Version:References:Message-ID:Subject:Cc:To:From:Date:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=bp1lWcxGkXI1dOKZa2p+oi0pswujYwX0tBwQBCst0zM=; b=REgQwD+8Du6hBrxoBK+zFIs0Z 6A92OGFjwvYnNCRJJ4qpiWJuwucUoi9OHxhYoVQDQTqgVMyaLdK99gZoOtjJRNalWF75yRLvkGVrx INHqGMXfpmgKCx6R82YcA0tWuC5c2i3Gq6M97zYis9unSS1TXNpFEWC36zXygXPLHbv2SQJGmJDmd KvyqZZIlkf0TWJOJ8yKuJ+dKNLqFI2LVLkvRj1wRGfas03zBgiNIX56pOMgwo8RJPrpZ9XpuWF5QC DJ2P8BGlVXy6JKxT8HFqs342ASPkC203Kc66tMqLZ746HkX28SgQ2NBwi7bw1sDQUIoQKdUuKpu3w VaFWa05lQ==; Received: from shell.armlinux.org.uk ([2001:4d48:ad52:3201:5054:ff:fe00:4ec]:43400) by pandora.armlinux.org.uk with esmtpsa (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.90_1) (envelope-from ) id 1j5Bop-0002S1-IA; Fri, 21 Feb 2020 17:10:27 +0000 Received: from linux by shell.armlinux.org.uk with local (Exim 4.92) (envelope-from ) id 1j5Bom-0003fn-Jw; Fri, 21 Feb 2020 17:10:24 +0000 Date: Fri, 21 Feb 2020 17:10:24 +0000 From: Russell King - ARM Linux admin To: Florian Fainelli Subject: Re: [PATCH net] net: macb: Properly handle phylink on at91rm9200 Message-ID: <20200221171024.GK25745@shell.armlinux.org.uk> References: <20200217104348.43164-1-alexandre.belloni@bootlin.com> <661c1e61-11c8-0c54-83a2-5e81674246e0@gmail.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <661c1e61-11c8-0c54-83a2-5e81674246e0@gmail.com> User-Agent: Mutt/1.10.1 (2018-07-13) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200221_091244_509171_E6836CB9 X-CRM114-Status: GOOD ( 15.21 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Alexandre Belloni , Antoine =?iso-8859-1?Q?T=E9nart?= , netdev@vger.kernel.org, linux-kernel@vger.kernel.org, "David S. Miller" , linux-arm-kernel@lists.infradead.org Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Mon, Feb 17, 2020 at 02:03:47PM -0800, Florian Fainelli wrote: > > > On 2/17/2020 2:43 AM, Alexandre Belloni wrote: > > at91ether_init was handling the phy mode and speed but since the switch to > > phylink, the NCFGR register got overwritten by macb_mac_config(). > > > > Add new phylink callbacks to handle emac and at91rm9200 properly. > > > > Fixes: 7897b071ac3b ("net: macb: convert to phylink") > > Signed-off-by: Alexandre Belloni > > --- > > [snip] > > > +static void at91ether_mac_link_up(struct phylink_config *config, > > + unsigned int mode, > > + phy_interface_t interface, > > + struct phy_device *phy) > > +{ > > + struct net_device *ndev = to_net_dev(config->dev); > > + struct macb *bp = netdev_priv(ndev); > > + > > + /* Enable Rx and Tx */ > > + macb_writel(bp, NCR, macb_readl(bp, NCR) | MACB_BIT(RE) | MACB_BIT(TE)); > > + > > + netif_tx_wake_all_queues(ndev); > > So this happens to be copied from the mvpp2 driver, if this is a > requirement, should not this be moved to the phylink implementation > since it already manages the carrier? Those two drivers are the only > ones doing this. Looking at mvneta, it does stuff with managing the queues itself, and I suspect adding that into phylink will mess that driver up. Maybe someone with more knowledge can take a look. But, IMHO, two drivers doing something is not grounds for moving it into higher layers. -- RMK's Patch system: https://www.armlinux.org.uk/developer/patches/ FTTC broadband for 0.8mile line in suburbia: sync at 12.1Mbps down 622kbps up According to speedtest.net: 11.9Mbps down 500kbps up _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel