svn commit: r278216 - head/sys/arm/ti

Luiz Otavio O Souza loos at FreeBSD.org
Wed Feb 4 18:35:50 UTC 2015


Author: loos
Date: Wed Feb  4 18:35:49 2015
New Revision: 278216
URL: https://svnweb.freebsd.org/changeset/base/278216

Log:
  Fix a bug where an interrupt could be masked unintentionally when
  bus_config_intr() is called with the same interrupt type and polarity that
  is already set.
  
  Pointy hat:	loos

Modified:
  head/sys/arm/ti/ti_gpio.c

Modified: head/sys/arm/ti/ti_gpio.c
==============================================================================
--- head/sys/arm/ti/ti_gpio.c	Wed Feb  4 18:15:28 2015	(r278215)
+++ head/sys/arm/ti/ti_gpio.c	Wed Feb  4 18:35:49 2015	(r278216)
@@ -1004,7 +1004,7 @@ ti_gpio_config_intr(device_t dev, int ir
 		val |= TI_GPIO_MASK(irq);
 		ti_gpio_write_4(sc, TI_GPIO_BANK(irq), reg, val);
 	}
-	if (oldreg != 0) {
+	if (reg != oldreg && oldreg != 0) {
 		/* Remove the old settings. */
 		val = ti_gpio_read_4(sc, TI_GPIO_BANK(irq), oldreg);
 		val &= ~TI_GPIO_MASK(irq);


More information about the svn-src-head mailing list