View | Details | Raw Unified | Return to bug 267922 | Differences between
and this patch

Collapse All | Expand All

(-)b/share/man/man4/usb_quirk.4 (+2 lines)
Lines 78-83 does not identify properly Link Here
78
mouse sends an unknown leading byte
78
mouse sends an unknown leading byte
79
.It UQ_MS_REVZ
79
.It UQ_MS_REVZ
80
mouse has Z-axis reversed
80
mouse has Z-axis reversed
81
.It UQ_MS_VENDOR_BTN
82
mouse has buttons in vendor usage page
81
.It UQ_NO_STRINGS
83
.It UQ_NO_STRINGS
82
string descriptors are broken
84
string descriptors are broken
83
.It UQ_POWER_CLAIM
85
.It UQ_POWER_CLAIM
(-)b/sys/dev/usb/input/ums.c (-6 / +12 lines)
Lines 122-127 struct ums_info { Link Here
122
#define	UMS_FLAG_SBU        0x0010	/* spurious button up events */
122
#define	UMS_FLAG_SBU        0x0010	/* spurious button up events */
123
#define	UMS_FLAG_REVZ	    0x0020	/* Z-axis is reversed */
123
#define	UMS_FLAG_REVZ	    0x0020	/* Z-axis is reversed */
124
#define	UMS_FLAG_W_AXIS     0x0040
124
#define	UMS_FLAG_W_AXIS     0x0040
125
#define	UMS_FLAG_VBTN	    0x0080	/* Buttons in vendor usage page */
125
126
126
	uint8_t	sc_iid_w;
127
	uint8_t	sc_iid_w;
127
	uint8_t	sc_iid_x;
128
	uint8_t	sc_iid_x;
Lines 538-549 ums_hid_parse(struct ums_softc *sc, device_t dev, const uint8_t *buf, Link Here
538
	}
539
	}
539
540
540
	/* detect other buttons */
541
	/* detect other buttons */
541
542
	if (info->sc_flags & UMS_FLAG_VBTN) {
542
	for (j = 0; (i < UMS_BUTTON_MAX) && (j < 2); i++, j++) {
543
		for (j = 0; (i < UMS_BUTTON_MAX) && (j < 2); i++, j++) {
543
		if (!hid_locate(buf, len, HID_USAGE2(HUP_MICROSOFT, (j + 1)),
544
			if (!hid_locate(buf, len, HID_USAGE2(HUP_MICROSOFT,
544
		    hid_input, index, &info->sc_loc_btn[i], NULL, 
545
			    (j + 1)), hid_input, index, &info->sc_loc_btn[i],
545
		    &info->sc_iid_btn[i])) {
546
			    NULL, &info->sc_iid_btn[i])) {
546
			break;
547
				break;
548
			}
547
		}
549
		}
548
	}
550
	}
549
551
Lines 618-623 ums_attach(device_t dev) Link Here
618
620
619
	isize = hid_report_size_max(d_ptr, d_len, hid_input, &sc->sc_iid);
621
	isize = hid_report_size_max(d_ptr, d_len, hid_input, &sc->sc_iid);
620
622
623
	if (usb_test_quirk(uaa, UQ_MS_VENDOR_BTN))
624
		for (i = 0; i < UMS_INFO_MAX; i++)
625
			sc->sc_info[i].sc_flags |= UMS_FLAG_VBTN;
626
621
	/*
627
	/*
622
	 * The Microsoft Wireless Notebook Optical Mouse seems to be in worse
628
	 * The Microsoft Wireless Notebook Optical Mouse seems to be in worse
623
	 * shape than the Wireless Intellimouse 2.0, as its X, Y, wheel, and
629
	 * shape than the Wireless Intellimouse 2.0, as its X, Y, wheel, and
(-)b/sys/dev/usb/quirk/usb_quirk.c (+3 lines)
Lines 175-180 static struct usb_quirk_entry usb_quirks[USB_DEV_QUIRKS_MAX] = { Link Here
175
	/* Quirk for Corsair STRAFE Gaming keyboard */
175
	/* Quirk for Corsair STRAFE Gaming keyboard */
176
	USB_QUIRK(CORSAIR, STRAFE, 0x0000, 0xffff, UQ_KBD_BOOTPROTO),
176
	USB_QUIRK(CORSAIR, STRAFE, 0x0000, 0xffff, UQ_KBD_BOOTPROTO),
177
	USB_QUIRK(CORSAIR, STRAFE2, 0x0000, 0xffff, UQ_KBD_BOOTPROTO),
177
	USB_QUIRK(CORSAIR, STRAFE2, 0x0000, 0xffff, UQ_KBD_BOOTPROTO),
178
	/* Quirk for Kensington Slimblade Trackball */
179
	USB_QUIRK(KENSINGTON, SLIMBLADE, 0x0000, 0xffff, UQ_MS_VENDOR_BTN),
178
	/* umodem(4) device quirks */
180
	/* umodem(4) device quirks */
179
	USB_QUIRK(METRICOM, RICOCHET_GS, 0x100, 0x100, UQ_ASSUME_CM_OVER_DATA),
181
	USB_QUIRK(METRICOM, RICOCHET_GS, 0x100, 0x100, UQ_ASSUME_CM_OVER_DATA),
180
	USB_QUIRK(SANYO, SCP4900, 0x000, 0x000, UQ_ASSUME_CM_OVER_DATA),
182
	USB_QUIRK(SANYO, SCP4900, 0x000, 0x000, UQ_ASSUME_CM_OVER_DATA),
Lines 649-654 static const char *usb_quirk_str[USB_QUIRK_MAX] = { Link Here
649
	[UQ_MS_BAD_CLASS]	= "UQ_MS_BAD_CLASS",
651
	[UQ_MS_BAD_CLASS]	= "UQ_MS_BAD_CLASS",
650
	[UQ_MS_LEADING_BYTE]	= "UQ_MS_LEADING_BYTE",
652
	[UQ_MS_LEADING_BYTE]	= "UQ_MS_LEADING_BYTE",
651
	[UQ_MS_REVZ]		= "UQ_MS_REVZ",
653
	[UQ_MS_REVZ]		= "UQ_MS_REVZ",
654
	[UQ_MS_VENDOR_BTN]	= "UQ_MS_VENDOR_BTN",
652
	[UQ_NO_STRINGS]		= "UQ_NO_STRINGS",
655
	[UQ_NO_STRINGS]		= "UQ_NO_STRINGS",
653
	[UQ_POWER_CLAIM]	= "UQ_POWER_CLAIM",
656
	[UQ_POWER_CLAIM]	= "UQ_POWER_CLAIM",
654
	[UQ_SPUR_BUT_UP]	= "UQ_SPUR_BUT_UP",
657
	[UQ_SPUR_BUT_UP]	= "UQ_SPUR_BUT_UP",
(-)b/sys/dev/usb/quirk/usb_quirk.h (+1 lines)
Lines 55-60 enum { Link Here
55
	UQ_MS_BAD_CLASS,	/* doesn't identify properly */
55
	UQ_MS_BAD_CLASS,	/* doesn't identify properly */
56
	UQ_MS_LEADING_BYTE,	/* mouse sends an unknown leading byte */
56
	UQ_MS_LEADING_BYTE,	/* mouse sends an unknown leading byte */
57
	UQ_MS_REVZ,		/* mouse has Z-axis reversed */
57
	UQ_MS_REVZ,		/* mouse has Z-axis reversed */
58
	UQ_MS_VENDOR_BTN,	/* mouse has buttons in vendor usage page */
58
	UQ_NO_STRINGS,		/* string descriptors are broken */
59
	UQ_NO_STRINGS,		/* string descriptors are broken */
59
	UQ_POWER_CLAIM,		/* hub lies about power status */
60
	UQ_POWER_CLAIM,		/* hub lies about power status */
60
	UQ_SPUR_BUT_UP,		/* spurious mouse button up events */
61
	UQ_SPUR_BUT_UP,		/* spurious mouse button up events */

Return to bug 267922