svn commit: r188074 - head/sys/dev/usb2/quirk

Andrew Thompson thompsa at FreeBSD.org
Tue Feb 3 07:24:01 PST 2009


Author: thompsa
Date: Tue Feb  3 15:24:00 2009
New Revision: 188074
URL: http://svn.freebsd.org/changeset/base/188074

Log:
  Add missing string table for the usb quirk enum.
  
  Pointy hat:	me
  Submitted by:	rrs

Modified:
  head/sys/dev/usb2/quirk/usb2_quirk.c
  head/sys/dev/usb2/quirk/usb2_quirk.h

Modified: head/sys/dev/usb2/quirk/usb2_quirk.c
==============================================================================
--- head/sys/dev/usb2/quirk/usb2_quirk.c	Tue Feb  3 14:32:06 2009	(r188073)
+++ head/sys/dev/usb2/quirk/usb2_quirk.c	Tue Feb  3 15:24:00 2009	(r188074)
@@ -112,7 +112,32 @@ static struct usb2_quirk_entry usb2_quir
 	{USB_QUIRK_ENTRY(USB_VENDOR_METAGEEK, USB_PRODUCT_METAGEEK_WISPY24X, 0x0000, 0xFFFF, UQ_KBD_IGNORE, UQ_HID_IGNORE, UQ_NONE)},
 };
 
-USB_MAKE_DEBUG_TABLE(USB_QUIRK);
+static const char *usb_quirk_str[USB_QUIRK_MAX] = {
+	"UQ_NONE",
+	"UQ_AUDIO_SWAP_LR",	/* left and right sound channels are swapped */
+	"UQ_AU_INP_ASYNC",	/* input is async despite claim of adaptive */
+	"UQ_AU_NO_FRAC",	/* don't adjust for fractional samples */
+	"UQ_AU_NO_XU",		/* audio device has broken extension unit */
+	"UQ_BAD_ADC",		/* bad audio spec version number */
+	"UQ_BAD_AUDIO",		/* device claims audio class, but isn't */
+	"UQ_BROKEN_BIDIR",	/* printer has broken bidir mode */
+	"UQ_BUS_POWERED",	/* device is bus powered, despite claim */
+	"UQ_HID_IGNORE",	/* device should be ignored by hid class */
+	"UQ_KBD_IGNORE",	/* device should be ignored by kbd class */
+	"UQ_MS_BAD_CLASS",	/* doesn't identify properly */
+	"UQ_MS_LEADING_BYTE",	/* mouse sends an unknown leading byte */
+	"UQ_MS_REVZ",		/* mouse has Z-axis reversed */
+	"UQ_NO_STRINGS",	/* string descriptors are broken */
+	"UQ_OPEN_CLEARSTALL",	/* device needs clear endpoint stall */
+	"UQ_POWER_CLAIM",	/* hub lies about power status */
+	"UQ_SPUR_BUT_UP",	/* spurious mouse button up events */
+	"UQ_SWAP_UNICODE",	/* has some Unicode strings swapped */
+	"UQ_CFG_INDEX_1",	/* select configuration index 1 by default */
+	"UQ_CFG_INDEX_2",	/* select configuration index 2 by default */
+	"UQ_CFG_INDEX_3",	/* select configuration index 3 by default */
+	"UQ_CFG_INDEX_4",	/* select configuration index 4 by default */
+	"UQ_CFG_INDEX_0",	/* select configuration index 0 by default */
+};
 
 /*------------------------------------------------------------------------*
  *	usb2_quirkstr
@@ -123,7 +148,7 @@ static const char *
 usb2_quirkstr(uint16_t quirk)
 {
 	return ((quirk < USB_QUIRK_MAX) ?
-	    USB_QUIRK[quirk] : "USB_QUIRK_UNKNOWN");
+	    usb_quirk_str[quirk] : "USB_QUIRK_UNKNOWN");
 }
 
 /*------------------------------------------------------------------------*

Modified: head/sys/dev/usb2/quirk/usb2_quirk.h
==============================================================================
--- head/sys/dev/usb2/quirk/usb2_quirk.h	Tue Feb  3 14:32:06 2009	(r188073)
+++ head/sys/dev/usb2/quirk/usb2_quirk.h	Tue Feb  3 15:24:00 2009	(r188074)
@@ -28,7 +28,7 @@
 #define	_USB2_QUIRK_H_
 
 /* NOTE: UQ_NONE is not a valid quirk */
-enum {
+enum {	/* keep in sync with usb_quirk_str table */
 	UQ_NONE,
 	UQ_AUDIO_SWAP_LR,	/* left and right sound channels are swapped */
 	UQ_AU_INP_ASYNC,	/* input is async despite claim of adaptive */


More information about the svn-src-all mailing list