aha_mca.c (122361) | aha_mca.c (127135) |
---|---|
1/*- 2 * Copyright (c) 1999 Matthew N. Dodd <winter@jurai.net> 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 13 unchanged lines hidden (view full) --- 22 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 23 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 24 * SUCH DAMAGE. 25 * 26 * Based on aha_isa.c 27 */ 28 29#include <sys/cdefs.h> | 1/*- 2 * Copyright (c) 1999 Matthew N. Dodd <winter@jurai.net> 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 13 unchanged lines hidden (view full) --- 22 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 23 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 24 * SUCH DAMAGE. 25 * 26 * Based on aha_isa.c 27 */ 28 29#include <sys/cdefs.h> |
30__FBSDID("$FreeBSD: head/sys/dev/aha/aha_mca.c 122361 2003-11-09 19:51:16Z imp $"); | 30__FBSDID("$FreeBSD: head/sys/dev/aha/aha_mca.c 127135 2004-03-17 17:50:55Z njl $"); |
31 32#include <sys/types.h> 33#include <sys/param.h> 34#include <sys/kernel.h> 35#include <sys/lock.h> 36#include <sys/mutex.h> 37 38#include <sys/module.h> --- 82 unchanged lines hidden (view full) --- 121 struct resource * irq = NULL; 122 struct resource * drq = NULL; 123 int error = 0; 124 int unit = device_get_unit(dev); 125 int rid; 126 void * ih; 127 128 rid = 0; | 31 32#include <sys/types.h> 33#include <sys/param.h> 34#include <sys/kernel.h> 35#include <sys/lock.h> 36#include <sys/mutex.h> 37 38#include <sys/module.h> --- 82 unchanged lines hidden (view full) --- 121 struct resource * irq = NULL; 122 struct resource * drq = NULL; 123 int error = 0; 124 int unit = device_get_unit(dev); 125 int rid; 126 void * ih; 127 128 rid = 0; |
129 io = bus_alloc_resource(dev, SYS_RES_IOPORT, &rid, 130 0, ~0, 1, RF_ACTIVE); | 129 io = bus_alloc_resource_any(dev, SYS_RES_IOPORT, &rid, RF_ACTIVE); |
131 if (!io) { 132 device_printf(dev, "No I/O space?!\n"); 133 error = ENOMEM; 134 goto bad; 135 } 136 137 rid = 0; | 130 if (!io) { 131 device_printf(dev, "No I/O space?!\n"); 132 error = ENOMEM; 133 goto bad; 134 } 135 136 rid = 0; |
138 irq = bus_alloc_resource(dev, SYS_RES_IRQ, &rid, 139 0, ~0, 1, RF_ACTIVE); | 137 irq = bus_alloc_resource_any(dev, SYS_RES_IRQ, &rid, RF_ACTIVE); |
140 if (irq == NULL) { 141 device_printf(dev, "No IRQ?!\n"); 142 error = ENOMEM; 143 goto bad; 144 } 145 146 rid = 0; | 138 if (irq == NULL) { 139 device_printf(dev, "No IRQ?!\n"); 140 error = ENOMEM; 141 goto bad; 142 } 143 144 rid = 0; |
147 drq = bus_alloc_resource(dev, SYS_RES_DRQ, &rid, 148 0, ~0, 1, RF_ACTIVE); | 145 drq = bus_alloc_resource_any(dev, SYS_RES_DRQ, &rid, RF_ACTIVE); |
149 if (drq == NULL) { 150 device_printf(dev, "No DRQ?!\n"); 151 error = ENOMEM; 152 goto bad; 153 } 154 155 aha_alloc(sc, unit, rman_get_bustag(io), rman_get_bushandle(io)); 156 error = aha_probe(sc); --- 85 unchanged lines hidden --- | 146 if (drq == NULL) { 147 device_printf(dev, "No DRQ?!\n"); 148 error = ENOMEM; 149 goto bad; 150 } 151 152 aha_alloc(sc, unit, rman_get_bustag(io), rman_get_bushandle(io)); 153 error = aha_probe(sc); --- 85 unchanged lines hidden --- |