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: <2b1c9bec6824eeea8f9099482a7d762fc32edb15.camel@microchip.com>
Date:   Tue, 19 Jul 2022 15:58:16 +0000
From:   <Arun.Ramadoss@...rochip.com>
To:     <olteanv@...il.com>
CC:     <andrew@...n.ch>, <linux-kernel@...r.kernel.org>,
        <UNGLinuxDriver@...rochip.com>, <vivien.didelot@...il.com>,
        <linux@...linux.org.uk>, <f.fainelli@...il.com>, <kuba@...nel.org>,
        <edumazet@...gle.com>, <pabeni@...hat.com>,
        <netdev@...r.kernel.org>, <Woojung.Huh@...rochip.com>,
        <davem@...emloft.net>
Subject: Re: [RFC Patch net-next 01/10] net: dsa: microchip: lan937x: read
 rgmii delay from device tree

On Tue, 2022-07-19 at 13:28 +0300, Vladimir Oltean wrote:
> EXTERNAL EMAIL: Do not click links or open attachments unless you
> know the content is safe
> 
> On Tue, Jul 12, 2022 at 09:32:59PM +0530, Arun Ramadoss wrote:
> > This patch read the rgmii tx and rx delay from device tree and
> > stored it
> > in the ksz_port.
> > 
> > Signed-off-by: Arun Ramadoss <arun.ramadoss@...rochip.com>
> > ---
> 
> I think this patch should be squashed into the change that actually
> uses
> the parsed values.

Ok, I will Squash this patch.

> 
> >  drivers/net/dsa/microchip/ksz_common.c | 16 ++++++++++++++++
> >  drivers/net/dsa/microchip/ksz_common.h |  2 ++
> >  2 files changed, 18 insertions(+)
> > 
> > diff --git a/drivers/net/dsa/microchip/ksz_common.c
> > b/drivers/net/dsa/microchip/ksz_common.c
> > index 28d7cb2ce98f..4bc6277b4361 100644
> > --- a/drivers/net/dsa/microchip/ksz_common.c
> > +++ b/drivers/net/dsa/microchip/ksz_common.c
> > @@ -1499,6 +1499,7 @@ int ksz_switch_register(struct ksz_device
> > *dev)
> >       struct device_node *port, *ports;
> >       phy_interface_t interface;
> >       unsigned int port_num;
> > +     u32 *value;
> >       int ret;
> >       int i;
> > 
> > @@ -1589,6 +1590,21 @@ int ksz_switch_register(struct ksz_device
> > *dev)
> >                               }
> >                               of_get_phy_mode(port,
> >                                               &dev-
> > >ports[port_num].interface);
> > +
> > +                             if (!dev->info-
> > >supports_rgmii[port_num])
> > +                                     continue;
> > +
> > +                             value = &dev-
> > >ports[port_num].rgmii_rx_val;
> > +                             if (of_property_read_u32(port,
> > +                                                      "rx-
> > internal-delay-ps",
> > +                                                      value))
> > +                                     *value = 0;
> > +
> > +                             value = &dev-
> > >ports[port_num].rgmii_tx_val;
> > +                             if (of_property_read_u32(port,
> > +                                                      "tx-
> > internal-delay-ps",
> > +                                                      value))
> > +                                     *value = 0;
> >                       }
> >               dev->synclko_125 = of_property_read_bool(dev->dev-
> > >of_node,
> >                                                        "microchip,s
> > ynclko-125");
> > diff --git a/drivers/net/dsa/microchip/ksz_common.h
> > b/drivers/net/dsa/microchip/ksz_common.h
> > index d5dddb7ec045..41fe6388af9e 100644
> > --- a/drivers/net/dsa/microchip/ksz_common.h
> > +++ b/drivers/net/dsa/microchip/ksz_common.h
> > @@ -77,6 +77,8 @@ struct ksz_port {
> >       struct ksz_port_mib mib;
> >       phy_interface_t interface;
> >       u16 max_frame;
> > +     u32 rgmii_tx_val;
> > +     u32 rgmii_rx_val;
> >  };
> > 
> >  struct ksz_device {
> > --
> > 2.36.1
> > 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ