Re: Reprobing of devices after module load?

2011-11-21 Thread John Baldwin
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.

-- 
John Baldwin
___
freebsd-current@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to freebsd-current-unsubscr...@freebsd.org


Re: Reprobing of devices after module load?

2011-11-21 Thread Warner Losh

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

___
freebsd-current@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to freebsd-current-unsubscr...@freebsd.org


Re: Reprobing of devices after module load?

2011-11-21 Thread Paul B. Mahol
On 11/21/11, John Baldwin j...@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?
___
freebsd-current@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to freebsd-current-unsubscr...@freebsd.org


Reprobing of devices after module load?

2011-11-18 Thread Paul B. Mahol
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)?
___
freebsd-current@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to freebsd-current-unsubscr...@freebsd.org