From owner-freebsd-current@FreeBSD.ORG Thu Nov 23 00:54:05 2006 Return-Path: X-Original-To: freebsd-current@freebsd.org Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id E269E16A415 for ; Thu, 23 Nov 2006 00:54:05 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: from mail2.fluidhosting.com (mx21.fluidhosting.com [204.14.89.4]) by mx1.FreeBSD.org (Postfix) with SMTP id 4376443D5A for ; Thu, 23 Nov 2006 00:53:32 +0000 (GMT) (envelope-from dougb@FreeBSD.org) Received: (qmail 27263 invoked by uid 399); 23 Nov 2006 00:54:03 -0000 Received: from localhost (HELO ?192.168.0.7?) (dougb@dougbarton.us@127.0.0.1) by localhost with SMTP; 23 Nov 2006 00:54:03 -0000 Message-ID: <4564F129.70902@FreeBSD.org> Date: Wed, 22 Nov 2006 16:54:01 -0800 From: Doug Barton Organization: http://www.FreeBSD.org/ User-Agent: Thunderbird 1.5.0.8 (X11/20061111) MIME-Version: 1.0 To: "Stephane E. Potvin" References: <4564996D.50808@FreeBSD.org> <455C2290.6010907@videotron.ca> In-Reply-To: <455C2290.6010907@videotron.ca> X-Enigmail-Version: 0.94.1.0 Content-Type: multipart/mixed; boundary="------------010308060106090902050804" Cc: freebsd-current@freebsd.org Subject: Re: EHCI problem on -current, and unknown devs 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: Thu, 23 Nov 2006 00:54:06 -0000 This is a multi-part message in MIME format. --------------010308060106090902050804 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit cc'ing "Mr. rman," jhb, since this was his change. Stephane E. Potvin wrote: > Doug Barton wrote: >> [ No response from the -usb list, so I'll try here. ] >> >> Howdy, >> >> I have a new Dell Latitude D620, and using recent -current I get this: >> >> ehci0: mem >> 0xffa80000-0xffa803ff irq 20 at device 29.7 on pci0 >> ehci0: Could not map memory >> device_attach: ehci0 attach returned 6 >> >> FWIW, I also saw a user on the -stable list report this same problem. >> I'm assuming this is bad, but what to do about it? >> >> >> I'm also getting some unknown devices: >> >> uhub4: > 2> on uhub0 >> uhub5: > 3> on uhub4 >> ugen2: > addr 6> on uhub4 >> uhub6: > 2> on uhub3 >> >> Vendor ID 0x413c is Dell, and is already in the usbdevs file. The >> other vendor is O2, and I got their ID for the attached patch from the >> list at http://www.usb.org/developers/tools. The 0x0058 device is >> already in our usbdevs file, it's the port replicator (docking >> station) that the laptop is plugged into currently. I added the 0x8103 >> device in the attached patch based on an entry in the NetBSD usbdevs >> file. (The entry makes sense to me as well, since I have one of those.) >> >> So I have two questions ... for the devices (and vendors) that are >> already in my local usbdevs file, why are they still showing up by ID? >> And how do I find the device IDs for the two unknown devices? I >> imagine that the O2 device is related to my built in smart card >> reader, not sure about the other one. >> > > Hi Doug, > > I had the same problem with my Dell Inspiron 9400 and fixed it using the > following patch: > > Index: sys/kern/subr_rman.c > =================================================================== > RCS file: /home/FreeBSD/ncvs/src/sys/kern/subr_rman.c,v > retrieving revision 1.53 > diff -u -r1.53 subr_rman.c > --- sys/kern/subr_rman.c 11 Sep 2006 19:31:52 -0000 1.53 > +++ sys/kern/subr_rman.c 2 Nov 2006 03:05:34 -0000 > @@ -170,7 +170,7 @@ > > /* Skip entries before us. */ > for (s = TAILQ_FIRST(&rm->rm_list); > - s && s->r_end + 1 < r->r_start; > + s && s->r_end < r->r_start; > s = TAILQ_NEXT(s, r_link)) > ; > > This code was added in revision 1.53 when support for intelligent > merging was added. When r_end is equal to UINT_MAX, adding one will > cause it to overflow, creating quite a mess in the entries ordering. I'm > not sure the fix I did is completely correct as I didn't had time to > check if the +1 is needed at all in this case. At least it fixed the > problem for me. Works for me too. I've attached what dmesg for EHCI and 'usbdevs -v' look like after applying this patch. Still interested in the unknown devices though, if anyone has insight into that issue. Doug -- This .signature sanitized for your protection --------------010308060106090902050804 Content-Type: text/plain; name="after" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="after" ehci0: mem 0xffa80000-0xffa803ff irq 20 at device 29.7 on pci0 ehci0: [GIANT-LOCKED] usb4: EHCI version 1.0 usb4: on ehci0 uhub4: on usb4 Controller /dev/usb0: addr 1: full speed, self powered, config 1, UHCI root hub(0x0000), Intel(0x0000), rev 1.00 port 1 powered port 2 powered Controller /dev/usb1: addr 1: full speed, self powered, config 1, UHCI root hub(0x0000), Intel(0x0000), rev 1.00 port 1 powered port 2 powered Controller /dev/usb2: addr 1: full speed, self powered, config 1, UHCI root hub(0x0000), Intel(0x0000), rev 1.00 port 1 powered port 2 powered Controller /dev/usb3: addr 1: full speed, self powered, config 1, UHCI root hub(0x0000), Intel(0x0000), rev 1.00 port 1 powered port 2 powered Controller /dev/usb4: addr 1: high speed, self powered, config 1, EHCI root hub(0x0000), Intel(0x0000), rev 1.00 port 1 powered port 2 addr 2: high speed, self powered, config 1, product 0xa005(0xa005), vendor 0x413c(0x413c), rev 50.18 port 1 powered port 2 powered port 3 addr 3: full speed, power 200 mA, config 1, product 0x7761(0x7761), vendor 0x0b97(0x0b97), rev 1.10 port 1 addr 4: full speed, power 100 mA, config 1, Biometric Coprocessor(0x2016), STMicroelectronics(0x0483), rev 0.01 port 2 addr 5: full speed, self powered, config 1, O2Micro CCID SC Reader(0x7762), O2(0x0b97), rev 1.10 port 3 powered port 4 addr 6: full speed, self powered, config 1, product 0x8103(0x8103), vendor 0x413c(0x413c), rev 24.22 port 3 powered port 4 powered port 5 powered port 6 powered port 7 powered port 8 addr 7: high speed, self powered, config 1, product 0x0058(0x0058), vendor 0x413c(0x413c), rev 0.00 port 1 addr 8: high speed, self powered, config 1, USB2.0 Hub Controller(0x0058), NEC Corporation(0x0409), rev 1.00 port 1 powered port 2 powered port 3 powered port 4 powered port 2 powered port 3 addr 9: low speed, power 100 mA, config 1, Trackball(0xc404), Logitech(0x046d), rev 2.20 port 4 powered --------------010308060106090902050804--