From owner-freebsd-alpha Sun Dec 31 17:57:56 2000 From owner-freebsd-alpha@FreeBSD.ORG Sun Dec 31 17:57:54 2000 Return-Path: Delivered-To: freebsd-alpha@freebsd.org Received: from mass.osd.bsdi.com (adsl-63-202-177-107.dsl.snfc21.pacbell.net [63.202.177.107]) by hub.freebsd.org (Postfix) with ESMTP id ECA1937B400 for ; Sun, 31 Dec 2000 17:57:53 -0800 (PST) Received: from mass.osd.bsdi.com (localhost [127.0.0.1]) by mass.osd.bsdi.com (8.11.1/8.11.1) with ESMTP id f0129cn12505; Sun, 31 Dec 2000 18:09:39 -0800 (PST) (envelope-from msmith@mass.osd.bsdi.com) Message-Id: <200101010209.f0129cn12505@mass.osd.bsdi.com> X-Mailer: exmh version 2.1.1 10/15/1999 To: mjacob@feral.com Cc: alpha@freebsd.org Subject: Re: rawhide breakage report... In-reply-to: Your message of "Sun, 31 Dec 2000 16:46:11 PST." Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Sun, 31 Dec 2000 18:09:38 -0800 From: Mike Smith Sender: msmith@mass.osd.bsdi.com Sender: owner-freebsd-alpha@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org > 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