Changeset View
Changeset View
Standalone View
Standalone View
sys/dev/pci/pci_subr.c
Show First 20 Lines • Show All 254 Lines • ▼ Show 20 Lines | if (flags & RF_PREFETCHABLE) { | ||||
flags &= ~RF_PREFETCHABLE; | flags &= ~RF_PREFETCHABLE; | ||||
rle = resource_list_find(&hr->hr_rl, type, 0); | rle = resource_list_find(&hr->hr_rl, type, 0); | ||||
goto restart; | goto restart; | ||||
} | } | ||||
return (NULL); | return (NULL); | ||||
} | } | ||||
int | int | ||||
pcib_host_res_adjust(struct pcib_host_resources *hr, device_t dev, int type, | pcib_host_res_adjust(struct pcib_host_resources *hr, device_t dev, | ||||
struct resource *r, rman_res_t start, rman_res_t end) | struct resource *r, rman_res_t start, rman_res_t end) | ||||
{ | { | ||||
struct resource_list_entry *rle; | struct resource_list_entry *rle; | ||||
rle = resource_list_find(&hr->hr_rl, type, 0); | rle = resource_list_find(&hr->hr_rl, rman_get_type(r), 0); | ||||
if (rle == NULL) { | if (rle == NULL) { | ||||
/* | /* | ||||
* No decoding ranges for this resource type, just pass | * No decoding ranges for this resource type, just pass | ||||
* the request up to the parent. | * the request up to the parent. | ||||
*/ | */ | ||||
return (bus_generic_adjust_resource(hr->hr_pcib, dev, type, r, | return (bus_generic_adjust_resource(hr->hr_pcib, dev, r, start, | ||||
start, end)); | end)); | ||||
} | } | ||||
/* Only allow adjustments that stay within a decoded range. */ | /* Only allow adjustments that stay within a decoded range. */ | ||||
for (; rle != NULL; rle = STAILQ_NEXT(rle, link)) { | for (; rle != NULL; rle = STAILQ_NEXT(rle, link)) { | ||||
if (rle->start <= start && rle->end >= end) | if (rle->start <= start && rle->end >= end) | ||||
return (bus_generic_adjust_resource(hr->hr_pcib, dev, | return (bus_generic_adjust_resource(hr->hr_pcib, dev, | ||||
type, r, start, end)); | r, start, end)); | ||||
} | } | ||||
return (ERANGE); | return (ERANGE); | ||||
} | } | ||||
#ifdef PCI_RES_BUS | #ifdef PCI_RES_BUS | ||||
struct pci_domain { | struct pci_domain { | ||||
int pd_domain; | int pd_domain; | ||||
struct rman pd_bus_rman; | struct rman pd_bus_rman; | ||||
▲ Show 20 Lines • Show All 127 Lines • Show Last 20 Lines |