Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 31 Dec 2000 18:09:38 -0800
From:      Mike Smith <msmith@freebsd.org>
To:        mjacob@feral.com
Cc:        alpha@freebsd.org
Subject:   Re: rawhide breakage report... 
Message-ID:  <200101010209.f0129cn12505@mass.osd.bsdi.com>
In-Reply-To: Your message of "Sun, 31 Dec 2000 16:46:11 PST." <Pine.BSF.4.21.0012311626480.85056-200000@beppo.feral.com> 

next in thread | previous in thread | raw e-mail | index | archive | help

> 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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200101010209.f0129cn12505>