From patchwork Mon Dec 18 22:18:13 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dimitri Fedrau X-Patchwork-Id: 13497645 X-Patchwork-Delegate: kuba@kernel.org Received: from mail-wr1-f41.google.com (mail-wr1-f41.google.com [209.85.221.41]) (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 DE3E67349B; Mon, 18 Dec 2023 22:18:28 +0000 (UTC) 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 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="BNneC3eW" Received: by mail-wr1-f41.google.com with SMTP id ffacd0b85a97d-3366827ca79so1455660f8f.3; Mon, 18 Dec 2023 14:18:28 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1702937907; x=1703542707; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=jjNyfg9b/oa8PqsdonOr0+sP3WwEoMGtYWMIoH9NCVc=; b=BNneC3eW6UBY562oVFewtjyhpmr2IWfmOthN9vjd7AXHAahU+1G4X3IhLyMYwWz79S /GVIftYP941VP/vdrAmEZPX7rHENnuCj8mAoo0QywiFAlwrl8TI9edpr3dGSb0x7PMBN XcCeiPgUUortxEvNWlpWWNYE5/vAev12fs2MDRyf1MLfnmeS3BFBohPWx9oUTFxyAJCL 9brVCg9PN8INIcykf1M38W860txmFAWc9biWVtgA4E/BM0WIkMC5zx1X3fnB2nuKiSEy e9oKq6ms7ZQ4Zs/a26EH3mxv7kbY7qXferQ96CsSjUNdOcnMlmShGo2BR/g8raXFGlbu vfNQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1702937907; x=1703542707; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=jjNyfg9b/oa8PqsdonOr0+sP3WwEoMGtYWMIoH9NCVc=; b=cFOiu1hoOAcBl3IXXt0LnNJBJURU1ukIXnqfdQWZQKJ8tzJZFacd03xCBDa2IsMYi6 tyjvo6eW62cLGd61i/aHOMu6uBqAvcKpooo+uqvsTzIJwyUQKK2vEdiThQkuRPMQESp5 DdMS2CNJm9PBFeg/k9qr44LqrlGDncmpqCv13OmROVazo1de8iUBu0Rq9Vke7LfKNfAM a23cKdxR+DcxTAeRDphbkroBd5AI1sqT/JuoqU6yH3V57ST/ccPK8QkgETxJBwzlJlRc wYu+FUCkbkiR0/8gwzv5r4B2ITGnZVKCXBybw+5OSpiP5oahhTPuTt94yJw+QE82dNgm HEpw== X-Gm-Message-State: AOJu0YzUbzT5q99bGEF7TbXMJtHF0saz3/ZQ633yvt5WEZqx1mkPjY6Z aiyTBGicSdf4D4VLCprRiaffx7gg2k485A== X-Google-Smtp-Source: AGHT+IFsUhbL8W2P30+8ZvSZ/j1GVHR/pb7H/a1FC3KUBjSjHyS90PQEOa4Hj5Su4f45NVM5mvf6mg== X-Received: by 2002:a05:600c:5486:b0:40c:6e0b:69e4 with SMTP id iv6-20020a05600c548600b0040c6e0b69e4mr3326830wmb.18.1702937907181; Mon, 18 Dec 2023 14:18:27 -0800 (PST) Received: from debian.fritz.box ([93.184.186.109]) by smtp.gmail.com with ESMTPSA id d9-20020a05600c34c900b0040c2c5f5844sm86928wmq.21.2023.12.18.14.18.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 18 Dec 2023 14:18:26 -0800 (PST) From: Dimitri Fedrau To: Cc: Dimitri Fedrau , Andrew Lunn , Heiner Kallweit , Russell King , netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 1/2] net: phy: Add BaseT1 auto-negotiation constants Date: Mon, 18 Dec 2023 23:18:13 +0100 Message-Id: <20231218221814.69304-1-dima.fedrau@gmail.com> X-Mailer: git-send-email 2.39.2 Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Added constants for advertising 100BT1 and 1000BT1 in register BASE-T1 auto-negotiation advertisement register [31:16] (Register 7.515) Signed-off-by: Dimitri Fedrau --- include/uapi/linux/mdio.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/include/uapi/linux/mdio.h b/include/uapi/linux/mdio.h index d03863da180e..020ccc810d23 100644 --- a/include/uapi/linux/mdio.h +++ b/include/uapi/linux/mdio.h @@ -348,6 +348,8 @@ /* BASE-T1 auto-negotiation advertisement register [31:16] */ #define MDIO_AN_T1_ADV_M_B10L 0x4000 /* device is compatible with 10BASE-T1L */ +#define MDIO_AN_T1_ADV_M_1000BT1 0x0080 /* advertise 1000BASE-T1 */ +#define MDIO_AN_T1_ADV_M_100BT1 0x0020 /* advertise 100BASE-T1 */ #define MDIO_AN_T1_ADV_M_MST 0x0010 /* advertise master preference */ /* BASE-T1 auto-negotiation advertisement register [47:32] */ From patchwork Mon Dec 18 22:18:14 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dimitri Fedrau X-Patchwork-Id: 13497646 X-Patchwork-Delegate: kuba@kernel.org Received: from mail-wm1-f51.google.com (mail-wm1-f51.google.com [209.85.128.51]) (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 2868D71470; Mon, 18 Dec 2023 22:18:37 +0000 (UTC) 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 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="dKlR7InW" Received: by mail-wm1-f51.google.com with SMTP id 5b1f17b1804b1-40c38de1ee4so38107955e9.0; Mon, 18 Dec 2023 14:18:37 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1702937916; x=1703542716; 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=vKxmXgd84F0l1C3rdxwz9qBQGX032HUOjc/IMT1HuYc=; b=dKlR7InW5uhDWc5mu4uccAZ0T6mRDNZk3FSz3nynJwf+ex9bA23u2KJRFjEbyjSwmq ljZGbiUhnhBnByQ3pUMyokpOAExUxXWjhGw7BQ7Hbm4PE0LjuKZFE6BngHTx303GkqXf nrWmJdBsxbalxpZ/MEqTA2fBNj1XeeV97n3hc+o0B0FiXj91qpTT1sMjrx14GGdfOpk9 +4xK1d40Kc8fPPGJit8jQC9Zw+nWCQijSrh2SmOuRsmLNISarCbSvVB9O3kLO/M2nEqA 8IKXEpb57U+KlXxMcys/eBGMoVkKAllSR26aVjHijITanZx3rMmUo36Kot4E5xqODtMg 4aUQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1702937916; x=1703542716; 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=vKxmXgd84F0l1C3rdxwz9qBQGX032HUOjc/IMT1HuYc=; b=wSzGfafRF/0yqlv6X7b7PoqA8dUxIuHkrld6+CDwA6+MTRhWjsvtK+H+kDJ4k18wNn Hf/KpIuH3tgxz78Lzw7Fp295ObeiTPPtZQxv5IQfnPSiz7LPB/7mbUgE1yO0bLthRZ2b 3CDoLp45CDBUf9rC4rBLQEv4kZ+/vvdPAOziDpYMu2RLi8I3n0XXEefR1UHd2uKzqLNU mOuegFSDRw91i8fNDdFD6Z/nomg1QnO4Dnu0JQQOU8VzCbWs+Fdy4rAqumUj6fRFhec6 XOASYHhEd7Zc6f/f0nJR6uTObFkdB7ofvXcLmBhYnqyDp2+PszadmBqI7i2c/wrMUZqW kUcg== X-Gm-Message-State: AOJu0Ywkfrhg6eT/ci3LwSpg+DbWlD7FTAGDMuBBTkT9g8l4cWiAJK+k 0Qf+djxiurezi2M2R4BX/Rw= X-Google-Smtp-Source: AGHT+IF+FFQWtym9rQ6akSd1UL7fu/Rk5wBZt6VirWA5sxLt+y2oSTB8TSc1AFT2bEKk8wTHNcojZw== X-Received: by 2002:a05:600c:3790:b0:40b:5e21:ec3c with SMTP id o16-20020a05600c379000b0040b5e21ec3cmr8387726wmr.110.1702937916252; Mon, 18 Dec 2023 14:18:36 -0800 (PST) Received: from debian.fritz.box ([93.184.186.109]) by smtp.gmail.com with ESMTPSA id d9-20020a05600c34c900b0040c2c5f5844sm86928wmq.21.2023.12.18.14.18.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 18 Dec 2023 14:18:35 -0800 (PST) From: Dimitri Fedrau To: Cc: Dimitri Fedrau , Andrew Lunn , Heiner Kallweit , Russell King , netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 2/2] net: phy: Support 100BT1 and 1000BT1 linkmode advertisements Date: Mon, 18 Dec 2023 23:18:14 +0100 Message-Id: <20231218221814.69304-2-dima.fedrau@gmail.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20231218221814.69304-1-dima.fedrau@gmail.com> References: <20231218221814.69304-1-dima.fedrau@gmail.com> Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Extend helper function linkmode_adv_to_mii_t1_adv_m_t to support 100BT1 and 1000BT1 linkmode advertisements. Signed-off-by: Dimitri Fedrau --- include/linux/mdio.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/include/linux/mdio.h b/include/linux/mdio.h index 007fd9c3e4b6..322c7a5092e4 100644 --- a/include/linux/mdio.h +++ b/include/linux/mdio.h @@ -408,6 +408,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; }