From patchwork Fri Jun 10 03:36:04 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ong Boon Leong X-Patchwork-Id: 12876373 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 1C221C433EF for ; Fri, 10 Jun 2022 03:43:08 +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:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=Hmxvi9sE5AlP4y3EM+PN8L7svqdJGHxjtDwDZ5Mram8=; b=dfUiJQtaKBuakU KdDrSrFxPIIUgO2vzgIdtCTuSnTcLJ63U6umSqBhWABWVfHNL5sNdqf2X3TLPniJnBdhpQVgayzbM WEicJ7S3BvxwkJ32KGHxXpHkycbET7OfQ8k2X9Hpds6V9lf9MTxR4RbVLdKMO4jN/u0WgeP11/D5J sbkB7bk/kk97UznX7qhB3IgNz6GzVytEXDyfFePgWvrlTKG8o0LL9uZN54Ge2Xm4RqTtWUDcdAR9L XCSPCtKBKy8E6eJgtJ5cJe0b/iraeaa8IKVa1eqTGaKGR+SEy7UmN/ylqsRaz7tHAk1era1GvGCTr FrhBTeWQ68Mgm88s9JOQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nzVWE-005U5u-OO; Fri, 10 Jun 2022 03:41:07 +0000 Received: from mga09.intel.com ([134.134.136.24]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nzVVu-005Tx5-2H for linux-arm-kernel@lists.infradead.org; Fri, 10 Jun 2022 03:40:47 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1654832446; x=1686368446; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=vVaY3s3lE4ItFC0xHICKpZseE6UtFUDVvXsybibK+8A=; b=DvsPRWESYwdB2PmXoxu1NF91Cf1z7zQR8JWjXk2VlqaWLvFn/W1KxL0t NWIxGamoTbLryL3E3D0x3UjodbU4vW93U4yPWuo5baVFEqJlDhwg6DXFw Dlymk5Kd3ZZhE7bjkJWJFF40pFHjpYrsX3XBX9mw0VwKvT8+3A4E1vbRM VWvR8J1r1GJPqcE8JJ4byOWUd8SP91SYgQklG6qXMU2xEsPAhdfcjbDkZ L7vxZBfykohJj1qhktinlNj0RnNtJ1eeQgYBPzIJFxF1WIuFljgfplsnE NyAgBk3BKzbrHIg2Lwj9CiDDP2b+gMAxH+lAVuqPa3naWrnJ467ytsv17 A==; X-IronPort-AV: E=McAfee;i="6400,9594,10373"; a="278305226" X-IronPort-AV: E=Sophos;i="5.91,288,1647327600"; d="scan'208";a="278305226" Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by orsmga102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 09 Jun 2022 20:40:45 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.91,288,1647327600"; d="scan'208";a="827993932" Received: from p12hl98bong5.png.intel.com ([10.158.65.178]) by fmsmga006.fm.intel.com with ESMTP; 09 Jun 2022 20:40:41 -0700 From: Ong Boon Leong To: Alexandre Torgue , Jose Abreu , Andrew Lunn , Heiner Kallweit , Russell King , Paolo Abeni , "David S . Miller" , Eric Dumazet , Jakub Kicinski , Vladimir Oltean , Vivien Didelot , Florian Fainelli , Maxime Coquelin , Giuseppe Cavallaro Cc: netdev@vger.kernel.org, linux-stm32@st-md-mailman.stormreply.com, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Emilio Riva , Ong Boon Leong Subject: [PATCH net-next v3 1/7] net: pcs: xpcs: prepare xpcs_do_config to accept advertising input Date: Fri, 10 Jun 2022 11:36:04 +0800 Message-Id: <20220610033610.114084-2-boon.leong.ong@intel.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220610033610.114084-1-boon.leong.ong@intel.com> References: <20220610033610.114084-1-boon.leong.ong@intel.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220609_204046_195852_0964AD33 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: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org xpcs_config() has 'advertising' input that is required for C37 1000BASE-X AN in later patch series. So, we prepare xpcs_do_config() for it. Signed-off-by: Ong Boon Leong --- drivers/net/pcs/pcs-xpcs.c | 6 +++--- include/linux/pcs/pcs-xpcs.h | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/net/pcs/pcs-xpcs.c b/drivers/net/pcs/pcs-xpcs.c index 4cfd05c15ae..48d81c40aab 100644 --- a/drivers/net/pcs/pcs-xpcs.c +++ b/drivers/net/pcs/pcs-xpcs.c @@ -795,7 +795,7 @@ static int xpcs_config_2500basex(struct dw_xpcs *xpcs) } int xpcs_do_config(struct dw_xpcs *xpcs, phy_interface_t interface, - unsigned int mode) + unsigned int mode, const unsigned long *advertising) { const struct xpcs_compat *compat; int ret; @@ -843,7 +843,7 @@ static int xpcs_config(struct phylink_pcs *pcs, unsigned int mode, { struct dw_xpcs *xpcs = phylink_pcs_to_xpcs(pcs); - return xpcs_do_config(xpcs, interface, mode); + return xpcs_do_config(xpcs, interface, mode, advertising); } static int xpcs_get_state_c73(struct dw_xpcs *xpcs, @@ -864,7 +864,7 @@ static int xpcs_get_state_c73(struct dw_xpcs *xpcs, state->link = 0; - return xpcs_do_config(xpcs, state->interface, MLO_AN_INBAND); + return xpcs_do_config(xpcs, state->interface, MLO_AN_INBAND, NULL); } if (state->an_enabled && xpcs_aneg_done_c73(xpcs, state, compat)) { diff --git a/include/linux/pcs/pcs-xpcs.h b/include/linux/pcs/pcs-xpcs.h index 266eb26fb02..37eb97cc228 100644 --- a/include/linux/pcs/pcs-xpcs.h +++ b/include/linux/pcs/pcs-xpcs.h @@ -30,7 +30,7 @@ int xpcs_get_an_mode(struct dw_xpcs *xpcs, phy_interface_t interface); void xpcs_link_up(struct phylink_pcs *pcs, unsigned int mode, phy_interface_t interface, int speed, int duplex); int xpcs_do_config(struct dw_xpcs *xpcs, phy_interface_t interface, - unsigned int mode); + unsigned int mode, const unsigned long *advertising); void xpcs_get_interfaces(struct dw_xpcs *xpcs, unsigned long *interfaces); int xpcs_config_eee(struct dw_xpcs *xpcs, int mult_fact_100ns, int enable);