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: <a8d13528857151652f39ce840567fad8650139e7.camel@microchip.com>
Date:   Wed, 30 Nov 2022 04:48:35 +0000
From:   <Arun.Ramadoss@...rochip.com>
To:     <pavan.chebbi@...adcom.com>
CC:     <andrew@...n.ch>, <linux-kernel@...r.kernel.org>,
        <UNGLinuxDriver@...rochip.com>, <vivien.didelot@...il.com>,
        <olteanv@...il.com>, <linux@...linux.org.uk>, <ceggers@...i.de>,
        <Tristram.Ha@...rochip.com>, <f.fainelli@...il.com>,
        <kuba@...nel.org>, <edumazet@...gle.com>, <pabeni@...hat.com>,
        <richardcochran@...il.com>, <netdev@...r.kernel.org>,
        <Woojung.Huh@...rochip.com>, <davem@...emloft.net>
Subject: Re: [Patch net-next v1 11/12] net: dsa: microchip: ptp: add periodic
 output signal

On Tue, 2022-11-29 at 15:27 +0530, Pavan Chebbi wrote:
> On Tue, Nov 29, 2022 at 2:23 PM Pavan Chebbi <
> pavan.chebbi@...adcom.com> wrote:
> > 
> > On Mon, Nov 28, 2022 at 4:05 PM Arun Ramadoss
> > <arun.ramadoss@...rochip.com> wrote:
> > 
> > > +static int ksz_ptp_enable(struct ptp_clock_info *ptp,
> > > +                         struct ptp_clock_request *req, int on)
> > > +{
> > > +       struct ksz_ptp_data *ptp_data = ptp_caps_to_data(ptp);
> > > +       struct ksz_device *dev = ptp_data_to_ksz_dev(ptp_data);
> > > +       struct ptp_perout_request *request = &req->perout;
> > > +       int ret;
> > > +
> > > +       switch (req->type) {
> > > +       case PTP_CLK_REQ_PEROUT:
> > > +               if (request->index > ptp->n_per_out)
> > > +                       return -EINVAL;
> > 
> > Should be -EOPNOTSUPP ? I see some other places where -EOPNOTSUPP
> > is
> > more appropriate.
> > 
> > > +
> > > +               mutex_lock(&ptp_data->lock);
> > > +               ret = ksz_ptp_enable_perout(dev, request, on);
> > > +               mutex_unlock(&ptp_data->lock);
> > > +               break;
> > > +       default:
> > > +               return -EINVAL;
> 
> OK I really meant here.

Ok. I will update -EINVAL to -EOPNOTSUPP.

> 
> > > +       }
> > > +
> > > +       return ret;
> > > +}
> > > +
> > >  /*  Function is pointer to the do_aux_work in the ptp_clock
> > > capability */
> > >  static long ksz_ptp_do_aux_work(struct ptp_clock_info *ptp)
> > >  {
> > > @@ -508,6 +823,8 @@ static const struct ptp_clock_info
> > > ksz_ptp_caps = {
> > >         .adjfine        = ksz_ptp_adjfine,
> > >         .adjtime        = ksz_ptp_adjtime,
> > >         .do_aux_work    = ksz_ptp_do_aux_work,
> > > +       .enable         = ksz_ptp_enable,
> > > +       .n_per_out      = 3,
> > >  };
> > > 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ