From owner-p4-projects@FreeBSD.ORG Thu Jul 12 19:18:16 2007 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 834E216A469; Thu, 12 Jul 2007 19:18:16 +0000 (UTC) X-Original-To: perforce@FreeBSD.org Delivered-To: perforce@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 40F1A16A400 for ; Thu, 12 Jul 2007 19:18:16 +0000 (UTC) (envelope-from rpaulo@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [69.147.83.41]) by mx1.freebsd.org (Postfix) with ESMTP id 19D8E13C43E for ; Thu, 12 Jul 2007 19:18:16 +0000 (UTC) (envelope-from rpaulo@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.8/8.13.8) with ESMTP id l6CJIFfY094949 for ; Thu, 12 Jul 2007 19:18:15 GMT (envelope-from rpaulo@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.8/8.13.8/Submit) id l6CJIFkI094946 for perforce@freebsd.org; Thu, 12 Jul 2007 19:18:15 GMT (envelope-from rpaulo@FreeBSD.org) Date: Thu, 12 Jul 2007 19:18:15 GMT Message-Id: <200707121918.l6CJIFkI094946@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to rpaulo@FreeBSD.org using -f From: Rui Paulo To: Perforce Change Reviews Cc: Subject: PERFORCE change 123399 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 12 Jul 2007 19:18:17 -0000 http://perforce.freebsd.org/chv.cgi?CH=123399 Change 123399 by rpaulo@rpaulo_epsilon on 2007/07/12 19:18:01 For some reason, moused confuses sysmouse after attaching to the HID version of the MacBook Bluetooth device. For now, blacklist the product id of the Bluetooth controller (in HID mode) inside ums(4). Affected files ... .. //depot/projects/soc2007/rpaulo-macbook/dev/usb/ums.c#13 edit .. //depot/projects/soc2007/rpaulo-macbook/dev/usb/usb_quirks.c#7 edit .. //depot/projects/soc2007/rpaulo-macbook/dev/usb/usb_quirks.h#8 edit .. //depot/projects/soc2007/rpaulo-macbook/dev/usb/usbdevs#16 edit Differences ... ==== //depot/projects/soc2007/rpaulo-macbook/dev/usb/ums.c#13 (text+ko) ==== @@ -198,6 +198,9 @@ if (err) return (UMATCH_NONE); + if (usbd_get_quirks(uaa->device)->uq_flags & UQ_MS_IGNORE) + return (UMATCH_NONE); + if (id->bInterfaceClass == UICLASS_HID && id->bInterfaceSubClass == UISUBCLASS_BOOT && id->bInterfaceProtocol == UIPROTO_MOUSE) ==== //depot/projects/soc2007/rpaulo-macbook/dev/usb/usb_quirks.c#7 (text+ko) ==== @@ -111,6 +111,10 @@ /* Devices that need special handling of the Fn key */ { USB_VENDOR_APPLE, USB_PRODUCT_APPLE_INTKBTP, ANY, { UQ_KBD_FNKEY } }, + + { USB_VENDOR_APPLE, USB_PRODUCT_APPLE_BLUETOOTH_HID, + ANY, { UQ_MS_IGNORE } }, + { 0, 0, 0, { 0 } } }; ==== //depot/projects/soc2007/rpaulo-macbook/dev/usb/usb_quirks.h#8 (text+ko) ==== @@ -58,6 +58,7 @@ #define UQ_MS_BAD_CLASS 0x00020000 /* doesn't identify properly */ #define UQ_MS_LEADING_BYTE 0x40000 /* mouse sends an unknown leading byte. */ #define UQ_KBD_FNKEY 0x00080000 /* device needs special handling for the Fn key */ +#define UQ_MS_IGNORE 0x00100000 /* device should be ignored by ums */ }; extern const struct usbd_quirks usbd_no_quirk; ==== //depot/projects/soc2007/rpaulo-macbook/dev/usb/usbdevs#16 (text+ko) ==== @@ -823,6 +823,7 @@ /* Apple Computer products */ product APPLE OPTMOUSE 0x0302 Optical mouse +product APPLE BLUETOOTH_HID 0x1000 Bluetooth (HID mode) product APPLE SPEAKERS 0x1101 Speakers product APPLE IPOD 0x1201 iPod product APPLE IPOD2G 0x1202 iPod 2G