本文整理汇总了C++中PCI_VENDOR函数的典型用法代码示例。如果您正苦于以下问题:C++ PCI_VENDOR函数的具体用法?C++ PCI_VENDOR怎么用?C++ PCI_VENDOR使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了PCI_VENDOR函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。
示例1: gscpcib_match
int
gscpcib_match(struct device *parent, void *match, void *aux)
{
struct pci_attach_args *pa = aux;
if (PCI_CLASS(pa->pa_class) != PCI_CLASS_BRIDGE ||
PCI_SUBCLASS(pa->pa_class) != PCI_SUBCLASS_BRIDGE_ISA)
return (0);
if (PCI_VENDOR(pa->pa_id) == PCI_VENDOR_NS &&
PCI_PRODUCT(pa->pa_id) == PCI_PRODUCT_NS_SC1100_ISA)
return (2); /* supersede pcib(4) */
return (0);
}
开发者ID:repos-holder,项目名称:openbsd-patches,代码行数:15,代码来源:gscpcib.c
示例2: ath_pci_match
int
ath_pci_match(struct device *parent, void *match, void *aux)
{
const char* devname;
struct pci_attach_args *pa = aux;
pci_vendor_id_t vendor;
vendor = PCI_VENDOR(pa->pa_id);
if (vendor == 0x128c)
vendor = PCI_VENDOR_ATHEROS;
devname = ath_hal_probe(vendor, PCI_PRODUCT(pa->pa_id));
if (devname)
return 1;
return 0;
}
开发者ID:orumin,项目名称:openbsd-efivars,代码行数:16,代码来源:if_ath_pci.c
示例3: siop_lookup_product
const struct siop_product_desc *
siop_lookup_product(uint32_t id, int rev)
{
const struct siop_product_desc *pp;
const struct siop_product_desc *rp = NULL;
if (PCI_VENDOR(id) != PCI_VENDOR_SYMBIOS)
return NULL;
for (pp = siop_products; pp->name != NULL; pp++) {
if (PCI_PRODUCT(id) == pp->product && pp->revision <= rev)
if (rp == NULL || pp->revision > rp->revision)
rp = pp;
}
return rp;
}
开发者ID:eyberg,项目名称:rumpkernel-netbsd-src,代码行数:16,代码来源:siop_pci_common.c
示例4: mfi_pci_find_device
const struct mfi_pci_device *
mfi_pci_find_device(struct pci_attach_args *pa)
{
const struct mfi_pci_device *mpd;
int i;
for (i = 0; i < sizeofa(mfi_pci_devices); i++) {
mpd = &mfi_pci_devices[i];
if (mpd->mpd_vendor == PCI_VENDOR(pa->pa_id) &&
mpd->mpd_product == PCI_PRODUCT(pa->pa_id))
return (mpd);
}
return (NULL);
}
开发者ID:repos-holder,项目名称:openbsd-patches,代码行数:16,代码来源:mfi_pci.c
示例5: viaide_lookup
static const struct pciide_product_desc *
viaide_lookup(pcireg_t id)
{
switch (PCI_VENDOR(id)) {
case PCI_VENDOR_VIATECH:
return (pciide_lookup_product(id, pciide_via_products));
case PCI_VENDOR_AMD:
return (pciide_lookup_product(id, pciide_amd_products));
case PCI_VENDOR_NVIDIA:
return (pciide_lookup_product(id, pciide_nvidia_products));
}
return (NULL);
}
开发者ID:RyanLucchese,项目名称:rumpkernel-netbsd-src,代码行数:16,代码来源:viaide.c
示例6: igma_newpch_match
static int
igma_newpch_match(const struct pci_attach_args *pa)
{
if (PCI_VENDOR(pa->pa_id) != PCI_VENDOR_INTEL)
return 0;
switch (0xff00 & PCI_PRODUCT(pa->pa_id)) {
case 0x3b00: /* ibex peak */
case 0x1c00: /* cougar point */
case 0x1e00: /* panther point */
case 0x8c00: /* lynx point */
case 0x9c00: /* lynx point lp */
return 1;
}
return 0;
}
开发者ID:ryoon,项目名称:netbsd-xhci,代码行数:16,代码来源:igma.c
示例7: igsfb_pci_match_by_id
static int
igsfb_pci_match_by_id(pcireg_t id)
{
if (PCI_VENDOR(id) != PCI_VENDOR_INTEGRAPHICS)
return 0;
switch (PCI_PRODUCT(id)) {
case PCI_PRODUCT_INTEGRAPHICS_IGA1682: /* FALLTHROUGH */
case PCI_PRODUCT_INTEGRAPHICS_CYBERPRO2000: /* FALLTHROUGH */
case PCI_PRODUCT_INTEGRAPHICS_CYBERPRO2010:
return 1;
default:
return 0;
}
}
开发者ID:eyberg,项目名称:rumpkernel-netbsd-src,代码行数:16,代码来源:igsfb_pci.c
示例8: PCI_VENDOR
static struct cxgb_ident *cxgb_get_ident(struct pci_attach_args *pa)
{
struct cxgb_ident *id;
int vendorid, deviceid;
vendorid = PCI_VENDOR(pci_conf_read(pa->pa_pc, pa->pa_tag, PCI_ID_REG));
deviceid = PCI_PRODUCT(pci_conf_read(pa->pa_pc, pa->pa_tag, PCI_ID_REG));
for (id = cxgb_identifiers; id->desc != NULL; id++) {
if ((id->vendor == vendorid) &&
(id->device == deviceid)) {
return (id);
}
}
return (NULL);
}
开发者ID:eyberg,项目名称:rumpkernel-netbsd-src,代码行数:16,代码来源:cxgb_main.c
示例9: virtio_match
static int
virtio_match(device_t parent, cfdata_t match, void *aux)
{
struct pci_attach_args *pa;
pa = (struct pci_attach_args *)aux;
switch (PCI_VENDOR(pa->pa_id)) {
case PCI_VENDOR_QUMRANET:
if ((0x1000 <= PCI_PRODUCT(pa->pa_id)) &&
(PCI_PRODUCT(pa->pa_id) <= 0x103f))
return 1;
break;
}
return 0;
}
开发者ID:arroway,项目名称:virtio_DragonFlyBSD,代码行数:16,代码来源:virtio.c
示例10: cy_pci_lookup
static const struct cy_pci_product *
cy_pci_lookup(const struct pci_attach_args *pa)
{
const struct cy_pci_product *cp;
int i;
if (PCI_VENDOR(pa->pa_id) != PCI_VENDOR_CYCLADES)
return (NULL);
for (i = 0; i < cy_pci_nproducts; i++) {
cp = &cy_pci_products[i];
if (PCI_PRODUCT(pa->pa_id) == cp->cp_product)
return (cp);
}
return (NULL);
}
开发者ID:eyberg,项目名称:rumpkernel-netbsd-src,代码行数:16,代码来源:cy_pci.c
示例11: cs4280_match
static int
cs4280_match(device_t parent, cfdata_t match, void *aux)
{
struct pci_attach_args *pa;
pa = (struct pci_attach_args *)aux;
if (PCI_VENDOR(pa->pa_id) != PCI_VENDOR_CIRRUS)
return 0;
if (PCI_PRODUCT(pa->pa_id) == PCI_PRODUCT_CIRRUS_CS4280
#if 0 /* I can't confirm */
|| PCI_PRODUCT(pa->pa_id) == PCI_PRODUCT_CIRRUS_CS4610
#endif
)
return 1;
return 0;
}
开发者ID:eyberg,项目名称:rumpkernel-netbsd-src,代码行数:16,代码来源:cs4280.c
示例12: malo_pci_match
static int
malo_pci_match(device_t parent, cfdata_t match, void *aux)
{
struct pci_attach_args *pa = aux;
if (PCI_VENDOR(pa->pa_id) != PCI_VENDOR_MARVELL)
return (0);
switch (PCI_PRODUCT(pa->pa_id)) {
case PCI_PRODUCT_MARVELL_88W8310:
case PCI_PRODUCT_MARVELL_88W8335_1:
case PCI_PRODUCT_MARVELL_88W8335_2:
return (1);
}
return (0);
}
开发者ID:RyanLucchese,项目名称:rumpkernel-netbsd-src,代码行数:17,代码来源:if_malo_pci.c
示例13: piccolo_attach
static void
piccolo_attach(device_t parent, device_t self, void *aux)
{
struct pci_attach_args *pa = aux;
struct pciide_softc *sc = device_private(self);
const struct pciide_product_desc *pp;
sc->sc_wdcdev.sc_atac.atac_dev = self;
if (PCI_VENDOR(pa->pa_id) == PCI_VENDOR_TOSHIBA2)
pp = pciide_lookup_product(pa->pa_id, pciide_toshiba2_products);
else
pp = NULL;
if (pp == NULL)
panic("toshide_attach");
pciide_common_attach(sc, pa, pp);
}
开发者ID:RyanLucchese,项目名称:rumpkernel-netbsd-src,代码行数:17,代码来源:toshide.c
示例14: pci_scan_bus
static int
pci_scan_bus(struct pci_bus *bus)
{
int totaldev = 0;
struct pci_func df;
memset(&df, 0, sizeof(df));
df.bus = bus;
for (df.dev = 0; df.dev < 32; df.dev++) {
uint32_t bhlc = pci_conf_read(&df, PCI_BHLC_REG);
struct pci_func f;
if (PCI_HDRTYPE_TYPE(bhlc) > 1) /* Unsupported or no device */
continue;
/* found a device */
totaldev++;
f = df;
for (f.func = 0; f.func < (PCI_HDRTYPE_MULTIFN(bhlc) ? 8 : 1);
f.func++) {
struct pci_func *af;
uint32_t dev_id;
uint32_t intr;
dev_id = pci_conf_read(&f, PCI_ID_REG);
if (PCI_VENDOR(dev_id) == 0xffff)
continue;
/* found a function */
af = kmem_alloc(sizeof(*af));
*af = f;
list_init(&af->link);
list_insert(&pci_func_list, &af->link);
af->dev_id = dev_id;
intr = pci_conf_read(af, PCI_INTERRUPT_REG);
af->irq_line = PCI_INTERRUPT_LINE(intr);
af->dev_class = pci_conf_read(af, PCI_CLASS_REG);
#ifdef SHOW_PCI_VERBOSE_INFO
pci_print_func(af);
#endif
}
}
return totaldev;
}
开发者ID:m943040028,项目名称:prex,代码行数:46,代码来源:pci.c
示例15: pci_func_enable
void
pci_func_enable(struct pci_func *f, uint8_t flags)
{
uint32_t v = 0;
if (flags & PCI_MEM_ENABLE)
v |= PCI_COMMAND_MEM_ENABLE;
if (flags & PCI_IO_ENABLE)
v |= PCI_COMMAND_IO_ENABLE;
pci_conf_write(f, PCI_COMMAND_STATUS_REG,
v | PCI_COMMAND_MASTER_ENABLE);
printf("pci: function %02x:%02x.%d (%04x:%04x) enabled\n",
f->bus->busno, f->dev, f->func,
PCI_VENDOR(f->dev_id), PCI_PRODUCT(f->dev_id));
}
开发者ID:m943040028,项目名称:prex,代码行数:17,代码来源:pci.c
示例16: pciprint
int
pciprint(void *aux, const char *pnp)
{
struct pci_attach_args *pa = aux;
char devinfo[256];
const struct pci_quirkdata *qd;
if (pnp) {
pci_devinfo(pa->pa_id, pa->pa_class, 1, devinfo, sizeof(devinfo));
aprint_normal("%s at %s", devinfo, pnp);
}
aprint_normal(" dev %d function %d", pa->pa_device, pa->pa_function);
if (pci_config_dump) {
printf(": ");
pci_conf_print(pa->pa_pc, pa->pa_tag, NULL);
if (!pnp)
pci_devinfo(pa->pa_id, pa->pa_class, 1, devinfo, sizeof(devinfo));
printf("%s at %s", devinfo, pnp ? pnp : "?");
printf(" dev %d function %d (", pa->pa_device, pa->pa_function);
#ifdef __i386__
printf("tag %#lx, intrtag %#lx, intrswiz %#lx, intrpin %#lx",
*(long *)&pa->pa_tag, *(long *)&pa->pa_intrtag,
(long)pa->pa_intrswiz, (long)pa->pa_intrpin);
#else
printf("intrswiz %#lx, intrpin %#lx",
(long)pa->pa_intrswiz, (long)pa->pa_intrpin);
#endif
printf(", i/o %s, mem %s,",
pa->pa_flags & PCI_FLAGS_IO_OKAY ? "on" : "off",
pa->pa_flags & PCI_FLAGS_MEM_OKAY ? "on" : "off");
qd = pci_lookup_quirkdata(PCI_VENDOR(pa->pa_id),
PCI_PRODUCT(pa->pa_id));
if (qd == NULL) {
printf(" no quirks");
} else {
snprintb(devinfo, sizeof (devinfo),
"\002\001multifn\002singlefn\003skipfunc0"
"\004skipfunc1\005skipfunc2\006skipfunc3"
"\007skipfunc4\010skipfunc5\011skipfunc6"
"\012skipfunc7", qd->quirks);
printf(" quirks %s", devinfo);
}
printf(")");
}
return UNCONF;
}
开发者ID:yazshel,项目名称:netbsd-kernel,代码行数:46,代码来源:pci.c
示例17: iyonix_pci_intr_map
int
iyonix_pci_intr_map(const struct pci_attach_args *pa, pci_intr_handle_t *ihp)
{
struct i80321_softc *sc = pa->pa_pc->pc_intr_v;
int b, d, f;
uint32_t busno;
busno = bus_space_read_4(sc->sc_st, sc->sc_atu_sh, ATU_PCIXSR);
busno = PCIXSR_BUSNO(busno);
if (busno == 0xff)
busno = 0;
pci_decompose_tag(pa->pa_pc, pa->pa_intrtag, &b, &d, &f);
/* No mappings for devices not on our bus. */
if (b != busno)
goto no_mapping;
/*
* XXX We currently deal only with the southbridge and with
* regular PCI. IOC devices may need further attention.
*/
/* Devices on the southbridge are all routed through xint 1 */
if (PCI_VENDOR(pa->pa_id) == PCI_VENDOR_ALI) {
switch (PCI_PRODUCT(pa->pa_id)) {
case PCI_PRODUCT_ALI_M1543: /* Southbridge */
case PCI_PRODUCT_ALI_M5229: /* ATA */
case PCI_PRODUCT_ALI_M5237: /* ohci */
case PCI_PRODUCT_ALI_M5257: /* Modem */
case PCI_PRODUCT_ALI_M5451: /* AC97 */
case PCI_PRODUCT_ALI_M7101: /* PMC */
*ihp = ICU_INT_XINT(1);
return (0);
}
}
/* Route other interrupts with default swizzling rule */
*ihp = ICU_INT_XINT((d + pa->pa_intrpin - 1) % 4);
return 0;
no_mapping:
printf("iyonix_pci_intr_map: no mapping for %d/%d/%d\n",
pa->pa_bus, pa->pa_device, pa->pa_function);
return (1);
}
开发者ID:krytarowski,项目名称:netbsd-current-src-sys,代码行数:46,代码来源:iyonix_pci.c
示例18: joy_pci_match
static int
joy_pci_match(device_t parent, cfdata_t match, void *aux)
{
struct pci_attach_args *pa = aux;
if (PCI_CLASS(pa->pa_class) == PCI_CLASS_INPUT &&
PCI_SUBCLASS(pa->pa_class) == PCI_SUBCLASS_INPUT_GAMEPORT &&
PCI_INTERFACE(pa->pa_class) == 0x10)
return 1;
if (PCI_VENDOR(pa->pa_id) == PCI_VENDOR_CREATIVELABS &&
(PCI_PRODUCT(pa->pa_id) == PCI_PRODUCT_CREATIVELABS_SBJOY ||
PCI_PRODUCT(pa->pa_id) == PCI_PRODUCT_CREATIVELABS_SBJOY2))
return 1;
return 0;
}
开发者ID:NetBsdDriverProxy,项目名称:NetBsdDriverProxy,代码行数:17,代码来源:joy_pci.c
示例19: bwi_pci_match
int
bwi_pci_match(struct device *parent, void *match, void *aux)
{
struct pci_attach_args *pa = aux;
/*
* The second revision of the BCM4311/BCM4312
* chips require v4 firmware.
*/
if (PCI_VENDOR(pa->pa_id) == PCI_VENDOR_BROADCOM &&
(PCI_PRODUCT(pa->pa_id) == PCI_PRODUCT_BROADCOM_BCM4311 ||
PCI_PRODUCT(pa->pa_id) == PCI_PRODUCT_BROADCOM_BCM4312) &&
PCI_REVISION(pa->pa_class) == 0x02)
return (0);
return (pci_matchbyid((struct pci_attach_args *)aux, bwi_pci_devices,
sizeof(bwi_pci_devices) / sizeof(bwi_pci_devices[0])));
}
开发者ID:SylvestreG,项目名称:bitrig,代码行数:18,代码来源:if_bwi_pci.c
示例20: auvia_match
static int
auvia_match(device_t parent, cfdata_t match, void *aux)
{
struct pci_attach_args *pa;
pa = (struct pci_attach_args *) aux;
if (PCI_VENDOR(pa->pa_id) != PCI_VENDOR_VIATECH)
return 0;
switch (PCI_PRODUCT(pa->pa_id)) {
case PCI_PRODUCT_VIATECH_VT82C686A_AC97:
case PCI_PRODUCT_VIATECH_VT8233_AC97:
break;
default:
return 0;
}
return 1;
}
开发者ID:eyberg,项目名称:rumpkernel-netbsd-src,代码行数:18,代码来源:auvia.c
注:本文中的PCI_VENDOR函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论