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-next>] [day] [month] [year] [list]
Message-Id: <1374485092-13211-1-git-send-email-p.zabel@pengutronix.de>
Date:	Mon, 22 Jul 2013 11:24:52 +0200
From:	Philipp Zabel <p.zabel@...gutronix.de>
To:	linux-kernel@...r.kernel.org
Cc:	Mark Brown <broonie@...nel.org>,
	Philipp Zabel <p.zabel@...gutronix.de>
Subject: [PATCH] regmap: irq: Acknowledge also interrupts that are masked

In case the hardware interrupt mask register does not prevent the chip level
irq from being asserted by the corresponding interrupt status bit, stray
masked interrupts should to be acknowledged, too.

Signed-off-by: Philipp Zabel <p.zabel@...gutronix.de>
---
I have seen GPI interrupts trigger on DA9063 trigger after being masked during
initialization, and once the status bits are set, the interrupt handler routine
never clears them, which keeps the chip irq line asserted forever.
---
 drivers/base/regmap/regmap-irq.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/base/regmap/regmap-irq.c b/drivers/base/regmap/regmap-irq.c
index 1643e88..0bdf43f 100644
--- a/drivers/base/regmap/regmap-irq.c
+++ b/drivers/base/regmap/regmap-irq.c
@@ -253,8 +253,6 @@ static irqreturn_t regmap_irq_thread(int irq, void *d)
 	 * doing a write per register.
 	 */
 	for (i = 0; i < data->chip->num_regs; i++) {
-		data->status_buf[i] &= ~data->mask_buf[i];
-
 		if (data->status_buf[i] && chip->ack_base) {
 			reg = chip->ack_base +
 				(i * map->reg_stride * data->irq_reg_stride);
@@ -263,6 +261,8 @@ static irqreturn_t regmap_irq_thread(int irq, void *d)
 				dev_err(map->dev, "Failed to ack 0x%x: %d\n",
 					reg, ret);
 		}
+
+		data->status_buf[i] &= ~data->mask_buf[i];
 	}
 
 	for (i = 0; i < chip->num_irqs; i++) {
-- 
1.8.3.2

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ