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>] [day] [month] [year] [list]
Date:   Tue, 11 Oct 2016 17:54:57 -0500
From:   Leo Li <pku.leo@...il.com>
To:     Marc Zyngier <maz@...terjones.org>,
        Linus Walleij <linus.walleij@...aro.org>,
        Alexandre Courbot <gnurou@...il.com>
Cc:     linux-gpio@...r.kernel.org, lkml <linux-kernel@...r.kernel.org>,
        Marc Zyngier <marc.zyngier@....com>
Subject: pca953x interrupt missing

Hi Marc,

You added the edge interrupt support to the pca953x driver with commit
(89ea8bbe9c). But recently I'm getting interrupt missing problem when
using the pca9555 as an interrupt controller.  After some research of
the PCA9555 data sheet, it seems to me that the hardware is not
capable of catching all edge changes without missing interrupt except
for the PCAL9555a variant with the latching support.  Quoted from the
pca9555 data sheet:

"The open-drain interrupt output is activated when one of the port
pins changes state and
the pin is configured as an input. The interrupt is deactivated when
the input returns to its
previous state or the Input Port register is read."

There is no latch register to record which pin has just changed.  So
if one of the input pin changes two times quickly before the read of
the Input Port register which is even more likely to happen as the
interrupt handling is delayed to work queue, we can not figure out
which pin has just changed by reading the Input Port register and
invoke the correct interrupt service routine.  However, I think it
would be possible to support level-sensitive interrupt input, as we
can get the current level through the Input Port register and figure
out which interrupt service routine to invoke.

I think we should remove the support for edge based interrupts for the
chips without the latching capability and add level based interrupt
support.  I'd like to have your thought on this.

Regards,
Leo

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ