LKML Archive mirror
 help / color / mirror / Atom feed
From: Andrew Lunn <andrew@lunn.ch>
To: Sky Huang <SkyLake.Huang@mediatek.com>
Cc: Heiner Kallweit <hkallweit1@gmail.com>,
	Russell King <linux@armlinux.org.uk>,
	"David S. Miller" <davem@davemloft.net>,
	Eric Dumazet <edumazet@google.com>,
	Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
	Daniel Golle <daniel@makrotopia.org>,
	Qingfang Deng <dqfext@gmail.com>,
	Matthias Brugger <matthias.bgg@gmail.com>,
	AngeloGioacchino Del Regno
	<angelogioacchino.delregno@collabora.com>,
	linux-kernel@vger.kernel.org, netdev@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org,
	linux-mediatek@lists.infradead.org,
	Steven Liu <Steven.Liu@mediatek.com>
Subject: Re: [PATCH 2/3] net: phy: mediatek: Add mtk phy lib for token ring access & LED/other manipulations
Date: Thu, 25 Apr 2024 17:13:54 +0200	[thread overview]
Message-ID: <d6c62ab9-256b-47d2-8145-7dc6ffcbd020@lunn.ch> (raw)
In-Reply-To: <20240425023325.15586-3-SkyLake.Huang@mediatek.com>

On Thu, Apr 25, 2024 at 10:33:24AM +0800, Sky Huang wrote:
> From: "SkyLake.Huang" <skylake.huang@mediatek.com>
> 
> Integrate some common phy manipulations in mtk-phy-lib:
> 1. Token ring access: This is proprietary register access on page 52b5.
> Use these APIs so we can see which fields we're going to modify/set/clear.
> 2. LED: External/internal giga & internal 2.5g phy share almost the same
> LED control registers/logic.
> 3. Extend 1G TX/RX link pulse time: We observe that some devices' 1G
> training time violates specification, which may last 2230ms and affect
> later TX/RX link pulse time. So we try to extend our 1G TX/RX link pulse
> time so that we can still detect such devices.

Please break this up into 3 patches.

> -#define MTK_PHY_PAGE_EXTENDED_52B5		0x52b5
> +
> +/* Registers on Token Ring debug nodes */
> +/* ch_addr = 0x0, node_addr = 0x7, data_addr = 0x15 */
> +#define NORMAL_MSE_LO_THRESH_MASK		GENMASK(15, 8) /* NormMseLoThresh */
> +
> +/* ch_addr = 0x0, node_addr = 0xf, data_addr = 0x3c */
> +#define REMOTE_ACK_COUNT_LIMIT_CTRL_MASK	GENMASK(2, 1) /* RemAckCntLimitCtrl */
> +
> +/* ch_addr = 0x1, node_addr = 0xd, data_addr = 0x20 */
> +#define VCO_SLICER_THRESH_HIGH_MASK		GENMASK(23, 0) /* VcoSlicerThreshBitsHigh */
> +
> +/* ch_addr = 0x1, node_addr = 0xf, data_addr = 0x0 */
> +#define DFE_TAIL_EANBLE_VGA_TRHESH_1000		GENMASK(5, 1) /* DfeTailEnableVgaThresh1000 */
> +
> +/* ch_addr = 0x1, node_addr = 0xf, data_addr = 0x1 */
> +#define MRVL_TR_FIX_100KP_MASK			GENMASK(22, 20) /* MrvlTrFix100Kp */
> +#define MRVL_TR_FIX_100KF_MASK			GENMASK(19, 17) /* MrvlTrFix100Kf */
> +#define MRVL_TR_FIX_1000KP_MASK			GENMASK(16, 14) /* MrvlTrFix1000Kp */
> +#define MRVL_TR_FIX_1000KF_MASK			GENMASK(13, 11) /* MrvlTrFix1000Kf */

This is not what i would expect for moving code into a library. I
expect code to be deleted from one file and appear in another file,
with some minor changes, static dropped, EXPORT_SYMBOL_PHY added.  If
i see code just move, i don't need to review it line for line. If you
do want to change the code, please move it into the library first, and
make modifications.

Lots of small patches, which are obviously correct.

	Andrew

  reply	other threads:[~2024-04-25 15:14 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-04-25  2:33 [PATCH 0/3] net: phy: mediatek: Integrate mtk-phy-lib and add 2.5Gphy support Sky Huang
2024-04-25  2:33 ` [PATCH 1/3] net: phy: mediatek: Re-organize MediaTek ethernet phy drivers Sky Huang
2024-04-25 15:04   ` Andrew Lunn
2024-04-26  2:27   ` kernel test robot
2024-04-25  2:33 ` [PATCH 2/3] net: phy: mediatek: Add mtk phy lib for token ring access & LED/other manipulations Sky Huang
2024-04-25 15:13   ` Andrew Lunn [this message]
2024-04-25 18:05   ` kernel test robot
2024-05-07 14:40   ` Daniel Golle
2024-05-08 12:25     ` Andrew Lunn
2024-05-08 13:09       ` Russell King (Oracle)
2024-05-08 14:02         ` Daniel Golle
2024-04-25  2:33 ` [PATCH 3/3] net: phy: mediatek: add support for built-in 2.5G ethernet PHY on MT7988 Sky Huang
2024-04-25  9:01   ` Russell King (Oracle)
2024-05-08 10:56     ` SkyLake Huang (黃啟澤)
2024-05-08 12:30       ` Andrew Lunn
2024-05-08 16:21         ` Daniel Golle
2024-04-25 15:37   ` Andrew Lunn
2024-04-25  3:05 ` [PATCH 0/3] net: phy: mediatek: Integrate mtk-phy-lib and add 2.5Gphy support Daniel Golle

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=d6c62ab9-256b-47d2-8145-7dc6ffcbd020@lunn.ch \
    --to=andrew@lunn.ch \
    --cc=SkyLake.Huang@mediatek.com \
    --cc=Steven.Liu@mediatek.com \
    --cc=angelogioacchino.delregno@collabora.com \
    --cc=daniel@makrotopia.org \
    --cc=davem@davemloft.net \
    --cc=dqfext@gmail.com \
    --cc=edumazet@google.com \
    --cc=hkallweit1@gmail.com \
    --cc=kuba@kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mediatek@lists.infradead.org \
    --cc=linux@armlinux.org.uk \
    --cc=matthias.bgg@gmail.com \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).