From owner-freebsd-questions@FreeBSD.ORG Tue Nov 4 15:46:42 2008 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9DEBB1065673 for ; Tue, 4 Nov 2008 15:46:42 +0000 (UTC) (envelope-from bruce@cran.org.uk) Received: from muon.cran.org.uk (muon.cran.org.uk [66.246.138.153]) by mx1.freebsd.org (Postfix) with ESMTP id 70C0B8FC12 for ; Tue, 4 Nov 2008 15:46:41 +0000 (UTC) (envelope-from bruce@cran.org.uk) Received: from muon.cran.org.uk (localhost [127.0.0.1]) by muon.cran.org.uk (Postfix) with ESMTP id 7C96B1905E; Tue, 4 Nov 2008 10:46:40 -0500 (EST) X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on muon X-Spam-Level: X-Spam-Status: No, score=0.1 required=5.0 tests=AWL,RDNS_NONE autolearn=no version=3.2.5 Received: from tau.draftnet (unknown [66.45.161.67]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by muon.cran.org.uk (Postfix) with ESMTPSA; Tue, 4 Nov 2008 10:46:40 -0500 (EST) Date: Tue, 4 Nov 2008 07:46:23 -0800 From: Bruce Cran To: Boris Samorodov Message-ID: <20081104074623.25f51f27@tau.draftnet> In-Reply-To: <80794437@bs1.sp34.ru> References: <20080904202402.0c245ed2@tau.draftnet> <20081103192749.2f35701b@tau.draftnet> <80794437@bs1.sp34.ru> X-Mailer: Claws Mail 3.5.0 (GTK+ 2.12.11; amd64-portbld-freebsd7.1) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: Hans, Alfred Perlstein , freebsd-questions@freebsd.org, Petter Selasky Subject: Re: garmin forerunner 305 X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 04 Nov 2008 15:46:42 -0000 On Tue, 04 Nov 2008 14:57:14 +0300 Boris Samorodov wrote: > Bruce Cran writes: > > > I don't know if it'll work with the usb stack that's in shipping > > version of FreeBSD though, and even with the new stack I had to > > make a change to libgpsusb.c in gpsbabel to get it working. > > Can you submit a patch? Thanks! Having just read about endpoint addresses I'm not sure who's wrong. gpsbabel truncates the address to the first 4 bytes using USB_ENDPOINT_ADDRESS_MASK from libusb20 while the stack clearly wants the rest, including the top 'direction' bit. In fact in /sys/dev/usb2/core/usb2_device.c line 114 it masks out the reserved bits but still keeps the direction bit. usb2_get_pipe_by_addr was failing when passed address 1 because the full endpoint address is 0x81 (endpoint 1, direction IN). It looks as though by changing EA_MASK to be just the endpoint number would fix the problem, but I'm not sure if that's correct. -- Bruce Cran