From owner-freebsd-current@FreeBSD.ORG Mon Dec 4 21:26:22 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 8ABEC16A40F for ; Mon, 4 Dec 2006 21:26:22 +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 A98F943DF2 for ; Mon, 4 Dec 2006 21:19:25 +0000 (GMT) (envelope-from dougb@FreeBSD.org) Received: (qmail 5259 invoked by uid 399); 4 Dec 2006 21:19:51 -0000 Received: from localhost (HELO ?192.168.0.7?) (dougb@dougbarton.us@127.0.0.1) by localhost with SMTP; 4 Dec 2006 21:19:51 -0000 Message-ID: <457490F5.8050007@FreeBSD.org> Date: Mon, 04 Dec 2006 13:19:49 -0800 From: Doug Barton Organization: http://www.freebsd.org/ User-Agent: Thunderbird 1.5.0.8 (X11/20061125) MIME-Version: 1.0 To: "Stephane E. Potvin" References: <4564996D.50808@FreeBSD.org> <200611301443.31419.jhb@freebsd.org> <456FA276.6050706@videotron.ca> <200612011225.02780.jhb@freebsd.org> <45742EB4.8060405@videotron.ca> In-Reply-To: <45742EB4.8060405@videotron.ca> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit 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: Mon, 04 Dec 2006 21:26:22 -0000 Stephane E. Potvin wrote: > I had to modify the patch a little again to make it compile. With this > slight modification (changing rm->link to rm->list), the patch seems to > be working fine and I got back my ehci controller. > > Index: 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 > --- subr_rman.c 11 Sep 2006 19:31:52 -0000 1.53 > +++ subr_rman.c 1 Dec 2006 15:25:59 -0000 > @@ -61,6 +61,7 @@ > #include > #include > #include > +#include > #include > #include > #include > @@ -169,10 +170,12 @@ > mtx_lock(rm->rm_mtx); > > /* Skip entries before us. */ > - for (s = TAILQ_FIRST(&rm->rm_list); > - s && s->r_end + 1 < r->r_start; > - s = TAILQ_NEXT(s, r_link)) > - ; > + TAILQ_FOREACH(s, &rm->rm_list, r_link) { > + if (s->r_end == ULONG_MAX) > + break; > + if (s->r_end + 1 >= r->r_start) > + break; > + } > > /* If we ran off the end of the list, insert at the tail. */ > if (s == NULL) { > > Thanks a lot! With Stephane's change this works for me as well. Doug -- This .signature sanitized for your protection