diff options
author | fsmp <fsmp@FreeBSD.org> | 1997-05-27 19:24:36 +0000 |
---|---|---|
committer | fsmp <fsmp@FreeBSD.org> | 1997-05-27 19:24:36 +0000 |
commit | 22acbff456b79d56eb2010a6214bba1ffdfa590d (patch) | |
tree | 61b7db12c74185a026ae3db6269a141114067947 /sys/dev | |
parent | 5f3af8b16dbe17af45084a918b77a96b97fd45a9 (diff) | |
download | FreeBSD-src-22acbff456b79d56eb2010a6214bba1ffdfa590d.zip FreeBSD-src-22acbff456b79d56eb2010a6214bba1ffdfa590d.tar.gz |
Minor cleanup of APIC_IO code.
Submitted by: Stefan Esser <se@freebsd.org>
Diffstat (limited to 'sys/dev')
-rw-r--r-- | sys/dev/pci/pci.c | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/sys/dev/pci/pci.c b/sys/dev/pci/pci.c index 0382435..6183784 100644 --- a/sys/dev/pci/pci.c +++ b/sys/dev/pci/pci.c @@ -23,7 +23,7 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * $Id: pci.c,v 1.72 1997/05/26 15:08:34 se Exp $ + * $Id: pci.c,v 1.73 1997/05/27 04:09:01 fsmp Exp $ * */ @@ -332,18 +332,15 @@ pci_readcfg(pcicfgregs *probe) cfg->intline = pci_cfgread(cfg, PCIR_INTLINE, 1); #ifdef APIC_IO - if (cfg->intline && (cfg->intline != 0xff)) { - u_char airq = 0xff; - u_char rirq = 0xff; + if (cfg->intpin != 0) { + int airq; airq = get_pci_apic_irq(cfg->bus, cfg->slot, cfg->intpin); - if (airq != 0xff) { /* APIC IRQ exists */ - rirq = cfg->intline; /* 're-directed' IRQ */ - cfg->intline = airq; /* use APIC IRQ */ - pci_cfgwrite(cfg, PCIR_INTLINE, airq, 1); - undirect_pci_irq(rirq); + if ((airq >= 0) && (airq != cfg->intline)) { + undirect_pci_irq(cfg->intline); + cfg->intline = airq; } } #endif /* APIC_IO */ |