CVSROOT: /cvs Module name: src Changes by: s...@cvs.openbsd.org 2021/11/07 07:07:43
Modified files: sys/dev/ic : dwiic.c Log message: Fix handling of interrupts shared between multiple dwiic(4) devices. Interrupt sharing did not work correctly when two dwiic(4) devices share an interrupt line. We ended up with an interrupt storm. One of the two interrupt handlers would see interrupt status bits set to zero but claim the interrupt regardless. The second handler would never get to run, and the interrupt condition on the second device was not cleared as a result. Fix this by returning zero from dwiic_intr() if the device's interrupt status bits read back as zero. The storm occurred as soon as X11 was started. xenodm(1) never managed to display its login prompt. Observed on the Thinkpad Helix2 which had been unable to start X since dwiic(4) started to attach on this machine in 2018. (I already saw the problem back then but never dug into it, and temporarily lost access to helix2 hardware for a long time.) With help from jcs@ who provided debugging hints already back in 2018. ok kettenis@