diff options
| author | Warner Losh <imp@FreeBSD.org> | 2003-02-16 02:02:44 +0000 |
|---|---|---|
| committer | Warner Losh <imp@FreeBSD.org> | 2003-02-16 02:02:44 +0000 |
| commit | 594b5aeb67979647c6524aa2efa4a48ed1f98963 (patch) | |
| tree | 3361ccdef3775e014b098bc4f38e05d5f30aae39 /sys/dev | |
| parent | 03cf2fba38751d4d891fb7053acb702eed3fc0a4 (diff) | |
Notes
Diffstat (limited to 'sys/dev')
| -rw-r--r-- | sys/dev/pci/pci.c | 10 | ||||
| -rw-r--r-- | sys/dev/pci/pci_private.h | 4 |
2 files changed, 6 insertions, 8 deletions
diff --git a/sys/dev/pci/pci.c b/sys/dev/pci/pci.c index ecdcba0a231a0..3ca38c3c7e7c4 100644 --- a/sys/dev/pci/pci.c +++ b/sys/dev/pci/pci.c @@ -65,9 +65,6 @@ static int pci_maptype(unsigned mapreg); static int pci_mapsize(unsigned testval); static int pci_maprange(unsigned mapreg); static void pci_fixancient(pcicfgregs *cfg); -static void pci_hdrtypedata(device_t pcib, int b, int s, int f, - pcicfgregs *cfg); -static void pci_read_extcap(device_t pcib, pcicfgregs *cfg); static int pci_porten(device_t pcib, int b, int s, int f); static int pci_memen(device_t pcib, int b, int s, int f); @@ -294,7 +291,7 @@ pci_fixancient(pcicfgregs *cfg) /* extract header type specific config data */ -static void +void pci_hdrtypedata(device_t pcib, int b, int s, int f, pcicfgregs *cfg) { #define REG(n, w) PCIB_READ_CONFIG(pcib, b, s, f, n, w) @@ -392,7 +389,7 @@ pci_read_device(device_t pcib, int b, int s, int f, size_t size) #undef REG } -static void +void pci_read_extcap(device_t pcib, pcicfgregs *cfg) { #define REG(n, w) PCIB_READ_CONFIG(pcib, cfg->bus, cfg->slot, cfg->func, n, w) @@ -451,7 +448,6 @@ pci_freecfg(struct pci_devinfo *dinfo) devlist_head = &pci_devq; - /* XXX this hasn't been tested */ STAILQ_REMOVE(devlist_head, dinfo, pci_devinfo, pci_links); free(dinfo, M_DEVBUF); @@ -1337,7 +1333,7 @@ pci_delete_resource(device_t dev, device_t child, int type, int rid) rle = resource_list_find(rl, type, rid); if (rle) { if (rle->res) { - if (rle->res->r_dev != dev || + if (rman_get_device(rle->res) != dev || rman_get_flags(rle->res) & RF_ACTIVE) { device_printf(dev, "delete_resource: " "Resource still owned by child, oops. " diff --git a/sys/dev/pci/pci_private.h b/sys/dev/pci/pci_private.h index 1b14bc8406961..3902efb45f88b 100644 --- a/sys/dev/pci/pci_private.h +++ b/sys/dev/pci/pci_private.h @@ -68,5 +68,7 @@ struct pci_devinfo *pci_read_device(device_t pcib, int b, int s, int f, size_t size); void pci_print_verbose(struct pci_devinfo *dinfo); int pci_freecfg(struct pci_devinfo *dinfo); - +void pci_hdrtypedata(device_t pcib, int b, int s, int f, + pcicfgregs *cfg); +void pci_read_extcap(device_t pcib, pcicfgregs *cfg); #endif /* _PCI_PRIVATE_H_ */ |
