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 C00E7C7EE2C for ; Tue, 30 May 2023 12:50:17 +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=gSWq22fcz3yeiKr2ajotznB1AM4RHJGsIfGkJ0jc9is=; b=COMLEky5jscJWA g0DbWsZC96fDsDzW4GTTXExKgfWCGo9ZJ+ohYpfUIUYLq2XT1ZZAWDttz2AFSznvxAlswhzms2nfR T7vBq7IFBGeRnfmnHVa/4OLkzkfmv0uKdwYhDTbzYnwQikIEGk5VL0ZTL0YSGR9FSLXPGpgcihTgn feGYK7CcsKvKlQq9OMag/f+RoYnhNiM6oRlmfZoSq+i1PCNeoNbMYs+gyxZcOxbqKtcnuLpDVA5Kl Zl2xQyVkZ+Tl1nlrqa4bXWQpKB/j1hNCELBUkzDYsuCcbyWAIi/D3NGeo2KhX6l7EcNhssIBHpYyg iXR+10IGqxYmdX+ErKnQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1q3ynU-00DvhX-2z; Tue, 30 May 2023 12:49:56 +0000 Received: from esa.microchip.iphmx.com ([68.232.153.233]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1q3ynS-00DvdF-09 for linux-arm-kernel@lists.infradead.org; Tue, 30 May 2023 12:49:55 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=microchip.com; i=@microchip.com; q=dns/txt; s=mchp; t=1685450993; x=1716986993; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=LRq38u3QQgU2FIbQKrkSVOikV0xBGgLon/1g05hOxKY=; b=nM+SRKUkkkqwp0AmlDauBQnlFdQzXp+R0tQ5x8TJbBeY2GOJyaHqZB42 7nZL671bSp9XITXvH9Y6JzOr/rSMZOPAnNZqAY59ZwSxaUiG1bGt0lQG8 t10eayi9t5pjyppzitz0lt83FPLytwupNVuwl11C13uqCz2rrHEOnHi8i 6X5ZtL+uDqjAIRbouo6bVXB/diKSeNHSsQLzOs2WH9cQLHleiglDpdVkt B1j7oX6M3vD2/XB06sl7f12ejLG7oE61mS7ZEyY/KzzLgQyY2q6StPWDV 26Pj0WsAjYMeSGmfaarkTg/hWfiPtueqiy3BrKkUYwlFTD5e7AJBXI663 g==; X-IronPort-AV: E=Sophos;i="6.00,204,1681196400"; d="scan'208";a="215434789" X-Amp-Result: SKIPPED(no attachment in message) Received: from unknown (HELO email.microchip.com) ([170.129.1.10]) by esa3.microchip.iphmx.com with ESMTP/TLS/AES256-SHA256; 30 May 2023 05:49:44 -0700 Received: from chn-vm-ex03.mchp-main.com (10.10.85.151) by chn-vm-ex01.mchp-main.com (10.10.85.143) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.21; Tue, 30 May 2023 05:49:44 -0700 Received: from DEN-LT-70577 (10.10.115.15) by chn-vm-ex03.mchp-main.com (10.10.85.151) with Microsoft SMTP Server id 15.1.2507.21 via Frontend Transport; Tue, 30 May 2023 05:49:40 -0700 Date: Tue, 30 May 2023 12:49:39 +0000 From: Daniel Machon To: "Russell King (Oracle)" CC: Andrew Lunn , Heiner Kallweit , "David S. Miller" , Eric Dumazet , Florian Fainelli , Horatiu Vultur , Ioana Ciornei , "Jakub Kicinski" , Lars Povlsen , , Madalin Bucur , Marcin Wojtas , Michal Simek , , Paolo Abeni , Radhey Shyam Pandey , Sean Anderson , Steen Hegelund , Taras Chornyi , Thomas Petazzoni , , Vladimir Oltean Subject: Re: [PATCH RFC net-next 9/9] net: sparx5: switch PCS driver to use phylink_pcs_neg_mode() Message-ID: References: MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230530_054954_324798_8C3CF5BA X-CRM114-Status: GOOD ( 17.24 ) 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 > Use the newly introduced phylink_pcs_neg_mode() to configure whether > inband-AN should be used. > > Signed-off-by: Russell King (Oracle) > --- > drivers/net/ethernet/microchip/sparx5/sparx5_phylink.c | 8 ++++++-- > 1 file changed, 6 insertions(+), 2 deletions(-) > > diff --git a/drivers/net/ethernet/microchip/sparx5/sparx5_phylink.c b/drivers/net/ethernet/microchip/sparx5/sparx5_phylink.c > index bb97d27a1da4..87bdec185383 100644 > --- a/drivers/net/ethernet/microchip/sparx5/sparx5_phylink.c > +++ b/drivers/net/ethernet/microchip/sparx5/sparx5_phylink.c > @@ -99,13 +99,17 @@ static int sparx5_pcs_config(struct phylink_pcs *pcs, > { > struct sparx5_port *port = sparx5_pcs_to_port(pcs); > struct sparx5_port_config conf; > + unsigned int neg_mode; > int ret = 0; > > + neg_mode = phylink_pcs_neg_mode(mode, interface, advertising); > + > conf = port->conf; > conf.power_down = false; > conf.portmode = interface; > - conf.inband = phylink_autoneg_inband(mode); > - conf.autoneg = phylink_test(advertising, Autoneg); > + conf.inband = neg_mode == PHYLINK_PCS_NEG_INBAND_DISABLED || > + neg_mode == PHYLINK_PCS_NEG_INBAND_ENABLED; > + conf.autoneg = neg_mode == PHYLINK_PCS_NEG_INBAND_ENABLED; > conf.pause_adv = 0; > if (phylink_test(advertising, Pause)) > conf.pause_adv |= ADVERTISE_1000XPAUSE; > -- > 2.30.2 > > Hi Russel, This looks good to me. Tested on sparx5 pcb134 and pcb135. /Daniel _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel