devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Pieter <vtpieter@gmail.com>
To: Arun.Ramadoss@microchip.com
Cc: devicetree@vger.kernel.org, Woojung.Huh@microchip.com,
	 UNGLinuxDriver@microchip.com, netdev@vger.kernel.org,
	o.rempel@pengutronix.de,  pieter.van.trappen@cern.ch
Subject: Re: [PATCH net-next v2 3/5] net: dsa: microchip: generalize KSZ9477 WoL functions at ksz_common
Date: Thu, 1 Aug 2024 17:48:55 +0200	[thread overview]
Message-ID: <CAHvy4AqyHUvm-0oAt88uxPazbpKvKO36goqpW2kyDoeyicxOjw@mail.gmail.com> (raw)
In-Reply-To: <925034c0e0714fce5859d829fdb0ad6cd82f71d7.camel@microchip.com>

Hi Arun,

> > @@ -1051,12 +1052,12 @@ void ksz9477_port_setup(struct ksz_device
> > *dev, int port, bool cpu_port)
> >         ksz9477_port_acl_init(dev, port);
> >
> >         /* clear pending wake flags */
> > -       ksz9477_handle_wake_reason(dev, port);
> > +       ksz_handle_wake_reason(dev, port);
> >
> >         /* Disable all WoL options by default. Otherwise
> >          * ksz_switch_macaddr_get/put logic will not work properly.
> >          */
> > -       ksz_pwrite8(dev, port, REG_PORT_PME_CTRL, 0);
> > +       ksz_pwrite8(dev, port, regs[REG_PORT_PME_CTRL], 0);
>
> check the return value.

Thanks but since it's a void function, I cannot pass a non-zero return value
so is there a point checking it?

>
> >  }
> >
> >  void ksz9477_config_cpu_port(struct dsa_switch *ds)
> > @@ -1153,6 +1154,7 @@ int ksz9477_enable_stp_addr(struct ksz_device
> > *dev)
> >  int ksz9477_setup(struct dsa_switch *ds)
> >  {
> >         struct ksz_device *dev = ds->priv;
> > +       const u16 *regs = dev->info->regs;
> >         int ret = 0;
> >
> >         ds->mtu_enforcement_ingress = true;
> > @@ -1183,11 +1185,11 @@ int ksz9477_setup(struct dsa_switch *ds)
> >         /* enable global MIB counter freeze function */
> >         ksz_cfg(dev, REG_SW_MAC_CTRL_6, SW_MIB_COUNTER_FREEZE, true);
> >
> > -       /* Make sure PME (WoL) is not enabled. If requested, it will
> > be
> > -        * enabled by ksz9477_wol_pre_shutdown(). Otherwise, some
> > PMICs do not
> > -        * like PME events changes before shutdown.
> > +       /* Make sure PME (WoL) is not enabled. If requested, it will
> > +        * be enabled by ksz_wol_pre_shutdown(). Otherwise, some
> > PMICs
> > +        * do not like PME events changes before shutdown.
> >          */
> > -       ksz_write8(dev, REG_SW_PME_CTRL, 0);
> > +       ksz_write8(dev, regs[REG_SW_PME_CTRL], 0);
>
> here also.

Thanks will do.

Cheers, Pieter

  reply	other threads:[~2024-08-01 15:49 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-07-31 10:33 [PATCH net-next v2 0/5] net: dsa: microchip: ksz8795: add Wake on LAN support vtpieter
2024-07-31 10:33 ` [PATCH net-next v2 1/5] dt-bindings: net: dsa: microchip: add microchip,pme-active-high flag vtpieter
2024-07-31 10:34 ` [PATCH net-next v2 2/5] net: dsa: microchip: move KSZ9477 WoL functions to ksz_common vtpieter
2024-07-31 20:10   ` Simon Horman
2024-08-01  6:45     ` Pieter
2024-08-02  4:56       ` Oleksij Rempel
2024-07-31 10:34 ` [PATCH net-next v2 3/5] net: dsa: microchip: generalize KSZ9477 WoL functions at ksz_common vtpieter
2024-08-01 15:22   ` Arun.Ramadoss
2024-08-01 15:48     ` Pieter [this message]
2024-07-31 10:34 ` [PATCH net-next v2 4/5] net: dsa: microchip: add WoL support for KSZ87xx family vtpieter
2024-08-01 15:16   ` Arun.Ramadoss
2024-07-31 10:34 ` [PATCH net-next v2 5/5] net: dsa: microchip: check erratum workaround through indirect register read vtpieter
2024-08-02  7:48   ` Oleksij Rempel

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=CAHvy4AqyHUvm-0oAt88uxPazbpKvKO36goqpW2kyDoeyicxOjw@mail.gmail.com \
    --to=vtpieter@gmail.com \
    --cc=Arun.Ramadoss@microchip.com \
    --cc=UNGLinuxDriver@microchip.com \
    --cc=Woojung.Huh@microchip.com \
    --cc=devicetree@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=o.rempel@pengutronix.de \
    --cc=pieter.van.trappen@cern.ch \
    /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;
as well as URLs for NNTP newsgroup(s).