Changeset View
Changeset View
Standalone View
Standalone View
sys/kern/bus_if.m
Show First 20 Lines • Show All 60 Lines • ▼ Show 20 Lines | CODE { | ||||
static device_t | static device_t | ||||
null_add_child(device_t bus, int order, const char *name, | null_add_child(device_t bus, int order, const char *name, | ||||
int unit) | int unit) | ||||
{ | { | ||||
panic("bus_add_child is not implemented"); | panic("bus_add_child is not implemented"); | ||||
} | } | ||||
static int null_reset_post(device_t bus, device_t dev) | |||||
{ | |||||
return (0); | |||||
} | |||||
static int null_reset_prepare(device_t bus, device_t dev) | |||||
{ | |||||
return (0); | |||||
} | |||||
}; | }; | ||||
imp: null_reset is the same as the default behavior: return ENXIO when there's no routine given. | |||||
/** | /** | ||||
* @brief Print a description of a child device | * @brief Print a description of a child device | ||||
* | * | ||||
* This is called from system code which prints out a description of a | * This is called from system code which prints out a description of a | ||||
* device. It should describe the attachment that the child has with | * device. It should describe the attachment that the child has with | ||||
* the parent. For instance the TurboLaser bus prints which node the | * the parent. For instance the TurboLaser bus prints which node the | ||||
* device is attached to. See bus_generic_print_child() for more | * device is attached to. See bus_generic_print_child() for more | ||||
* information. | * information. | ||||
▲ Show 20 Lines • Show All 764 Lines • ▼ Show 20 Lines | |||||
*/ | */ | ||||
METHOD int get_cpus { | METHOD int get_cpus { | ||||
device_t _dev; | device_t _dev; | ||||
device_t _child; | device_t _child; | ||||
enum cpu_sets _op; | enum cpu_sets _op; | ||||
size_t _setsize; | size_t _setsize; | ||||
cpuset_t *_cpuset; | cpuset_t *_cpuset; | ||||
} DEFAULT bus_generic_get_cpus; | } DEFAULT bus_generic_get_cpus; | ||||
METHOD int reset_prepare { | |||||
jhbUnsubmitted Not Done Inline ActionsBefore commit these need comments of course, and probably manpages for the new methods, but I assume you are just waiting to get the design reviewed first which is fine. I might have called the new method 'bus_reset_child' since you are resetting a specific child device ('pci_reset' resets a single child PCI device, not the entire PCI bus, 'pcib_reset' resets the child PCI bus, not the bridge device itself, etc.), but that is minor. jhb: Before commit these need comments of course, and probably manpages for the new methods, but I… | |||||
device_t _dev; | |||||
device_t _child; | |||||
} DEFAULT null_reset_prepare; | |||||
METHOD int reset_post { | |||||
device_t _dev; | |||||
device_t _child; | |||||
} DEFAULT null_reset_post; | |||||
METHOD int reset { | |||||
device_t _dev; | |||||
device_t _child; | |||||
int _flags; | |||||
}; |
null_reset is the same as the default behavior: return ENXIO when there's no routine given.