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 mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by smtp.lore.kernel.org (Postfix) with ESMTP id 3A3B8E9D800 for ; Sun, 5 Apr 2026 20:07:44 +0000 (UTC) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 5DA9140285; Sun, 5 Apr 2026 22:07:43 +0200 (CEST) Received: from mail-pj1-f50.google.com (mail-pj1-f50.google.com [209.85.216.50]) by mails.dpdk.org (Postfix) with ESMTP id 1168040265 for ; Sun, 5 Apr 2026 22:07:40 +0200 (CEST) Received: by mail-pj1-f50.google.com with SMTP id 98e67ed59e1d1-358e3cc5e7eso1579868a91.0 for ; Sun, 05 Apr 2026 13:07:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20251104.gappssmtp.com; s=20251104; t=1775419659; x=1776024459; darn=dpdk.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:subject:cc:to:from:date:from:to:cc:subject:date :message-id:reply-to; bh=nofEexM1teS6pMvy9455GfoUx7R5GFPG4+9PQLfQfWo=; b=EeoCvpaeivYhyJ+rQTqbrXvSdSMNgoKtXhq6beWpiXe++JUpEL8XIvQFXCmHhbNu1e jG6wytchnsdffxYhc30Qc3gO+vxW2HWfBngwJ8lPR7Qu/QsencLxK7YbEPxPfqer0cZx lNSNp4KVmbTuZP8IxBcfQBIuGgI9B3dqbkQ/FmrfALUb6lW4M1bViE1y7iauWn1szMsi 2O+MUBYjVPB8cxBGb5VNvfUQKC+FV11kwgHXoSRF541u/KfPgGf0T7KWy4gJMH8kO1VJ 6j2/xNd+tWH2wruEYu+cIVezxoY/wyF/ZxSzDTZxmCb+2kVCA4Wuyxj6TKIgymk2vR29 2qYg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1775419659; x=1776024459; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:subject:cc:to:from:date:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=nofEexM1teS6pMvy9455GfoUx7R5GFPG4+9PQLfQfWo=; b=Emwq8Yq5pOrz/NiKN7YD3Sj24WjxKCFGwdpV9MnP55kHJxOuUGcE85wh9eOg17x52o V8Y2L//7LRPKipyJi/VAw+h98cSU4ao2Qk+CjCLOoLT/xS0Sy7XgUznWq/W/8jmc5dxY nMI+d/i0gqllN8LYNNjflXKFDKK5R6W0qX7nMy5pF90wN4NFDI8Jcz0t3v/6mOsCbxEv i50OzoMux7FM1gLqmGeSDe4lJG87nBEcFW6+q443iLDrT8+qnDWUjXubQY9Voozchj9q ix4KgxsH2cZGQg+RqDhr4p+HgkZkCHIstc5B1l4Vyg6dyxr6zpH1IKXVnc9HUlows/L8 4EjQ== X-Gm-Message-State: AOJu0YzuDHoW7xkGUoqnoNL5F1dXcwt+FVFDem2SxyGrjj7a3eUceemJ Qq/mlp0vQJZDyaJ9hCr10sPf9CVo9wB7qs1IRgJw6ej+uWqEBue4282Cho57wman9Ms= X-Gm-Gg: AeBDievMB2uapnb1zyrdYwCos/cUwxlzf24bTzUXSUCXUU/Syxn+75ZvoE+vm+pNKbh Gx4xJ4MAMg3yvGoPOM6xoq4qnkV+IKgNi4qSh2V1My/p/iqjiFlv5U0ZIYtAUu+Ic1lu0BRMnUQ QVr7lc9bkIMlGAoAUqjIMqP7QI9ej6+AODQEXhZkROF9wWLu/5hXDRmI6SSRSmGUikwvwwz8AGW 0gFFx1PlspifAK1xBzyNYk8grHAyjcuumHYJ2nbwcY4O22yZrQzwhtFrqA6K+oX3RsyooYNqFRs EXXM3O3ELHU7s2wBfPbSVOTlAPZzINM/Xz6sOjSCJ7uDdmw+KlHL4qNwHGfnJQPDtb6lqWuKIVv PxuyFMOoT0sYmmQHWYiYfn6SbZ2hlXia6C0+Y6jlWZS4P5nkeqGr1BJDJo5Kd9VG7UyPcxNPh1e TBh785qQ0MZ9rXKaM6v9Pn7Q3VkE8OdxsuIA0= X-Received: by 2002:a17:903:17cb:b0:2b2:5a5a:4f2d with SMTP id d9443c01a7336-2b28176a472mr110716755ad.31.1775419658928; Sun, 05 Apr 2026 13:07:38 -0700 (PDT) Received: from phoenix.local ([104.202.41.210]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-2b27472d5e5sm142213235ad.15.2026.04.05.13.07.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 05 Apr 2026 13:07:38 -0700 (PDT) Date: Sun, 5 Apr 2026 13:07:30 -0700 From: Stephen Hemminger To: Ashok Kumar Natarajan Cc: , Subject: Re: [PATCH v3] net/axgbe: mask unsupported PHY half-duplex modes Message-ID: <20260405125722.5b936678@phoenix.local> In-Reply-To: <20260402065450.1074-1-ashokkumar.natarajan@amd.com> References: <20260401075831.568-1-ashokkumar.natarajan@amd.com> <20260402065450.1074-1-ashokkumar.natarajan@amd.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org On Thu, 2 Apr 2026 12:24:49 +0530 Ashok Kumar Natarajan wrote: > The AXGBE MAC supports only full-duplex operation at all speeds. > However, the PHY auto-negotiation configuration could advertise > half-duplex modes, including 10BASE-T, 100BASE-TX, and 1000BASE-T, > which are not supported by the MAC. > > Update the Clause 22 and Clause 40 PHY advertisement handling to mask > all half-duplex modes while preserving existing PHY, strap, and > vendor-specific configuration using read-modify-write. > > To maintain backward compatibility, full-duplex advertisement for > 10/100 and 1000BASE-T is preserved by default when no explicit PHY > advertising mask is provided. > > This ensures IEEE 802.3 compliant PHY advertisement while avoiding > regressions on platforms relying on PHY default configuration. > > Signed-off-by: Ashok Kumar Natarajan > --- AI review noticed possible issues with thsi. Which may be an issue, or false positive. > The AXGBE MAC supports only full-duplex operation at all speeds. > However, the PHY auto-negotiation configuration could advertise > half-duplex modes, including 10BASE-T, 100BASE-TX, and 1000BASE-T, > which are not supported by the MAC. > > Update the Clause 22 and Clause 40 PHY advertisement handling to mask > all half-duplex modes while preserving existing PHY, strap, and > vendor-specific configuration using read-modify-write. The read-modify-write approach is good, and the Clause 22 / Clause 40 separation is clean. > + if (!adv) { > + advert |= ADVERTISE_10FULL | ADVERTISE_100FULL; > + } else { The original code unconditionally sets ADVERTISE_PAUSE_CAP: advert |= ADVERTISE_FULL; advert |= ADVERTISE_PAUSE_CAP; In the legacy path (adv == 0), the new code advertises 10/100 full-duplex but drops pause advertisement. This is a behavioral regression for platforms relying on the default configuration -- exactly the scenario the commit message says should avoid regressions. The !adv block should also set ADVERTISE_PAUSE_CAP to match the old behavior. > +#define AXGBE_PHY_MII_CTRL1000_1000T_FULL 0x0200 > +#define AXGBE_PHY_MII_CTRL1000_1000T_HALF 0x0100 These are standard IEEE 802.3 Clause 40 bits. Since axgbe_phy.h already mirrors the Linux MII defines for Clause 22, consider adding these as ADVERTISE_1000FULL / ADVERTISE_1000HALF in the existing MII section for consistency rather than under the M88E1512-specific block. 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 mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by smtp.lore.kernel.org (Postfix) with ESMTP id D9B49E9D82F for ; Mon, 6 Apr 2026 03:37:49 +0000 (UTC) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 98A234026D; Mon, 6 Apr 2026 05:37:48 +0200 (CEST) Received: from mail-pf1-f181.google.com (mail-pf1-f181.google.com [209.85.210.181]) by mails.dpdk.org (Postfix) with ESMTP id 40B4840265 for ; Mon, 6 Apr 2026 05:37:47 +0200 (CEST) Received: by mail-pf1-f181.google.com with SMTP id d2e1a72fcca58-824c9da9928so2589455b3a.3 for ; Sun, 05 Apr 2026 20:37:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20251104.gappssmtp.com; s=20251104; t=1775446666; x=1776051466; darn=dpdk.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:subject:cc:to:from:date:from:to:cc:subject:date :message-id:reply-to; bh=nofEexM1teS6pMvy9455GfoUx7R5GFPG4+9PQLfQfWo=; b=tKYomAA5LB7/5Uk3xY3bJHaeFOWPJk/3TzxfDPrqRL0ZAPPKUuG3eLIe6CLNsntdoT xaz1jh8yIOCKpoPXWnu/1OhEqcQjdfUUtmSqin4AlhP814KiR0GEou3yn6T87hwhaItQ mLIg5Vn2neZHhrqi5q1Oe3ZLeX8f7pJEdWWYVVwekWCkTHcgP4TpwFhE+17BDGY1IH6W vd6j3arLy0yv2dhm7wDL6fAeudZyJ2DjxlOShO8lUCA7bd1bD4tPHNMjkUAHxVKHpObl QcPWz19dffTgHbhuLhSY+fzxvJqCJKChpjdoY3C+oiVpsHnYKPnC0L8+WmFYGIWhBJRJ lX2g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1775446666; x=1776051466; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:subject:cc:to:from:date:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=nofEexM1teS6pMvy9455GfoUx7R5GFPG4+9PQLfQfWo=; b=tTSCaBUnSXuuHwpCqKil44d8ENpV/6yTIrnFOSZEmQPStXTp/6cN5Jt/lFtEnBHsjz SBzgUHsYOULJOOyanV7WDpLT/yUBI3JWqo3R6FJtW1rKkg63DM3pAex/VKqq9CrDdqVr uhJdb1d7X4zhZXEvMzaSaRie91xJ0zsQpLJQ4QfPVsAOb96bZxUTZ4fcms1LHA7TtB3L 0L/2Y6SIYFApfVLdolEc57BVUnn/AIVMBZrsBxEbcwMltC3i8FQtrBPYDxA95NzZ1sVa mzfIn08MrljNApxpw4zkTAiXrkO6wfME23M0In0hsvahSFKpApNeiTtoImdj8EhMw8Kf oG2Q== X-Gm-Message-State: AOJu0YzWOr9fYxUel+Iav7f1S3YArnrCyZ3lHoqX6/vlqJOtI/mEoJq/ F3lZQrp7nZO5RMVm1Ua0Aq4gdj56UrPgRsgw4S8Zl0mRzmynHlX91I2te27JlGHsEBs= X-Gm-Gg: AeBDiesOM+7frzR+djFAfq1OkrqWP5isU7GQeEmfdw42o/3hOfa5F7zoEqYkQYMg5Ge st0Zsja01ifTprK4Jm0eO5ieMEUuBbae0PpeCrOJ8EVl8wzlDz6JPszecxQm7PhlTm10WZxwesi Q80WtKVRiuo6f9KwpBJQDaNinZUXrL0FEPdSIxw9jOagZDzMqrshrd7kdJPHVGPztfcH8CGZl6B s8uwh0KKxpo4NhtqC63cV3uIi8cWGdywmVT7BnkL5NkcAPlIwTPI1Mwon6Mc6nZR6rpsjttqVYI Gt2oLENCti7xbGO0NFC2/mEEuLJaCsPjCZFEniB/BpZDwWJ91qkdhVle3pVSmiWpWSXmqIghRfH SLxS27DUf4MHdV/Vxy4Ns6QFP40STRuEqrGI4oF+4Pj6+NcMctTy6BBJeyjxXnvYRxM3rlH5TpY CXtzSO6E8BsIwY/7kpUSzC0yhbQdVj8FQS5vs= X-Received: by 2002:a05:6a20:9192:b0:398:759d:23e with SMTP id adf61e73a8af0-39f2efaf81dmr10987052637.32.1775446666114; Sun, 05 Apr 2026 20:37:46 -0700 (PDT) Received: from phoenix.local ([104.202.41.210]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-82cf9b23c6asm16133035b3a.10.2026.04.05.20.37.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 05 Apr 2026 20:37:45 -0700 (PDT) Date: Sun, 5 Apr 2026 12:57:22 -0700 From: Stephen Hemminger To: Ashok Kumar Natarajan Cc: , Subject: Re: [PATCH v3] net/axgbe: mask unsupported PHY half-duplex modes Message-ID: <20260405125722.5b936678@phoenix.local> In-Reply-To: <20260402065450.1074-1-ashokkumar.natarajan@amd.com> References: <20260401075831.568-1-ashokkumar.natarajan@amd.com> <20260402065450.1074-1-ashokkumar.natarajan@amd.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Message-ID: <20260405195722.a-yN6lD0q76f4f_C0w1SNjy191jmWhjLPxUaXA0Vzgo@z> On Thu, 2 Apr 2026 12:24:49 +0530 Ashok Kumar Natarajan wrote: > The AXGBE MAC supports only full-duplex operation at all speeds. > However, the PHY auto-negotiation configuration could advertise > half-duplex modes, including 10BASE-T, 100BASE-TX, and 1000BASE-T, > which are not supported by the MAC. > > Update the Clause 22 and Clause 40 PHY advertisement handling to mask > all half-duplex modes while preserving existing PHY, strap, and > vendor-specific configuration using read-modify-write. > > To maintain backward compatibility, full-duplex advertisement for > 10/100 and 1000BASE-T is preserved by default when no explicit PHY > advertising mask is provided. > > This ensures IEEE 802.3 compliant PHY advertisement while avoiding > regressions on platforms relying on PHY default configuration. > > Signed-off-by: Ashok Kumar Natarajan > --- AI review noticed possible issues with thsi. Which may be an issue, or false positive. > The AXGBE MAC supports only full-duplex operation at all speeds. > However, the PHY auto-negotiation configuration could advertise > half-duplex modes, including 10BASE-T, 100BASE-TX, and 1000BASE-T, > which are not supported by the MAC. > > Update the Clause 22 and Clause 40 PHY advertisement handling to mask > all half-duplex modes while preserving existing PHY, strap, and > vendor-specific configuration using read-modify-write. The read-modify-write approach is good, and the Clause 22 / Clause 40 separation is clean. > + if (!adv) { > + advert |= ADVERTISE_10FULL | ADVERTISE_100FULL; > + } else { The original code unconditionally sets ADVERTISE_PAUSE_CAP: advert |= ADVERTISE_FULL; advert |= ADVERTISE_PAUSE_CAP; In the legacy path (adv == 0), the new code advertises 10/100 full-duplex but drops pause advertisement. This is a behavioral regression for platforms relying on the default configuration -- exactly the scenario the commit message says should avoid regressions. The !adv block should also set ADVERTISE_PAUSE_CAP to match the old behavior. > +#define AXGBE_PHY_MII_CTRL1000_1000T_FULL 0x0200 > +#define AXGBE_PHY_MII_CTRL1000_1000T_HALF 0x0100 These are standard IEEE 802.3 Clause 40 bits. Since axgbe_phy.h already mirrors the Linux MII defines for Clause 22, consider adding these as ADVERTISE_1000FULL / ADVERTISE_1000HALF in the existing MII section for consistency rather than under the M88E1512-specific block.