]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commit
HID: intel-ish: ipc: handle PIMR before ish_wakeup also clear PISR busy_clear bit
authorSong Hongyan <hongyan.song@intel.com>
Tue, 22 Jan 2019 01:06:26 +0000 (09:06 +0800)
committerKleber Sacilotto de Souza <kleber.souza@canonical.com>
Wed, 14 Aug 2019 09:18:49 +0000 (11:18 +0200)
commitc024f16ca2d96086b480208edeefe8661bc020c5
tree1488db4c45bdeab1f5a255bb71761c6d52c4f667
parent00bb2a9a49afadaf0593044847ba172a27b8aeab
HID: intel-ish: ipc: handle PIMR before ish_wakeup also clear PISR busy_clear bit

BugLink: https://bugs.launchpad.net/bugs/1838116
[ Upstream commit 2edefc056e4f0e6ec9508dd1aca2c18fa320efef ]

Host driver should handle interrupt mask register earlier than wake up ish FW
else there will be conditions when FW interrupt comes, host PIMR register still
not set ready, so move the interrupt mask setting before ish_wakeup.

Clear PISR busy_clear bit in ish_irq_handler. If not clear, there will be
conditions host driver received a busy_clear interrupt (before the busy_clear
mask bit is ready), it will return IRQ_NONE after check_generated_interrupt,
the interrupt will never be cleared, causing the DEVICE not sending following
IRQ.

Since PISR clear should not be called for the CHV device we do this change.
After the change, both ISH2HOST interrupt and busy_clear interrupt will be
considered as interrupt from ISH, busy_clear interrupt will return IRQ_HANDLED
from IPC_IS_BUSY check.

Signed-off-by: Song Hongyan <hongyan.song@intel.com>
Acked-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Khalid Elmously <khalid.elmously@canonical.com>
drivers/hid/intel-ish-hid/ipc/ipc.c