diff options
author | hselasky <hselasky@FreeBSD.org> | 2015-10-08 07:17:35 +0000 |
---|---|---|
committer | hselasky <hselasky@FreeBSD.org> | 2015-10-08 07:17:35 +0000 |
commit | 60e5f4dda1ebe3af7e222b97c3eb6de34c5e38ea (patch) | |
tree | 065cd3bfdccd0ec909618e3fe9be3e651393bf8a /share/man/man4/usb_quirk.4 | |
parent | 221f5f4a8e3034bb64122f7ddcfa04d18457de30 (diff) | |
download | FreeBSD-src-60e5f4dda1ebe3af7e222b97c3eb6de34c5e38ea.zip FreeBSD-src-60e5f4dda1ebe3af7e222b97c3eb6de34c5e38ea.tar.gz |
MFC r288180:
Implement support for reading USB quirks from the kernel environment.
Refer to the usb_quirk(4) manual page for more details on how to use
this new feature.
Submitted by: Maxime Soule <btik-fbsd@scoubidou.com>
PR: 203249
Diffstat (limited to 'share/man/man4/usb_quirk.4')
-rw-r--r-- | share/man/man4/usb_quirk.4 | 57 |
1 files changed, 55 insertions, 2 deletions
diff --git a/share/man/man4/usb_quirk.4 b/share/man/man4/usb_quirk.4 index 5b3f01c..e22bbc8 100644 --- a/share/man/man4/usb_quirk.4 +++ b/share/man/man4/usb_quirk.4 @@ -16,7 +16,7 @@ .\" .\" $FreeBSD$ .\" -.Dd May 7, 2015 +.Dd September 24, 2015 .Dt USB_QUIRK 4 .Os .Sh NAME @@ -177,7 +177,53 @@ ejects after HID command .Pp See .Pa /sys/dev/usb/quirk/usb_quirk.h -for the complete list of supported quirks. +or run "usbconfig dump_quirk_names" for the complete list of supported quirks. +.Sh LOADER TUNABLE +The following tunable can be set at the +.Xr loader 8 +prompt before booting the kernel, or stored in +.Xr loader.conf 5 . +.Bl -tag -width indent +.It Va hw.usb.quirk.%d +The value is a string whose format is: +.Bd -literal -offset indent +.Qo VendorId ProductId LowRevision HighRevision UQ_QUIRK,... Qc +.Ed +.Pp +Installs the quirks +.Ic UQ_QUIRK,... +for all USB devices matching +.Ic VendorId , +.Ic ProductId +and has a hardware revision between and including +.Ic LowRevision +and +.Ic HighRevision . +.Pp +.Ic VendorId , +.Ic ProductId , +.Ic LowRevision +and +.Ic HighRevision +are all 16 bits numbers which can be decimal or hexadecimal based. +.Pp +A maximum of 100 variables +.Ic hw.usb.quirk.0, .1, ..., .99 +can be defined. +.Pp +If a matching entry is found in the kernel's internal quirks table, it +is replaced by the new definition. +.Pp +Else a new entry is created given that the quirk table is not full. +.Pp +The kernel iterates over the +.Ic hw.usb.quirk.N +variables starting at +.Ic N = 0 +and stops at +.Ic N = 99 +or the first non-existing one. +.El .Sh EXAMPLES After attaching a .Nm u3g @@ -186,6 +232,13 @@ device which appears as a USB device on .Bd -literal -offset indent usbconfig -d ugen0.3 add_quirk UQ_MSC_EJECT_WAIT .Ed +.Pp +To install a quirk at boot time, place one or several lines like the +following in +.Xr loader.conf 5 : +.Bd -literal -offset indent +hw.usb.quirk.0="0x04d9 0xfa50 0 0xffff UQ_KBD_IGNORE" +.Ed .Sh SEE ALSO .Xr usbconfig 8 .Sh HISTORY |