> Date: Fri, 29 May 2020 19:55:25 +1000
> From: Jonathan Gray <j...@jsg.id.au>
> Content-Type: text/plain; charset=us-ascii
> Content-Disposition: inline
> 
> On Fri, May 29, 2020 at 11:25:44AM +0200, Bruno Flueckiger wrote:
> > Hi,
> > 
> > My brand new laptop HP EliteBook 850 G6 comes with an Intel 300 Series
> > HD Audio device rev 0x11. The device shows up as not configured in the
> > dmesg. The PCI config space of the device identifies its subclass as
> > PCI_SUBCLASS_MULTIMEDIA_AUDIO instead of PCI_SUBCLASS_MULTIMEDIA_HDAUDIO
> > 
> > The patch below makes the device work just fine on my laptop.
> > 
> > Cheers,
> > Bruno
> 
> I think it would be better to match on the id in that case as non-azalia
> devices use the audio class.

Agreed.  ok kettenis@

> Index: azalia.c
> ===================================================================
> RCS file: /cvs/src/sys/dev/pci/azalia.c,v
> retrieving revision 1.255
> diff -u -p -r1.255 azalia.c
> --- azalia.c  18 Apr 2020 21:55:56 -0000      1.255
> +++ azalia.c  29 May 2020 09:51:06 -0000
> @@ -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, 
>       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
> 
> 

Reply via email to