HomeFreeBSD

bus_if: provide a default null rescan method

Description

bus_if: provide a default null rescan method

There is an existing helper function, bus_null_rescan(), but most
drivers won't use it except to override an inherited rescan method. It
also returns the same error as an empty method. Make this the default
rescan method in 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

(cherry picked from commit 36a8572ee8f5db7ecb64bedc5738a363ec7cad36)
(cherry picked from commit 29afffb942b159511ad7d5ea5d086851f65ef4a0)

Details

Provenance
mhorneAuthored on Jun 21 2022, 1:29 PM
Reviewer
imp
Differential Revision
D35501: bus_if: provide a default null rescan method
Parents
rG9168218160ca: release: fix alignment for arm SoCs
Branches
Unknown
Tags
Unknown