-/* $OpenBSD: pci.c,v 1.111 2015/11/27 15:28:22 kettenis Exp $ */
+/* $OpenBSD: pci.c,v 1.112 2018/07/28 15:28:51 kettenis Exp $ */
/* $NetBSD: pci.c,v 1.31 1997/06/06 23:48:04 thorpej Exp $ */
/*
return (0);
}
+uint16_t
+pci_requester_id(pci_chipset_tag_t pc, pcitag_t tag)
+{
+ int bus, dev, func;
+
+ pci_decompose_tag(pc, tag, &bus, &dev, &func);
+ return ((bus << 8) | (dev << 3) | func);
+}
+
int
pci_find_device(struct pci_attach_args *pa,
int (*match)(struct pci_attach_args *))
-/* $OpenBSD: pcivar.h,v 1.69 2013/08/08 17:54:11 kettenis Exp $ */
+/* $OpenBSD: pcivar.h,v 1.70 2018/07/28 15:28:51 kettenis Exp $ */
/* $NetBSD: pcivar.h,v 1.23 1997/06/06 23:48:05 thorpej Exp $ */
/*
bus_space_tag_t *, bus_space_handle_t *, bus_addr_t *,
bus_size_t *, bus_size_t);
-
int pci_io_find(pci_chipset_tag_t, pcitag_t, int, bus_addr_t *,
bus_size_t *);
int pci_mem_find(pci_chipset_tag_t, pcitag_t, int, bus_addr_t *,
int pci_get_ht_capability(pci_chipset_tag_t, pcitag_t, int,
int *, pcireg_t *);
+uint16_t pci_requester_id(pci_chipset_tag_t, pcitag_t);
+
struct pci_matchid {
pci_vendor_id_t pm_vid;
pci_product_id_t pm_pid;