diff options
author | Jonathan Gray <jsg@cvs.openbsd.org> | 2020-05-31 04:58:39 +0000 |
---|---|---|
committer | Jonathan Gray <jsg@cvs.openbsd.org> | 2020-05-31 04:58:39 +0000 |
commit | b53b5d52307ccca87e152ec67a8c103119b09eb3 (patch) | |
tree | be0fe293750a5fe28187902761b4cf1b47500db1 /sys/dev/pci/azalia.c | |
parent | a61f0090d71e5750dfaa09081f83717b1b5fdf11 (diff) |
match on pci id for azalia device with wrong subclass
The HP EliteBook 850 G6 has an Intel 300 Series HD Audio device with pci
subclass of MULTIMEDIA_AUDIO instead of the expected MULTIMEDIA_HDAUDIO.
Match on the pci id to handle this.
Reported and tested by Bruno Flueckiger.
ok kettenis@ deraadt@
Diffstat (limited to 'sys/dev/pci/azalia.c')
-rw-r--r-- | sys/dev/pci/azalia.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/sys/dev/pci/azalia.c b/sys/dev/pci/azalia.c index 21b5d894354..d3b87e3b42c 100644 --- a/sys/dev/pci/azalia.c +++ b/sys/dev/pci/azalia.c @@ -1,4 +1,4 @@ -/* $OpenBSD: azalia.c,v 1.255 2020/04/18 21:55:56 ratchov Exp $ */ +/* $OpenBSD: azalia.c,v 1.256 2020/05/31 04:58:38 jsg Exp $ */ /* $NetBSD: azalia.c,v 1.20 2006/05/07 08:31:44 kent Exp $ */ /*- @@ -474,6 +474,10 @@ azalia_configure_pci(azalia_t *az) } } +const struct pci_matchid azalia_pci_devices[] = { + { PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_300SERIES_U_HDA } +}; + int azalia_pci_match(struct device *parent, void *match, void *aux) { @@ -483,7 +487,8 @@ azalia_pci_match(struct device *parent, void *match, void *aux) if (PCI_CLASS(pa->pa_class) == PCI_CLASS_MULTIMEDIA && PCI_SUBCLASS(pa->pa_class) == PCI_SUBCLASS_MULTIMEDIA_HDAUDIO) return 1; - return 0; + return pci_matchbyid((struct pci_attach_args *)aux, azalia_pci_devices, + nitems(azalia_pci_devices)); } void |