1/*-
2 * Copyright (c) 1991 The Regents of the University of California.
3 * All rights reserved.
4 *
5 * This code is derived from software contributed to Berkeley by
6 * William Jolitz.
7 *
8 * Redistribution and use in source and binary forms, with or without
--- 20 unchanged lines hidden (view full) ---
29 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
30 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
31 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
32 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
33 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
34 * SUCH DAMAGE.
35 *
36 * from: @(#)isa.c 7.2 (Berkeley) 5/13/91
37 * $Id: intr_machdep.c,v 1.16 1999/01/08 19:17:48 bde Exp $
38 */
39
40#include "opt_auto_eoi.h"
41
42#include <sys/param.h>
43#ifndef SMP
44#include <machine/lock.h>
45#endif
--- 277 unchanged lines hidden (view full) ---
323 struct isa_device *dp;
324
325 if (id == -1)
326 return ("pci"); /* XXX may also be eisa */
327 if (id == 0)
328 return ("clk0"); /* XXX may also be sloppy driver */
329 if (id == 1)
330 return ("rtc0");
331 for (dp = isa_devtab_bio; dp->id_driver != NULL; dp++)
332 if (dp->id_id == id)
333 goto found_device;
334 for (dp = isa_devtab_cam; dp->id_driver != NULL; dp++)
335 if (dp->id_id == id)
336 goto found_device;
337 for (dp = isa_devtab_net; dp->id_driver != NULL; dp++)
338 if (dp->id_id == id)
339 goto found_device;
340 for (dp = isa_devtab_null; dp->id_driver != NULL; dp++)
341 if (dp->id_id == id)
342 goto found_device;
343 for (dp = isa_devtab_tty; dp->id_driver != NULL; dp++)
344 if (dp->id_id == id)
345 goto found_device;
346 return "???";
347
348found_device:
349 snprintf(buf, sizeof(buf), "%s%d", dp->id_driver->name, dp->id_unit);
350 return (buf);
351}
352
353void
--- 163 unchanged lines hidden ---
2 * Copyright (c) 1991 The Regents of the University of California.
3 * All rights reserved.
4 *
5 * This code is derived from software contributed to Berkeley by
6 * William Jolitz.
7 *
8 * Redistribution and use in source and binary forms, with or without
--- 20 unchanged lines hidden (view full) ---
29 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
30 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
31 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
32 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
33 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
34 * SUCH DAMAGE.
35 *
36 * from: @(#)isa.c 7.2 (Berkeley) 5/13/91
37 * $Id: intr_machdep.c,v 1.16 1999/01/08 19:17:48 bde Exp $
38 */
39
40#include "opt_auto_eoi.h"
41
42#include <sys/param.h>
43#ifndef SMP
44#include <machine/lock.h>
45#endif
--- 277 unchanged lines hidden (view full) ---
323 struct isa_device *dp;
324
325 if (id == -1)
326 return ("pci"); /* XXX may also be eisa */
327 if (id == 0)
328 return ("clk0"); /* XXX may also be sloppy driver */
329 if (id == 1)
330 return ("rtc0");
331 for (dp = isa_devtab_bio; dp->id_driver != NULL; dp++)
332 if (dp->id_id == id)
333 goto found_device;
334 for (dp = isa_devtab_cam; dp->id_driver != NULL; dp++)
335 if (dp->id_id == id)
336 goto found_device;
337 for (dp = isa_devtab_net; dp->id_driver != NULL; dp++)
338 if (dp->id_id == id)
339 goto found_device;
340 for (dp = isa_devtab_null; dp->id_driver != NULL; dp++)
341 if (dp->id_id == id)
342 goto found_device;
343 for (dp = isa_devtab_tty; dp->id_driver != NULL; dp++)
344 if (dp->id_id == id)
345 goto found_device;
346 return "???";
347
348found_device:
349 snprintf(buf, sizeof(buf), "%s%d", dp->id_driver->name, dp->id_unit);
350 return (buf);
351}
352
353void
--- 163 unchanged lines hidden ---