From owner-freebsd-alpha Mon Jan 1 8:50:42 2001 From owner-freebsd-alpha@FreeBSD.ORG Mon Jan 1 08:50:40 2001 Return-Path: Delivered-To: freebsd-alpha@freebsd.org Received: from feral.com (feral.com [192.67.166.1]) by hub.freebsd.org (Postfix) with ESMTP id 4575437B400; Mon, 1 Jan 2001 08:50:39 -0800 (PST) Received: from beppo (beppo [192.67.166.79]) by feral.com (8.9.3/8.9.3) with ESMTP id IAA18435; Mon, 1 Jan 2001 08:50:39 -0800 Date: Mon, 1 Jan 2001 08:50:38 -0800 (PST) From: Matthew Jacob Reply-To: mjacob@feral.com To: Mike Smith Cc: alpha@freebsd.org Subject: Re: rawhide breakage report... In-Reply-To: <200101010209.f0129cn12505@mass.osd.bsdi.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-alpha@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org Done. Thanks. On Sun, 31 Dec 2000, Mike Smith wrote: > > What it turns out is that a card had PCIM_STATUS_CAPPRESENT set in the status > > register (Qlogic 2200, and the code that reads this got stuck in an infinite > > loop... I'm not sure whether this was due to bad reads from config space or > > whether it really was a bogus PCIM_STATUS_CAPPRESENT or what (see attach). It > > kinda looks like the config read stuff is broken because it accepted an offset > > of -1 :-), but there was a case before where a value of -1 was returned. > > > > I don't know this cap goop at all. Whaddya think? > > nextptr = REG(ptrptr, 1); /* sanity check? */ > > The right sanity check probably involves looking at nextptr in the loop: > > /* > * Read capability entries. > */ > while (nextptr != 0) { > /* Sanity check */ > if (nextptr > 255) { > printf("illegal PCI extended capability offset %d\n", > nexptr); > return; > } > /* Find the next entry */ > ptr = nextptr; > nextptr = REG(ptr + 1, 1); > > It should never be < 0, since pci_read_config returns unsigned. Since > you have some errant hardware, it'd be great if you could check and > commit this. > > -- > ... every activity meets with opposition, everyone who acts has his > rivals and unfortunately opponents also. But not because people want > to be opponents, rather because the tasks and relationships force > people to take different points of view. [Dr. Fritz Todt] > V I C T O R Y N O T V E N G E A N C E > > To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-alpha" in the body of the message