From owner-freebsd-current@FreeBSD.ORG Wed Nov 26 09:29:16 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 578781065673 for ; Wed, 26 Nov 2008 09:29:16 +0000 (UTC) (envelope-from nick@van-laarhoven.org) Received: from cpsmtpo-eml05.kpnxchange.com (cpsmtpo-eml05.KPNXCHANGE.COM [213.75.38.154]) by mx1.freebsd.org (Postfix) with ESMTP id D86FF8FC13 for ; Wed, 26 Nov 2008 09:29:15 +0000 (UTC) (envelope-from nick@van-laarhoven.org) Received: from cpsmtp-eml109.kpnxchange.com ([213.75.84.109]) by cpsmtpo-eml05.kpnxchange.com with Microsoft SMTPSVC(6.0.3790.3959); Wed, 26 Nov 2008 10:29:14 +0100 Received: from uitsmijter.van-laarhoven.org ([81.207.207.222]) by cpsmtp-eml109.kpnxchange.com with Microsoft SMTPSVC(6.0.3790.3959); Wed, 26 Nov 2008 10:29:14 +0100 Received: (qmail 74912 invoked by uid 98); 26 Nov 2008 09:29:13 -0000 Received: from 77.63.242.191 (nick@77.63.242.191) by uitsmijter.van-laarhoven.org (envelope-from , uid 82) with qmail-scanner-2.01 (clamdscan: 0.92/5270. f-prot: 4.6.7/3.16.15. spamassassin: 3.2.3. Clear:RC:0(77.63.242.191):SA:0(0.9/5.0):. Processed in 3.121259 secs); 26 Nov 2008 09:29:13 -0000 X-Spam-Status: No, score=0.9 required=5.0 X-Spam-Level: Received: from unknown (HELO van-laarhoven.org) (nick@77.63.242.191) by uitsmijter.van-laarhoven.org with SMTP; 26 Nov 2008 09:29:09 -0000 Received: (nullmailer pid 2319 invoked by uid 1001); Wed, 26 Nov 2008 09:29:05 -0000 From: Nick Hibma To: Vladimir Grebenschikov Date: Wed, 26 Nov 2008 10:29:04 +0100 User-Agent: KMail/1.9.10 References: <492A62EF.7000803@bsdforen.de> <200811251545.10807.nick@van-laarhoven.org> <1227685292.1852.12.camel@localhost> In-Reply-To: <1227685292.1852.12.camel@localhost> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200811261029.05178.nick@van-laarhoven.org> X-OriginalArrivalTime: 26 Nov 2008 09:29:14.0297 (UTC) FILETIME=[72546290:01C94FA9] Cc: freebsd-current@freebsd.org Subject: Re: u3g and ubsa 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: Wed, 26 Nov 2008 09:29:16 -0000 > dmesg has: > Nov 26 10:25:49 vbook kernel: ucom0: invalid receive data size, > -754491385 chars > Nov 26 10:25:49 vbook kernel: ucom0: invalid receive data size, > -754491390 chars > Nov 26 10:25:51 vbook kernel: ucom0: invalid receive data size, > -754491385 chars > Nov 26 10:25:52 vbook kernel: ucom0: invalid receive data size, > -754491390 chars > Nov 26 10:25:56 vbook kernel: ucom0: invalid receive data size, > 626606082 chars > Nov 26 10:25:59 vbook kernel: ucom0: invalid receive data size, > 466214914 chars > Nov 26 10:26:00 vbook kernel: ucom0: invalid receive data size, > 466214919 chars > Nov 26 10:26:01 vbook kernel: ucom0: invalid receive data size, > 466214914 chars 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. 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