Deleted Added
full compact
aha_isa.c (39616) aha_isa.c (40160)
1/*
2 * Product specific probe and attach routines for:
3 * Adaptec 154x.
4 *
5 * Derived from code written by:
6 *
7 * Copyright (c) 1998 Justin T. Gibbs
8 * All rights reserved.

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

23 * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
24 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
25 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
26 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
27 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
28 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
29 * SUCH DAMAGE.
30 *
1/*
2 * Product specific probe and attach routines for:
3 * Adaptec 154x.
4 *
5 * Derived from code written by:
6 *
7 * Copyright (c) 1998 Justin T. Gibbs
8 * All rights reserved.

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

23 * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
24 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
25 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
26 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
27 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
28 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
29 * SUCH DAMAGE.
30 *
31 * $Id: aha_isa.c,v 1.1 1998/09/15 07:39:55 gibbs Exp $
31 * $Id: aha_isa.c,v 1.2 1998/09/24 10:43:42 bde Exp $
32 */
33
34#include <sys/param.h>
35#include <sys/systm.h>
36
37#include <machine/bus_pio.h>
38#include <machine/bus.h>
39

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

96aha_isa_probe: Nearest valid baseport is 0x%x.
97aha_isa_probe: Failing probe.\n",
98 dev->id_iobase,
99 (port_index <= max_port_index)
100 ? aha_isa_ports[port_index].addr
101 : aha_isa_ports[max_port_index].addr);
102 return 0;
103 }
32 */
33
34#include <sys/param.h>
35#include <sys/systm.h>
36
37#include <machine/bus_pio.h>
38#include <machine/bus.h>
39

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

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

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

161 default:
162 printf("aha_isa_probe: Invalid DMA setting "
163 "detected for adapter at 0x%x. "
164 "Failing probe\n", ioport);
165 }
166 dev->id_iobase = aha_isa_ports[port_index].addr;
167 dev->id_irq = (config_data.irq << 9);
168 dev->id_intr = aha_isa_intr;
129 /* Allocate a softc for use during probing */
130 aha = aha_alloc(dev->id_unit, I386_BUS_SPACE_IO, ioport);
131
132 if (aha == NULL)
133 break;
134
135 /* We're going to attempt to probe it now, so mark it probed */
136 aha_mark_probed_bio(port_index);

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

169 default:
170 printf("aha_isa_probe: Invalid DMA setting "
171 "detected for adapter at 0x%x. "
172 "Failing probe\n", ioport);
173 }
174 dev->id_iobase = aha_isa_ports[port_index].addr;
175 dev->id_irq = (config_data.irq << 9);
176 dev->id_intr = aha_isa_intr;
177
178 /*
179 * OK, check to make sure that we're not stepping on
180 * someone else's IRQ or DRQ
181 */
182 if (haveseen_isadev(dev, CC_DRQ)) {
183 printf("aha_isa_probe: Aha card at I/O 0x%x's drq %d "
184 "conflicts, ignoring card.\n", dev->id_iobase,
185 dev->id_drq);
186 aha_free(aha);
187 return 0;
188 }
189 if (haveseen_isadev(dev, CC_IRQ)) {
190 printf("aha_isa_probe: Aha card at I/O 0x%x's irq %d "
191 "conflicts, ignoring card.\n", dev->id_iobase,
192 config_data.irq + 9);
193 aha_free(aha);
194 return 0;
195 }
169 aha_unit++;
170 return (AHA_NREGS);
171 }
172
173 return (0);
174}
175
176/*

--- 51 unchanged lines hidden ---
196 aha_unit++;
197 return (AHA_NREGS);
198 }
199
200 return (0);
201}
202
203/*

--- 51 unchanged lines hidden ---