From owner-freebsd-current@FreeBSD.ORG Sun Jun 21 20:28:31 2009 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7F020106566C for ; Sun, 21 Jun 2009 20:28:31 +0000 (UTC) (envelope-from jason.harmening@gmail.com) Received: from mail-gx0-f207.google.com (mail-gx0-f207.google.com [209.85.217.207]) by mx1.freebsd.org (Postfix) with ESMTP id 3330B8FC16 for ; Sun, 21 Jun 2009 20:28:30 +0000 (UTC) (envelope-from jason.harmening@gmail.com) Received: by gxk3 with SMTP id 3so4103261gxk.19 for ; Sun, 21 Jun 2009 13:28:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:date:from:to:cc:subject :message-id:in-reply-to:references:x-mailer:mime-version :content-type:content-transfer-encoding; bh=W8EtrlgYDlI5ImbDyaOTY7XxTWRFJrSxEqNMtRexP/A=; b=vL9zjc6VdSUZKFrNRqadNI1T2cBaSu/bvN6qBCDdKrs1h5Gxoh0MusIRl9gZV0o35X cWxJvMyRmT26tZDYiGRfIFR+4vLYPqGszUBLi//NkFXdA/WxXOYnruPf/VfzuB9VZCWY 1T28UzOvkwJ9uMB6iyQCvNeFp6sS4SosVZizk= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=date:from:to:cc:subject:message-id:in-reply-to:references:x-mailer :mime-version:content-type:content-transfer-encoding; b=ZcenSvDMIRYq7QdhAknB6IeAJ4gRKK9/mLDLBV3hpwhxBx95ZRDrSYUZtdQD+DQ2Y/ THx9Qg+mMcfJKL91MxafrkjXzEyr1crxV8I5OcQ+X6Jb/QP6wn/2ypV6CztrlIqtjBW+ lWhifWrYsBN/G7DoVAeK/qYReclg8Iwf2jTw4= Received: by 10.90.25.7 with SMTP id 7mr4499534agy.107.1245616110530; Sun, 21 Jun 2009 13:28:30 -0700 (PDT) Received: from CORONA ([24.174.5.175]) by mx.google.com with ESMTPS id 9sm2779953agb.75.2009.06.21.13.28.28 (version=TLSv1/SSLv3 cipher=RC4-MD5); Sun, 21 Jun 2009 13:28:29 -0700 (PDT) Date: Sun, 21 Jun 2009 15:26:09 -0500 From: Jason Harmening To: Hans Petter Selasky Message-ID: <20090621152609.05a4e3be@CORONA> In-Reply-To: <200906210300.14044.hselasky@c2i.net> References: <20090620140820.14273115@CORONA> <200906210300.14044.hselasky@c2i.net> X-Mailer: Claws Mail 3.7.1 (GTK+ 2.16.1; amd64-portbld-freebsd7.1) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Mailman-Approved-At: Mon, 22 Jun 2009 02:16:47 +0000 Cc: freebsd-current@freebsd.org Subject: Re: USB keyboard/mouse combo fails to attach X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 21 Jun 2009 20:28:31 -0000 On Sun, 21 Jun 2009 03:00:12 +0200 Hans Petter Selasky wrote: > > In /sys/dev/usb/usb_device.c : > > There is some code to re-enumerate the device, when errors are > detected. Maybe we should add an automatic re-enumeration in case the > full device descriptor cannot be retrieved aswell. > > Search for: > err = usbd_req_get_desc(udev, NULL, NULL, &udev->ddesc, > USB_MAX_IPACKET, USB_MAX_IPACKET, 0, UDESC_DEVICE, 0, 0); > if (err) { > DPRINTFN(0, "getting device descriptor " > "at addr %d failed, %s!\n", udev->address, > usbd_errstr(err)); > /* XXX try to re-enumerate the device */ > err = usbd_req_re_enumerate(udev, NULL); > if (err) { > goto done; > } > } > > Some lines down you patch the code like this: > > /* get the full device descriptor */ > err = usbd_req_get_device_desc(udev, NULL, &udev->ddesc); > if (err) { > DPRINTF("addr=%d, getting full desc failed\n", > udev->address); > + /* XXX try to re-enumerate the device */ > + err = usbd_req_re_enumerate(udev, NULL); > + if (err) { > + goto done; > + } > - goto done; > } > > --HPS That seems to work--thanks! So is this just flaky firmware then? I had such high hopes for the device, as it's advertised as needing no special drivers (in Windows of course), but I guess the firmware probably still "expects" the Windows HID layer on the other end...*sigh* Also, thanks for your tremendous work on the new USB stack! I should mention that while this device always *enumerated* under 7, it never completely *worked*--only the keyboard part seemed to work w/ the old HID layer. Also, it's really nice to be giant-free on a 4-CPU machine. --Jason