From owner-freebsd-usb@FreeBSD.ORG Thu Sep 1 14:01:12 2005 Return-Path: X-Original-To: freebsd-usb@freebsd.org Delivered-To: freebsd-usb@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id EF0BE16A41F; Thu, 1 Sep 2005 14:01:11 +0000 (GMT) (envelope-from hselasky@c2i.net) Received: from swip.net (mailfe07.swip.net [212.247.154.193]) by mx1.FreeBSD.org (Postfix) with ESMTP id 37B8D43D45; Thu, 1 Sep 2005 14:01:10 +0000 (GMT) (envelope-from hselasky@c2i.net) X-T2-Posting-ID: Y1QAsIk9O44SO+J/q9KNyQ== Received: from mp-217-135-60.daxnet.no ([193.217.135.60] verified) by mailfe07.swip.net (CommuniGate Pro SMTP 4.3.4) with ESMTP id 253215240; Thu, 01 Sep 2005 16:01:08 +0200 From: Hans Petter Selasky To: "Eygene A. Ryabinkin" Date: Thu, 1 Sep 2005 16:02:00 +0200 User-Agent: KMail/1.7 References: <200508302009.aa99975@nowhere.iedowse.com> <200508312239.04897.hselasky@c2i.net> <20050901093733.GA915@rea.mbslab.kiae.ru> In-Reply-To: <20050901093733.GA915@rea.mbslab.kiae.ru> MIME-Version: 1.0 Content-Type: text/plain; charset="koi8-r" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200509011602.03079.hselasky@c2i.net> Cc: freebsd-hackers@freebsd.org, Scott Long , Eugene Grosbein , Ian Dowse , freebsd-usb@freebsd.org Subject: Re: Low umass performance with USB 2.0 ports X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: hselasky@c2i.net List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 Sep 2005 14:01:12 -0000 On Thursday 01 September 2005 11:37, Eygene A. Ryabinkin wrote: > > If Scott's patch doesn't work, could you have tried to install the > > following (compiles on FreeBSD 5/6/7): > > Yes, it also works and does even better work: FAT 32 and FAT 16 > permormance are just the same and there is no additional load as been with > the Scott's patch. > So I definitely would vote for this fix. > > > Download the three files below into a new directory and type > > "make install" (to uninstall type "make deinstall") > > http://home.c2i.net/hselasky/isdn4bsd/privat/usb/Makefile > > http://home.c2i.net/hselasky/isdn4bsd/privat/usb/new_usb_1_5_4.diff.bz2 > > http://home.c2i.net/hselasky/isdn4bsd/privat/usb/new_usb_1_5_4.tar.bz2 > > Can this fix be transformed into the patch? It will be very helpful to the > committers to have in the form of patch. Are there any reasons to make it > in the way you did? I did things like I did it, so I would be saved the work of upgrading my patch every time the source code changes. I am currently working on getting this ported to NetBSD, so maybe the official USB system of FreeBSD can be upgraded without splitting with NetBSD. At the present moment there are too many changes made, so a single patch will not be so good. > Thank you for your work! On Thursday 01 September 2005 14:08, you wrote: > > Yes, it also works and does even better work: FAT 32 and FAT 16 > > permormance are just the same and there is no additional load as been > > with the Scott's patch. Interesting. > > So I definitely would vote for this fix. > > Oops, it seems that this patch also does not work as expected: after some > time of playing with flash card and working with the system it started to > stall as unpatched system, but it freezes the system -- even IP stack was > frozen (I am using DEVICE_POLLING), so I were to remove the flash from the > port -- system was unfrozen and continued to work. So something is still > bad with the USB. I'll try to do some long testing with USB 1.1 -- maybe it > will show the same behaviour after some more time. Do you mean my patch? Maybe you can turn on debugging when the system starts freezing: sysctl hw.usb.debug=15 sysctl hw.usb.umass.debug=-1 sysctl hw.usb.ehci.debug=15 # note: produces alot of output ! Set these variables to zero to turn off debugging. If the system resumes to normal operation when you pull the device plug, it is most likely a timeout in "umass" that takes too long. In the file "/sys/dev/usb/umass.c": Add: sc->timeout = 1000; Before: /* Read the Command Status Wrapper via bulk-in endpoint. */ if (umass_setup_transfer(sc, sc->bulkin_pipe, &sc->csw, UMASS_BBB_CSW_SIZE, 0, next_xfer)) { umass_bbb_reset(sc, STATUS_WIRE_FAILED); return; } See if you get any timeout messages while stressing the system. --HPS