siis.c (243e0fb9a0143cee0eb998b68ec54494865b9d74) siis.c (445cc79ca9bb78ad2bb52d37139aceb65c32680c)
1/*-
2 * Copyright (c) 2009 Alexander Motin <mav@FreeBSD.org>
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

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

393 retval = bus_print_child_header(dev, child);
394 retval += printf(" at channel %d",
395 (int)(intptr_t)device_get_ivars(child));
396 retval += bus_print_child_footer(dev, child);
397
398 return (retval);
399}
400
1/*-
2 * Copyright (c) 2009 Alexander Motin <mav@FreeBSD.org>
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

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

393 retval = bus_print_child_header(dev, child);
394 retval += printf(" at channel %d",
395 (int)(intptr_t)device_get_ivars(child));
396 retval += bus_print_child_footer(dev, child);
397
398 return (retval);
399}
400
401static int
402siis_child_location_str(device_t dev, device_t child, char *buf,
403 size_t buflen)
404{
405
406 snprintf(buf, buflen, "channel=%d",
407 (int)(intptr_t)device_get_ivars(child));
408 return (0);
409}
410
401devclass_t siis_devclass;
402static device_method_t siis_methods[] = {
403 DEVMETHOD(device_probe, siis_probe),
404 DEVMETHOD(device_attach, siis_attach),
405 DEVMETHOD(device_detach, siis_detach),
406 DEVMETHOD(device_suspend, siis_suspend),
407 DEVMETHOD(device_resume, siis_resume),
408 DEVMETHOD(bus_print_child, siis_print_child),
409 DEVMETHOD(bus_alloc_resource, siis_alloc_resource),
410 DEVMETHOD(bus_release_resource, siis_release_resource),
411 DEVMETHOD(bus_setup_intr, siis_setup_intr),
412 DEVMETHOD(bus_teardown_intr,siis_teardown_intr),
411devclass_t siis_devclass;
412static device_method_t siis_methods[] = {
413 DEVMETHOD(device_probe, siis_probe),
414 DEVMETHOD(device_attach, siis_attach),
415 DEVMETHOD(device_detach, siis_detach),
416 DEVMETHOD(device_suspend, siis_suspend),
417 DEVMETHOD(device_resume, siis_resume),
418 DEVMETHOD(bus_print_child, siis_print_child),
419 DEVMETHOD(bus_alloc_resource, siis_alloc_resource),
420 DEVMETHOD(bus_release_resource, siis_release_resource),
421 DEVMETHOD(bus_setup_intr, siis_setup_intr),
422 DEVMETHOD(bus_teardown_intr,siis_teardown_intr),
423 DEVMETHOD(bus_child_location_str, siis_child_location_str),
413 { 0, 0 }
414};
415static driver_t siis_driver = {
416 "siis",
417 siis_methods,
418 sizeof(struct siis_controller)
419};
420DRIVER_MODULE(siis, pci, siis_driver, siis_devclass, 0, 0);

--- 1419 unchanged lines hidden ---
424 { 0, 0 }
425};
426static driver_t siis_driver = {
427 "siis",
428 siis_methods,
429 sizeof(struct siis_controller)
430};
431DRIVER_MODULE(siis, pci, siis_driver, siis_devclass, 0, 0);

--- 1419 unchanged lines hidden ---