Deleted Added
sdiff udiff text old ( 40265 ) new ( 41048 )
full compact
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.3 1998/10/10 00:44:12 imp 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

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

81
82 bt = NULL;
83 port_index = 0;
84 max_port_index = BT_NUM_ISAPORTS - 1;
85 /*
86 * Bound our board search if the user has
87 * specified an exact port.
88 */
89 if (dev->id_iobase > 0) {
90 for (;port_index <= max_port_index; port_index++)
91 if (dev->id_iobase >= bt_isa_ports[port_index].addr)
92 break;
93 if ((port_index > max_port_index)
94 || (dev->id_iobase != bt_isa_ports[port_index].addr)) {
95 printf("
96bt_isa_probe: Invalid baseport of 0x%x specified.
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;
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, EISA or ISA adapter.
119 */
120 if (bt_check_probed_iop(ioport) != 0)
121 continue;
122 dev->id_iobase = bt_isa_ports[port_index].addr;
123 if (haveseen_isadev(dev, CC_IOADDR | CC_QUIET))
124 continue;
125
126 /* Allocate a softc for use during probing */
127 bt = bt_alloc(dev->id_unit, I386_BUS_SPACE_IO, ioport);
128
129 if (bt == NULL)
130 break;

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

164 break;
165 case DMA_CHAN_7:
166 dev->id_drq = 7;
167 break;
168 default:
169 printf("bt_isa_probe: Invalid DMA setting "
170 "detected for adapter at 0x%x. "
171 "Failing probe\n", ioport);
172 }
173 } else {
174 /* VL DMA */
175 dev->id_drq = -1;
176 }
177 dev->id_irq = (config_data.irq << 9);
178 dev->id_intr = bt_isa_intr;
179

--- 145 unchanged lines hidden ---