From owner-p4-projects@FreeBSD.ORG Tue Jul 24 13:59:15 2007 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 7152E16A41B; Tue, 24 Jul 2007 13:59:15 +0000 (UTC) Delivered-To: perforce@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3694816A417 for ; Tue, 24 Jul 2007 13:59:15 +0000 (UTC) (envelope-from rpaulo@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 20D3B13C45D for ; Tue, 24 Jul 2007 13:59:15 +0000 (UTC) (envelope-from rpaulo@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id l6ODxF2n047107 for ; Tue, 24 Jul 2007 13:59:15 GMT (envelope-from rpaulo@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id l6ODxE93047104 for perforce@freebsd.org; Tue, 24 Jul 2007 13:59:14 GMT (envelope-from rpaulo@FreeBSD.org) Date: Tue, 24 Jul 2007 13:59:14 GMT Message-Id: <200707241359.l6ODxE93047104@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 124012 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: Tue, 24 Jul 2007 13:59:15 -0000 http://perforce.freebsd.org/chv.cgi?CH=124012 Change 124012 by rpaulo@rpaulo_epsilon on 2007/07/24 13:59:10 Don't depend on a quirk to detect Apple keyboards with the Fn key. Affected files ... .. //depot/projects/soc2007/rpaulo-macbook/dev/usb/ukbd.c#10 edit .. //depot/projects/soc2007/rpaulo-macbook/dev/usb/usb_quirks.c#10 edit .. //depot/projects/soc2007/rpaulo-macbook/dev/usb/usb_quirks.h#9 edit Differences ... ==== //depot/projects/soc2007/rpaulo-macbook/dev/usb/ukbd.c#10 (text+ko) ==== @@ -201,23 +201,20 @@ /* * Locate the Fn key on Apple keyboards. */ - if (usbd_get_quirks(uaa->device)->uq_flags & UQ_KBD_FNKEY) { - err = usbd_read_report_desc(uaa->iface, &desc, &size, M_TEMP); - if (err) { - device_printf(self, - "could not read report descriptor\n"); - return ENXIO; - } + err = usbd_read_report_desc(uaa->iface, &desc, &size, M_TEMP); + if (err) { + device_printf(self, "could not read report descriptor\n"); + return ENXIO; + } - if (hid_locate(desc, size, HID_USAGE2(HUP_CUSTOM, HUC_FNKEY), - hid_input, &sc->sc_loc_fn, &flags)) { - device_printf(self, "Fn key.\n"); - sc->sc_flags |= UKBD_FN; - } else - device_printf(self, "Fn key not found.\n"); - free(desc, M_TEMP); + if (hid_locate(desc, size, HID_USAGE2(HUP_CUSTOM, HUC_FNKEY), + hid_input, &sc->sc_loc_fn, &flags)) { + device_printf(self, "Fn key.\n"); + sc->sc_flags |= UKBD_FN; } + free(desc, M_TEMP); + arg[0] = (void *)uaa; arg[1] = (void *)ukbd_intr; kbd = NULL; ==== //depot/projects/soc2007/rpaulo-macbook/dev/usb/usb_quirks.c#10 (text+ko) ==== @@ -110,10 +110,7 @@ ANY, { UQ_KBD_IGNORE }}, { USB_VENDOR_METAGEEK, USB_PRODUCT_METAGEEK_WISPYX, ANY, { UQ_KBD_IGNORE }}, - /* Devices that need special handling of the Fn key */ - { USB_VENDOR_APPLE, USB_PRODUCT_APPLE_INTKBTP, - ANY, { UQ_KBD_FNKEY } }, - + /* XXX: temporary */ { USB_VENDOR_APPLE, USB_PRODUCT_APPLE_BLUETOOTH_HID, ANY, { UQ_MS_IGNORE } }, ==== //depot/projects/soc2007/rpaulo-macbook/dev/usb/usb_quirks.h#9 (text+ko) ==== @@ -57,7 +57,6 @@ #define UQ_KBD_IGNORE 0x00018000 /* device should be ignored by both kbd and hid class */ #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 */ };