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.5 1998/11/10 06:44:54 gibbs Exp $
32 */
33
34#include "pnp.h"
35
36#include <sys/param.h>
37#include <sys/systm.h>
38#include <sys/kernel.h>
39
--- 212 unchanged lines hidden (view full) ---
252
253 return (s);
254}
255
256static void
257ahapnp_attach(u_long csn, u_long vend_id, char *name, struct isa_device *dev)
258{
259 struct pnp_cinfo d;
260 struct isa_device *dvp;
261
262 if (dev->id_unit >= NAHATOT)
263 return;
264
265 if (read_pnp_parms(&d, 0) == 0) {
266 printf("failed to read pnp parms\n");
267 return;
268 }
--- 4 unchanged lines hidden (view full) ---
273
274 dev->id_iobase = d.port[0];
275 dev->id_irq = (1 << d.irq[0]);
276 dev->id_intr = aha_intr;
277 dev->id_drq = d.drq[0];
278
279 if (dev->id_driver == NULL) {
280 dev->id_driver = &ahadriver;
281 dvp = find_isadev(isa_devtab_tty, &ahadriver, 0);
282 if (dvp != NULL)
283 dev->id_id = dvp->id_id;
284 }
285
286 if ((dev->id_alive = aha_isa_probe(dev)) != 0)
287 aha_isa_attach(dev);
288 else
289 printf("aha%d: probe failed\n", dev->id_unit);
290}
291#endif
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.5 1998/11/10 06:44:54 gibbs Exp $
32 */
33
34#include "pnp.h"
35
36#include <sys/param.h>
37#include <sys/systm.h>
38#include <sys/kernel.h>
39
--- 212 unchanged lines hidden (view full) ---
252
253 return (s);
254}
255
256static void
257ahapnp_attach(u_long csn, u_long vend_id, char *name, struct isa_device *dev)
258{
259 struct pnp_cinfo d;
260 struct isa_device *dvp;
261
262 if (dev->id_unit >= NAHATOT)
263 return;
264
265 if (read_pnp_parms(&d, 0) == 0) {
266 printf("failed to read pnp parms\n");
267 return;
268 }
--- 4 unchanged lines hidden (view full) ---
273
274 dev->id_iobase = d.port[0];
275 dev->id_irq = (1 << d.irq[0]);
276 dev->id_intr = aha_intr;
277 dev->id_drq = d.drq[0];
278
279 if (dev->id_driver == NULL) {
280 dev->id_driver = &ahadriver;
281 dvp = find_isadev(isa_devtab_tty, &ahadriver, 0);
282 if (dvp != NULL)
283 dev->id_id = dvp->id_id;
284 }
285
286 if ((dev->id_alive = aha_isa_probe(dev)) != 0)
287 aha_isa_attach(dev);
288 else
289 printf("aha%d: probe failed\n", dev->id_unit);
290}
291#endif