1/*
2 * Product specific probe and attach routines for:
3 * Buslogic BT-54X and BT-445 cards
4 *
5 * Copyright (c) 1998 Justin T. Gibbs
6 * All rights reserved.
7 *
8 * Redistribution and use in source and binary forms, with or without
--- 12 unchanged lines hidden (view full) ---
21 * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
22 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
23 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
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 * $Id: bt_isa.c,v 1.2 1998/09/24 10:43:42 bde Exp $
30 */
31
32#include <sys/param.h>
33#include <sys/systm.h>
34
35#include <machine/bus_pio.h>
36#include <machine/bus.h>
37
--- 72 unchanged lines hidden (view full) ---
110 config_data_t config_data;
111 u_int ioport;
112 int error;
113
114 ioport = bt_isa_ports[port_index].addr;
115
116 /*
117 * Ensure this port has not already been claimed already
118 * by a PCI or EISA adapter.
119 */
120 if (bt_check_probed_iop(ioport) != 0)
121 continue;
122
123 /*
124 * Make sure that we do not conflict with another device's
125 * I/O address.
126 */
127 if (haveseen_isadev(dev, CC_IOADDR))
128 continue;
129
130 /* Allocate a softc for use during probing */
131 bt = bt_alloc(dev->id_unit, I386_BUS_SPACE_IO, ioport);
132
133 if (bt == NULL)
134 break;
135
--- 37 unchanged lines hidden (view full) ---
173 printf("bt_isa_probe: Invalid DMA setting "
174 "detected for adapter at 0x%x. "
175 "Failing probe\n", ioport);
176 }
177 } else {
178 /* VL DMA */
179 dev->id_drq = -1;
180 }
181 dev->id_iobase = bt_isa_ports[port_index].addr;
182 dev->id_irq = (config_data.irq << 9);
183 dev->id_intr = bt_isa_intr;
184
185 /*
186 * OK, check to make sure that we're not stepping on
187 * someone else's IRQ or DRQ
188 */
189 if (haveseen_isadev(dev, CC_DRQ)) {
190 printf("bt_isa_probe: Bt card at I/O 0x%x's drq %d "
191 "conflicts, ignoring card.\n", dev->id_iobase,
192 dev->id_drq);
193 bt_free(bt);
194 return 0;
195 }
196 if (haveseen_isadev(dev, CC_IRQ)) {
197 printf("bt_isa_probe: Bt card at I/O 0x%x's irq %d "
198 "conflicts, ignoring card.\n", dev->id_iobase,
199 config_data.irq + 9);
200 bt_free(bt);
201 return 0;
202 }
203 bt_unit++;
204 return (BT_NREGS);
205 }
206
207 return (0);
208}
209
210/*
--- 137 unchanged lines hidden ---
2 * Product specific probe and attach routines for:
3 * Buslogic BT-54X and BT-445 cards
4 *
5 * Copyright (c) 1998 Justin T. Gibbs
6 * All rights reserved.
7 *
8 * Redistribution and use in source and binary forms, with or without
--- 12 unchanged lines hidden (view full) ---
21 * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
22 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
23 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
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 * $Id: bt_isa.c,v 1.2 1998/09/24 10:43:42 bde Exp $
30 */
31
32#include <sys/param.h>
33#include <sys/systm.h>
34
35#include <machine/bus_pio.h>
36#include <machine/bus.h>
37
--- 72 unchanged lines hidden (view full) ---
110 config_data_t config_data;
111 u_int ioport;
112 int error;
113
114 ioport = bt_isa_ports[port_index].addr;
115
116 /*
117 * Ensure this port has not already been claimed already
118 * by a PCI or EISA adapter.
119 */
120 if (bt_check_probed_iop(ioport) != 0)
121 continue;
122
123 /*
124 * Make sure that we do not conflict with another device's
125 * I/O address.
126 */
127 if (haveseen_isadev(dev, CC_IOADDR))
128 continue;
129
130 /* Allocate a softc for use during probing */
131 bt = bt_alloc(dev->id_unit, I386_BUS_SPACE_IO, ioport);
132
133 if (bt == NULL)
134 break;
135
--- 37 unchanged lines hidden (view full) ---
173 printf("bt_isa_probe: Invalid DMA setting "
174 "detected for adapter at 0x%x. "
175 "Failing probe\n", ioport);
176 }
177 } else {
178 /* VL DMA */
179 dev->id_drq = -1;
180 }
181 dev->id_iobase = bt_isa_ports[port_index].addr;
182 dev->id_irq = (config_data.irq << 9);
183 dev->id_intr = bt_isa_intr;
184
185 /*
186 * OK, check to make sure that we're not stepping on
187 * someone else's IRQ or DRQ
188 */
189 if (haveseen_isadev(dev, CC_DRQ)) {
190 printf("bt_isa_probe: Bt card at I/O 0x%x's drq %d "
191 "conflicts, ignoring card.\n", dev->id_iobase,
192 dev->id_drq);
193 bt_free(bt);
194 return 0;
195 }
196 if (haveseen_isadev(dev, CC_IRQ)) {
197 printf("bt_isa_probe: Bt card at I/O 0x%x's irq %d "
198 "conflicts, ignoring card.\n", dev->id_iobase,
199 config_data.irq + 9);
200 bt_free(bt);
201 return 0;
202 }
203 bt_unit++;
204 return (BT_NREGS);
205 }
206
207 return (0);
208}
209
210/*
--- 137 unchanged lines hidden ---