Article View: linux.kernel.netdev
Article #25806Re: [PATCH net-next v5 3/4] net: phy: realtek: add PTP clock support for RTL8127a
From: Andrew Lunn
Date: Wed, 02 Dec 2026 13:21
Date: Wed, 02 Dec 2026 13:21
29 lines
8984 bytes
8984 bytes
> +static int rtl_internal_nbaset_probe(struct phy_device *phydev)
> +{
> + int ret;
> +
> + ret = rtl822x_probe(phydev);
> + if (ret)
> + return ret;
> +
> + /* Only the internal PHY of RTL8127A has a PTP block. PTP is
> + * optional, keep the PHY usable without it.
> + */
As you point out here, the PTP block is in the PHY.
> +static int rtl8127a_ptp_read(struct rtl8127a_ptp *ptp, u16 reg)
> +{
> + return phy_read_mmd(ptp->phydev, MDIO_MMD_VEND2, reg);
> +}
And you are using PHY APIs to access it.
All this code needs to move into the PHY driver.
I can accept old code violating layering, but new could should not.
NACK.
Andrew
Technical Details
Message-ID:
<69a985e6-92df-4cdd-bec3-56a6afdb927a@lunn.ch>Path:
mbox-mo1.pugleaf.net!srv.newsdeef.eu.MISMATCH!feed-us-txt.newsdeef.eu!feed-us-ny.newsdeef.eu!srv.newsdeef.eu!newsfeed.bofh.team!news.nntp4.net!nntp.xenet.de!news.neodome.net!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-375808-linux-kernel-netdev=dewy.ruReferences:
<20261201094454.1150-1-javen_xu@realsil.com.cn> <20261201094454.1150-4-javen_xu@realsil.com.cn>Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!srv.newsdeef.eu.MISMATCH!feed-us-txt.newsdeef.eu!feed-us-ny.newsdeef.eu!srv.newsdeef.eu!newsfeed.bofh.team!news.nntp4.net!nntp.xenet.de!news.neodome.net!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-375808-linux-kernel-netdev=dewy.ru From: andrew@lunn.ch (Andrew Lunn) Newsgroups: linux.kernel.netdev Subject: Re: [PATCH net-next v5 3/4] net: phy: realtek: add PTP clock support for RTL8127a Date: Wed, 2 Dec 2026 14:21:57 +0100 Organization: Usenet Network Message-ID: <69a985e6-92df-4cdd-bec3-56a6afdb927a@lunn.ch> References: <20261201094454.1150-1-javen_xu@realsil.com.cn> <20261201094454.1150-4-javen_xu@realsil.com.cn> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Injection-Info: usenet.network; logging-data="1978448"; mail-complaints-to="abuse@usenet.network" Cancel-Lock: sha1:9m5g/QmdmjxiA8oS+K/aT4Ij2kk= sha256:+tlnYAJJBEYKDVRWPwQBUJI1cjN8agOIowR0Q4ldoy4= sha1:+nuB0omDkTFdjKeCxxQEB4EE9xw= sha256:z/aTJTD7UX6vYf+0aY8V649XSToSHYbZVzLPEYFJT9s= 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 7887B11764C; Wed, 2 Dec 2026 16:22:42 +0300 (MSK) X-Virus-Scanned: Debian amavisd-new at usenet.network X-Spam-Flag: NO X-Spam-Score: -3.05 X-Spam-Status: No, score=-3.05 tagged_above=-9999 required=6.31 tests=[DCC_REPUT_70_89=0.1, 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, URIBL_BLOCKED=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 F1hHQRycLSKt; Wed, 2 Dec 2026 16:22:39 +0300 (MSK) X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=104.64.211.4; helo=sin.lore.kernel.org; envelope-from=netdev+bounces-375808-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 sin.lore.kernel.org (sin.lore.kernel.org [104.64.211.4]) by mail.dewy.ru (Postfix) with ESMTPS id 1B842117647; Wed, 2 Dec 2026 16:22:28 +0300 (MSK) X-Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.77.114.92]) by sin.lore.kernel.org (Postfix) with ESMTP id 1F7C525E47; Wed, 2 Dec 2026 13:22:26 +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=1796217744; b=2AAdl7ZOf8pCwNfdVwVmVykEQLBQxnrIWMRmhKgEROjyRlTludgrI2qlodBBxOG8Aw4z 7LgfBadJ0vQSNVJKwAmsoyynVLgFY3pdSBykUitypxn10sOgj+i3aracPYbFaLZgJZFTv UY67rGV72jcp65ySRIQ3/jJ1Gq1jmG09IJjfrLModipVzeow18shs3RpOb9LaWdZQMy52 C24VBtmQEoStW8uB3R8bY8syM/fDl5gzQhg4ZoN/1av/pi48e1rtAoe4HSKPvRmr/iJ8V hzdwUP48nKThwgUCTGlDwGYWopA13vqYHkDDvdxi0nCeaUJnkaOAySZLCVHo1tBYYYA== X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796217744; 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=VC7e55j2bljf8FP2YwYxKKk3S42V6GQOC5CQHRSGmOg=; b=SVBfJeO2wE6GggKp81/5URvTG+4wdNlYqY/Cytu0kb+4cgdCaEvznHQkVNPJHu4Q5kay uV+QNnnQQi5ZZSJNfoTeuu5nfrRX2tz6YRn65O56Lms2p7Ajo+iLt+/uPx6j+mF+zJyFQ LJrbCqS3JYJTkDcbpB86pBJV8dWvCQMc9PEv49fKk4BoZfdpOJpvc6Wz45v/HquAlKyz8 fG7wnxamTIZFhzjEpBZwWcdWJPek0SN41V5sQCWF45oPvdsBLSEPvcjTZOPEfF+Jlef5s GS+z75DSKBlvxIJM5iVbWm5tE8IYzI7+wt+7B96UsgXzFIRexxGSdMQYBtF+1buEb2A== 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=rNciUDV4; 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 44B6F606A322; Wed, 2 Dec 2026 13:22:24 +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=rNciUDV4 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=1796217738; b=WbaTRmtpFVrllmOL2mfJ0H3lFScszI+8r0pIpObLDjKfuLEaBCoXcm2efR+04JdZ4KyH lG+Rky4ngdiJmI1j+vPhd4dTXx2KpWv0GRnU6zaUsdIAw+55tEiywGxnsJTcodo0DZbEW 4+sNPYowzJqrVpefDJYnLCg0IC3aeP3XxqlAEvclqNhHSIlBR3rOBGmO3R8AxGLDUCEr1 Ru5Tvm1qxiiYMGLxpkV/Sv3dQyZ8RfUPM2Zu/I2ag1eixtpaBv25fPNH20LckVdckun0v jJmLk8MZyvM1mBVRtcSImgiOXoJUJ/lS+8AhvdS3IpmdfFLVvEqIsJW/rI1RhVdiGqQ== X-ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796217738; h=DMARC-Filter:DKIM-Signature:Received:Date:From:To:Cc:Subject: Message-ID:References:MIME-Version:Content-Type:Content-Disposition: In-Reply-To; bh=VC7e55j2bljf8FP2YwYxKKk3S42V6GQOC5CQHRSGmOg=; b=Svnbb1xTu/nuj/DCdj/wuGBJGcUwjzKafIHUtpETKyTnIOaVhpMk9loMBo/4PmHXjx3Y EM5ae7XIiDk6plWO3qGP/x/ZpNwQ4WLPPgtfdxxXFJtTu9XO6OTQrgamUYfWzObJfXmL5 5jdWyoShnXei1FHx1uMcaef6IVd3PSIvNZWBEL5jX50ML3uBSzRxpB34oiRONYp10NiW6 SbXZL8RFyws39/PheV7GFNu3OxqhngDhWqO0BK69YzCUxeiM4ZJMz/y0Clzhh52jZflqz Nu/rZ5mtU9d23PCup4gFvPglvTrXqhYZY01a7KD1y2Nsp+gwNNyCfYTgwbpRF4syK1w== 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=rNciUDV4; 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 1E4A5606A31A; Wed, 2 Dec 2026 13:22:17 +0000 (UTC) X-DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 1E4A5606A31A 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=VC7e55j2bljf8FP2YwYxKKk3S42V6GQOC5CQHRSGmOg=; b=rNciUDV4aF+XazE0JtuyQ9kt2G pHNL6pA363oLfLDQ2iY+3HbfIFMo9G3YJzB1HeYCGWXOWzRUBeCRzbWpPM2zM7iu3U36opZMZjNN4 I7aBDf0T6icnCZa0hBX61kF9+z1GUWg5zm8bA5Tu4YOKcUFIerW+Rw03E/YT/nBZlnWc=; X-Received: from andrew by vps0.lunn.ch with local (Exim 4.94.2) (envelope-from <andrew@lunn.ch>) id 1xYkHV-002pQI-8L; Wed, 02 Dec 2026 14:21:57 +0100 X-Cc: hkallweit1@gmail.com, linux@armlinux.org.uk, davem@davemloft.net, edumazet@google.com, kuba@kernel.org, pabeni@redhat.com, nb@tipi-net.de, maxime.chevallier@bootlin.com, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, daniel@makrotopia.org, vladimir.oltean@nxp.com 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: <20261201094454.1150-4-javen_xu@realsil.com.cn>