On 7/7/18 8:25 AM, Warner Losh wrote:
> Author: imp
> Date: Sat Jul  7 15:25:11 2018
> New Revision: 336066
> URL: https://svnweb.freebsd.org/changeset/base/336066
> 
> Log:
>   Create PCI_MATCH and pci_match_device
>   
>   Create a covenience function to match PCI device IDs. It's about 15
>   years overdue.
>   
>   Differential Revision: https://reviews.freebsd.org/D15999
> 
> Modified:
>   head/sys/compat/linsysfs/linsysfs.c
>   head/sys/dev/pci/pci.c
>   head/sys/dev/pci/pcivar.h
> 
> Modified: head/sys/dev/pci/pcivar.h
> ==============================================================================
> --- head/sys/dev/pci/pcivar.h Sat Jul  7 15:25:06 2018        (r336065)
> +++ head/sys/dev/pci/pcivar.h Sat Jul  7 15:25:11 2018        (r336066)
> @@ -259,6 +259,66 @@ typedef struct {
>  
>  extern uint32_t pci_numdevs;
>  
> +struct pci_device_table {
> +#if BYTE_ORDER == LITTLE_ENDIAN
> +     uint16_t
> +             match_flag_vendor:1,
> +             match_flag_device:1,
> +             match_flag_subvendor:1,
> +             match_flag_subdevice:1,
> +             match_flag_class:1,
> +             match_flag_subclass:1,
> +             match_flag_revid:1,
> +             match_flag_unused:9;
> +#else
> +     uint16_t
> +             match_flag_unused:9,
> +             match_flag_revid:1,
> +             match_flag_subclass:1,
> +             match_flag_class:1,
> +             match_flag_subdevice:1,
> +             match_flag_subvendor:1,
> +             match_flag_device:1,
> +             match_flag_vendor:1;
> +#endif
> +     uint16_t        vendor;
> +     uint16_t        device;
> +     uint16_t        subvendor;
> +     uint16_t        subdevice;
> +     uint16_t        class_id;
> +     uint16_t        subclass;
> +     uint16_t        revid;
> +     uint16_t        unused;
> +     uintptr_t       driver_data;
> +     char            *descr;

This should probably be 'const char *'?

-- 
John Baldwin
_______________________________________________
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"

Reply via email to