HomeFreeBSD

bus_if: provide a default null rescan method

Description

bus_if: provide a default null rescan method

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"

Reviewed by: imp
MFC after: 1 week
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D35501

Details

Provenance
mhorneAuthored on Jun 21 2022, 1:29 PM
Reviewer
imp
Differential Revision
D35501: bus_if: provide a default null rescan method
Parents
rG8757d0fca9e6: if_ffec: free the dmamem allocation in detach
Branches
Unknown
Tags
Unknown