NetBSD Problem Report #22036

Received: (qmail 561 invoked by uid 605); 2 Jul 2003 15:11:09 -0000
Message-Id: <>
Date: Wed,  2 Jul 2003 15:11:04 +0000 (UTC)
Subject: pci interrupt fixup routine bad
X-Send-Pr-Version: www-1.0

>Number:         22036
>Category:       port-i386
>Synopsis:       pci interrupt fixup routine bad
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    port-i386-maintainer
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Wed Jul 02 15:12:00 +0000 2003
>Last-Modified:  Sun Sep 03 01:19:54 +0000 2006
>Originator:     Anders Franzen
>Release:        1.6
The machine is not running.
I have 2 ethernet boards that did not work on my PC.
I compiled the option PCIBIOS_INTR_FIXUP and it still did not work.

In this case there was 2 problems.

1. The VIA82C586 part of the fixup code seemed to get wrong irqs for the
 PIRQ# compared to linux.

The chip is actually a VIA82C686.

This is the original shift masks from the header file.
#define VP3_CFG_INTR_SHIFT_PIRQA        0x14
#define VP3_CFG_INTR_SHIFT_PIRQB        0x10
#define VP3_CFG_INTR_SHIFT_PIRQC        0x1c
#define VP3_CFG_INTR_SHIFT_PIRQD        0x0c

I changed it to this:
#define VP3_CFG_INTR_SHIFT_PIRQA        0x0c
#define VP3_CFG_INTR_SHIFT_PIRQB        0x10
#define VP3_CFG_INTR_SHIFT_PIRQC        0x14
#define VP3_CFG_INTR_SHIFT_PIRQD        0x18

+ OpenBSD sayes there can be 7 PIRQ's I dont know how to map those
cause they would go into the next 32 bits register (0x58).

2. The fixup code assumes that if it did not have to do any fix
with the routing, it was ok by BIOS and it does not change EDGE/LEVEL.

In my computer the IRQ was routed right but was EDGE. So I changed
the generic pci_intr_fixup.c:
line 540:
                        } else {
                                /* BIOS setting has no problem */
                                printf("pciintr_link_route: "
                                    "route of PIRQ 0x%02x -> "
                                    "IRQ %d preserved BIOS setting\n",
                                    l->clink, l->irq);

/* Add the following to get the shit to LEVEL trigg!! */ 
                                             l->irq, IST_LEVEL);
                           *pciirq |= (1 << l->irq);
                        continue; /* nothing to do. */

Just boot it on my pc. :)
See above.
Responsible-Changed-From-To: port-i386-maintainer->mycroft 
Responsible-Changed-By: mycroft 
Responsible-Changed-When: Sun Jul 4 00:40:31 UTC 2004 
Responsible-Changed-From-To: mycroft->port-i386-maintainer
Responsible-Changed-When: Sun, 03 Sep 2006 01:19:54 +0000
Back to role account, mycroft doesn't have commit access any longer.


NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.39 2013/11/01 18:47:49 spz Exp $
$NetBSD:,v 1.8 2006/05/07 09:23:38 tsutsui Exp $
Copyright © 1994-2007 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.