From owner-freebsd-usb@FreeBSD.ORG Wed Aug 15 10:32:18 2007 Return-Path: Delivered-To: freebsd-usb@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DCA0F16A417 for ; Wed, 15 Aug 2007 10:32:18 +0000 (UTC) (envelope-from avg@icyb.net.ua) Received: from gateway.cybervisiontech.com.ua (gateway.cybervisiontech.com.ua [88.81.251.18]) by mx1.freebsd.org (Postfix) with ESMTP id 920CA13C46C for ; Wed, 15 Aug 2007 10:32:18 +0000 (UTC) (envelope-from avg@icyb.net.ua) Received: from localhost (hq.cybervisiontech.com [127.0.0.1]) by gateway.cybervisiontech.com.ua (Postfix) with ESMTP id 5E849ED51F8 for ; Wed, 15 Aug 2007 13:07:08 +0300 (EEST) X-Virus-Scanned: amavisd-new at cybervisiontech.com Received: from gateway.cybervisiontech.com.ua ([127.0.0.1]) by localhost (hq.cybervisiontech.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id NZoAQLs8q30d for ; Wed, 15 Aug 2007 13:07:07 +0300 (EEST) Received: from [10.2.1.87] (rein.cybervisiontech.com.ua [10.2.1.87]) by gateway.cybervisiontech.com.ua (Postfix) with ESMTP id 1F51EED51F0 for ; Wed, 15 Aug 2007 13:07:07 +0300 (EEST) Message-ID: <46C2D04A.30409@icyb.net.ua> Date: Wed, 15 Aug 2007 13:07:06 +0300 From: Andriy Gapon User-Agent: Thunderbird 2.0.0.6 (X11/20070803) MIME-Version: 1.0 To: freebsd-usb@freebsd.org Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Subject: usbd_set_config_no vs. usbd_set_config_index X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 15 Aug 2007 10:32:18 -0000 I am curious about a difference between usbd_set_config_no and usbd_set_config_index. My reason is such: I am trying to use palm/uppc-kmod to talk to my pocket pc device via usb. When I used the port in its original shape it gave me the following error each time I plugged the device: kernel: ucom0: failed to set configuration, err=STALLED kernel: device_attach: ucom0 attach returned 6 Then, to mimic some other driver I simply changed usbd_set_config_index() to usbd_set_config_no() in the code, and voila: kernel: ucom0: ASUS ASUS Windows Mobile Device, rev 2.00/0.00, addr 3 (rt) I am now trying to get synce to actually work. But I am really curious what my change really did, and I am totally ignorant about our usb code. BTW: FreeBSD 6.2-RELEASE-p3 amd64 Thank you in advance for my education. -- Andriy Gapon