Page MenuHomeFreeBSD

bus_if: provide a default null rescan method
ClosedPublic

Authored by mhorne on Jun 15 2022, 7:55 PM.
Tags
None
Referenced Files
F108538137: D35501.diff
Sun, Jan 26, 1:54 AM
F108520116: D35501.diff
Sat, Jan 25, 8:37 PM
Unknown Object (File)
Fri, Jan 17, 8:58 AM
Unknown Object (File)
Dec 11 2024, 6:02 PM
Unknown Object (File)
Nov 26 2024, 8:52 AM
Unknown Object (File)
Nov 26 2024, 8:52 AM
Unknown Object (File)
Nov 26 2024, 8:51 AM
Unknown Object (File)
Nov 26 2024, 8:27 AM
Subscribers

Details

Summary

There is an existing helper method in subr_bus.c, but almost no drivers
know to use it. It also returns the same error as an empty method,
making it not very useful. Move this to bus_if.m and return a more
sensible error code.

This gives a slightly more meaningful error message when attempting
'devctl rescan' on buses and devices alike:

"Device not configured" --> "Operation not supported by device"

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 45999
Build 42887: arc lint + arc unit

Event Timeline

Not sure about the ofw_pcibus.c changes, but the overall change is good, and the cardbus bits are also: There's no need to ever rescan cardbus since we always know (we have a polling backup in case the admin interrupts on that interface are wonky). Since we look so often, rescan will always be a nop.

This revision is now accepted and ready to land.Jun 15 2022, 7:59 PM
In D35501#805061, @imp wrote:

Not sure about the ofw_pcibus.c changes, but the overall change is good, and the cardbus bits are also: There's no need to ever rescan cardbus since we always know (we have a polling backup in case the admin interrupts on that interface are wonky). Since we look so often, rescan will always be a nop.

Thanks. I did at least look at the callers of BUS_RESCAN() and I did not see anything that depended on a particular error value being returned.

This revision was automatically updated to reflect the committed changes.