Re: How are USB drivers assigned?
When the ums driver is loaded (at boot time or through kldload) it registers itself with the usb bus driver. When your mouse is plugged in the bus driver calls the probe routine of every driver that has registered with it. If the ums probe routine detects that the new device is in fact a mouse it returns the value BUS_PROBE_GENERIC to the bus driver to indicate that it supports the new device. Once all the probe routines have been run the bus driver runs the attach routine of the driver that returned the highest non-error value from its probe routine. In the case of a mouse the attach routine of ums should be called. The ums attach routine is responsible for configuring the device for use by the system. A successful return from the attach routine means the device is added to the system and ready to be used. For more info see /sys/dev/usb/input/ums.c especially the functions ums_probe and ums_attach and the DRIVER_MODULE macro. Hope this helps, Nick On Mon, Jun 28, 2010 at 10:37 PM, o...@aloha.com wrote: On Tue, 29 Jun 2010 17:56:39 +0200 Roland Smith rsm...@xs4all.nl wrote: On Mon, Jun 28, 2010 at 11:03:38PM -1000, Gary Dunn wrote: Is there a file that associates drivers with USB device information? More specifically, how does a USB mouse get assigned to the ums driver? This is for FreeBSD 8.0, if it matters. When queried on connection the mouse identifies itself by sending a descrip tor as a Human Interface Device class peripheral, and specifically a mouse. The USB driver then knows to attach the ums device driver. Thanks for the reply Roland. What I am looking for is The USB driver then knows to attach the ums device driver. how it knows. Gary Dunn Open Slate Project ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
How are USB drivers assigned?
Is there a file that associates drivers with USB device information? More specifically, how does a USB mouse get assigned to the ums driver? This is for FreeBSD 8.0, if it matters. -- Gary Dunn, Honolulu o...@aloha.com http://openslate.net/ http://e9erust.blogspot.com/ Sent from Slate001 ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: How are USB drivers assigned?
On Mon, Jun 28, 2010 at 11:03:38PM -1000, Gary Dunn wrote: Is there a file that associates drivers with USB device information? More specifically, how does a USB mouse get assigned to the ums driver? This is for FreeBSD 8.0, if it matters. When queried on connection the mouse identifies itself by sending a descriptor as a Human Interface Device class peripheral, and specifically a mouse. The USB driver then knows to attach the ums device driver. Roland -- R.F.Smith http://www.xs4all.nl/~rsmith/ [plain text _non-HTML_ PGP/GnuPG encrypted/signed email much appreciated] pgp: 1A2B 477F 9970 BA3C 2914 B7CE 1277 EFB0 C321 A725 (KeyID: C321A725) pgp0kW4oz5q0S.pgp Description: PGP signature
Re: How are USB drivers assigned?
On Tue, 29 Jun 2010 17:56:39 +0200 Roland Smith rsm...@xs4all.nl wrote: On Mon, Jun 28, 2010 at 11:03:38PM -1000, Gary Dunn wrote: Is there a file that associates drivers with USB device information? More specifically, how does a USB mouse get assigned to the ums driver? This is for FreeBSD 8.0, if it matters. When queried on connection the mouse identifies itself by sending a descrip tor as a Human Interface Device class peripheral, and specifically a mouse. The USB driver then knows to attach the ums device driver. Thanks for the reply Roland. What I am looking for is The USB driver then knows to attach the ums device driver. how it knows. Gary Dunn Open Slate Project ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org