Date: Mon, 1 Jan 2001 08:50:38 -0800 (PST) From: Matthew Jacob <mjacob@feral.com> To: Mike Smith <msmith@freebsd.org> Cc: alpha@freebsd.org Subject: Re: rawhide breakage report... Message-ID: <Pine.BSF.4.21.0101010850340.86667-100000@beppo.feral.com> In-Reply-To: <200101010209.f0129cn12505@mass.osd.bsdi.com>
index | next in thread | previous in thread | raw e-mail
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
help
Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.4.21.0101010850340.86667-100000>
