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 061F3C05027 for ; Wed, 8 Feb 2023 13:28:45 +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=e2TNfnshxBF7y/lBdcF1PxcKJ2vwy0nd8tm4D6sKM/4=; b=ou+FoGxdpZczyS +lTPSksSmXQhtquUhertGS0dU/3N2VQxAyw0dVGuHChUilzhV6jaeSUJexEXkZtmj2HlWvTtPuqIB ka4yyd11Sgx/G99BewgJvM5y+gnvD2AyNwfpyTDaDJIo+DjyJlKOpM/uVZrwDrXET2BtO/T5eGpI7 yFgp72pfg4egAlgDDNMcB6EQy4iO+DLJHJNcy1c8lDsQAUChJLOhEcvVWRswLS2OSibXsQZhj3Q5h LiBZG5S7BNjLPKvZUDe6IEa4tKS/5YyYDTrGyI91ZfW12dSHMIA/7WOoAwdkrAPHU369ivQMdnWCo iywfLmXZFmJgOH2vPQ2Q==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1pPkUC-00Fjt8-39; Wed, 08 Feb 2023 13:27:44 +0000 Received: from vps0.lunn.ch ([156.67.10.101]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1pPkU8-00Fjry-EB for linux-arm-kernel@lists.infradead.org; Wed, 08 Feb 2023 13:27:41 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lunn.ch; s=20171124; h=In-Reply-To:Content-Disposition:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:From:Sender:Reply-To:Subject: Date:Message-ID:To:Cc:MIME-Version:Content-Type:Content-Transfer-Encoding: Content-ID:Content-Description:Content-Disposition:In-Reply-To:References; bh=b+UE50I3cqS7Z7xe3M4khVDXZklYfj2TnH0XnO2ACAk=; b=DEDweJWY7X9s3HuPEk2ZtV/x+F JFS87RzT4Ra2WDBwsMsa5PGSjXHcjIuDyfz5PkcDxGUpRhSw7uGUkbfivVqS76GpD+UGk5aRoicgu 0G5zV2woZAsKWj0sVFtP6mExGUbJuhYFJ5Bw0Qo5gzO2wtRilI0EK2gFQxhvyRzLcCTc=; Received: from andrew by vps0.lunn.ch with local (Exim 4.94.2) (envelope-from ) id 1pPkTb-004P9J-Vl; Wed, 08 Feb 2023 14:27:07 +0100 Date: Wed, 8 Feb 2023 14:27:07 +0100 From: Andrew Lunn To: Guan Wentao Cc: peppe.cavallaro@st.com, alexandre.torgue@foss.st.com, joabreu@synopsys.com, davem@davemloft.net, edumazet@google.com, kuba@kernel.org, pabeni@redhat.com, mcoquelin.stm32@gmail.com, netdev@vger.kernel.org, linux-stm32@st-md-mailman.stormreply.com, linux-arm-kernel@lists.infradead.org Subject: Re: [PATCH] net: stmmac: get phydev->interface from mac for mdio phy init Message-ID: References: <20230208112054.22965-1-guanwentao@uniontech.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20230208112054.22965-1-guanwentao@uniontech.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230208_052740_495136_B29CD2FD X-CRM114-Status: GOOD ( 11.83 ) 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 Wed, Feb 08, 2023 at 07:20:54PM +0800, Guan Wentao wrote: > The phy->interface from mdiobus_get_phy is default from phy_device_create. > In some phy devices like at803x, we need the correct value to init delay. > Use priv->plat->interface to init if we know. You commit message i missing a lot of details to make this easy to review. So you board is not using DT? And so there is not a DT node specifying the phy-mode. You have some other way of getting the correct interface mode into plat->interface. And since you don't have DT, you also have some other mechanism to set plat->phy_addr to the address on the MDIO bus. The code then directly gets the PHY from the MDIO bus, and calls phylink_connect_phy() to connect the PHY. The old code used phy_connect() which took an interface parameter but phylink_connect_phy() does not. And that is your problem. So your fix makes sense. Please improve the commit message. Please also take a look at https://www.kernel.org/doc/html/latest/process/maintainer-netdev.html You should set the email Subject: line to indicate which tree this patch is for. Andrew _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel