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]
Date:   Wed, 15 Jun 2022 06:49:20 +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 v2 06/15] net: dsa: microchip: get P_STP_CTRL
 in ksz_port_stp_state by ksz_dev_ops

On Mon, 2022-06-13 at 12:31 +0300, Vladimir Oltean wrote:
> EXTERNAL EMAIL: Do not click links or open attachments unless you
> know the content is safe
> 
> On Mon, May 30, 2022 at 04:12:48PM +0530, Arun Ramadoss wrote:
> > At present, P_STP_CTRL register value is passed as parameter to
> > ksz_port_stp_state from the individual dsa_switch_ops hooks. This
> > patch
> > update the function to retrieve the register value through the
> > ksz_dev_ops function pointer.
> > And add the static to ksz_update_port_member since it is not called
> > outside the ksz_common.
> > 
> > Signed-off-by: Arun Ramadoss <arun.ramadoss@...rochip.com>
> > ---
> >  drivers/net/dsa/microchip/ksz8795.c    |  9 +++++----
> >  drivers/net/dsa/microchip/ksz9477.c    | 10 +++++-----
> >  drivers/net/dsa/microchip/ksz_common.c |  9 +++++----
> >  drivers/net/dsa/microchip/ksz_common.h |  5 ++---
> >  4 files changed, 17 insertions(+), 16 deletions(-)
> > 
> > diff --git a/drivers/net/dsa/microchip/ksz8795.c
> > b/drivers/net/dsa/microchip/ksz8795.c
> > index 8657b520b336..e6982fa9d382 100644
> > --- a/drivers/net/dsa/microchip/ksz8795.c
> > +++ b/drivers/net/dsa/microchip/ksz8795.c
> > @@ -920,9 +920,9 @@ static void ksz8_cfg_port_member(struct
> > ksz_device *dev, int port, u8 member)
> >       ksz_pwrite8(dev, port, P_MIRROR_CTRL, data);
> >  }
> > 
> > -static void ksz8_port_stp_state_set(struct dsa_switch *ds, int
> > port, u8 state)
> > +static int ksz8_get_stp_reg(void)
> >  {
> > -     ksz_port_stp_state_set(ds, port, state, P_STP_CTRL);
> > +     return P_STP_CTRL;
> >  }
> 
> Since there's nothing dynamic about get_stp_reg(), can the STP
> register
> location stay in struct ksz_chip_data?

I will update the ksz_chip_data for holding the address of STP_CTL 
register.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ