Received: by 2002:a05:7412:5112:b0:fa:6e18:a558 with SMTP id fm18csp104880rdb; Mon, 22 Jan 2024 13:30:36 -0800 (PST) X-Google-Smtp-Source: AGHT+IEw79ZPz5ALYtyJawsr7ftZyLaeMqArVdaTSHxf3vvGI7AyNRXaFseKXtInZfz2p0DtaSFY X-Received: by 2002:a05:6a21:329e:b0:199:dd1e:555a with SMTP id yt30-20020a056a21329e00b00199dd1e555amr6629914pzb.11.1705959036729; Mon, 22 Jan 2024 13:30:36 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1705959036; cv=pass; d=google.com; s=arc-20160816; b=qMb9so8KvynXya05jljwFT09zqeuWo1bUqxqbtyQX1wA4XQYtAo+Ula49Sb+Fbpk6F ZhDZoDb3+iwH4RMvrShIYc6mJoITlhLTjP7bUshmREbVrGc0atZsBN2bmYfr2HjhxQwL ulXprhI2/4hzeIe+1TwEkbmmhQaWU5n2fjI7EwNKkgL02bycID3MNBMjxf+xty8w5xC9 6kaV4PhlHzMNXwgA9lRVdMy32631hF2H4zq+/0tiGKhCgK5rTELcEohDN7E/We4936Kk YhEF4p2X+MV0ku9CPwdQ7mDXdsXL9DKZgy0t4PU7aVaAEh6QplAmOFVoVoC5xv2obURI Hu9A== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=ABA/+6oxHumH7163VNUvqNT1eTr+ehROcpiaVQm4GRM=; fh=TOl4FxWt5pBlu4XkSm4mUQyI/JKDmSoC512X9CiXBA8=; b=YGMALj5GjHbENDHSpyzylcBa2M+XJIdN96CzOZBjDUXO3Nzw0wGgjkTn8zGZQza0yN RP31oRf2H7hHi+n4nVv+7Fw5l4lECR8RRupI/R3Ab7oeBEg1RP4PAky84N1BtfmZ/RGj kyCSC8kjkKxAkRRT/1iuys37pxmg130Xchz7oqpmNhtMN5PwFb4wAwyGC4lASiTgIvpb OFNZv8x+Y/JT4GwkT4l1PYgswJTXi/dDDYvKqq36K2z95z19h6XDCPvlR1J08DRhvEkx MZw6wtztMByYPHq/B8208/f6j5erbxj8okm5yau7l03EwUcQo9uLQpibiOe7t2aVhU4o +T0g== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=ajPUvRGF; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com dmarc=pass fromdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-34183-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-34183-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id o15-20020a634e4f000000b005d2520bdefbsi166768pgl.208.2024.01.22.13.30.36 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 22 Jan 2024 13:30:36 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-34183-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=ajPUvRGF; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com dmarc=pass fromdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-34183-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-34183-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id 54DDC28838E for ; Mon, 22 Jan 2024 21:30:36 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 05E4D48CC6; Mon, 22 Jan 2024 21:29:40 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="ajPUvRGF" Received: from mail-ej1-f54.google.com (mail-ej1-f54.google.com [209.85.218.54]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id A8B2E482ED; Mon, 22 Jan 2024 21:29:37 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.218.54 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1705958979; cv=none; b=N735qamUdcGFotAflY9dHzkCIo/+8ToYTg9Tu6bdyBuwNKfkC3vOPFESpUJNBVs9uDeoAQQQIKvLTmPwaaOam/ZTLMbkAGAZGcImKiCWhW/+20DvpWaWAnrNy5pn61j+YnQVVyrEQnVbM9lEEFwu+PWU4tcg2UC7WWaEv2yF8xo= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1705958979; c=relaxed/simple; bh=Xlt6sMMKAUm7IbZRBGhxEDcRLpN3TDT3XNkJuoLuK4w=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=HKdDbPcBaGvLrwpgetFS17Tpiv5WDTb8g7hba98NXyHUCKLBqRnapPxHPXxrbxSuKlpf9gggSK9Ghf4TFYVmN3AwWF2BPD4nSRzjbrPTuYgZ/JDcKRUlBLZtLCCsZ47Fz4QyoLL7RVLfhQ+uNICEHTjjaOgG9KkimN/4P4wzLz8= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=ajPUvRGF; arc=none smtp.client-ip=209.85.218.54 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-ej1-f54.google.com with SMTP id a640c23a62f3a-a28f66dc7ffso806602066b.0; Mon, 22 Jan 2024 13:29:37 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1705958976; x=1706563776; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=ABA/+6oxHumH7163VNUvqNT1eTr+ehROcpiaVQm4GRM=; b=ajPUvRGF5ssv6lRWYhlfo41cptvxfBEnyzUnhIS7cZJEDj16sn03lxLF0CT2KT/kQo 3DecZ3Fu6GT6+xtp5k9k+YX+knRCc1OPJqSkKgK4E+B3+J6jRSbEg5E/5bFMQF58mtxO aSbonJmdlgyphofX6ZcF7H4TwkX2CB14C7xuDlsOXofsyYNz2STLnknG/nCzpAuATNm2 zeHN0tC5CZXokNOzqDWWHgkZ1VuwsnjSaoyDpjhYEvskerLfNWk7wLkQJrSHe2ihdiXi eeWTi3o/ZNINiW6MBO8smYx1FV++cZgT056gf5hVapxh8HLia0qti0DgD6EQkCpPKDbO OG6g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1705958976; x=1706563776; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=ABA/+6oxHumH7163VNUvqNT1eTr+ehROcpiaVQm4GRM=; b=GJFpEB5pMSEx55yoqsZc+GXER4yDkGEJTrH/a+NmRWGCAE40gw5EMduX+T8VJI+LhC Ncial9yc7MMpNU9LIeEWQOrBN8AUx5ORSrgcSQiek+30cju80c9LEJjeXsYsiZr2xF8W z0ag0moLb7DPv41LvnsyMfJX1lY1pDjSQIcP11QUx/dFNOJYHMg2YMSjZHCMABVne33T SohvJYs2K/7Mdyxxz3u3/6CAU/y1YOps/QulYiqxD/+8yeMaEaEnj4b2RcvXi52TPT4o 4C4jK0IKUMJ8f9enr5Td7PohEXfRe9LOWeYbT+jMyV8Qczrxdt5d/eqhp6itnzm+NoSO 3DYA== X-Gm-Message-State: AOJu0YxeVbKSqYYfS00wvlDgSpZehmB7t2squxceluyOgvx6NOnixf0Q Ffn2FAXag1AgdD1G3oKHW15kXLq6bde5WKi7nN5eK8vGHUYZ9wFX X-Received: by 2002:a17:906:bc45:b0:a28:9546:f92a with SMTP id s5-20020a170906bc4500b00a289546f92amr5044730ejv.67.1705958975603; Mon, 22 Jan 2024 13:29:35 -0800 (PST) Received: from debian.fritz.box ([93.184.186.109]) by smtp.gmail.com with ESMTPSA id j25-20020a1709066dd900b00a26af4d96c6sm13823336ejt.4.2024.01.22.13.29.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 22 Jan 2024 13:29:35 -0800 (PST) From: Dimitri Fedrau To: Cc: Dimitri Fedrau , Andrew Lunn , Heiner Kallweit , Russell King , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Stefan Eichenberger , netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v5 net-next 02/13] net: phy: Support 100/1000BT1 linkmode advertisements Date: Mon, 22 Jan 2024 22:28:35 +0100 Message-Id: <20240122212848.3645785-3-dima.fedrau@gmail.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240122212848.3645785-1-dima.fedrau@gmail.com> References: <20240122212848.3645785-1-dima.fedrau@gmail.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Extend helper functions mii_t1_adv_m_mod_linkmode_t and linkmode_adv_to_mii_t1_adv_m_t to support 100BT1 and 1000BT1 linkmode advertisements. Reviewed-by: Andrew Lunn Signed-off-by: Dimitri Fedrau --- include/linux/mdio.h | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/include/linux/mdio.h b/include/linux/mdio.h index 79ceee3c8673..ecd21acc7eed 100644 --- a/include/linux/mdio.h +++ b/include/linux/mdio.h @@ -373,6 +373,10 @@ static inline void mii_t1_adv_m_mod_linkmode_t(unsigned long *advertising, u32 l { linkmode_mod_bit(ETHTOOL_LINK_MODE_10baseT1L_Full_BIT, advertising, lpa & MDIO_AN_T1_ADV_M_B10L); + linkmode_mod_bit(ETHTOOL_LINK_MODE_100baseT1_Full_BIT, + advertising, lpa & MDIO_AN_T1_ADV_M_100BT1); + linkmode_mod_bit(ETHTOOL_LINK_MODE_1000baseT1_Full_BIT, + advertising, lpa & MDIO_AN_T1_ADV_M_1000BT1); } /** @@ -409,6 +413,10 @@ static inline u32 linkmode_adv_to_mii_t1_adv_m_t(unsigned long *advertising) if (linkmode_test_bit(ETHTOOL_LINK_MODE_10baseT1L_Full_BIT, advertising)) result |= MDIO_AN_T1_ADV_M_B10L; + if (linkmode_test_bit(ETHTOOL_LINK_MODE_100baseT1_Full_BIT, advertising)) + result |= MDIO_AN_T1_ADV_M_100BT1; + if (linkmode_test_bit(ETHTOOL_LINK_MODE_1000baseT1_Full_BIT, advertising)) + result |= MDIO_AN_T1_ADV_M_1000BT1; return result; } -- 2.39.2