Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 21 Nov 2011 18:42:10 +0000
From:      "Paul B. Mahol" <onemda@gmail.com>
To:        John Baldwin <jhb@freebsd.org>
Cc:        freebsd-hackers@freebsd.org, FreeBSD-Current <freebsd-current@freebsd.org>
Subject:   Re: Reprobing of devices after module load?
Message-ID:  <CAPYw7P584Ngm1c3h6e62J4bDdqU-J59nAEkqsLa%2Bn4-3hNti1w@mail.gmail.com>
In-Reply-To: <201111211126.15627.jhb@freebsd.org>
References:  <CAPYw7P6nqLmdRqa2Szntnac5pc3otf75cfGkCvVz1FoazssU%2Bg@mail.gmail.com> <201111211126.15627.jhb@freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On 11/21/11, John Baldwin <jhb@freebsd.org> 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.

I have changed NDISulator to load 3rd party *.SYS from userspace
via ioctl on /dev/ndis.

For now i can do reprobe by reloading if_ndis.ko module.
Loading if_ndis.ko ideally should not cause reprobe but reprobe
should be done after ioctl on /dev/ndis.

Perhaps devclass_add_driver from sys/kern/subr_bus can do this?



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAPYw7P584Ngm1c3h6e62J4bDdqU-J59nAEkqsLa%2Bn4-3hNti1w>