Deleted Added
full compact
bt_isa.c (39616) bt_isa.c (40160)
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 *
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.1 1998/09/15 07:32:54 gibbs Exp $
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

--- 59 unchanged lines hidden (view full) ---

97bt_isa_probe: Nearest valid baseport is 0x%x.
98bt_isa_probe: Failing probe.\n",
99 dev->id_iobase,
100 (port_index <= max_port_index)
101 ? bt_isa_ports[port_index].addr
102 : bt_isa_ports[max_port_index].addr);
103 return 0;
104 }
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

--- 59 unchanged lines hidden (view full) ---

97bt_isa_probe: Nearest valid baseport is 0x%x.
98bt_isa_probe: Failing probe.\n",
99 dev->id_iobase,
100 (port_index <= max_port_index)
101 ? bt_isa_ports[port_index].addr
102 : bt_isa_ports[max_port_index].addr);
103 return 0;
104 }
105 max_port_index = port_index;
105 }
106
107 /* Attempt to find an adapter */
108 for (;port_index <= max_port_index; port_index++) {
109 config_data_t config_data;
110 u_int ioport;
111 int error;
112
113 ioport = bt_isa_ports[port_index].addr;
114
115 /*
116 * Ensure this port has not already been claimed already
117 * by a PCI or EISA adapter.
118 */
119 if (bt_check_probed_iop(ioport) != 0)
120 continue;
121
106 }
107
108 /* Attempt to find an adapter */
109 for (;port_index <= max_port_index; port_index++) {
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
122 /* Allocate a softc for use during probing */
123 bt = bt_alloc(dev->id_unit, I386_BUS_SPACE_IO, ioport);
124
125 if (bt == NULL)
126 break;
127
128 /* We're going to attempt to probe it now, so mark it probed */
129 bt_mark_probed_bio(port_index);

--- 38 unchanged lines hidden (view full) ---

168 }
169 } else {
170 /* VL DMA */
171 dev->id_drq = -1;
172 }
173 dev->id_iobase = bt_isa_ports[port_index].addr;
174 dev->id_irq = (config_data.irq << 9);
175 dev->id_intr = bt_isa_intr;
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
136 /* We're going to attempt to probe it now, so mark it probed */
137 bt_mark_probed_bio(port_index);

--- 38 unchanged lines hidden (view full) ---

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 }
176 bt_unit++;
177 return (BT_NREGS);
178 }
179
180 return (0);
181}
182
183/*

--- 137 unchanged lines hidden ---
203 bt_unit++;
204 return (BT_NREGS);
205 }
206
207 return (0);
208}
209
210/*

--- 137 unchanged lines hidden ---