if (!pcibr_flags & PCIBR_VERBOSE)
if (pcibr_flags & PCIBR_VERBOSE)
pciaddr_do_resource_allocate(sc, pc, tag, mapreg, ex, type, addr, size)	struct pcibr_softc *sc;	pci_chipset_tag_t pc;	pcitag_t tag;	struct extent *ex;	int mapreg, type;	bus_addr_t *addr;	bus_size_t size;{	bus_addr_t start;	int error;		if (*addr) /* no need to allocate */		return (0);	/* XXX Don't allocate if device is AGP device to avoid conflict. */	if (pciaddr_device_is_agp(pc, tag)) 		return (0);		start = (type == PCI_MAPREG_TYPE_MEM ? sc->sc_membus_space.bus_base		: sc->sc_iobus_space.bus_base);	if (start < ex->ex_start || start + size - 1 >= ex->ex_end) {		PCIBIOS_PRINTV(("No available resources. fixup failed\n"));		return (1);	}	error = extent_alloc_subregion(ex, start, ex->ex_end, size, size, 0, 0,	    EX_FAST|EX_NOWAIT|EX_MALLOCOK, addr);	if (error) {		PCIBIOS_PRINTV(("No available resources. fixup failed\n"));		return (1);	}	/* write new address to PCI device configuration header */	pci_conf_write(pc, tag, mapreg, *addr);	/* check */	if (!pcibr_flags & PCIBR_VERBOSE)	{		printf("pci_addr_fixup: ");		pciaddr_print_devid(pc, tag);	}	if (pciaddr_ioaddr(pci_conf_read(pc, tag, mapreg)) != *addr) {		pci_conf_write(pc, tag, mapreg, 0); /* clear */		printf("fixup failed. (new address=%#x)\n", *addr);		return (1);	}	if (!pcibr_flags & PCIBR_VERBOSE)		printf("new address 0x%08x\n", *addr);	return (0);}