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] [day] [month] [year] [list]
Date:   Mon, 12 Dec 2022 10:13:46 +0000
From:   <Arun.Ramadoss@...rochip.com>
To:     <linux-kernel@...r.kernel.org>, <netdev@...r.kernel.org>,
        <ceggers@...i.de>
CC:     <olteanv@...il.com>, <UNGLinuxDriver@...rochip.com>,
        <vivien.didelot@...il.com>, <andrew@...n.ch>,
        <linux@...linux.org.uk>, <Tristram.Ha@...rochip.com>,
        <f.fainelli@...il.com>, <kuba@...nel.org>, <edumazet@...gle.com>,
        <pabeni@...hat.com>, <richardcochran@...il.com>,
        <Woojung.Huh@...rochip.com>, <davem@...emloft.net>
Subject: Re: [Patch net-next v3 05/13] net: dsa: microchip: ptp: enable
 interrupt for timestamping

Hi Christian,
Thanks for the comment.

On Fri, 2022-12-09 at 20:40 +0100, Christian Eggers wrote:
> EXTERNAL EMAIL: Do not click links or open attachments unless you
> know the content is safe
> 
> Hi Arun,
> 
> On Friday, 9 December 2022, 08:24:29 CET, Arun Ramadoss wrote:
> > PTP Interrupt mask and status register differ from the global and
> > port
> > interrupt mechanism by two methods. One is that for global/port
> > interrupt enabling we have to clear the bit but for ptp interrupt
> > we
> > have to set the bit. And other is bit12:0 is reserved in ptp
> > interrupt
> > registers. This forced to not use the generic implementation of
> > global/port interrupt method routine. This patch implement the ptp
> > interrupt mechanism to read the timestamp register for sync,
> > pdelay_req
> > and pdelay_resp.
> > 
> > Signed-off-by: Arun Ramadoss <arun.ramadoss@...rochip.com>
> > 
> > +
> > +             ret = request_threaded_irq(ptpmsg_irq->irq_num, NULL,
> > +                                        ksz_ptp_msg_thread_fn,
> > +                                        IRQF_ONESHOT |
> > IRQF_TRIGGER_FALLING,
> 
> I assume that IRQF_TRIGGER_FALLING is not required here as nested
> interrupts are fired by
> software (withing having an edge / a level).  Additionally I had to
> remove all existing
> occurrences of this flag in ksz_common.c in order to rid of
> persistent "timed out while
> polling for tx timestamp" messages which appeared randomly after some
> time of operation.
> I think that on i.MX6 I need to use level triggered interrupts
> instead of edge triggered
> ones.  Additionally I think that such flags should be set in the
> device tree instead of
> the driver:
> 
> https://stackoverflow.com/a/40051191

I will remove IRQF_TRIGGER_FALLING from the ksz_ptp.c in next patch
version. To remove the flag in ksz_common.c, I will send bug fix patch
separately.

> 
> 
> > +             if (ret)
> > +                     goto out;
> > +     }
> > +
> > +     return 0;
> > +
> > +out:
> > +     while (n--)
> > +             irq_dispose_mapping(port->ptpmsg_irq[n].irq_num);
> > +
> > +     return ret;
> > +}
> > 
> > 
> 
> 
> 
> 

Powered by blists - more mailing lists