diff mbox series

[v4,net-next,2/2] net: phy: smsc: add LAN8742 phy support.

Message ID 20220505181252.32196-3-yuiko.oshino@microchip.com (mailing list archive)
State Accepted
Commit 53ad228682899689d8a3a0f91e399febe88a1db3
Delegated to: Netdev Maintainers
Headers show
Series net: phy: add LAN8742 phy support | expand

Checks

Context Check Description
netdev/tree_selection success Clearly marked for net-next
netdev/fixes_present success Fixes tag not required for -next series
netdev/subject_prefix success Link
netdev/cover_letter success Series has a cover letter
netdev/patch_count success Link
netdev/header_inline success No static functions without inline keyword in header files
netdev/build_32bit success Errors and warnings before: 0 this patch: 0
netdev/cc_maintainers warning 4 maintainers not CCed: linux@armlinux.org.uk edumazet@google.com hkallweit1@gmail.com pabeni@redhat.com
netdev/build_clang success Errors and warnings before: 0 this patch: 0
netdev/module_param success Was 0 now: 0
netdev/verify_signedoff success Signed-off-by tag matches author and committer
netdev/verify_fixes success No Fixes tag
netdev/build_allmodconfig_warn success Errors and warnings before: 0 this patch: 0
netdev/checkpatch success total: 0 errors, 0 warnings, 0 checks, 39 lines checked
netdev/kdoc success Errors and warnings before: 0 this patch: 0
netdev/source_inline success Was 0 now: 0

Commit Message

Yuiko Oshino May 5, 2022, 6:12 p.m. UTC
The current phy IDs on the available hardware.
        LAN8742 0x0007C130, 0x0007C131

Signed-off-by: Yuiko Oshino <yuiko.oshino@microchip.com>
---
 drivers/net/phy/smsc.c | 27 +++++++++++++++++++++++++++
 1 file changed, 27 insertions(+)

Comments

Andrew Lunn May 5, 2022, 7:29 p.m. UTC | #1
On Thu, May 05, 2022 at 11:12:52AM -0700, Yuiko Oshino wrote:
> The current phy IDs on the available hardware.
>         LAN8742 0x0007C130, 0x0007C131
> 
> Signed-off-by: Yuiko Oshino <yuiko.oshino@microchip.com>

Reviewed-by: Andrew Lunn <andrew@lunn.ch>

    Andrew
Jakub Kicinski May 6, 2022, 10:45 p.m. UTC | #2
On Thu, 5 May 2022 21:29:13 +0200 Andrew Lunn wrote:
> On Thu, May 05, 2022 at 11:12:52AM -0700, Yuiko Oshino wrote:
> > The current phy IDs on the available hardware.
> >         LAN8742 0x0007C130, 0x0007C131
> > 
> > Signed-off-by: Yuiko Oshino <yuiko.oshino@microchip.com>  
> 
> Reviewed-by: Andrew Lunn <andrew@lunn.ch>

The comments which I think were requested in the review of v2 and
appeared in v3 are now gone, again. Is that okay?
Andrew Lunn May 7, 2022, 1:48 p.m. UTC | #3
On Fri, May 06, 2022 at 03:45:13PM -0700, Jakub Kicinski wrote:
> On Thu, 5 May 2022 21:29:13 +0200 Andrew Lunn wrote:
> > On Thu, May 05, 2022 at 11:12:52AM -0700, Yuiko Oshino wrote:
> > > The current phy IDs on the available hardware.
> > >         LAN8742 0x0007C130, 0x0007C131
> > > 
> > > Signed-off-by: Yuiko Oshino <yuiko.oshino@microchip.com>  
> > 
> > Reviewed-by: Andrew Lunn <andrew@lunn.ch>
> 
> The comments which I think were requested in the review of v2 and
> appeared in v3 are now gone, again. Is that okay?

Ah, i had not noticed. Thanks for pointing it out.

Those comments are important, since these mask are odd, somebody is
either going to ask about them, or try to 'fix' them. Some robot will
fall over them, etc.

     Andrew
Yuiko Oshino May 9, 2022, 11:45 a.m. UTC | #4
>-----Original Message-----
>From: Jakub Kicinski <kuba@kernel.org>
>Sent: Friday, May 6, 2022 6:45 PM
>To: Andrew Lunn <andrew@lunn.ch>
>Cc: Yuiko Oshino - C18177 <Yuiko.Oshino@microchip.com>; Woojung Huh -
>C21699 <Woojung.Huh@microchip.com>; davem@davemloft.net;
>netdev@vger.kernel.org; Ravi Hegde - C21689 <Ravi.Hegde@microchip.com>;
>UNGLinuxDriver <UNGLinuxDriver@microchip.com>
>Subject: Re: [PATCH v4 net-next 2/2] net: phy: smsc: add LAN8742 phy support.
>
>EXTERNAL EMAIL: Do not click links or open attachments unless you know the
>content is safe
>
>On Thu, 5 May 2022 21:29:13 +0200 Andrew Lunn wrote:
>> On Thu, May 05, 2022 at 11:12:52AM -0700, Yuiko Oshino wrote:
>> > The current phy IDs on the available hardware.
>> >         LAN8742 0x0007C130, 0x0007C131
>> >
>> > Signed-off-by: Yuiko Oshino <yuiko.oshino@microchip.com>
>>
>> Reviewed-by: Andrew Lunn <andrew@lunn.ch>
>
>The comments which I think were requested in the review of v2 and appeared in v3
>are now gone, again. Is that okay?

Thank you for the review.
Sorry, I will fix it (add the comments) and re-submit.
Yuiko
Yuiko Oshino May 9, 2022, 1:47 p.m. UTC | #5
>-----Original Message-----
>From: Andrew Lunn <andrew@lunn.ch>
>Sent: Saturday, May 7, 2022 9:49 AM
>To: Jakub Kicinski <kuba@kernel.org>
>Cc: Yuiko Oshino - C18177 <Yuiko.Oshino@microchip.com>; Woojung Huh - C21699
><Woojung.Huh@microchip.com>; davem@davemloft.net; netdev@vger.kernel.org; Ravi
>Hegde - C21689 <Ravi.Hegde@microchip.com>; UNGLinuxDriver
><UNGLinuxDriver@microchip.com>
>Subject: Re: [PATCH v4 net-next 2/2] net: phy: smsc: add LAN8742 phy support.
>
>EXTERNAL EMAIL: Do not click links or open attachments unless you know the content is
>safe
>
>On Fri, May 06, 2022 at 03:45:13PM -0700, Jakub Kicinski wrote:
>> On Thu, 5 May 2022 21:29:13 +0200 Andrew Lunn wrote:
>> > On Thu, May 05, 2022 at 11:12:52AM -0700, Yuiko Oshino wrote:
>> > > The current phy IDs on the available hardware.
>> > >         LAN8742 0x0007C130, 0x0007C131
>> > >
>> > > Signed-off-by: Yuiko Oshino <yuiko.oshino@microchip.com>
>> >
>> > Reviewed-by: Andrew Lunn <andrew@lunn.ch>
>>
>> The comments which I think were requested in the review of v2 and
>> appeared in v3 are now gone, again. Is that okay?
>
>Ah, i had not noticed. Thanks for pointing it out.
>
>Those comments are important, since these mask are odd, somebody is either going to
>ask about them, or try to 'fix' them. Some robot will fall over them, etc.
>
>     Andrew

Hi Andrew and Jakub,
I see that the patches are already applied to net-next?
So should I create a new series with the missing comments only rather than doing v5?
Please let me know.
Thank you.
Yuiko
Andrew Lunn May 9, 2022, 1:50 p.m. UTC | #6
> So should I create a new series with the missing comments only
> rather than doing v5?

Yes please.

    Andrew
Yuiko Oshino May 9, 2022, 2:24 p.m. UTC | #7
>-----Original Message-----
>From: Andrew Lunn <andrew@lunn.ch>
>Sent: Monday, May 9, 2022 9:51 AM
>To: Yuiko Oshino - C18177 <Yuiko.Oshino@microchip.com>
>Cc: kuba@kernel.org; Woojung Huh - C21699 <Woojung.Huh@microchip.com>;
>davem@davemloft.net; netdev@vger.kernel.org; Ravi Hegde - C21689
><Ravi.Hegde@microchip.com>; UNGLinuxDriver <UNGLinuxDriver@microchip.com>
>Subject: Re: [PATCH v4 net-next 2/2] net: phy: smsc: add LAN8742 phy support.
>
>EXTERNAL EMAIL: Do not click links or open attachments unless you know the content is
>safe
>
>> So should I create a new series with the missing comments only rather
>> than doing v5?
>
>Yes please.
>
>    Andrew

May I also fix this missing one tab after the phy_id in smsc.c in the same patch?

+	.phy_id	= 0x0007c130,	/* 0x0007c130 and 0x0007c131 */
+	.phy_id_mask	= 0xfffffff2,
+
Jakub Kicinski May 9, 2022, 4:35 p.m. UTC | #8
On Mon, 9 May 2022 14:24:44 +0000 Yuiko.Oshino@microchip.com wrote:
> May I also fix this missing one tab after the phy_id in smsc.c in the same patch?
> 
> +	.phy_id	= 0x0007c130,	/* 0x0007c130 and 0x0007c131 */
> +	.phy_id_mask	= 0xfffffff2,
> +

Seems like an okay change to make in addition in adding the comments.
Both are non-functional changes, anyway.
diff mbox series

Patch

diff --git a/drivers/net/phy/smsc.c b/drivers/net/phy/smsc.c
index d8cac02a79b9..44fa9e00cc50 100644
--- a/drivers/net/phy/smsc.c
+++ b/drivers/net/phy/smsc.c
@@ -481,6 +481,32 @@  static struct phy_driver smsc_phy_driver[] = {
 	.get_strings	= smsc_get_strings,
 	.get_stats	= smsc_get_stats,
 
+	.suspend	= genphy_suspend,
+	.resume		= genphy_resume,
+}, {
+	.phy_id	= 0x0007c130,	/* 0x0007c130 and 0x0007c131 */
+	.phy_id_mask	= 0xfffffff2,
+	.name		= "Microchip LAN8742",
+
+	/* PHY_BASIC_FEATURES */
+	.flags		= PHY_RST_AFTER_CLK_EN,
+
+	.probe		= smsc_phy_probe,
+
+	/* basic functions */
+	.read_status	= lan87xx_read_status,
+	.config_init	= smsc_phy_config_init,
+	.soft_reset	= smsc_phy_reset,
+
+	/* IRQ related */
+	.config_intr	= smsc_phy_config_intr,
+	.handle_interrupt = smsc_phy_handle_interrupt,
+
+	/* Statistics */
+	.get_sset_count = smsc_get_sset_count,
+	.get_strings	= smsc_get_strings,
+	.get_stats	= smsc_get_stats,
+
 	.suspend	= genphy_suspend,
 	.resume		= genphy_resume,
 } };
@@ -498,6 +524,7 @@  static struct mdio_device_id __maybe_unused smsc_tbl[] = {
 	{ 0x0007c0d0, 0xfffffff0 },
 	{ 0x0007c0f0, 0xfffffff0 },
 	{ 0x0007c110, 0xfffffff0 },
+	{ 0x0007c130, 0xfffffff2 },
 	{ }
 };