From owner-svn-src-head@freebsd.org Mon Jul 9 16:09:43 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9874F10346F6; Mon, 9 Jul 2018 16:09:43 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from mail.baldwin.cx (bigwig.baldwin.cx [IPv6:2001:470:1f11:75::1]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3F8F876B18; Mon, 9 Jul 2018 16:09:43 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from John-Baldwins-MacBook-Pro-2.local (unknown [IPv6:2601:648:8880:1e30:8e7:68a6:558a:7a6]) by mail.baldwin.cx (Postfix) with ESMTPSA id B2C3C10AFD4; Mon, 9 Jul 2018 12:09:41 -0400 (EDT) Subject: Re: svn commit: r336066 - in head/sys: compat/linsysfs dev/pci To: Warner Losh , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201807071525.w67FPBNO088877@repo.freebsd.org> From: John Baldwin Message-ID: <319074e8-e317-ce3c-3a92-94923fb55052@FreeBSD.org> Date: Mon, 9 Jul 2018 09:09:40 -0700 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:52.0) Gecko/20100101 Thunderbird/52.8.0 MIME-Version: 1.0 In-Reply-To: <201807071525.w67FPBNO088877@repo.freebsd.org> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.4.3 (mail.baldwin.cx); Mon, 09 Jul 2018 12:09:42 -0400 (EDT) X-Virus-Scanned: clamav-milter 0.99.2 at mail.baldwin.cx X-Virus-Status: Clean X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 09 Jul 2018 16:09:43 -0000 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