Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 15 Aug 2007 17:41:47 +0200
From:      Hans Petter Selasky <hselasky@c2i.net>
To:        freebsd-usb@freebsd.org
Cc:        Andriy Gapon <avg@icyb.net.ua>
Subject:   Re: usbd_set_config_no vs. usbd_set_config_index
Message-ID:  <200708151741.47907.hselasky@c2i.net>
In-Reply-To: <46C2D04A.30409@icyb.net.ua>
References:  <46C2D04A.30409@icyb.net.ua>

next in thread | previous in thread | raw e-mail | index | archive | help
On Wednesday 15 August 2007, Andriy Gapon wrote:
> 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: <Windows CE Device> 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.

Hi,

usbd_set_config_no will search for a matching bConfiguration value.

usbd_set_config_index will set the configuration by physical index: 0, 1, 
2 ...

--HPS



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200708151741.47907.hselasky>