FreeBSD/sys/dev/pci/pci_pci.c
/*
 * Attempt to grow the secondary bus range.  This is much simpler than
 * for I/O windows as the range can only be grown by increasing
 * subbus.
 */
Attempt to grow the secondary bus range.  This is much simpler than
for I/O windows as the range can only be grown by increasing
subbus.
Attempt to grow the secondary bus range . This is much simpler than for I / O windows as the range can only be grown by increasing subbus .
static int
pcib_grow_subbus(struct pcib_secbus *bus, rman_res_t new_end)
{
	rman_res_t old_end;
	int error;
	old_end = rman_get_end(bus->res);
	KASSERT(new_end > old_end, ("attempt to shrink subbus"));
	error = bus_adjust_resource(bus->dev, PCI_RES_BUS, bus->res,
	    rman_get_start(bus->res), new_end);
	if (error)
		return (error);
	if (bootverbose)
		device_printf(bus->dev, "grew bus range to %ju-%ju\n",
		    rman_get_start(bus->res), rman_get_end(bus->res));
	error = rman_manage_region(&bus->rman, old_end + 1,
	    rman_get_end(bus->res));
	if (error)
		panic("Failed to add resource to rman");
	bus->sub = rman_get_end(bus->res);
	pci_write_config(bus->dev, bus->sub_reg, bus->sub, 1);
	return (0);
}
static int pcib_grow_subbus ( struct pcib_secbus * bus , rman_res_t new_end ) { rman_res_t old_end ; int error ; old_end = rman_get_end ( bus -> res ) ; KASSERT ( new_end > old_end , ( " " ) ) ; error = bus_adjust_resource ( bus -> dev , PCI_RES_BUS , bus -> res , rman_get_start ( bus -> res ) , new_end ) ; if ( error ) return ( error ) ; if ( bootverbose ) device_printf ( bus -> dev , " \n " , rman_get_start ( bus -> res ) , rman_get_end ( bus -> res ) ) ; error = rman_manage_region ( & bus -> rman , old_end + 1 , rman_get_end ( bus -> res ) ) ; if ( error ) panic ( " " ) ; bus -> sub = rman_get_end ( bus -> res ) ; pci_write_config ( bus -> dev , bus -> sub_reg , bus -> sub , 1 ) ; return ( 0 ) ; }
Attempt to grow the secondary bus range.
Attempt to grow the secondary bus range .