]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
hdac: Handle interrupts racing with device suspend
authorMark Johnston <markj@FreeBSD.org>
Wed, 16 Mar 2022 16:09:17 +0000 (12:09 -0400)
committerMark Johnston <markj@FreeBSD.org>
Thu, 24 Mar 2022 15:42:11 +0000 (11:42 -0400)
commit9f83c6fa52fb7c5a256fed2f1a13735b66b8f7c2
tree0a470f5c2d33c755c2dcd9996b16466b7beed97f
parentca2b1e3480ba689cf32345ba87b6bb5bf1fe7c27
hdac: Handle interrupts racing with device suspend

- Avoid looping forever if a concurrent reset causes a read of the
  interrupt status register to return all ones.
- Lock the softc before reading the interrupt status, so as to avoid a
  similar infinite loop in hdac_one_intr().

This fixes suspend-to-S3 on some laptops.

Approved by: re (gjb)
PR: 261207
Reviewed by: mav, imp
Tested by: uqs
Sponsored by: The FreeBSD Foundation

(cherry picked from commit 077564cfdb7285ff7d256424715e563cbac36f8b)
(cherry picked from commit 18a3bada308d89928f170f4098c85cd3f11db864)
sys/dev/sound/pci/hda/hdac.c