🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: linux.kernel.netdev
Article #19181

Re: [PATCH net-next v8 10/11] r8152: add TGPHY register access for RTL8157 and RTL8159

#19181
From: Andrew Lunn
Date: Thu, 19 Nov 2026 13:57
51 lines
10773 bytes
On Thu, Nov 19, 2026 at 07:18:16AM +0000, Chih Kai Hsu wrote:
> On 19/11/2026 12:42 pm, Birger Koblitz wrote:
> > On 18/11/2026 2:42 pm, Andrew Lunn wrote:
> > >> I plan to add two new functions, rtl_nway_restart() and
> > >> rtl8152_get_link_ksettings, to replace mii_nway_restart() and
> > mii_ethtool_get_link_ksettings, respectively.
> > >
> > > Ideally, you should port this driver to phylink.
> > >
> > >        Andrew
> > 
> > Indeed, all of the (integrated) PHYs on the adapters supporeted by r8152 I
> > looked at are already supported under drivers/net/phy/realtek/ It should be
> > straight-forward with many immediate benefits.
> > 
> > Birger
> 
> I agree that a phylink conversion is a better long-term direction. I'd like to
> keep it out of this series. This series fixes and completes the existing RTL8157/59
> support. The phylink conversion is a larger change. r8152 has no MDIO bus and 
> accesses PHY through OCP registers.

It does have an MDIO bus, it just used OCP registers to access it. But
there is no reason you cannot export it using a normal Linux MDIO bus
driver.

> , and the MAC code also does PHY configuration,

Which is a layer violation.

> firmware patching, UPS and EEE handling that would need to move or coexist with
> the phylib drivers.

Or just thrown away because the it already works in the PHY drivers
and phylink.

> The two helpers here are self-contained and will be removed by
> the phylink port.

phylink_ethtool_nway_reset and phy_ethtool_nway_reset exists, so there
is no need to add yet another version. phylink_ethtool_ksettings_set &
phylink_ethtool_ksettings_get and phy_ethtool_get_link_ksettings &
phy_ethtool_set_link_ksettings already exist, so there is no reason to
add new ones.

I'm tempted to just NACK it. The best pressure i can apply to make you
move to phylink is to not merge your patches. If you are adding stuff
which should really by done by phylink, i think it should be rejected.

      Andrew
Technical Details
Message-ID: <1543707c-c121-4c35-8849-c4db1a71fb57@lunn.ch>
Path: mbox-mo1.pugleaf.net!news-lax.pugleaf.net!srl.newsdeef.eu!news.mb-net.net!open-news-network.org!3.eu.feeder.erje.net!feeder.erje.net!feeder1.feed.ams11.usenet.farm!feed.usenet.farm!peer03.ams4!peer.am4.highwinds-media.com!news.highwinds-media.com!feeder.usenetexpress.com!tr3.eu1.usenetexpress.com!news.neodome.net!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-367054-linux-kernel-netdev=dewy.ru
References: <20261110032416.16968-11-nic_swsd@realtek.com> <179464851836.2199510.10154643847175029122@kernel.org> <0c6318e175b14ce8b86a957c7c79d5db@realtek.com> <cafe3b8f-2b65-41d6-b31d-a1cabbf93720@lunn.ch> <2e601d9c-1271-4802-a45c-a16a0d9cfa8d@birger-koblitz.de> <b53ecd5dc96f4890956f051959b74e32@realtek.com>

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!news-lax.pugleaf.net!srl.newsdeef.eu!news.mb-net.net!open-news-network.org!3.eu.feeder.erje.net!feeder.erje.net!feeder1.feed.ams11.usenet.farm!feed.usenet.farm!peer03.ams4!peer.am4.highwinds-media.com!news.highwinds-media.com!feeder.usenetexpress.com!tr3.eu1.usenetexpress.com!news.neodome.net!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-367054-linux-kernel-netdev=dewy.ru
From: andrew@lunn.ch (Andrew Lunn)
Newsgroups: linux.kernel.netdev
Subject: Re: [PATCH net-next v8 10/11] r8152: add TGPHY register access for RTL8157 and RTL8159
Date: Thu, 19 Nov 2026 14:57:52 +0100
Organization: Usenet Network
Message-ID: <1543707c-c121-4c35-8849-c4db1a71fb57@lunn.ch>
References: <20261110032416.16968-11-nic_swsd@realtek.com> <179464851836.2199510.10154643847175029122@kernel.org> <0c6318e175b14ce8b86a957c7c79d5db@realtek.com> <cafe3b8f-2b65-41d6-b31d-a1cabbf93720@lunn.ch> <2e601d9c-1271-4802-a45c-a16a0d9cfa8d@birger-koblitz.de> <b53ecd5dc96f4890956f051959b74e32@realtek.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Injection-Info: usenet.network; logging-data="2887369"; mail-complaints-to="abuse@usenet.network"
Cancel-Lock: sha1:MMrVqpoP+1k1a9n8KKcXN0Uh0V4= sha256:mBtsTyICLvpY2et9MmTjPd1btGm80q5SgbPlhIxTeBY= sha1:ZqcgUCxzP4yDMAZcFzeTFPwKpzM= sha256:+XR5RvFBGvtFVMSh4ds3zbCAi8arYwmC0UzCUQ0Pv6M=
Content-Disposition: inline
List-ID: <netdev.vger.kernel.org>
X-Mailpost-Empty-Hdrs: X-Spam-Level
X-Received: from localhost (localhost [127.0.0.1]) by mail.dewy.ru (Postfix) with ESMTP id 5ACFF115680; Thu, 19 Nov 2026 16:58:28 +0300 (MSK)
X-Virus-Scanned: Debian amavisd-new at usenet.network
X-Spam-Flag: NO
X-Spam-Score: -3.151
X-Spam-Status: No, score=-3.151 tagged_above=-9999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HEADER_FROM_DIFFERENT_DOMAINS=0.249, MAILING_LIST_MULTI=-1, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=0.001, SPF_PASS=-0.001] autolearn=ham autolearn_force=no
X-Authentication-Results: mail.dewy.ru (amavisd-new); dkim=pass (1024-bit key) header.d=lunn.ch
X-Received: from mail.dewy.ru ([127.0.0.1]) by localhost (mail.dewy.ru [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id IDSxiyyqbUf1; Thu, 19 Nov 2026 16:58:17 +0300 (MSK)
X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.234.253.10; helo=sea.lore.kernel.org; envelope-from=netdev+bounces-367054-linux-kernel-netdev=dewy.ru@vger.kernel.org; receiver=<UNKNOWN>
X-Authentication-Results: OpenDMARC; dmarc=fail (p=none dis=none) header.from=lunn.ch
X-Received: from sea.lore.kernel.org (sea.lore.kernel.org [172.234.253.10]) by mail.dewy.ru (Postfix) with ESMTPS id A375E115643; Thu, 19 Nov 2026 16:58:08 +0300 (MSK)
X-Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.77.114.92]) by sea.lore.kernel.org (Postfix) with ESMTP id CBE551A2828; Thu, 19 Nov 2026 13:58:05 +0000 (UTC)
X-Authentication-Results: smtp.subspace.kernel.org; arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1
X-ARC-Seal: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=pass; t=1795096681; b=GtOrcnehi+hyc8f66OWa0SKQpNE7JWjz8fFjRl/at3dHa/BYdHgy1X0QursK5xrWoGEs wA6CXooL8KlwQo91i1wWb53kSFoocvJ4vgprcq9ByL4fswZcUV39s7vkGtBz4J11/i1JJ zWCUmiplKJ15ypyfcEGInQiAkAsKtmJenFYZIC0ci/KZnJbAwjrc0zyMzm0TXNMvlmgH8 6BClEhchT9Qvr1XO5QJF4BYxaUWwWPfTkgzDY20qK21fukQo+/aj2wimvjBG8KCHPyR+c bYoG4HyMQvL8qDlm2/XRKXdkm2VkeGx3cvhRDHpBr0sqbx3+/LcFQQzdAAzjp2/XJ4g==
X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1795096681; h=X-Original-To:Received:DMARC-Filter:DKIM-Signature:Received:Date: From:To:Cc:Subject:Message-ID:References:X-Mailing-List:List-Id: List-Post:List-Help:List-Subscribe:List-Unsubscribe:List-Owner: Precedence:MIME-Version:Content-Type:Content-Disposition:In-Reply-To; bh=x9Y9tQjBdLrfIJ3ZnwR1GSvIi6f1WsQxYqUW4NGAlF8=; b=ta7X7g/S1Uq2TWbodHJo0HFanbxIobNnBVbV5u2wxBsknQAa2bdinsFkmZ7XDChIs8BQ XAxWthSaz2ZeU8oDSerKn9pt2OVR1IFqFxs19DSpX8D4VeTa79ilf+cglqjyh2jM9S2rI //iVDQRYfp6PbsiN2i8DaVFPOx3NnB0qnHKS6E60sUy8PAkGc4zpJSdLSh/LvmJXXbh7b KjvDVSRqJqWRyItOIqqUMjg162a1JkcjaqnURUTvQ0Rho4XJqSbP+WwpVdZJDzjMrwd24 bBhG7UdOLn9+bO+ITt5GBMCQyWpjNRroBCjes/WZae78FyhkSxUK84m+m8rC9hHjTzA==
X-ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dkim=pass header.d=lunn.ch header.i=@lunn.ch header.a=rsa-sha256 header.s=20171124 header.b=CnikS7YZ; dmarc=pass header.from=lunn.ch; spf=pass smtp.mailfrom=lunn.ch; arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1
X-Received: from localhost.localdomain (localhost [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 4B3A9606A32A; Thu, 19 Nov 2026 13:58:01 +0000 (UTC)
X-Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=lunn.ch header.i=@lunn.ch header.a=rsa-sha256 header.s=20171124 header.b=CnikS7YZ
X-Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=156.67.10.101
X-ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1795096680; b=UbX/TlDe0j+fAjm8Byd5dKqPDjO39KxELW+glGFBbGq2hGYcRlfKb6K8FYoRFNIZCLem pIjYN6BFbLpc2Ox93HeDnqC6lANfSbtK50EHmuDkiTiH1imG6ScgAeoZ5CRA1UaF4Vs+i 7jCw/Bq25kkEhgvgsFmF6ihAR/R+izJBaz8mPUKcwb5qiXzBEyiOUWm0uHXwdbIEycEEi 7UJNpAATlq3nZVYADvdPMgDrjgg/rN4IMnjDurSPcuue8o6tZPEK7hezJSR0Rsl6FaH1g TrE0FQLU7g25+XyVsfq6UPWddqRzu/LlAsGAqDUne2DKW2TcnVVd2vxGeSwaBosGgYQ==
X-ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1795096680; h=DMARC-Filter:DKIM-Signature:Received:Date:From:To:Cc:Subject: Message-ID:References:MIME-Version:Content-Type:Content-Disposition: In-Reply-To; bh=x9Y9tQjBdLrfIJ3ZnwR1GSvIi6f1WsQxYqUW4NGAlF8=; b=tMtPvX6OatPvOBLu61roI1KlERTkfjucwClZoy9ZJ1mICJm5O030norFbj7xZxSnPrvS RipmgaKSipfgTw2M4g6Zum7RjpsiJBj/h7GydsKEFnYDst/VWLtK/fhxs41aCSqSOxvE/ tr550GjOOt7LfbjClPN4hBwfreSzmfNQSSdcRFq9dJstaU5ZhMOrvXW8yQBrD+n0Bf+0K sfh1LrAFulhO6iWgABe/4mfcDfOQZIUe9yEfmhtWlOBaDCVZCxfpkq0NUuXi3k2+6qeqR CyPBmMdegTEdLX4EvJg2QTwp2lMoDqHQuLG3cbxw6m87rV6TRLvZpvsBFrB7qHJHVAQ==
X-ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass header.from=lunn.ch; spf=pass smtp.mailfrom=lunn.ch; dkim=pass header.d=lunn.ch header.i=@lunn.ch header.a=rsa-sha256 header.s=20171124 header.b=CnikS7YZ; arc=none smtp.remote-ip=156.67.10.101
X-Received: from vps0.lunn.ch (vps0.lunn.ch [156.67.10.101]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (prime256v1) server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 26ECB606A32C; Thu, 19 Nov 2026 13:57:59 +0000 (UTC)
X-DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 26ECB606A32C
X-Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=lunn.ch
X-Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=lunn.ch
X-DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lunn.ch; s=20171124; h=In-Reply-To:Content-Disposition:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:From:Sender:Reply-To:Subject: Date:Message-ID:To:Cc:MIME-Version:Content-Type:Content-Transfer-Encoding: Content-ID:Content-Description:Content-Disposition:In-Reply-To:References; bh=x9Y9tQjBdLrfIJ3ZnwR1GSvIi6f1WsQxYqUW4NGAlF8=; b=CnikS7YZ/nww+ymXTnk4rS2AND Ozq/uS0+TxbH6PcdAZ+CMR6Uqd2qu2vXPGPKp4eScjwvACqrwByTupKm0/CFHvbEfCcnegp7LUP61 PDs/1JpAyn+pgPXHInSH86i9SOIr04sW9HVsYzy32HFfXAuXTCFq1ySvDr+R4VmlTt1Y=;
X-Received: from andrew by vps0.lunn.ch with local (Exim 4.94.2) (envelope-from <andrew@lunn.ch>) id 1xU2e8-0002yB-OT; Thu, 19 Nov 2026 14:57:52 +0100
X-Cc: Birger Koblitz <mail@birger-koblitz.de>, "netdev-bot+sashiko@kernel.org" <netdev-bot+sashiko@kernel.org>, "davem@davemloft.net" <davem@davemloft.net>, "kuba@kernel.org" <kuba@kernel.org>, "netdev@vger.kernel.org" <netdev@vger.kernel.org>, nic_swsd <nic_swsd@realtek.com>, "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>, "linux-usb@vger.kernel.org" <linux-usb@vger.kernel.org>, "edumazet@google.com" <edumazet@google.com>, "bjorn@mork.no" <bjorn@mork.no>, "pabeni@redhat.com" <pabeni@redhat.com>, "andrew+netdev@lunn.ch" <andrew+netdev@lunn.ch>
X-Mailing-List: netdev@vger.kernel.org
X-List-Post: <mailto:netdev@vger.kernel.org>
X-List-Help: <mailto:netdev+help@vger.kernel.org>
X-List-Subscribe: <mailto:netdev+subscribe@vger.kernel.org>
X-List-Unsubscribe: <mailto:netdev+unsubscribe@vger.kernel.org>
X-List-Owner: <mailto:netdev+owner@vger.kernel.org>
X-Precedence: list
X-In-Reply-To: <b53ecd5dc96f4890956f051959b74e32@realtek.com>
X-Received-Bytes: 10487