From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-ej1-f43.google.com (mail-ej1-f43.google.com [209.85.218.43]) (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 ABBF13A5431 for ; Thu, 8 Oct 2026 19:35:15 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.218.43 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1791488117; cv=none; b=dHtXtGEYGIrnPwrUuQYVR1e5PjWbQBE+4/ZjO5j6dcmE7acBJ7MKEPq8iKdHTS789MMYJHoqxV3MYmI9XWd/8cLokPiv+7lMNgpZRg308ahPP5XEFHV3nEsSduLNJDKdqJwoS0XNrb757ndPxxmf9WYoS2NUI4wDHeTKi1c4Njs= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1791488117; c=relaxed/simple; bh=fpC1Eme3VEz18Iit7OxfXGD+XO5w8Dx1LlQClNa1prs=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=QekG9+z3cSLcbrRzcnMZP64Ph2vCOnNdxdv2y9HhwddDytBt5pXEYhIQtdV054e39hYyZ86PQY+uXeu3XRkOU/vhttvcbAzP/SuxiWuxLnKuGwCI4Kx0RWyzIed0hJeyPLE5Us5x7pKbUlD1xq/3HxXnlXcB5qoOIvOPipoLf0k= 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=Hh6mZ6Ye; arc=none smtp.client-ip=209.85.218.43 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="Hh6mZ6Ye" Received: by mail-ej1-f43.google.com with SMTP id a640c23a62f3a-c2e62319cfaso585052066b.2 for ; Thu, 08 Oct 2026 12:35:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1791488114; x=1792092914; 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:content-type; bh=fpC1Eme3VEz18Iit7OxfXGD+XO5w8Dx1LlQClNa1prs=; b=Hh6mZ6YeeckXZTR898XQjBmLEGbeXw18sCPz7rrAH0DuUv+vdP8pbPif/pDiYRKL7R nUPe5AtsHFadO2iY1o8pqu5SCzUVNgD4X+et6qr7dTpucw+MSJrrVQ4L50I5CWwtLInN hS/6ObJCLQaAXVo2sMtLURdBW6mjJ3cENnPLWDoB7niy7pUeyTxHM/BWFQu3vgpEtbR5 sczdqKEJliAQWLjKI3px7mufo3ABznZ6gcRmvhOW7Eqz5aKQ5slIv5w0vOSc6XReXirn 9GhND3HcpCqYNB68PMFrc5oG9/9dswu/4byiZtoVS/oXVtGtIk+5V3t08abYwQP1n5TV k1ZA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1791488114; x=1792092914; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to:content-type; bh=fpC1Eme3VEz18Iit7OxfXGD+XO5w8Dx1LlQClNa1prs=; b=S7gZWREfsE8olzsTPL1ZzO8zGvmrw73DkY6nxM/wJjtxUPL+5DBowMtnGkcHIWFSAY I8yFrq4uniIDIF7lxm3i5nGKhon8Rx+gPnCzYQfHgV1zvuNYxKzxOpwvRE0UUaFn9ARZ BGxNU7B8iVhdMQ0tOkCmo/eQvV9PVAOkpQ7JTHzdBQ9cigPvuXOlFS4Nz1fhJCGUiBad 2ue/y+R/yJwBs9ZFm6FlD1xuu/7cEeL6A/X3ES+aFzUEtw29N9mRRkXvFEROZUMJ4eKG mqH6UxH3ayrR8O7r+oHBV00siuVoTpC8DFWx5Pt19GdOhxPILHAViF5WDEBWujUiRD+G 4GNA== X-Forwarded-Encrypted: i=1; AKwUvBx54gwBf4RwCYVI5951WBvLfZ9Wmw7JlVX4jMMdQhVqZlpz3oKZT6GZAjxMTnUuhs6V1vHEshRUIsnTGus=@vger.kernel.org X-Gm-Message-State: AFuF++nJc21r72GqMRiyMp26+gSGxQuaRvexA+y4dKVvZkJks2eJloNv N9WJ4ey6GJZGcvzDWav5mQbhFbvp+TPig0x4j4XHzrr+BrRZXMZXwvP+ X-Gm-Gg: AYBFou3DT5DbzDY4HXh6gXM23o2CL1wprmrgJV7buDHv2D7sw5H9aEH8Fl/qO1UiDoC DRc/rdCtUevldjLsj2gc0+1JVmd6NmpVravikgTWwO65v1hH0jHGTL5QGgKF6CPr0CQN7p1IXty //80yM+oCYG4+0ScETRIfh/cjAW0pfQGsjhgnH6WCyWOduU9ByEdEvqpUDYwuQxE5tsKacErfI1 bRro2yguJvyOSdwXdvH/3o1nEfmXLs1KehDW9oLx/xjBNATJCfJVo6HMPwkUqF6kvz0J/TBVOug tolhKbuZdd8NP3qnEKia25+u3Oa3/jc+61JLQx2rmbW0f5tK8hcr9X58zv1S03dCsWhLbDKU6gi jNxdzxeC1RyWZM3iSoPCrE16O5bLeIZQjvhmCXA4iWm11DXsNSfNDtjAiyODMDgrnFwfS6y42F7 qlSSZe4BlL5rcgc3jbiMEENOFJeSfbV2NwxLDlEgZu3PaFMMj3XiddvpQO9Deyre5MqSDs6UVDI gvu/BD97Qjbtt9czzXXAtNUz1fbUGS/ZCrpVsEA3TpOcse9X34b8oqwVr9GgIGmHlqV739EBlnQ xb8FO0AVrX/FW7fFjnxyU7E= X-Received: by 2002:a17:906:7316:b0:c2a:fd39:f231 with SMTP id a640c23a62f3a-c317c094878mr682956966b.26.1791488113806; Thu, 08 Oct 2026 12:35:13 -0700 (PDT) Received: from localhost.localdomain (94-255-221-162.cust.bredband2.com. [94.255.221.162]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-c31a4758795sm10017366b.5.2026.10.08.12.35.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 08 Oct 2026 12:35:13 -0700 (PDT) From: Yongzhao Chen To: netdev-bot+sashiko@kernel.org Cc: netdev@vger.kernel.org, Andrew Lunn , Heiner Kallweit , Russell King , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH net v3] net: phy: qca83xx: read resolved QCA8337 link status Date: Thu, 8 Oct 2026 21:35:00 +0200 Message-ID: <20261008193501.14850-1-yongzhao.derek@gmail.com> X-Mailer: git-send-email 2.45.2.windows.1 In-Reply-To: <179147542415.434549.1369676326541511457@kernel.org> References: <20261006160316.1356-1-yongzhao.derek@gmail.com> <179147542415.434549.1369676326541511457@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit On Thu, 08 Oct 2026 16:03:44 +0000 netdev-bot+sashiko@kernel.org wrote: > Suppose BMSR shows link up and autoneg complete before > AT803X_SS_SPEED_DUPLEX_RESOLVED is set in AT803X_SPECIFIC_STATUS. What ends > up in phydev->speed and phydev->duplex in that case? Both points are valid. Thanks. In that case v3 reports the link up with SPEED_UNKNOWN, and the early return in genphy_read_status() keeps it that way until the link drops. The reserved speed value ends up the same way. I don't know whether QCA8337 can report link up before the resolved bit is set, but the driver should not depend on that. v4 follows marvell_read_status_page_an(): if speed or duplex is still unknown after at803x_read_specific_status(), it reports the link as down. This driver has no interrupt support, so phylib polls the PHY and reads the status again on the next poll. The qca808x approach does not fit here. The value it falls back to is the advertisement-derived speed this patch replaces, so after a downshift it would keep 1000 Mbit/s. > Should mdix also be reset to ETH_TP_MDI_INVALID when the resolved status is > not read? Yes. v4 sets mdix to ETH_TP_MDI_INVALID on every poll except during a steady autonegotiated link and reads it again only at link-up. That covers both a link drop and autonegotiation being disabled. at803x_read_status(), used by the other AT803x PHYs, clears speed and duplex the same way before it calls the helper. I have not changed it in this patch. The model test now covers both cases, and v3 fails them. v4 has not been tested on hardware. I will send it separately. Thanks, Yongzhao Chen pw-bot: cr