<commit_before>.\"
.\" Copyright (c) 2010 AnyWi Technologies
.\" All rights reserved.
.\"
.\" Permission to use, copy, modify, and distribute this software for any
.\" purpose with or without fee is hereby granted, provided that the above
.\" copyright notice and this permission notice appear in all copies.
.\"
.\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
.\"
.\" $FreeBSD$
.\"
.Dd April 21, 2013
.Dt USB_QUIRK 4
.Os
.Sh NAME
.Nm usb_quirk
.Nd USB quirks module
.Sh SYNOPSIS
To compile this module into the kernel,
place the following line in your
kernel configuration file:
.Bd -ragged -offset indent
.Cd "device usb"
.Ed
.Pp
Alternatively, to load the module at boot
time, place the following line in
.Xr loader.conf 5 :
.Bd -literal -offset indent
usb_quirk_load="YES"
.Ed
.Sh DESCRIPTION
The
.Nm
module provides support for dynamically adding and removing quirks for
USB devices with
.Xr usbconfig 8 .
.Sh General quirks:
.Bl -tag -width Ds
.It UQ_AUDIO_SWAP_LR
swap left and right channels
.It UQ_AU_INP_ASYNC
input is async despite claim of adaptive
.It UQ_AU_NO_FRAC
don't adjust for fractional samples
.It UQ_AU_NO_XU
audio device has broken extension unit
.It UQ_BAD_ADC
bad audio spec version number
.It UQ_BAD_AUDIO
device claims audio class, but isn't
.It UQ_BROKEN_BIDIR
printer has broken bidir mode
.It UQ_BUS_POWERED
device is bus powered, despite claim
.It UQ_HID_IGNORE
device should be ignored by hid class
.It UQ_KBD_IGNORE
device should be ignored by kbd class
.It UQ_KBD_BOOTPROTO
device should set the boot protocol
.It UQ_UMS_IGNORE
device should be ignored by ums class
.It UQ_MS_BAD_CLASS
doesn't identify properly
.It UQ_MS_LEADING_BYTE
mouse sends an unknown leading byte
.It UQ_MS_REVZ
mouse has Z-axis reversed
.It UQ_NO_STRINGS
string descriptors are broken
.It UQ_POWER_CLAIM
hub lies about power status
.It UQ_SPUR_BUT_UP
spurious mouse button up events
.It UQ_SWAP_UNICODE
has some Unicode strings swapped
.It UQ_CFG_INDEX_1
select configuration index 1 by default
.It UQ_CFG_INDEX_2
select configuration index 2 by default
.It UQ_CFG_INDEX_3
select configuration index 3 by default
.It UQ_CFG_INDEX_4
select configuration index 4 by default
.It UQ_CFG_INDEX_0
select configuration index 0 by default
.It UQ_ASSUME_CM_OVER_DATA
assume cm over data feature
.El
.Sh USB Mass Storage Quirks
.Bl -tag -width Ds
.It UQ_MSC_NO_TEST_UNIT_READY
send start/stop instead of TUR
.It UQ_MSC_NO_RS_CLEAR_UA
does not reset Unit Att.
.It UQ_MSC_NO_START_STOP
does not support start/stop
.It UQ_MSC_NO_GETMAXLUN
does not support get max LUN
.It UQ_MSC_NO_INQUIRY
fake generic inq response
.It UQ_MSC_NO_INQUIRY_EVPD
does not support inq EVPD
.It UQ_MSC_NO_SYNC_CACHE
does not support sync cache
.It UQ_MSC_SHUTTLE_INIT
requires Shuttle init sequence
.It UQ_MSC_ALT_IFACE_1
switch to alternate interface 1
.It UQ_MSC_FLOPPY_SPEED
does floppy speeds (20kb/s)
.It UQ_MSC_IGNORE_RESIDUE
gets residue wrong
.It UQ_MSC_WRONG_CSWSIG
uses wrong CSW signature
.It UQ_MSC_RBC_PAD_TO_12
pad RBC requests to 12 bytes
.It UQ_MSC_READ_CAP_OFFBY1
reports sector count, not max sec.
.It UQ_MSC_FORCE_SHORT_INQ
does not support full inq.
.It UQ_MSC_FORCE_WIRE_BBB
force BBB wire protocol
.It UQ_MSC_FORCE_WIRE_CBI
force CBI wire protocol
.It UQ_MSC_FORCE_WIRE_CBI_I
force CBI with int. wire protocol
.It UQ_MSC_FORCE_PROTO_SCSI
force SCSI command protocol
.It UQ_MSC_FORCE_PROTO_ATAPI
force ATAPI command protocol
.It UQ_MSC_FORCE_PROTO_UFI
force UFI command protocol
.It UQ_MSC_FORCE_PROTO_RBC
force RBC command protocol
.El
.Sh Mass Storage Change (u3g) quirks:
.Bl -tag -width Ds
.It UQ_MSC_EJECT_HUAWEI
ejects after Huawei USB command
.It UQ_MSC_EJECT_SIERRA
ejects after Sierra USB command
.It UQ_MSC_EJECT_SCSIEJECT
ejects after SCSI eject command
0x1b0000000200
.It UQ_MSC_EJECT_REZERO
ejects after SCSI rezero command
0x010000000000
.It UQ_MSC_EJECT_ZTESTOR
ejects after ZTE SCSI command
0x850101011801010101010000
.It UQ_MSC_EJECT_CMOTECH
ejects after C-motech SCSI command
0xff52444556434847
.It UQ_MSC_EJECT_WAIT
wait for the device to eject
.It UQ_MSC_EJECT_SAEL_M460
ejects after Sael USB commands
.It UQ_MSC_EJECT_HUAWEISCSI
ejects after Huawei SCSI command
0x11060000000000000000000000000000
.It UQ_MSC_EJECT_TCT<commit_msg>Make section headings for different quirk types consistent.<commit_after>.\"
.\" Copyright (c) 2010 AnyWi Technologies
.\" All rights reserved.
.\"
.\" Permission to use, copy, modify, and distribute this software for any
.\" purpose with or without fee is hereby granted, provided that the above
.\" copyright notice and this permission notice appear in all copies.
.\"
.\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
.\"
.\" $FreeBSD$
.\"
.Dd April 21, 2013
.Dt USB_QUIRK 4
.Os
.Sh NAME
.Nm usb_quirk
.Nd USB quirks module
.Sh SYNOPSIS
To compile this module into the kernel,
place the following line in your
kernel configuration file:
.Bd -ragged -offset indent
.Cd "device usb"
.Ed
.Pp
Alternatively, to load the module at boot
time, place the following line in
.Xr loader.conf 5 :
.Bd -literal -offset indent
usb_quirk_load="YES"
.Ed
.Sh DESCRIPTION
The
.Nm
module provides support for dynamically adding and removing quirks for
USB devices with
.Xr usbconfig 8 .
.Sh General quirks:
.Bl -tag -width Ds
.It UQ_AUDIO_SWAP_LR
swap left and right channels
.It UQ_AU_INP_ASYNC
input is async despite claim of adaptive
.It UQ_AU_NO_FRAC
don't adjust for fractional samples
.It UQ_AU_NO_XU
audio device has broken extension unit
.It UQ_BAD_ADC
bad audio spec version number
.It UQ_BAD_AUDIO
device claims audio class, but isn't
.It UQ_BROKEN_BIDIR
printer has broken bidir mode
.It UQ_BUS_POWERED
device is bus powered, despite claim
.It UQ_HID_IGNORE
device should be ignored by hid class
.It UQ_KBD_IGNORE
device should be ignored by kbd class
.It UQ_KBD_BOOTPROTO
device should set the boot protocol
.It UQ_UMS_IGNORE
device should be ignored by ums class
.It UQ_MS_BAD_CLASS
doesn't identify properly
.It UQ_MS_LEADING_BYTE
mouse sends an unknown leading byte
.It UQ_MS_REVZ
mouse has Z-axis reversed
.It UQ_NO_STRINGS
string descriptors are broken
.It UQ_POWER_CLAIM
hub lies about power status
.It UQ_SPUR_BUT_UP
spurious mouse button up events
.It UQ_SWAP_UNICODE
has some Unicode strings swapped
.It UQ_CFG_INDEX_1
select configuration index 1 by default
.It UQ_CFG_INDEX_2
select configuration index 2 by default
.It UQ_CFG_INDEX_3
select configuration index 3 by default
.It UQ_CFG_INDEX_4
select configuration index 4 by default
.It UQ_CFG_INDEX_0
select configuration index 0 by default
.It UQ_ASSUME_CM_OVER_DATA
assume cm over data feature
.El
.Sh USB Mass Storage quirks:
.Bl -tag -width Ds
.It UQ_MSC_NO_TEST_UNIT_READY
send start/stop instead of TUR
.It UQ_MSC_NO_RS_CLEAR_UA
does not reset Unit Att.
.It UQ_MSC_NO_START_STOP
does not support start/stop
.It UQ_MSC_NO_GETMAXLUN
does not support get max LUN
.It UQ_MSC_NO_INQUIRY
fake generic inq response
.It UQ_MSC_NO_INQUIRY_EVPD
does not support inq EVPD
.It UQ_MSC_NO_SYNC_CACHE
does not support sync cache
.It UQ_MSC_SHUTTLE_INIT
requires Shuttle init sequence
.It UQ_MSC_ALT_IFACE_1
switch to alternate interface 1
.It UQ_MSC_FLOPPY_SPEED
does floppy speeds (20kb/s)
.It UQ_MSC_IGNORE_RESIDUE
gets residue wrong
.It UQ_MSC_WRONG_CSWSIG
uses wrong CSW signature
.It UQ_MSC_RBC_PAD_TO_12
pad RBC requests to 12 bytes
.It UQ_MSC_READ_CAP_OFFBY1
reports sector count, not max sec.
.It UQ_MSC_FORCE_SHORT_INQ
does not support full inq.
.It UQ_MSC_FORCE_WIRE_BBB
force BBB wire protocol
.It UQ_MSC_FORCE_WIRE_CBI
force CBI wire protocol
.It UQ_MSC_FORCE_WIRE_CBI_I
force CBI with int. wire protocol
.It UQ_MSC_FORCE_PROTO_SCSI
force SCSI command protocol
.It UQ_MSC_FORCE_PROTO_ATAPI
force ATAPI command protocol
.It UQ_MSC_FORCE_PROTO_UFI
force UFI command protocol
.It UQ_MSC_FORCE_PROTO_RBC
force RBC command protocol
.El
.Sh 3G Datacard (u3g) quirks:
.Bl -tag -width Ds
.It UQ_MSC_EJECT_HUAWEI
ejects after Huawei USB command
.It UQ_MSC_EJECT_SIERRA
ejects after Sierra USB command
.It UQ_MSC_EJECT_SCSIEJECT
ejects after SCSI eject command
0x1b0000000200
.It UQ_MSC_EJECT_REZERO
ejects after SCSI rezero command
0x010000000000
.It UQ_MSC_EJECT_ZTESTOR
ejects after ZTE SCSI command
0x850101011801010101010000
.It UQ_MSC_EJECT_CMOTECH
ejects after C-motech SCSI command
0xff52444556434847
.It UQ_MSC_EJECT_WAIT
wait for the device to eject
.It UQ_MSC_EJECT_SAEL_M460
ejects after Sael USB commands
.It UQ_MSC_EJECT_HUAWEISCSI
ejects after Huawei SCSI command
0x11060000000000000000000000000000
.It UQ_MSC_EJECT_TCT
{'fraction_non_alphanumeric': 0.04333579959835113, 'fraction_numerical': 0.028432512419405982, 'mean_word_length': 4.884328358208955, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 6, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5079230', 'n_tokens_mistral': 3736, 'n_tokens_neox': 3315, 'n_words': 1283}