From owner-freebsd-current@FreeBSD.ORG Wed Nov 26 10:46:23 2008 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 56D28106564A for ; Wed, 26 Nov 2008 10:46:23 +0000 (UTC) (envelope-from vova@sw.ru) Received: from relay.sw.ru (mailhub.sw.ru [195.214.232.25]) by mx1.freebsd.org (Postfix) with ESMTP id B600B8FC0A for ; Wed, 26 Nov 2008 10:46:21 +0000 (UTC) (envelope-from vova@sw.ru) Received: from vbook.fbsd.ru ([10.30.1.111]) (authenticated bits=0) by relay.sw.ru (8.13.4/8.13.4) with ESMTP id mAQAkHlS011557 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Wed, 26 Nov 2008 13:46:18 +0300 (MSK) Received: from vova by vbook.fbsd.ru with local (Exim 4.69 (FreeBSD)) (envelope-from ) id 1L5HuS-0000Ye-8X; Wed, 26 Nov 2008 13:46:16 +0300 From: Vladimir Grebenschikov To: Nick Hibma In-Reply-To: <200811261029.05178.nick@van-laarhoven.org> References: <492A62EF.7000803@bsdforen.de> <200811251545.10807.nick@van-laarhoven.org> <1227685292.1852.12.camel@localhost> <200811261029.05178.nick@van-laarhoven.org> Content-Type: text/plain Content-Transfer-Encoding: 7bit Organization: SWsoft Date: Wed, 26 Nov 2008 13:46:16 +0300 Message-Id: <1227696376.1755.1.camel@localhost> Mime-Version: 1.0 X-Mailer: Evolution 2.22.3.1 FreeBSD GNOME Team Port Sender: Vladimir Grebenschikov Cc: freebsd-current@freebsd.org Subject: Re: u3g and ubsa X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: vova@fbsd.ru List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 26 Nov 2008 10:46:23 -0000 On Wed, 2008-11-26 at 10:29 +0100, Nick Hibma wrote: > Could you try the following: > > Change the ibufsize and obufsize values to a power of 2 in u3g_attach: > > ucom->sc_ibufsize = 4096; > ucom->sc_ibufsizepad = ucom->sc_ibufsize; > ucom->sc_obufsize = 4096; > > Perhaps the USB stack does not like arbitrarily sized buffers due to > transfer rollovers at the end of the buffer / memory page or something. > > If that does not work could you lower it to 512, and if that does not work > change it to: > > ucom->sc_ibufsize = UGETW(ed->wMaxPacketSize); > ucom->sc_ibufsizepad = ucom->sc_ibufsize; > ucom->sc_obufsize = UGETW(ed->wMaxPacketSize); > > That last case is worst case as it would considerably increase overhead, > especially in USB 1.0 cases where the max. wMaxPacketSize is 64 bytes. All cases makes same panic on connecting to port: ohci.c:545 ohci_alloc_std_chain: XXX need to copy > If it works I'd be interested to hear about performance (download from SUN > is always a good one), and any messages in dmesg or in a ppp logfile for > dropped chars, and invalid FCS. > > Cheers, > > Nick -- Vladimir B. Grebenschikov vova@fbsd.ru