bt_isa.c (119418) | bt_isa.c (127135) |
---|---|
1/* 2 * Product specific probe and attach routines for: 3 * Buslogic BT-54X and BT-445 cards 4 * 5 * Copyright (c) 1998, 1999 Justin T. Gibbs 6 * All rights reserved. 7 * 8 * Redistribution and use in source and binary forms, with or without --- 15 unchanged lines hidden (view full) --- 24 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 25 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 26 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 27 * SUCH DAMAGE. 28 * 29 */ 30 31#include <sys/cdefs.h> | 1/* 2 * Product specific probe and attach routines for: 3 * Buslogic BT-54X and BT-445 cards 4 * 5 * Copyright (c) 1998, 1999 Justin T. Gibbs 6 * All rights reserved. 7 * 8 * Redistribution and use in source and binary forms, with or without --- 15 unchanged lines hidden (view full) --- 24 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 25 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 26 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 27 * SUCH DAMAGE. 28 * 29 */ 30 31#include <sys/cdefs.h> |
32__FBSDID("$FreeBSD: head/sys/dev/buslogic/bt_isa.c 119418 2003-08-24 17:55:58Z obrien $"); | 32__FBSDID("$FreeBSD: head/sys/dev/buslogic/bt_isa.c 127135 2004-03-17 17:50:55Z njl $"); |
33 34#include <sys/param.h> 35#include <sys/systm.h> 36#include <sys/kernel.h> 37#include <sys/module.h> 38#include <sys/lock.h> 39#include <sys/mutex.h> 40#include <sys/bus.h> --- 22 unchanged lines hidden (view full) --- 63 rid = 0; 64 port = bus_alloc_resource(dev, SYS_RES_IOPORT, &rid, 65 portstart, portend, BT_NREGS, RF_ACTIVE); 66 if (!port) 67 return (ENOMEM); 68 69 if (isa_get_irq(dev) != -1) { 70 rid = 0; | 33 34#include <sys/param.h> 35#include <sys/systm.h> 36#include <sys/kernel.h> 37#include <sys/module.h> 38#include <sys/lock.h> 39#include <sys/mutex.h> 40#include <sys/bus.h> --- 22 unchanged lines hidden (view full) --- 63 rid = 0; 64 port = bus_alloc_resource(dev, SYS_RES_IOPORT, &rid, 65 portstart, portend, BT_NREGS, RF_ACTIVE); 66 if (!port) 67 return (ENOMEM); 68 69 if (isa_get_irq(dev) != -1) { 70 rid = 0; |
71 irq = bus_alloc_resource(dev, SYS_RES_IRQ, &rid, 72 0, ~0, 1, RF_ACTIVE); | 71 irq = bus_alloc_resource_any(dev, SYS_RES_IRQ, &rid, RF_ACTIVE); |
73 if (!irq) { 74 if (port) 75 bus_release_resource(dev, SYS_RES_IOPORT, 76 0, port); 77 return (ENOMEM); 78 } 79 } else 80 irq = 0; 81 82 if (isa_get_drq(dev) != -1) { 83 rid = 0; | 72 if (!irq) { 73 if (port) 74 bus_release_resource(dev, SYS_RES_IOPORT, 75 0, port); 76 return (ENOMEM); 77 } 78 } else 79 irq = 0; 80 81 if (isa_get_drq(dev) != -1) { 82 rid = 0; |
84 drq = bus_alloc_resource(dev, SYS_RES_DRQ, &rid, 85 0, ~0, 1, RF_ACTIVE); | 83 drq = bus_alloc_resource_any(dev, SYS_RES_DRQ, &rid, RF_ACTIVE); |
86 if (!drq) { 87 if (port) 88 bus_release_resource(dev, SYS_RES_IOPORT, 89 0, port); 90 if (irq) 91 bus_release_resource(dev, SYS_RES_IRQ, 92 0, irq); 93 return (ENOMEM); --- 265 unchanged lines hidden --- | 84 if (!drq) { 85 if (port) 86 bus_release_resource(dev, SYS_RES_IOPORT, 87 0, port); 88 if (irq) 89 bus_release_resource(dev, SYS_RES_IRQ, 90 0, irq); 91 return (ENOMEM); --- 265 unchanged lines hidden --- |