From: <Tarun.Alle@microchip.com>
To: <andrew@lunn.ch>
Cc: <Arun.Ramadoss@microchip.com>, <UNGLinuxDriver@microchip.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>
Subject: RE: [PATCH net-next 2/2] net: phy: microchip_t1: Autonegotiaion support for LAN887x T1 phy
Date: Tue, 10 Dec 2024 06:42:54 +0000 [thread overview]
Message-ID: <DM4PR11MB623920FDDE3B5FCCAA9633058B3D2@DM4PR11MB6239.namprd11.prod.outlook.com> (raw)
In-Reply-To: <20d00e72-f342-4dac-ba4c-1a66c8b25ef6@lunn.ch>
Hi Andrew,
Thanks for your review comments.
> -----Original Message-----
> From: Andrew Lunn <andrew@lunn.ch>
> Sent: Monday, December 9, 2024 10:33 PM
> To: Tarun Alle - I68638 <Tarun.Alle@microchip.com>
> Cc: Arun Ramadoss - I17769 <Arun.Ramadoss@microchip.com>;
> UNGLinuxDriver <UNGLinuxDriver@microchip.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
> Subject: Re: [PATCH net-next 2/2] net: phy: microchip_t1: Autonegotiaion
> support for LAN887x T1 phy
>
> EXTERNAL EMAIL: Do not click links or open attachments unless you know
> the content is safe
>
> > - if (phydev->master_slave_set == MASTER_SLAVE_CFG_MASTER_FORCE
> ||
> > - phydev->master_slave_set ==
> MASTER_SLAVE_CFG_MASTER_PREFERRED){
> > - static const struct lan887x_regwr_map phy_cfg[] = {
> > - {MDIO_MMD_PMAPMD,
> LAN887X_AFE_PORT_TESTBUS_CTRL4, 0x00b8},
> > - {MDIO_MMD_PMAPMD, LAN887X_TX_AMPLT_1000T1_REG,
> 0x0038},
> > - {MDIO_MMD_VEND1, LAN887X_INIT_COEFF_DFE1_100,
> 0x000f},
> > - };
> > -
> > - ret = lan887x_phy_config(phydev, phy_cfg, ARRAY_SIZE(phy_cfg));
> > + if (phydev->autoneg == AUTONEG_DISABLE) {
> > + if (phydev->master_slave_set ==
> MASTER_SLAVE_CFG_MASTER_FORCE ||
> > + phydev->master_slave_set ==
> > + MASTER_SLAVE_CFG_MASTER_PREFERRED) {
> > + ret = lan887x_phy_config(phydev, phy_comm_cfg,
> > + ARRAY_SIZE(phy_comm_cfg));
> > + } else {
> > + static const struct lan887x_regwr_map phy_cfg[] = {
> > + {MDIO_MMD_PMAPMD,
> LAN887X_AFE_PORT_TESTBUS_CTRL4,
> > + 0x0038},
> > + {MDIO_MMD_VEND1, LAN887X_INIT_COEFF_DFE1_100,
> > + 0x0014},
> > + };
> > +
> > + ret = lan887x_phy_config(phydev, phy_cfg,
> > + ARRAY_SIZE(phy_cfg));
> > + }
>
> It might be better to pull this apart into two helper functions? That would
> avoid most of the not so nice wrapping.
>
I will implement helper functions for each case.
> Andrew
Thanks,
Tarun Alle.
next prev parent reply other threads:[~2024-12-10 6:42 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-12-09 16:14 [PATCH net-next 0/2] Add auto-negotiation " Tarun Alle
2024-12-09 16:14 ` [PATCH net-next 1/2] net: phy: phy-c45: Auto-negotiaion changes for T1 phy in phy library Tarun Alle
2024-12-09 16:48 ` Russell King (Oracle)
2024-12-09 16:54 ` Andrew Lunn
2024-12-10 6:39 ` Tarun.Alle
2024-12-09 16:14 ` [PATCH net-next 2/2] net: phy: microchip_t1: Autonegotiaion support for LAN887x T1 phy Tarun Alle
2024-12-09 17:03 ` Andrew Lunn
2024-12-10 6:42 ` Tarun.Alle [this message]
2024-12-09 17:11 ` Andrew Lunn
2024-12-12 8:47 ` Tarun.Alle
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=DM4PR11MB623920FDDE3B5FCCAA9633058B3D2@DM4PR11MB6239.namprd11.prod.outlook.com \
--to=tarun.alle@microchip.com \
--cc=Arun.Ramadoss@microchip.com \
--cc=UNGLinuxDriver@microchip.com \
--cc=andrew@lunn.ch \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=hkallweit1@gmail.com \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@armlinux.org.uk \
--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
all inboxes | Powered by JetHome®