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 35CE2C77B6E for ; Wed, 12 Apr 2023 08:07:31 +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:MIME-Version:References:In-Reply-To: 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=bMgIkf7KCYfv9AM70PKVH1DS9X8Y8FpbDiq502JXO5s=; b=hWqcn6g8F6GomO oGyyqSQb2U6+8fz+KxueEKUJYxmioHBIZcxHujTgbJrmIGqw+bD8nxF4tGyX8ZtFM1WjOPmsKh9bU pHoRKQId2flnMqSNObD3b4gjHbKPdE8oMtxGiwzW1L2bS2kTVsXhGG6nyDQ4CQeHu8GfmLtq4MXzi ELNkiUQ8FLXgDtLJyuuKNw7oW6rq5GgJletXq9a5TSFqpoRFeu0x4v/NpT3Kl2vH9YG4OVVqAeacW sNFG2/b53BKIX+YXIQYS0AxRDf9OkAgiDB84Etz+UgGoLANcpgQopKbm7/BC8IHgAMz/f8Fls/WKZ bV181J9FklwHDrZbUENA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1pmVV4-002C9g-2C; Wed, 12 Apr 2023 08:06:42 +0000 Received: from relay9-d.mail.gandi.net ([2001:4b98:dc4:8::229]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1pmVV0-002C6k-0p for linux-arm-kernel@lists.infradead.org; Wed, 12 Apr 2023 08:06:40 +0000 Received: (Authenticated sender: maxime.chevallier@bootlin.com) by mail.gandi.net (Postfix) with ESMTPSA id F28BBFF812; Wed, 12 Apr 2023 08:06:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1681286793; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=6sMvKzPXUQPaUNOAoXoB+ksyWApeu4V++9ieBbSNplg=; b=AIVwknBRq8FtcBddorKYDhaPsak6w1IVgxAE9xHvkAPQVErV8RYUDd6KxSE5Er7tT0vBOu Dr/zOZLwchd2skzKssKhhMzHtlpL5oBblK2V12mCHU6oe9I1HtLDHGB4/vBMJcOfGauOna /7B10RZPn3M+Nv+lOMkBQenM38zYKP5VBOJbbXyfvi5jYNYCDg8fX026aIiocQYbGAn6AX W+pGpnyr7cl1G6D2ikFwuDuOKEEbDerKgYAsUJma5XImsB7RJSV06/wDsp9Te9xu7VxRnf PwnvgufuGi3mvEukHNtihQcLj7fNZdeUqMZFl3gCWlhgmzNt+LDl5THknAdB0A== Date: Wed, 12 Apr 2023 10:06:27 +0200 From: Maxime Chevallier To: "Russell King (Oracle)" Cc: davem@davemloft.net, Sit Michael Wei Hong , Giuseppe Cavallaro , Alexandre Torgue , Jose Abreu , Maxime Coquelin , "linux-stm32 @ st-md-mailman . stormreply . com" , "alexis . lothore @ bootlin . com" , netdev@vger.kernel.org, linux-kernel@vger.kernel.org, thomas.petazzoni@bootlin.com, Andrew Lunn , Jakub Kicinski , Eric Dumazet , Paolo Abeni , Florian Fainelli , Heiner Kallweit , linux-arm-kernel@lists.infradead.org Subject: Re: [PATCH net] net: phylink: check for SFP bus presence in phylink_expects_phy Message-ID: <20230412100627.1daab691@pc-288.home> In-Reply-To: References: <20230412074850.41260-1-maxime.chevallier@bootlin.com> Organization: Bootlin X-Mailer: Claws Mail 4.1.1 (GTK 3.24.37; x86_64-redhat-linux-gnu) MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230412_010638_593312_6D662BF2 X-CRM114-Status: GOOD ( 15.84 ) 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 Hello Russell, On Wed, 12 Apr 2023 08:51:21 +0100 "Russell King (Oracle)" wrote: > On Wed, Apr 12, 2023 at 09:48:50AM +0200, Maxime Chevallier wrote: > > When an SFP bus is present, we don't expect a PHY to be attached > > directly from the MAC driver, it will be handled by phylink at SFP > > attach time. > > If we have a SFP, then phylink should be configured for in-band mode. > Maybe fix the firmware description instead? > The DT used on that platform has the following configuration : [...] &gmac1 { status = "okay"; phy-mode = "sgmii"; managed = "in-band-status"; sfp = <&sfp>; [...] } Here phylink_expects_phy() returns true because although we use in-band management, the link mode is set to sgmii, and phylink_expects_phy() checks if we are in in-band mode AND 802.3z. As we have an SFP and the link mode will be changed according to the module we plug-in, there should be no problem switching phy-mode to "1000BaseX", so I'm perfectly fine with this solution. However, is it semantically correct to use sgmii here ? If so, it may be a bit counter-intuitive to have to set the mode to 1000BaseX just so that the phylink_expects_phy() check passes ? Thanks for the quick reply, Maxime _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel