| 101 | } |
| 102 | |
| 103 | static struct resource * |
| 104 | mptable_hostb_alloc_resource(device_t dev, device_t child, int type, int *rid, |
| 105 | rman_res_t start, rman_res_t end, rman_res_t count, u_int flags) |
| 106 | { |
| 107 | struct mptable_hostb_softc *sc; |
| 108 | |
| 109 | #ifdef PCI_RES_BUS |
| 110 | if (type == PCI_RES_BUS) |
| 111 | return (pci_domain_alloc_bus(0, child, rid, start, end, count, |
| 112 | flags)); |
| 113 | #endif |
| 114 | sc = device_get_softc(dev); |
| 115 | if (type == SYS_RES_IOPORT && start + count - 1 == end) { |
| 116 | if (mptable_is_isa_range(start, end)) { |
| 117 | switch (sc->sc_decodes_isa_io) { |
| 118 | case -1: |
| 119 | return (NULL); |
| 120 | case 1: |
| 121 | return (bus_generic_alloc_resource(dev, child, |
| 122 | type, rid, start, end, count, flags)); |
| 123 | default: |
| 124 | break; |
| 125 | } |
| 126 | } |
| 127 | if (mptable_is_vga_range(start, end)) { |
| 128 | switch (sc->sc_decodes_vga_io) { |
| 129 | case -1: |
| 130 | return (NULL); |
| 131 | case 1: |
| 132 | return (bus_generic_alloc_resource(dev, child, |
| 133 | type, rid, start, end, count, flags)); |
| 134 | default: |
| 135 | break; |
| 136 | } |
| 137 | } |
| 138 | } |
| 139 | start = hostb_alloc_start(type, start, end, count); |
| 140 | return (pcib_host_res_alloc(&sc->sc_host_res, child, type, rid, start, |
| 141 | end, count, flags)); |
| 142 | } |
| 143 | |
| 144 | static int |
| 145 | mptable_hostb_adjust_resource(device_t dev, device_t child, int type, |
nothing calls this directly
no test coverage detected