1.\" 2.\" Copyright (c) 2010 AnyWi Technologies 3.\" All rights reserved. 4.\" 5.\" Permission to use, copy, modify, and distribute this software for any 6.\" purpose with or without fee is hereby granted, provided that the above 7.\" copyright notice and this permission notice appear in all copies. 8.\" 9.\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES 10.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF 11.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR 12.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 13.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN 14.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF 15.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 16.\" 17.\" $FreeBSD$ 18.\" 19.Dd February 8, 2012 20.Dt USB_QUIRK 4 21.Os 22.Sh NAME 23.Nm usb_quirk 24.Nd USB quirks module 25.Sh SYNOPSIS 26To compile this module into the kernel, 27place the following line in your 28kernel configuration file: 29.Bd -ragged -offset indent 30.Cd "device usb_quirk" 31.Ed 32.Pp 33Alternatively, to load the module at boot 34time, place the following line in 35.Xr loader.conf 5 : 36.Bd -literal -offset indent 37usb_quirk_load="YES" 38.Ed 39.Sh DESCRIPTION 40The 41.Nm 42module provides support for dynamically adding and removing quirks for 43USB devices with 44.Xr usbconfig 8 . 45.Sh General quirks: 46.Bl -tag -width Ds 47.It UQ_AUDIO_SWAP_LR 48swap left and right channels 49.It UQ_AU_INP_ASYNC 50input is async despite claim of adaptive 51.It UQ_AU_NO_FRAC 52don't adjust for fractional samples 53.It UQ_AU_NO_XU 54audio device has broken extension unit 55.It UQ_BAD_ADC 56bad audio spec version number 57.It UQ_BAD_AUDIO 58device claims audio class, but isn't 59.It UQ_BROKEN_BIDIR 60printer has broken bidir mode 61.It UQ_BUS_POWERED 62device is bus powered, despite claim 63.It UQ_HID_IGNORE 64device should be ignored by hid class 65.It UQ_KBD_IGNORE 66device should be ignored by kbd class 67.It UQ_KBD_BOOTPROTO 68device should set the boot protocol 69.It UQ_UMS_IGNORE 70device should be ignored by ums class 71.It UQ_MS_BAD_CLASS 72doesn't identify properly 73.It UQ_MS_LEADING_BYTE 74mouse sends an unknown leading byte 75.It UQ_MS_REVZ 76mouse has Z-axis reversed 77.It UQ_NO_STRINGS 78string descriptors are broken 79.It UQ_OPEN_CLEARSTALL 80device needs clear endpoint stall 81.It UQ_POWER_CLAIM 82hub lies about power status 83.It UQ_SPUR_BUT_UP 84spurious mouse button up events 85.It UQ_SWAP_UNICODE 86has some Unicode strings swapped 87.It UQ_CFG_INDEX_1 88select configuration index 1 by default 89.It UQ_CFG_INDEX_2 90select configuration index 2 by default 91.It UQ_CFG_INDEX_3 92select configuration index 3 by default 93.It UQ_CFG_INDEX_4 94select configuration index 4 by default 95.It UQ_CFG_INDEX_0 96select configuration index 0 by default 97.It UQ_ASSUME_CM_OVER_DATA 98assume cm over data feature 99.El 100.Sh USB Mass Storage Quirks 101.Bl -tag -width Ds 102.It UQ_MSC_NO_TEST_UNIT_READY 103send start/stop instead of TUR 104.It UQ_MSC_NO_RS_CLEAR_UA 105does not reset Unit Att. 106.It UQ_MSC_NO_START_STOP 107does not support start/stop 108.It UQ_MSC_NO_GETMAXLUN 109does not support get max LUN 110.It UQ_MSC_NO_INQUIRY 111fake generic inq response 112.It UQ_MSC_NO_INQUIRY_EVPD 113does not support inq EVPD 114.It UQ_MSC_NO_SYNC_CACHE 115does not support sync cache 116.It UQ_MSC_SHUTTLE_INIT 117requires Shuttle init sequence 118.It UQ_MSC_ALT_IFACE_1 119switch to alternate interface 1 120.It UQ_MSC_FLOPPY_SPEED 121does floppy speeds (20kb/s) 122.It UQ_MSC_IGNORE_RESIDUE 123gets residue wrong 124.It UQ_MSC_WRONG_CSWSIG 125uses wrong CSW signature 126.It UQ_MSC_RBC_PAD_TO_12 127pad RBC requests to 12 bytes 128.It UQ_MSC_READ_CAP_OFFBY1 129reports sector count, not max sec. 130.It UQ_MSC_FORCE_SHORT_INQ 131does not support full inq. 132.It UQ_MSC_FORCE_WIRE_BBB 133force BBB wire protocol 134.It UQ_MSC_FORCE_WIRE_CBI 135force CBI wire protocol 136.It UQ_MSC_FORCE_WIRE_CBI_I 137force CBI with int. wire protocol 138.It UQ_MSC_FORCE_PROTO_SCSI 139force SCSI command protocol 140.It UQ_MSC_FORCE_PROTO_ATAPI 141force ATAPI command protocol 142.It UQ_MSC_FORCE_PROTO_UFI 143force UFI command protocol 144.It UQ_MSC_FORCE_PROTO_RBC 145force RBC command protocol 146.El 147.Sh Mass Storage Change (u3g) quirks: 148.Bl -tag -width Ds 149.It UQ_MSC_EJECT_HUAWEI 150ejects after Huawei USB command 151.It UQ_MSC_EJECT_SIERRA 152ejects after Sierra USB command 153.It UQ_MSC_EJECT_SCSIEJECT 154ejects after SCSI eject command 1550x1b0000000200 156.It UQ_MSC_EJECT_REZERO 157ejects after SCSI rezero command 1580x010000000000 159.It UQ_MSC_EJECT_ZTESTOR 160ejects after ZTE SCSI command 1610x850101011801010101010000 162.It UQ_MSC_EJECT_CMOTECH 163ejects after C-motech SCSI command 1640xff52444556434847 165.It UQ_MSC_EJECT_WAIT 166wait for the device to eject 167.It UQ_MSC_EJECT_SAEL_M460 168ejects after Sael USB commands 169.It UQ_MSC_EJECT_HUAWEISCSI 170ejects after Huawei SCSI command 1710x11060000000000000000000000000000 172.It UQ_MSC_EJECT_TCT 173ejects after TCT SCSI command 1740x06f504025270 175.El 176See 177.Pa /sys/dev/usb/quirk/usb_quirk.h 178for the complete list of supported quirks. 179.Sh EXAMPLES 180After attaching a 181.Nm u3g 182device which appears as a USB device on 183.Pa ugen0.3 : 184.Bd -literal -offset indent 185usbconfig -d ugen0.3 add_quirk UQ_MSC_EJECT_WAIT 186.Ed 187.Sh SEE ALSO 188.Xr usbconfig 8 189.Sh HISTORY 190The 191.Nm 192module appeared in 193.Fx 8.0 , 194and was written by 195.An Hans Petter Selasky Aq hselasky@FreeBSD.org . 196This manual page was written by 197.An Nick Hibma Aq n_hibma@FreeBSD.org . 198