Re: [PATCH net-next v2 3/5] net: dsa: microchip: generalize KSZ9477 WoL functions at ksz_common

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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




[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]


  Powered by Linux