Date: Mon, 9 Jul 2018 09:09:40 -0700 From: John Baldwin <jhb@FreeBSD.org> To: Warner Losh <imp@FreeBSD.org>, src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r336066 - in head/sys: compat/linsysfs dev/pci Message-ID: <319074e8-e317-ce3c-3a92-94923fb55052@FreeBSD.org> In-Reply-To: <201807071525.w67FPBNO088877@repo.freebsd.org> References: <201807071525.w67FPBNO088877@repo.freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?319074e8-e317-ce3c-3a92-94923fb55052>