From owner-freebsd-drivers@FreeBSD.ORG Sat Jul 6 16:10:32 2013 Return-Path: Delivered-To: freebsd-drivers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 42D88A2C for ; Sat, 6 Jul 2013 16:10:32 +0000 (UTC) (envelope-from cg@cgross.info) Received: from alpha.kreiz-it.fr (alpha.kreiz-it.fr [178.32.219.166]) by mx1.freebsd.org (Postfix) with ESMTP id 0EDE51BE4 for ; Sat, 6 Jul 2013 16:10:31 +0000 (UTC) Received: from DirTech (lnr56-1-82-246-51-185.fbx.proxad.net [82.246.51.185]) by alpha.kreiz-it.fr (Postfix) with ESMTPSA id D0A089B4; Sat, 6 Jul 2013 18:10:30 +0200 (CEST) From: "Cedric GROSS" To: "'Warner Losh'" , "'Dr. Rolf Jansen'" References: <000c01ce7a34$ebd49a30$c37dce90$@info> <8982B63C-525E-4B3E-9DA1-F2535AFE4A22@cyclaero.com> <001a01ce7a38$6ce642b0$46b2c810$@info> In-Reply-To: Subject: RE: PCI Subdevice ID Date: Sat, 6 Jul 2013 18:10:26 +0200 Message-ID: <002301ce7a63$55b94800$012bd800$@info> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable X-Mailer: Microsoft Office Outlook 12.0 Thread-Index: Ac56X/iApu0mI35gRMOL75J4X8OWZwAAwO3Q Content-Language: fr Cc: freebsd-drivers@freebsd.org X-BeenThere: freebsd-drivers@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Writing device drivers for FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 06 Jul 2013 16:10:32 -0000 > De=A0: Warner Losh [mailto:wlosh@bsdimp.com] De la part de Warner Losh > Envoy=E9=A0: samedi 6 juillet 2013 17:46 > On Jul 6, 2013, at 5:03 AM, Cedric GROSS wrote: >=20 > >> -----Message d'origine----- > >> De : Dr. Rolf Jansen [mailto:rj@cyclaero.com] Envoy=E9 : samedi 6 > >> juillet 2013 12:52 =C0 : Cedric GROSS Cc : = freebsd-drivers@freebsd.org > >> Objet : Re: PCI Subdevice ID > >> > >> Am 06.07.2013 um 07:38 schrieb Cedric GROSS : > >> > >>> Hello everybody, > >>> > >>> I'm currently working adapt iwn driver for my Centrino Wireless-N > >> 2230 Card. > >>> > >>> As part of this tuff work, I asking me how to get subdevice id ? I > >>> didn't find anything about that. > >> > >> Hello, > >> > >> See here: http://pci-ids.ucw.cz > >> > >> You could also install this pciid list by the way of the ports > system: > >> > >> # /usr/ports/misc/pciids > >> # make install clean > >> > >> Then you would grep your device from that list: > >> > >> $ grep "Wireless-N 2230" /usr/local/share/pciids/pci.ids > >> > > Thanks Rolf. > > But in fact my demand concern development. > > My fault. Please apologize I wasn't enough clear. I'm looking for a > > kernel function like 'pci_get_device' but for subdevice >=20 > pci_get_subdevice and pci_get_subvendor. >=20 > All the following are available: > PCI_ACCESSOR(subvendor, SUBVENDOR, uint16_t) > PCI_ACCESSOR(subdevice, SUBDEVICE, uint16_t) > PCI_ACCESSOR(vendor, VENDOR, uint16_t) > PCI_ACCESSOR(device, DEVICE, uint16_t) > PCI_ACCESSOR(devid, DEVID, uint32_t) > PCI_ACCESSOR(class, CLASS, uint8_t) > PCI_ACCESSOR(subclass, SUBCLASS, uint8_t) > PCI_ACCESSOR(progif, PROGIF, uint8_t) > PCI_ACCESSOR(revid, REVID, uint8_t) > PCI_ACCESSOR(intpin, INTPIN, uint8_t) > PCI_ACCESSOR(irq, IRQ, uint8_t) > PCI_ACCESSOR(domain, DOMAIN, uint32_t) > PCI_ACCESSOR(bus, BUS, uint8_t) > PCI_ACCESSOR(slot, SLOT, uint8_t) > PCI_ACCESSOR(function, FUNCTION, uint8_t) > PCI_ACCESSOR(ether, ETHADDR, uint8_t *) > PCI_ACCESSOR(cmdreg, CMDREG, uint8_t) > PCI_ACCESSOR(cachelnsz, CACHELNSZ, uint8_t) > PCI_ACCESSOR(mingnt, MINGNT, uint8_t) > PCI_ACCESSOR(maxlat, MAXLAT, uint8_t) > PCI_ACCESSOR(lattimer, LATTIMER, uint8_t) >=20 > Although ETHADDR is available only to cardbus cards. >=20 > Warner Many thanks for answer Rolf and Warner. It's so logical. Cheers Cedric