From owner-freebsd-stable@FreeBSD.ORG Fri Nov 21 11:21:04 2003 Return-Path: Delivered-To: freebsd-stable@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 37B7E16A4F2; Fri, 21 Nov 2003 11:21:04 -0800 (PST) Received: from dastardly.newsbastards.org.72.27.172.IN-addr.ARPA.NOSPAM.dyndns.dk (does-d9b91939.pool.mediaWays.net [217.185.25.57]) by mx1.FreeBSD.org (Postfix) with ESMTP id 76FD443F85; Fri, 21 Nov 2003 11:20:20 -0800 (PST) (envelope-from bounce@NOSPAM.dyndns.dk) Received: from NOSPAM.spam.NOSPAM.spam.NOSPAM.dyndns.dk (NOSPAM.spam.NOSPAM.spam.NOSPAM.dyndns.dk [2002:3e50:3ceb:0:200:c0ff:fefc:19aa]) (8.11.6/8.11.6-SPAMMERS-DeLiGHt) with ESMTP id hAL10C712905 verified NO); Fri, 21 Nov 2003 02:00:15 +0100 (CET) (envelope-from bounce@NOSPAM.dyndns.dk) Received: (from beer@localhost)hAL0xuZ01392; Fri, 21 Nov 2003 01:59:57 +0100 (CET) (envelope-from bounce@NOSPAM.dyndns.dk) Date: Fri, 21 Nov 2003 01:59:57 +0100 (CET) Message-Id: <200311210059.hAL0xuZ01392@NOSPAM.spam.NOSPAM.spam.NOSPAM.dyndns.dk> X-Authentication-Warning: NOSPAM.spam.NOSPAM.spam.NOSPAM.dyndns.dk: beer set sender to bounce@NOSPAM.dyndns.dk using -f From: Barry Bouwsma To: freebsd-stable@freebsd.org References: <200309271405.aa30238@salmon.maths.tcd.ie> <20031005190822.GC4548@genius.tao.org.uk> <20031006211517.64c5d916.tijl@ulyssis.org> <20031011115001.GE1028@genius.tao.org.uk> Subject: Re: hang of new usb stack [was Re: Patch for boot-time USB hangs in 4.9-PRERELEASE] X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 21 Nov 2003 19:21:04 -0000 [Drop hostname part of IPv6-only address above to obtain IPv4-capable e-mail, or just drop me from the recipients and I'll catch up from the archives] A month late for this message, but I'm still catching up... Hey Joe, > > > The new usb patch to RELENG_4 as of today is at: > > > http://www.josef-k.net/misc/RELENG_4-USB-20031005.patch.gz Great! That looks like what I was hacking on, except two differences: it requires much less work on my part, and it almost works right out of the box... > You're right! I didn't add the usb tools to that patch set. I'll make > sure that they are there for the next one. I needed to add a few other minor hacks, to build the usb module (for historical reasons I use a kernel module rather than building it into the kernel, which buys me nothing since I can't unload the module so I end up rebooting if I need to make changes anyhows). Should I send those hacks upstream, or is it possible I'm missing some critical info, as I never downloaded or looked closely at the earlier patchset and remember little of the archives of that time? Basically, it works great for me, on a kernel built 15.Oct, from sources of earlier vintage -- looks like no later than 22.Sep -- and the usb hanging patch applied. Except I can't really use it in service, so I'm not. The problem I have is that the USB2.0 external hub I have, described in the -hackers list, errors (stalls) talking to the ehci controller, which disables that port. At boot, the hub is first attached to the ohci companion I have, which has no problems communicating with it, but then ehci takes over. I've meant to try to dig into that logic and see if it's possible for the ehci controller, upon seeing that particular hub, not to attach it at high speed, but leave it to the companion at full speed, but even if I could, I'm still looking for a round tuit. Since I can't use any devices attached to that hub, it makes it pretty useless for me. I could back out my makefile hacks for ehci support, but then I wouldn't see any benefit from the USB2.0-capable external drive (that I instead attach via firewire, so that's no excuse). Speaking of the USB2 external drive, I can see that it's faster than the default USB1 speed of 650k reported -- though not terribly faster as the ten-year-old machine itself is the bottleneck, but I can `dd' at a few MB/sec at least, matching the firewire ability. So I took a look at the diffs between the -current and -stable applicable SCSI code, to see if I could hack in a more accurate speed... My lack of sleep may be catching up to me, but I'd suspect one of the following is what (I presume) makes -current report a more accurate transfer rate from USB2 devices (no personal experience there, though a year ago I saw NetBSD doing that with its ehci support). I should probably hack myself to see if I can make it work, but I am reluctant to reboot or risk crashing this machine that's doing other long-running processes, so maybe some guru could offer advice or explanation... freq = scsi_calc_syncsrate(spi->sync_period); speed = freq; and/or speed *= (0x01 << spi->bus_width); and/or maybe even if (fc->valid & CTS_FC_VALID_SPEED) { speed = fc->bitrate; (all of which are in -current before printing the alleged device transfer rate, but missing from RELENG_4's source) The other odd thing, unrelated to these patches, is that while the USB2 drive is attached by ehci, a printer I have only reports full speed and is attached to ohci. I'm assuming the following means it's USB2-capable; if I'm ass-u-me-ing wrong, please enlighten me. DEVICE addr 4 DEVICE descriptor: bLength=18 bDescriptorType=device(1) bcdUSB=2.00 bDeviceClass=0 bDeviceSubClass=0 ^^^^^^^^ bDeviceProtocol=0 bMaxPacketSize=8 idVendor=0x03f0 idProduct=0x3c02 bcdDevice=100 iManufacturer=1(hp) iProduct=2(photosmart 7350) iSerialNumber=3(MY31K432VG6M) bNumConfigurations=1 I'd show `usbdevs' output with the patched driver, but I neglected to save a copy when I tested it, and now I'm not using it and at the moment, unable to trivially reboot to capture it, so that will have to wait until RSN. Sorry... Thanks, Barry B0uwsma