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 diff --git a/sys/src/9/port/pci.h b/sys/src/9/port/pci.h index 7d4acb2f8..1e9eac508 100644 --- a/sys/src/9/port/pci.h +++ b/sys/src/9/port/pci.h @@ -254,6 +254,7 @@ extern void pciclrmwi(Pcidev* p); extern int pcicap(Pcidev *p, int cap); extern int pcihtcap(Pcidev *p, int cap); +extern int pcienumcaps(Pcidev *p, int (*fmatch)(Pcidev*, int, int, int), int arg); extern int pcimsienable(Pcidev *p, uvlong addr, ulong data); extern int pcimsidisable(Pcidev *p);