| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
| |
|
| |
|
|
|
|
| |
releasing resources... also, NULL out the resources as we free them...
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
used by utilities to reset moused(8), for example. The syntax is:
!system=kern subsystem=power type=resume
Note that it would be nice to have notification of suspend, but it's more
difficult since there would have to be a method of doing request/ack
to userland and automatically timing out if no response. apm(4) has a
similar mechanism.
MFC after: 2 weeks
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
devclass's parent pointer if the two drivers share the same devclass. This
can happen if the drivers use the same new-bus name. For example, we
currently have 3 drivers that use the name "pci": the generic PCI bus
driver, the ACPI PCI bus driver, and the OpenFirmware PCI bus driver. If
the ACPI PCI bus driver was defined as a subclass of the generic PCI bus
driver, then without this check the "pci" devclass would point to itself
as its parent and device_probe_child() would spin forever when it
encountered the first PCI device that did have a matching driver.
Reviewed by: dfr, imp, new-bus@
|
|
|
|
| |
Found with: Coverity Prevent(tm)
|
|
|
|
|
|
|
| |
don't print anything at all.
# this fixes a problem that I noticed with devd.pipe not terminating lines
# with \n correctly sometimes.
|
|
|
|
|
|
|
|
|
|
|
|
| |
and bus_free_resources(). These functions take a list of resources
and handle them all in one go. A flag makes it possible to mark
a resource as optional.
A typical device driver can save 10-30 lines of code by using these.
Usage examples will follow RSN.
MFC: A good idea, eventually.
|
| |
|
| |
|
|
|
|
| |
of items returned is 0.
|
|
|
|
|
|
|
|
|
|
| |
1. Copy a NULL-terminated string into a fixed-length buffer, and
2. copyout that buffer to userland,
we really ought to
0. Zero the entire buffer
first.
Security: FreeBSD-SA-05:08.kmem
|
|
|
|
|
|
| |
elements of this list (eg, reset it).
Man page to follow
|
|
|
|
|
|
|
| |
resouce_list_find in some places.
Suggested by: sam
Found by: Coventry Analysis tool.
|
|
|
|
|
|
|
| |
highest unit.
Reviewed by: dfr
MFC after: 2 weeks
|
|
|
|
|
|
|
|
| |
instances in a given devclass. This is useful for systems that want to
call code in driver static methods, similar to device_identify().
Reviewed by: dfr
MFC after: 2 weeks
|
|
|
|
|
|
|
|
|
| |
in a devclass. All the other uses of maxunit are correct and this one was
safe since it checks the return value of devclass_get_device(), which would
always say that the highest unit device doesn't exist.
Reviewed by: dfr
MFC after: 3 days
|
|
|
|
|
|
| |
holding the appropriate lock.
- Add a comment explaining why we bump a driver's kobj class reference
when loading a module.
|
|
|
|
|
|
| |
subr_bus.c doesn't need to peek inside struct resource.
OK from: imp
|
|
|
|
|
|
|
|
|
| |
last in the list rather than first.
This makes the resouces print in the 4.x order rather than the 5.x order
(eg fdc0 at 0x3f0-0x3f5,0x3f7 is 4.x, but 0x3f7,0x3f0-0x3f5 is 5.x). This
also means that the pci code will once again print the resources in BAR
ascending order.
|
| |
|
|
|
|
| |
Noticed by: Coverity Prevent analysis tool
|
| |
|
|
|
|
|
|
| |
is set to -1.
Reviewed by: dfr, imp
|
|
|
|
| |
add a tab between #define and DF_REBID instead of a space.
|
|
|
|
| |
bus_release_resource by grabbing the rid from the resource.
|
|
|
|
|
|
|
|
| |
unloaded, cleanup, or return ebusy of that's inconvenient.' The
default module hanlder for newbus will now call this when we get a
MOD_QUIESCE event, but in the future may call this at other times.
This shouldn't change any actual behavior until drivers start to use it.
|
|
|
|
|
|
|
| |
the number of devices in a devclass and is a subset of
devclass_get_devices(9).
Reviewed by: imp, dfr
|
| |
|
|
|
|
|
|
|
|
|
| |
and that I've verified things seem to basically work. I was able to
boot and hot plug usb devices. Please let me know if this causes
problems for anybody.
The push down of giant has proceeded to the point that this will start
to matter more and more.
|
|
|
|
|
|
| |
unknown: not probled (disabled)
During verbose boot.
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Get flags first, in case there is no devclass.
* Reset flags after each probe in case the next driver has no hints so it
doesn't inherit the old ones.
* Set them again before the winning probe.
Tested ok both with and without ACPI for ISA device flags.
Reviewed by: imp
MFC after: 1 day
|
|
|
|
|
|
|
| |
via hints were not getting passed to the child.
PR: kern/72489
MFC after: 1 day
|
| |
|
|
|
|
|
|
|
|
|
|
| |
this in my tree for a while and in its disabled state there are no
issues. It isn't enabled yet because some drivers (in acpi) have side
effects in their probe routines that need to be resolved in some
manner before this can be turned on. The consensus at the last
developer's summit was to provide a static method for each driver
class that will return characteristics of the driver, one of which is
if can be reprobed idempotently.
|
|
|
|
|
|
|
|
|
| |
address I've lost, that move the location information to the atttach
routine as well. While one could use devinfo to get this data, that
is difficult and error prone and subject to races for short lived
devices.
Would make a good MT5 candidate.
|
|
|
|
|
| |
keep dangling pointers to strings in loaded modules from hanging
around after the drivers are unloaded.
|
| |
|
|
|
|
|
|
|
|
| |
for unknown events.
A number of modules return EINVAL in this instance, and I have left
those alone for now and instead taught MOD_QUIESCE to accept this
as "didn't do anything".
|
|
|
|
|
|
| |
__RMAN_RESOURCE_VISIBLE to see inside these now.
Reviewed by: dfr, njl (not njr)
|
|
|
|
|
|
|
|
| |
devremoved events. This reduces the races around these events. We
now include the pnp info in both. This lets one do more interesting
thigns with devd on device insertion.
Submitted by: Bernd Walter
|
|
|
|
|
|
| |
it wasn't a good idea to have the test for NULL on only a limited
subset. Go back because I'm not sure adding NULL to all the others is
a good idea.
|
|
|
|
|
|
| |
attached.
Reviewed by: njl(?) and jhb
|
|
|
|
| |
Bump __FreeBSD_version accordingly.
|
|
|
|
|
|
|
|
|
| |
tree, output an empty string instead of "?". This is already what
happened with DEVICE_SYSCTL_LOCATION and DEVICE_SYSCTL_PNPINFO. This
makes the output of "sysctl dev" much nicer (it won't display those
empty sysctls).
Reviewed by: des
|
|
|
|
|
|
| |
class variables in addition to per-device variables. In plain English,
this means that dev.foo0.bar is now called dev.foo.0.bar, and it is
possible to to have dev.foo.bar as well.
|
|
|
|
|
| |
more convenient to deal with. The notion of hierarchy is however
preserved by adding a new %parent node.
|
|
|
|
| |
Approved by: imp
|
|
|
|
|
| |
subtree (under the new dev top-level node). This should greatly simplify
drivers which need per-device sysctl variables (such as ndis).
|
| |
|