Date: Sun, 26 Jul 2009 15:50:43 GMT From: Hans Petter Selasky <hselasky@FreeBSD.org> To: Perforce Change Reviews <perforce@FreeBSD.org> Subject: PERFORCE change 166589 for review Message-ID: <200907261550.n6QFohAF007026@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=166589 Change 166589 by hselasky@hselasky_laptop001 on 2009/07/26 15:49:45 USB CORE: - fix false positive keyboard detection in a more general way. - make sure driver_info field has a default value. PR: usb/137129 Affected files ... .. //depot/projects/usb/src/sys/dev/usb/input/ukbd.c#23 edit .. //depot/projects/usb/src/sys/dev/usb/quirk/usb_quirk.c#6 edit .. //depot/projects/usb/src/sys/dev/usb/usb_device.c#45 edit Differences ... ==== //depot/projects/usb/src/sys/dev/usb/input/ukbd.c#23 (text+ko) ==== @@ -711,7 +711,15 @@ if (error) return (ENXIO); + /* + * NOTE: we currently don't support USB mouse and USB keyboard + * on the same USB endpoint. + */ if (hid_is_collection(d_ptr, d_len, + HID_USAGE2(HUP_GENERIC_DESKTOP, HUG_MOUSE))) { + /* most likely a mouse */ + error = ENXIO; + } else if (hid_is_collection(d_ptr, d_len, HID_USAGE2(HUP_GENERIC_DESKTOP, HUG_KEYBOARD))) { if (usb_test_quirk(uaa, UQ_KBD_IGNORE)) error = ENXIO; ==== //depot/projects/usb/src/sys/dev/usb/quirk/usb_quirk.c#6 (text+ko) ==== @@ -106,8 +106,6 @@ {USB_QUIRK_ENTRY(USB_VENDOR_HP, USB_PRODUCT_HP_830C, 0x0000, 0xFFFF, UQ_BROKEN_BIDIR, UQ_NONE)}, {USB_QUIRK_ENTRY(USB_VENDOR_HP, USB_PRODUCT_HP_1220C, 0x0000, 0xFFFF, UQ_BROKEN_BIDIR, UQ_NONE)}, {USB_QUIRK_ENTRY(USB_VENDOR_XEROX, USB_PRODUCT_XEROX_WCM15, 0x0000, 0xFFFF, UQ_BROKEN_BIDIR, UQ_NONE)}, - /* Devices which should be ignored by ukbd */ - {USB_QUIRK_ENTRY(USB_VENDOR_CYPRESS, USB_PRODUCT_CYPRESS_IKARILASER, 0x0000, 0xFFFF, UQ_KBD_IGNORE, UQ_NONE)}, /* Devices which should be ignored by uhid */ {USB_QUIRK_ENTRY(USB_VENDOR_APC, USB_PRODUCT_APC_UPS, 0x0000, 0xFFFF, UQ_HID_IGNORE, UQ_NONE)}, {USB_QUIRK_ENTRY(USB_VENDOR_BELKIN, USB_PRODUCT_BELKIN_F6C550AVR, 0x0000, 0xFFFF, UQ_HID_IGNORE, UQ_NONE)}, ==== //depot/projects/usb/src/sys/dev/usb/usb_device.c#45 (text+ko) ==== @@ -1283,6 +1283,7 @@ uaa.info.bIfaceNum = iface->idesc->bInterfaceNumber; uaa.use_generic = 0; + uaa.driver_info = 0; /* reset driver_info */ DPRINTFN(2, "iclass=%u/%u/%u iindex=%u/%u\n", uaa.info.bInterfaceClass, @@ -1299,6 +1300,7 @@ /* try generic interface drivers last */ uaa.use_generic = 1; + uaa.driver_info = 0; /* reset driver_info */ if (usb_probe_and_attach_sub(udev, &uaa)) { /* ignore */
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200907261550.n6QFohAF007026>
