[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAHvy4AqyHUvm-0oAt88uxPazbpKvKO36goqpW2kyDoeyicxOjw@mail.gmail.com>
Date: Thu, 1 Aug 2024 17:48:55 +0200
From: Pieter <vtpieter@...il.com>
To: Arun.Ramadoss@...rochip.com
Cc: devicetree@...r.kernel.org, Woojung.Huh@...rochip.com,
UNGLinuxDriver@...rochip.com, netdev@...r.kernel.org, o.rempel@...gutronix.de,
pieter.van.trappen@...n.ch
Subject: Re: [PATCH net-next v2 3/5] net: dsa: microchip: generalize KSZ9477
WoL functions at ksz_common
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
Powered by blists - more mailing lists