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 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 smtp.lore.kernel.org (Postfix) with ESMTPS id 96296CD54A9 for ; Tue, 19 Sep 2023 09:53:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc: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=y9AT6Nvg9krat2GqhOpIcOgTEqbo557HVN3M/doF4xQ=; b=qI7CRTKTZiqpvj OuMe+hoaZyUbCgbCM1ePdOJXv4cUgd5zNIeIiWzpBvMrhztVAlhR9ksh840oWsdLt7oqT4NYpRRLM 7qsI4PIcH+kMWd4Zy0wZ3stXHbCDZPlrk7cie3AArOkOR5ilHj+Cf2HkokolPVlQA2lI/dOk1PkZX RTxDGU4cfe+x6SvBUTqCO2a2+JHf7UW+fWg1wXalA3ZHgixHSuh+QxRX1MFSdDGRp0UpYxlma5mCR qETqvW0QuzZqfQE+u7gN/vb0ABnCb4ipfcABNT/PTV4vY+hHssynHIb9Z86H+F2Ys5gyF2+5yv4Pl t11xCsb7C596zLam4Jcw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qiXPL-00HYNU-28; Tue, 19 Sep 2023 09:52:39 +0000 Received: from pandora.armlinux.org.uk ([2001:4d48:ad52:32c8:5054:ff:fe00:142]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qiXPI-00HYK9-0D for linux-arm-kernel@lists.infradead.org; Tue, 19 Sep 2023 09:52:37 +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=Cd1Ux4djE90dqj6+aK7XqRcHlYlH0tDb31PNNhpsztI=; b=hW6R+IumLeYOQS/Txt3tMg861U BJ6waJVrjcxkXDpY93W0pHDiu9QeIoPUhoy2SWjOSyZ4E6n1wHUEB2uPdoYdvDn+OHV+4QqliRQ+b LZ2pgq0mwrexvVxV7o0zOvNSfRIBVxdPmdon03bemUi/OXXOZGzTqjEiKqBIA5YATjSJ/T7tpzRFM D9mz9ai1qm+jp2SEqnyQyQj0eCFpJIPi/N97C+brzC7jHydionanb4gjJYGs8ePJn0YXlWaiSrPVa ZS3ZwZh50kax0eesPAU6e/+qXhB5osB0NyB47E7klRu84gXyyHm9XnSdb5viR4OUzEnVIAiVAol1v jXVQ/NoQ==; Received: from shell.armlinux.org.uk ([fd8f:7570:feb6:1:5054:ff:fe00:4ec]:46096) by pandora.armlinux.org.uk with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1qiXOx-0001dt-33; Tue, 19 Sep 2023 10:52:15 +0100 Received: from linux by shell.armlinux.org.uk with local (Exim 4.94.2) (envelope-from ) id 1qiXOx-0001Os-5l; Tue, 19 Sep 2023 10:52:15 +0100 Date: Tue, 19 Sep 2023 10:52:15 +0100 From: "Russell King (Oracle)" To: Radhey Shyam Pandey Cc: davem@davemloft.net, edumazet@google.com, kuba@kernel.org, pabeni@redhat.com, robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, conor+dt@kernel.org, michal.simek@amd.com, netdev@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, git@amd.com, Sarath Babu Naidu Gaddam Subject: Re: [PATCH net-next v6 2/3] net: axienet: Preparatory changes for dmaengine support Message-ID: References: <1695064615-3164315-1-git-send-email-radhey.shyam.pandey@amd.com> <1695064615-3164315-3-git-send-email-radhey.shyam.pandey@amd.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <1695064615-3164315-3-git-send-email-radhey.shyam.pandey@amd.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230919_025236_381924_AC5BE06D X-CRM114-Status: GOOD ( 18.19 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Tue, Sep 19, 2023 at 12:46:54AM +0530, Radhey Shyam Pandey wrote: > +/** > + * axienet_open - Driver open routine. > + * @ndev: Pointer to net_device structure > + * > + * Return: 0, on success. > + * non-zero error value on failure > + * > + * This is the driver open routine. It calls phylink_start to start the > + * PHY device. > + * It also allocates interrupt service routines, enables the interrupt lines > + * and ISR handling. Axi Ethernet core is reset through Axi DMA core. Buffer > + * descriptors are initialized. > + */ > +static int axienet_open(struct net_device *ndev) > +{ > + int ret; > + struct axienet_local *lp = netdev_priv(ndev); > + > + dev_dbg(&ndev->dev, "%s\n", __func__); > + > + /* When we do an Axi Ethernet reset, it resets the complete core > + * including the MDIO. MDIO must be disabled before resetting. > + * Hold MDIO bus lock to avoid MDIO accesses during the reset. > + */ > + axienet_lock_mii(lp); > + ret = axienet_device_reset(ndev); > + axienet_unlock_mii(lp); > + > + ret = phylink_of_phy_connect(lp->phylink, lp->dev->of_node, 0); > + if (ret) { > + dev_err(lp->dev, "phylink_of_phy_connect() failed: %d\n", ret); > + return ret; > + } > + > + phylink_start(lp->phylink); ... and at this point, the link can come up while phylink_start() is completing. Could that cause a problem if this happens before: > + > + if (!lp->use_dmaengine) { > + ret = axienet_init_legacy_dma(ndev); > + if (ret) > + goto error_code; > + } ? I suppose I should add this statement to the phylink_start() documentation so that this point is clear for everyone. -- RMK's Patch system: https://www.armlinux.org.uk/developer/patches/ FTTP is here! 80Mbps down 10Mbps up. Decent connectivity at last! _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel