summaryrefslogtreecommitdiff
path: root/sys/src/9/port/pci.c
diff options
context:
space:
mode:
authorcinap_lenrek <cinap_lenrek@felloff.net>2021-07-10 18:34:22 +0000
committercinap_lenrek <cinap_lenrek@felloff.net>2021-07-10 18:34:22 +0000
commitc3589ef3cf33189d342a3ab638b558fd9249b220 (patch)
tree3d4f0ae5edc4f6405cb8c42a2813ef545e2ad307 /sys/src/9/port/pci.c
parent51a351e84570e8ac4322ad202bfc57f648755019 (diff)
kernel: export pcienumcaps() for custom capability enumeration in drivers (virtio)
This used to be a internal function, but virtio uses multiple structures with the same cap type to indicate the location of various register blocks in the pci bars so export it.
Diffstat (limited to 'sys/src/9/port/pci.c')
-rw-r--r--sys/src/9/port/pci.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/sys/src/9/port/pci.c b/sys/src/9/port/pci.c
index af4144533..7bfd60179 100644
--- a/sys/src/9/port/pci.c
+++ b/sys/src/9/port/pci.c
@@ -910,8 +910,8 @@ pciclrmwi(Pcidev* p)
pcicfgw16(p, PciPCR, p->pcr);
}
-static int
-enumcaps(Pcidev *p, int (*fmatch)(Pcidev*, int, int, int), int arg)
+int
+pcienumcaps(Pcidev *p, int (*fmatch)(Pcidev*, int, int, int), int arg)
{
int i, r, cap, off;
@@ -971,13 +971,13 @@ matchhtcap(Pcidev *p, int cap, int off, int arg)
int
pcicap(Pcidev *p, int cap)
{
- return enumcaps(p, matchcap, cap);
+ return pcienumcaps(p, matchcap, cap);
}
int
pcihtcap(Pcidev *p, int cap)
{
- return enumcaps(p, matchhtcap, cap);
+ return pcienumcaps(p, matchhtcap, cap);
}
static int