eisaconf.c (48100) | eisaconf.c (48754) |
---|---|
1/* 2 * EISA bus probe and attach routines 3 * 4 * Copyright (c) 1995, 1996 Justin T. Gibbs. 5 * All rights reserved. 6 * 7 * Redistribution and use in source and binary forms, with or without 8 * modification, are permitted provided that the following conditions --- 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 * EISA bus probe and attach routines 3 * 4 * Copyright (c) 1995, 1996 Justin T. Gibbs. 5 * All rights reserved. 6 * 7 * Redistribution and use in source and binary forms, with or without 8 * modification, are permitted provided that the following conditions --- 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: eisaconf.c,v 1.45 1999/05/24 03:08:46 peter Exp $ | 31 * $Id: eisaconf.c,v 1.46 1999/06/22 09:44:00 peter Exp $ |
32 */ 33 34#include "opt_eisa.h" 35 36#include <sys/param.h> 37#include <sys/systm.h> 38#include <sys/queue.h> 39#include <sys/malloc.h> --- 59 unchanged lines hidden (view full) --- 99 if (eisa_get_slot(dev) != 0) 100 return (ENXIO); 101 102 idstring = (char *)malloc(8 + sizeof(" (System Board)") + 1, 103 M_DEVBUF, M_NOWAIT); 104 if (idstring == NULL) { 105 panic("Eisa probe unable to malloc"); 106 } | 32 */ 33 34#include "opt_eisa.h" 35 36#include <sys/param.h> 37#include <sys/systm.h> 38#include <sys/queue.h> 39#include <sys/malloc.h> --- 59 unchanged lines hidden (view full) --- 99 if (eisa_get_slot(dev) != 0) 100 return (ENXIO); 101 102 idstring = (char *)malloc(8 + sizeof(" (System Board)") + 1, 103 M_DEVBUF, M_NOWAIT); 104 if (idstring == NULL) { 105 panic("Eisa probe unable to malloc"); 106 } |
107 sprintf(idstring, "%c%c%c%x%x (System Board)", | 107 sprintf(idstring, "%c%c%c%03x%01x (System Board)", |
108 EISA_MFCTR_CHAR0(id), 109 EISA_MFCTR_CHAR1(id), 110 EISA_MFCTR_CHAR2(id), 111 EISA_PRODUCT_ID(id), 112 EISA_REVISION_ID(id)); 113 device_set_desc(dev, idstring); 114 115 return (0); --- 74 unchanged lines hidden (view full) --- 190 * EISA busses themselves are not easily detectable, the easiest way 191 * to tell if there is an eisa bus is if we found something - there 192 * should be a motherboard "card" there somewhere. 193 */ 194 return devices_found ? 0 : ENXIO; 195} 196 197static void | 108 EISA_MFCTR_CHAR0(id), 109 EISA_MFCTR_CHAR1(id), 110 EISA_MFCTR_CHAR2(id), 111 EISA_PRODUCT_ID(id), 112 EISA_REVISION_ID(id)); 113 device_set_desc(dev, idstring); 114 115 return (0); --- 74 unchanged lines hidden (view full) --- 190 * EISA busses themselves are not easily detectable, the easiest way 191 * to tell if there is an eisa bus is if we found something - there 192 * should be a motherboard "card" there somewhere. 193 */ 194 return devices_found ? 0 : ENXIO; 195} 196 197static void |
198eisa_probe_nomatch(device_t dev, device_t child) 199{ 200 u_int32_t eisa_id = eisa_get_id(child); 201 u_int8_t slot = eisa_get_slot(child); 202 203 device_printf(dev, "unknown card %c%c%c%03x%01x (0x%08x) at slot %d\n", 204 EISA_MFCTR_CHAR0(eisa_id), 205 EISA_MFCTR_CHAR1(eisa_id), 206 EISA_MFCTR_CHAR2(eisa_id), 207 EISA_PRODUCT_ID(eisa_id), 208 EISA_REVISION_ID(eisa_id), 209 eisa_id, 210 slot); 211 212 return; 213} 214 215static void |
|
198eisa_print_child(device_t dev, device_t child) 199{ 200 /* XXX print resource descriptions? */ 201 printf(" at slot %d", eisa_get_slot(child)); 202 printf(" on %s", device_get_nameunit(dev)); 203} 204 205static int --- 265 unchanged lines hidden (view full) --- 471 DEVMETHOD(device_probe, eisa_probe), 472 DEVMETHOD(device_attach, bus_generic_attach), 473 DEVMETHOD(device_shutdown, bus_generic_shutdown), 474 DEVMETHOD(device_suspend, bus_generic_suspend), 475 DEVMETHOD(device_resume, bus_generic_resume), 476 477 /* Bus interface */ 478 DEVMETHOD(bus_print_child, eisa_print_child), | 216eisa_print_child(device_t dev, device_t child) 217{ 218 /* XXX print resource descriptions? */ 219 printf(" at slot %d", eisa_get_slot(child)); 220 printf(" on %s", device_get_nameunit(dev)); 221} 222 223static int --- 265 unchanged lines hidden (view full) --- 489 DEVMETHOD(device_probe, eisa_probe), 490 DEVMETHOD(device_attach, bus_generic_attach), 491 DEVMETHOD(device_shutdown, bus_generic_shutdown), 492 DEVMETHOD(device_suspend, bus_generic_suspend), 493 DEVMETHOD(device_resume, bus_generic_resume), 494 495 /* Bus interface */ 496 DEVMETHOD(bus_print_child, eisa_print_child), |
497 DEVMETHOD(bus_probe_nomatch, eisa_probe_nomatch), |
|
479 DEVMETHOD(bus_read_ivar, eisa_read_ivar), 480 DEVMETHOD(bus_write_ivar, eisa_write_ivar), 481 DEVMETHOD(bus_driver_added, bus_generic_driver_added), 482 DEVMETHOD(bus_alloc_resource, eisa_alloc_resource), 483 DEVMETHOD(bus_release_resource, eisa_release_resource), 484 DEVMETHOD(bus_activate_resource, bus_generic_activate_resource), 485 DEVMETHOD(bus_deactivate_resource, bus_generic_deactivate_resource), 486 DEVMETHOD(bus_setup_intr, bus_generic_setup_intr), --- 13 unchanged lines hidden --- | 498 DEVMETHOD(bus_read_ivar, eisa_read_ivar), 499 DEVMETHOD(bus_write_ivar, eisa_write_ivar), 500 DEVMETHOD(bus_driver_added, bus_generic_driver_added), 501 DEVMETHOD(bus_alloc_resource, eisa_alloc_resource), 502 DEVMETHOD(bus_release_resource, eisa_release_resource), 503 DEVMETHOD(bus_activate_resource, bus_generic_activate_resource), 504 DEVMETHOD(bus_deactivate_resource, bus_generic_deactivate_resource), 505 DEVMETHOD(bus_setup_intr, bus_generic_setup_intr), --- 13 unchanged lines hidden --- |