From owner-p4-projects@FreeBSD.ORG Tue Mar 2 22:41:03 2010 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id B48D81065674; Tue, 2 Mar 2010 22:41:03 +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 790C7106564A for ; Tue, 2 Mar 2010 22:41:03 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 66AF48FC12 for ; Tue, 2 Mar 2010 22:41:03 +0000 (UTC) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.3/8.14.3) with ESMTP id o22Mf3eS012996 for ; Tue, 2 Mar 2010 22:41:03 GMT (envelope-from hselasky@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.3/8.14.3/Submit) id o22Mf3kY012994 for perforce@freebsd.org; Tue, 2 Mar 2010 22:41:03 GMT (envelope-from hselasky@FreeBSD.org) Date: Tue, 2 Mar 2010 22:41:03 GMT Message-Id: <201003022241.o22Mf3kY012994@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky To: Perforce Change Reviews Precedence: bulk Cc: Subject: PERFORCE change 175284 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Mar 2010 22:41:03 -0000 http://p4web.freebsd.org/chv.cgi?CH=175284 Change 175284 by hselasky@hselasky_laptop001 on 2010/03/02 22:40:06 USB input (bugfix): - make sure we don't reset the sc_kbd_id to zero when an Apple HID item is not present. PR: usb/144414 Affected files ... .. //depot/projects/usb/src/sys/dev/usb/input/ukbd.c#46 edit Differences ... ==== //depot/projects/usb/src/sys/dev/usb/input/ukbd.c#46 (text+ko) ==== @@ -884,27 +884,30 @@ &hid_len, M_TEMP, uaa->info.bIfaceIndex); if (err == 0) { uint8_t apple_keys = 0; + uint8_t temp_id; /* investigate if this is an Apple Keyboard */ if (hid_locate(hid_ptr, hid_len, HID_USAGE2(HUP_CONSUMER, HUG_APPLE_EJECT), hid_input, 0, &sc->sc_loc_apple_eject, &flags, - &sc->sc_kbd_id)) { + &temp_id)) { if (flags & HIO_VARIABLE) sc->sc_flags |= UKBD_FLAG_APPLE_EJECT | UKBD_FLAG_APPLE_SWAP; DPRINTFN(1, "Found Apple eject-key\n"); apple_keys = 1; + sc->sc_kbd_id = temp_id; } if (hid_locate(hid_ptr, hid_len, HID_USAGE2(0xFFFF, 0x0003), hid_input, 0, &sc->sc_loc_apple_fn, &flags, - &sc->sc_kbd_id)) { + &temp_id)) { if (flags & HIO_VARIABLE) sc->sc_flags |= UKBD_FLAG_APPLE_FN | UKBD_FLAG_APPLE_SWAP; DPRINTFN(1, "Found Apple FN-key\n"); apple_keys = 1; + sc->sc_kbd_id = temp_id; } if (apple_keys == 0) { /*