From owner-freebsd-bugs@FreeBSD.ORG Wed Feb 23 01:40:15 2005 Return-Path: Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id AFC9B16A4CF for ; Wed, 23 Feb 2005 01:40:15 +0000 (GMT) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 7B16843D5E for ; Wed, 23 Feb 2005 01:40:15 +0000 (GMT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.13.1/8.13.1) with ESMTP id j1N1eFvE082001 for ; Wed, 23 Feb 2005 01:40:15 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.13.1/8.13.1/Submit) id j1N1eFLr082000; Wed, 23 Feb 2005 01:40:15 GMT (envelope-from gnats) Resent-Date: Wed, 23 Feb 2005 01:40:15 GMT Resent-Message-Id: <200502230140.j1N1eFLr082000@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Jonathan Hanna Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 7295F16A4CE for ; Wed, 23 Feb 2005 01:35:22 +0000 (GMT) Received: from S010600047597284e.vc.shawcable.net (S010600047597284e.vc.shawcable.net [24.81.10.24]) by mx1.FreeBSD.org (Postfix) with ESMTP id B46CB43D48 for ; Wed, 23 Feb 2005 01:35:21 +0000 (GMT) (envelope-from jhanna@S010600047597284e.vc.shawcable.net) Received: from S010600047597284e.vc.shawcable.net (localhost [127.0.0.1]) j1N1ZLNk041262 for ; Tue, 22 Feb 2005 17:35:22 -0800 (PST) (envelope-from jhanna@S010600047597284e.vc.shawcable.net) Received: (from jhanna@localhost)j1N1ZLcp041261; Tue, 22 Feb 2005 17:35:21 -0800 (PST) (envelope-from jhanna) Message-Id: <200502230135.j1N1ZLcp041261@S010600047597284e.vc.shawcable.net> Date: Tue, 22 Feb 2005 17:35:21 -0800 (PST) From: Jonathan Hanna To: FreeBSD-gnats-submit@FreeBSD.org X-Send-Pr-Version: 3.113 Subject: kern/77940: insertion of usb keyboard panics system X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: Jonathan Hanna List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 23 Feb 2005 01:40:15 -0000 >Number: 77940 >Category: kern >Synopsis: insertion of usb keyboard panics system >Confidential: no >Severity: serious >Priority: medium >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Wed Feb 23 01:40:15 GMT 2005 >Closed-Date: >Last-Modified: >Originator: Jonathan Hanna >Release: FreeBSD 6.0-CURRENT i386 >Organization: >Environment: FreeBSD 6.0-CURRENT Thought to affect all branches. >Description: Insertion of or boot with a ukbd0: Solid Year USB MINI Keyboard, rev 1.10/0.31, addr 2, iclass 3/1 panics the system. The stack trace is roughly: usdb_get_interface_descriptor() (iface is NULL) ukbd_attach() device_attach() usbd_new_device() uhub_explore() usb_discover() ... It seems that the usbd_set_protocol() fails and cuases USB_ATTACH(ukbd) in ukbd.c to eventually to be called with uaa->iface==NULL and uaa->usegeneric==1. When USB_ATTACH(ukbd) does "id = usbd_get_interface_descriptor(iface)" the NULL iface is dereferenced. The "id" does not seem to be used and may be a holdover from old debugging. May be related to usb/76847. >How-To-Repeat: >Fix: A work-around is: RCS file: /usr/ncvs/src/sys/dev/usb/usb_quirks.c,v retrieving revision 1.40 diff -u -r1.40 usb_quirks.c --- usb_quirks.c 3 Sep 2004 23:19:27 -0000 1.40 +++ usb_quirks.c 23 Feb 2005 00:28:42 -0000 @@ -101,6 +101,7 @@ ANY, { UQ_ASSUME_CM_OVER_DATA }}, { USB_VENDOR_SUNTAC, USB_PRODUCT_SUNTAC_AS64LX, 0x100, { UQ_ASSUME_CM_OVER_DATA }}, + { USB_VENDOR_SOLIDYEAR, 22785, 49, {UQ_NO_SET_PROTO}}, { 0, 0, 0, { 0 } } }; NetBSD removed the usbd_set_protocol() code from ukbd.c in their revision 1.75 of Fri Dec 28 17:32:36 2001. Perhaps it should be removed in FreeBSD, though that seemed to be part of some fairly extensive changes. >Release-Note: >Audit-Trail: >Unformatted: