lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID:
 <DM4PR11MB623920FDDE3B5FCCAA9633058B3D2@DM4PR11MB6239.namprd11.prod.outlook.com>
Date: Tue, 10 Dec 2024 06:42:54 +0000
From: <Tarun.Alle@...rochip.com>
To: <andrew@...n.ch>
CC: <Arun.Ramadoss@...rochip.com>, <UNGLinuxDriver@...rochip.com>,
	<hkallweit1@...il.com>, <linux@...linux.org.uk>, <davem@...emloft.net>,
	<edumazet@...gle.com>, <kuba@...nel.org>, <pabeni@...hat.com>,
	<netdev@...r.kernel.org>, <linux-kernel@...r.kernel.org>
Subject: RE: [PATCH net-next 2/2] net: phy: microchip_t1: Autonegotiaion
 support for LAN887x T1 phy

Hi Andrew,

Thanks for your review comments.

> -----Original Message-----
> From: Andrew Lunn <andrew@...n.ch>
> Sent: Monday, December 9, 2024 10:33 PM
> To: Tarun Alle - I68638 <Tarun.Alle@...rochip.com>
> Cc: Arun Ramadoss - I17769 <Arun.Ramadoss@...rochip.com>;
> UNGLinuxDriver <UNGLinuxDriver@...rochip.com>;
> hkallweit1@...il.com; linux@...linux.org.uk; davem@...emloft.net;
> edumazet@...gle.com; kuba@...nel.org; pabeni@...hat.com;
> netdev@...r.kernel.org; linux-kernel@...r.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.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ