From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 6483C233723; Fri, 6 Mar 2026 16:24:36 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772814276; cv=none; b=oJxRCirl3hdzDagUjxR+Fm8fSKnvhIHtRYG3Ybustrhe7oV71SX5MaJ45NAOwZl9BSBKXcsZAT9dqhG+7IRKS3asZR4QMNeEzvH0wql08vviQT7jM1/wPcN/FaO6/AHOIrqeJycZukC9sVn0Falqi1ZRdPR4tiaQkI+/A0hvaRs= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772814276; c=relaxed/simple; bh=Ba8mQLOaFnpnr0NzmQQ3FPas3CvCs/fUBqA1uiRtQN0=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=TDotoLvLrGc3J45qiypaAiZbN3PoCsS7bzNXztWeD3BgbudlBXQme6E38wVZyG9NiCG5iaAXiQGj1TY56yR/lWznP5LRpjnrOeaR6f5PGJlCZFVuvdN8THqdd1G5BPS8WHPu00GZ2PGtpUPQDMGriffVo9dIhyaN0qfp36Uux9k= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=Bo/QrYGf; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="Bo/QrYGf" Received: by smtp.kernel.org (Postfix) with ESMTPSA id A7BD5C4CEF7; Fri, 6 Mar 2026 16:24:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1772814276; bh=Ba8mQLOaFnpnr0NzmQQ3FPas3CvCs/fUBqA1uiRtQN0=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=Bo/QrYGfW4wrreeK3uFebWWpTvTwtJqaPQPIfKqff0TT+zbEkH0chP2GMl4V0GuPC tGGsZmrSsRdM4+JJlH7eIDmb76zJm0ErizR4axrQtKNQe9wH1xWFDnK8Tg3tOAqJv8 QtTZhvr0N8ioLqXDl7FHsaqamlxKLQd4fmN24l4yGP/HBR726s9ixtifJ40yiLCl7b ciDT5WM+5BqGBwPkfKMJihIrBhOF9cNe7U8QQGsXoQLuAM1+JGz53WiWSNw8YFmWqp oNe06SFmN88UMpT7dvclF+putj9KN15FuH7OhJIC6MX7ZDq3F3iqrbJX2/HddHrH6N p/GdpXeVEfZQA== Date: Fri, 6 Mar 2026 16:24:31 +0000 From: Conor Dooley To: "Russell King (Oracle)" Cc: Charles Perry , netdev@vger.kernel.org, Sean Anderson , Nicolas Ferre , Claudiu Beznea , Andrew Lunn , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , linux-kernel@vger.kernel.org Subject: Re: [PATCH net-next v2 1/3] net: macb: fix SGMII with inband aneg disabled Message-ID: <20260306-distaste-depress-55d020802bae@spud> References: <20260224202854.112813-1-charles.perry@microchip.com> <20260224202854.112813-2-charles.perry@microchip.com> <20260304-nebulizer-rounding-40fbc81a2ba1@spud> <20260304-unvented-crinkle-37f0bfd03541@spud> <20260305-backlit-epilogue-62139ae694a6@spud> <20260305-fantasy-useable-40ca04f0266e@spud> Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="mDj1BB+t/c7mmT8n" Content-Disposition: inline In-Reply-To: --mDj1BB+t/c7mmT8n Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Mar 05, 2026 at 02:28:08PM +0000, Russell King (Oracle) wrote: > I suggest something like the following in vitesse.c for this PHY: >=20 > #define VSC8662_EXT_CON1 0x17 > #define VSC8662_EXT_CON_MAC_AN BIT(13) >=20 > #define VSC8662_MAC_AN 0x1b > #define VSC8662_MAC_AN_BYPASS BIT(13) >=20 > static unsigned int vsc8662_inband_caps(struct phy_device *phydev, > phy_interface_t interface) > { > if (interface =3D=3D PHY_INTERFACE_MODE_SGMII) > return LINK_INBAND_DISABLE | LINK_INBAND_ENABLE | > LINK_INBAND_BYPASS; >=20 > return 0; > } >=20 > static int vsc8662_config_inband(struct phy_device *phydev, unsigned int = modes) > { > bool changed =3D false; > u16 mask; > int ret; >=20 > mask =3D VSC8662_EXT_CON_MAC_AN; > ret =3D phy_modify_changed(phydev, VSC8662_EXT_CON1, mask, > modes & (LINK_INBAND_ENABLE | > LINK_INBAND_BYPASS) ? mask : 0); > if (ret > 0) > changed =3D true; FYI, clang warns that changed is set but not used. > else if (ret < 0) > return ret; >=20 > mask =3D VSC8662_MAC_AN_BYPASS; > ret =3D phy_modify(phydev, VSC8662_MAC_AN, mask, > modes & LINK_INBAND_BYPASS ? mask : 0); > if (ret < 0) > return ret; >=20 > return genphy_soft_reset(phydev); > } >=20 > and the appropriate initialisers in the phy_driver struct. I tested this, on top of the failing next that I found the problem on, and it seems to make things work. Thanks for coming up with it. Could you please make this a patch, I don't understand why this is the correct way to fix the problem, or the impact on users of the 8662 other than me, so I wouldn't be able to write a suitable commit message. Cheers, Conor. --mDj1BB+t/c7mmT8n Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iHUEABYKAB0WIQRh246EGq/8RLhDjO14tDGHoIJi0gUCaar/vwAKCRB4tDGHoIJi 0uXBAPsFNIh3ZrTgJkV3Bf0AgYY/bP6tPP2WSb12J7/tBPl6YAD/cHTX+lDR7RMD Qj6IPIViHAADJdgB/uRBnLfEB9658gs= =UWpI -----END PGP SIGNATURE----- --mDj1BB+t/c7mmT8n--