Netdev List
 help / color / mirror / Atom feed
From: Kyle Switch <kyle.switch@motor-comm.com>
To: Andrew Lunn <andrew@lunn.ch>
Cc: Frank.Sae@motor-comm.com, hkallweit1@gmail.com,
	linux@armlinux.org.uk, davem@davemloft.net, edumazet@google.com,
	kuba@kernel.org, pabeni@redhat.com, netdev@vger.kernel.org,
	linux-kernel@vger.kernel.org, jianmin.wang@motor-comm.com,
	ming.xu@motor-comm.com, xiaolin.xu@motor-comm.com,
	jie.han@motor-comm.com
Subject: Re: [PATCH] net: phy: Add driver for Motorcomm Quad 2.5GbE phy
Date: Wed, 15 Jul 2026 19:56:53 +0800	[thread overview]
Message-ID: <50549cc2-c5e4-42b1-9b81-8b9e7bebd60a@motor-comm.com> (raw)
In-Reply-To: <a0e43216-d215-4c81-9954-c5e497b2d50f@lunn.ch>



On 7/15/26 05:43, Andrew Lunn wrote:
> On Tue, Jul 14, 2026 at 07:12:03PM +0800, Kyle Switch wrote:
>> Add a driver for motorcomm yt8824 quad 2.5G ethernet phy, supports
>> 2.5G/1000M/100M/10M speed.
> 
> Please take a read of:
> 
> https://www.kernel.org/doc/html/latest/process/maintainer-netdev.html
> 
> and set the Subject line correctly.
> 
>> +#define REG_MII_MMD_CTRL			0x0D
>> +#define REG_MII_MMD_DATA			0x0E
> 
> include/uapi/linux/mii.h
> 
> #define	MII_MMD_CTRL		0x0d	/* MMD Access Control Register */
> #define	MII_MMD_DATA		0x0e	/* MMD Access Data Register */
> 
> Please don't repeat something which already exists. But i also wounder
> why you need these.
> 
>> +static int ytphy_write_mmd(struct phy_device *phydev,
>> +			   u16 device, u16 reg,
>> +			   u16 value)
>> +{
>> +	int ret;
>> +
>> +	ret = __phy_write(phydev, REG_MII_MMD_CTRL, device);
>> +	if (ret)
>> +		return ret;
>> +	ret = __phy_write(phydev, REG_MII_MMD_DATA, reg);
>> +	if (ret)
>> +		return ret;
>> +	ret = __phy_write(phydev, REG_MII_MMD_CTRL, device | 0x4000);
>> +	if (ret)
>> +		return ret;
>> +	ret = __phy_write(phydev, REG_MII_MMD_DATA, value);
>> +
>> +	return ret;
>> +}
> 
> Why are you reinventing these functions when they already exist?
Ans: Sorry, I didn't notice the existing interface before. next patch, i will remove 
the duplicate functional interfaces include REG_MII_MMD_CTRL, REG_MII_MMD_DATA, and
ytphy_mmd_write api.

>> +
>>  /**
>>   * ytphy_get_wol() - report whether wake-on-lan is enabled
>>   * @phydev: a pointer to a &struct phy_device
>> @@ -3059,99 +3187,1620 @@ static int yt8821_resume(struct phy_device *phydev)
>>  	return yt8821_modify_utp_fiber_bmcr(phydev, BMCR_PDOWN, 0);
>>  }
>>  
>> -static struct phy_driver motorcomm_phy_drvs[] = {
>> -	{
>> -		PHY_ID_MATCH_EXACT(PHY_ID_YT8511),
>> -		.name		= "YT8511 Gigabit Ethernet",
>> -		.config_init	= yt8511_config_init,
>> -		.suspend	= genphy_suspend,
>> -		.resume		= genphy_resume,
>> -		.read_page	= yt8511_read_page,
>> -		.write_page	= yt8511_write_page,
>> -	},
>> -	{
>> -		PHY_ID_MATCH_EXACT(PHY_ID_YT8521),
>> -		.name		= "YT8521 Gigabit Ethernet",
>> -		.get_features	= yt8521_get_features,
>> -		.probe		= yt8521_probe,
> 
> Why are these all stoppering? diff would not remove them unless
> something is changing.
> 

Ans: after double check, no existing code logic has been modified. I guess the possible reason
is that git diff employs the Diff Algorithm, a "context minimization" strategy adopted to 
represent changes in the most compact manner. It consolidates modifications into a single block.

>     Andrew
> 
> ---
> pw-bot: cr

  reply	other threads:[~2026-07-15 11:57 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-14 11:12 [PATCH] net: phy: Add driver for Motorcomm Quad 2.5GbE phy Kyle Switch
2026-07-14 21:43 ` Andrew Lunn
2026-07-15 11:56   ` Kyle Switch [this message]
2026-07-14 21:46 ` Andrew Lunn
2026-07-15 11:59   ` Kyle Switch
2026-07-15 13:09     ` Andrew Lunn
2026-07-17  3:47       ` Kyle Switch
2026-08-05 12:26 ` kernel test robot
2026-08-05 22:28 ` kernel test robot

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=50549cc2-c5e4-42b1-9b81-8b9e7bebd60a@motor-comm.com \
    --to=kyle.switch@motor-comm.com \
    --cc=Frank.Sae@motor-comm.com \
    --cc=andrew@lunn.ch \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=hkallweit1@gmail.com \
    --cc=jianmin.wang@motor-comm.com \
    --cc=jie.han@motor-comm.com \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@armlinux.org.uk \
    --cc=ming.xu@motor-comm.com \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=xiaolin.xu@motor-comm.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