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: <ZuKP6XcWTSk0SUn4@HYD-DK-UNGSW21.microchip.com>
Date: Thu, 12 Sep 2024 12:23:29 +0530
From: Raju Lakkaraju <Raju.Lakkaraju@...rochip.com>
To: Andrew Lunn <andrew@...n.ch>
CC: Raju Lakkaraju <Raju.Lakkaraju@...rochip.com>, <netdev@...r.kernel.org>,
	<davem@...emloft.net>, <edumazet@...gle.com>, <kuba@...nel.org>,
	<pabeni@...hat.com>, <bryan.whitehead@...rochip.com>,
	<UNGLinuxDriver@...rochip.com>, <linux@...linux.org.uk>,
	<maxime.chevallier@...tlin.com>, <rdunlap@...radead.org>,
	<Steen.Hegelund@...rochip.com>, <daniel.machon@...rochip.com>,
	<linux-kernel@...r.kernel.org>
Subject: Re: [PATCH net-next V2 4/5] net: lan743x: Implement phylink pcs

Hi Andrew,

The 09/11/2024 19:26, Andrew Lunn wrote:
> EXTERNAL EMAIL: Do not click links or open attachments unless you know the content is safe
> 
> > +static int pci11x1x_pcs_read(struct mii_bus *bus, int addr, int devnum,
> > +                          int regnum)
> > +{
> > +     struct lan743x_adapter *adapter = bus->priv;
> > +
> > +     if (addr)
> > +             return -EOPNOTSUPP;
> > +
> > +     return lan743x_sgmii_read(adapter, devnum, regnum);
> > +}
> 
> >  static int lan743x_mdiobus_init(struct lan743x_adapter *adapter)
> >  {
> > +     struct dw_xpcs *xpcs;
> >       u32 sgmii_ctl;
> >       int ret;
> >
> > @@ -3783,8 +3823,17 @@ static int lan743x_mdiobus_init(struct lan743x_adapter *adapter)
> >                                 "SGMII operation\n");
> >                       adapter->mdiobus->read = lan743x_mdiobus_read_c22;
> >                       adapter->mdiobus->write = lan743x_mdiobus_write_c22;
> > -                     adapter->mdiobus->read_c45 = lan743x_mdiobus_read_c45;
> > -                     adapter->mdiobus->write_c45 = lan743x_mdiobus_write_c45;
> > +                     if (adapter->is_sfp_support_en) {
> > +                             adapter->mdiobus->read_c45 =
> > +                                     pci11x1x_pcs_read;
> > +                             adapter->mdiobus->write_c45 =
> > +                                     pci11x1x_pcs_write;
> 
> As you can see, the naming convention is to put the bus transaction
> type on the end. So please name these pci11x1x_pcs_read_c45...

Accpeted. I will fix

> 
> Also, am i reading this correct. C22 transfers will go out a
> completely different bus to C45 transfers when there is an SFP?

No. You are correct.
This LAN743x driver support following chips
1. LAN7430 - C22 only with GMII/RGMII I/F
2. LAN7431 - C22 only with MII I/F
3. PCI11010/PCI11414 - C45 with RGMII or SGMII/1000Base-X/2500Base-X
   If SFP enable, then XPCS's C45 PCS access
   If SGMII only enable, then SGMII (PCS) C45 access

> 
> If there are two physical MDIO busses, please instantiate two Linux
> MDIO busses.
> 

XPCS driver is doing.
Am i miss anything there?

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

-- 
Thanks,                                                                         
Raju

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ