Re: Reprobing of devices after module load?

From: Warner Losh <imp_at_bsdimp.com>
Date: Mon, 21 Nov 2011 10:09:37 -0700
On Nov 21, 2011, at 9:26 AM, John Baldwin wrote:

> On Friday, November 18, 2011 11:48:20 am Paul B. Mahol wrote:
>> Hi,
>> 
>> Is there nice way in FreeBSD to force reprobe of devices for specific
>> driver like it is done when kernel module is loaded (via
>> DRIVER_MODULE(...) stuff)?
> 
> Note that those probes happen for specific buses rather than for specific 
> drivers.  The routine that does this currently is static 
> (devclass_driver_added() in sys/kern/subr_bus.c).  What specific problem are 
> you trying to solve?  You might be able to use BUS_DRIVER_ADDED() or 
> device_probe_and_attach() to achieve what you are trying to do.

You can load a dummy module that has an attach point to the bus that you're wanting to force a rescan on.

Warner
Received on Mon Nov 21 2011 - 16:15:23 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:40:20 UTC