Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 6 Jul 2013 09:46:02 -0600
From:      Warner Losh <imp@bsdimp.com>
To:        "Cedric GROSS" <cg@cgross.info>
Cc:        freebsd-drivers@freebsd.org
Subject:   Re: PCI Subdevice ID
Message-ID:  <FB3D9B60-BB39-4D31-8C5C-95A692607F72@bsdimp.com>
In-Reply-To: <001a01ce7a38$6ce642b0$46b2c810$@info>
References:  <000c01ce7a34$ebd49a30$c37dce90$@info> <8982B63C-525E-4B3E-9DA1-F2535AFE4A22@cyclaero.com> <001a01ce7a38$6ce642b0$46b2c810$@info>

next in thread | previous in thread | raw e-mail | index | archive | help

On Jul 6, 2013, at 5:03 AM, Cedric GROSS wrote:

>> -----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
>>=20
>> Am 06.07.2013 um 07:38 schrieb Cedric GROSS <cg@cgross.info>:
>>=20
>>> Hello everybody,
>>>=20
>>> I'm currently working adapt iwn driver for my Centrino Wireless-N
>> 2230 Card.
>>>=20
>>> As part of this tuff work, I asking me how to get subdevice id ? I
>>> didn't find anything about that.
>>=20
>> Hello,
>>=20
>> See here: http://pci-ids.ucw.cz
>>=20
>> You could also install this pciid list by the way of the ports =
system:
>>=20
>>   # /usr/ports/misc/pciids
>>   # make install clean
>>=20
>> Then you would grep your device from that list:
>>=20
>>   $ grep "Wireless-N 2230" /usr/local/share/pciids/pci.ids
>>=20
> 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

pci_get_subdevice and pci_get_subvendor.

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.

Warner=



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?FB3D9B60-BB39-4D31-8C5C-95A692607F72>