ahci.c (6533cd198db5819bd78e3e148d1ea40aa229a2f6) | ahci.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 --- 764 unchanged lines hidden (view full) --- 773 retval = bus_print_child_header(dev, child); 774 retval += printf(" at channel %d", 775 (int)(intptr_t)device_get_ivars(child)); 776 retval += bus_print_child_footer(dev, child); 777 778 return (retval); 779} 780 | 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 --- 764 unchanged lines hidden (view full) --- 773 retval = bus_print_child_header(dev, child); 774 retval += printf(" at channel %d", 775 (int)(intptr_t)device_get_ivars(child)); 776 retval += bus_print_child_footer(dev, child); 777 778 return (retval); 779} 780 |
781static int 782ahci_child_location_str(device_t dev, device_t child, char *buf, 783 size_t buflen) 784{ 785 786 snprintf(buf, buflen, "channel=%d", 787 (int)(intptr_t)device_get_ivars(child)); 788 return (0); 789} 790 |
|
781devclass_t ahci_devclass; 782static device_method_t ahci_methods[] = { 783 DEVMETHOD(device_probe, ahci_probe), 784 DEVMETHOD(device_attach, ahci_attach), 785 DEVMETHOD(device_detach, ahci_detach), 786 DEVMETHOD(device_suspend, ahci_suspend), 787 DEVMETHOD(device_resume, ahci_resume), 788 DEVMETHOD(bus_print_child, ahci_print_child), 789 DEVMETHOD(bus_alloc_resource, ahci_alloc_resource), 790 DEVMETHOD(bus_release_resource, ahci_release_resource), 791 DEVMETHOD(bus_setup_intr, ahci_setup_intr), 792 DEVMETHOD(bus_teardown_intr,ahci_teardown_intr), | 791devclass_t ahci_devclass; 792static device_method_t ahci_methods[] = { 793 DEVMETHOD(device_probe, ahci_probe), 794 DEVMETHOD(device_attach, ahci_attach), 795 DEVMETHOD(device_detach, ahci_detach), 796 DEVMETHOD(device_suspend, ahci_suspend), 797 DEVMETHOD(device_resume, ahci_resume), 798 DEVMETHOD(bus_print_child, ahci_print_child), 799 DEVMETHOD(bus_alloc_resource, ahci_alloc_resource), 800 DEVMETHOD(bus_release_resource, ahci_release_resource), 801 DEVMETHOD(bus_setup_intr, ahci_setup_intr), 802 DEVMETHOD(bus_teardown_intr,ahci_teardown_intr), |
803 DEVMETHOD(bus_child_location_str, ahci_child_location_str), |
|
793 { 0, 0 } 794}; 795static driver_t ahci_driver = { 796 "ahci", 797 ahci_methods, 798 sizeof(struct ahci_controller) 799}; 800DRIVER_MODULE(ahci, pci, ahci_driver, ahci_devclass, 0, 0); 801static device_method_t ahci_ata_methods[] = { 802 DEVMETHOD(device_probe, ahci_ata_probe), 803 DEVMETHOD(device_attach, ahci_attach), 804 DEVMETHOD(device_detach, ahci_detach), 805 DEVMETHOD(device_suspend, ahci_suspend), 806 DEVMETHOD(device_resume, ahci_resume), 807 DEVMETHOD(bus_print_child, ahci_print_child), 808 DEVMETHOD(bus_alloc_resource, ahci_alloc_resource), 809 DEVMETHOD(bus_release_resource, ahci_release_resource), 810 DEVMETHOD(bus_setup_intr, ahci_setup_intr), 811 DEVMETHOD(bus_teardown_intr,ahci_teardown_intr), | 804 { 0, 0 } 805}; 806static driver_t ahci_driver = { 807 "ahci", 808 ahci_methods, 809 sizeof(struct ahci_controller) 810}; 811DRIVER_MODULE(ahci, pci, ahci_driver, ahci_devclass, 0, 0); 812static device_method_t ahci_ata_methods[] = { 813 DEVMETHOD(device_probe, ahci_ata_probe), 814 DEVMETHOD(device_attach, ahci_attach), 815 DEVMETHOD(device_detach, ahci_detach), 816 DEVMETHOD(device_suspend, ahci_suspend), 817 DEVMETHOD(device_resume, ahci_resume), 818 DEVMETHOD(bus_print_child, ahci_print_child), 819 DEVMETHOD(bus_alloc_resource, ahci_alloc_resource), 820 DEVMETHOD(bus_release_resource, ahci_release_resource), 821 DEVMETHOD(bus_setup_intr, ahci_setup_intr), 822 DEVMETHOD(bus_teardown_intr,ahci_teardown_intr), |
823 DEVMETHOD(bus_child_location_str, ahci_child_location_str), |
|
812 { 0, 0 } 813}; 814static driver_t ahci_ata_driver = { 815 "ahci", 816 ahci_ata_methods, 817 sizeof(struct ahci_controller) 818}; 819DRIVER_MODULE(ahci, atapci, ahci_ata_driver, ahci_devclass, 0, 0); --- 1811 unchanged lines hidden --- | 824 { 0, 0 } 825}; 826static driver_t ahci_ata_driver = { 827 "ahci", 828 ahci_ata_methods, 829 sizeof(struct ahci_controller) 830}; 831DRIVER_MODULE(ahci, atapci, ahci_ata_driver, ahci_devclass, 0, 0); --- 1811 unchanged lines hidden --- |