Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/arch/x86/pci Revert:



details:   https://anonhg.NetBSD.org/src/rev/6ae2b603d715
branches:  trunk
changeset: 836028:6ae2b603d715
user:      cherry <cherry%NetBSD.org@localhost>
date:      Sun Sep 23 02:51:06 2018 +0000

description:
Revert:
http://mail-index.netbsd.org/source-changes/2018/09/10/msg098995.html

It is incorrect to infer semantics from usage.

the problem for which the original commit was intended should be fixed
within the callee intr_establish_xname() and not the caller:
pci_intr_find_intx_irq()

This was accomplished via:
http://mail-index.netbsd.org/source-changes/2018/09/20/msg099286.html

diffstat:

 sys/arch/x86/pci/pci_intr_machdep.c |  8 +++++---
 1 files changed, 5 insertions(+), 3 deletions(-)

diffs (29 lines):

diff -r 714cf756606e -r 6ae2b603d715 sys/arch/x86/pci/pci_intr_machdep.c
--- a/sys/arch/x86/pci/pci_intr_machdep.c       Sun Sep 23 02:27:24 2018 +0000
+++ b/sys/arch/x86/pci/pci_intr_machdep.c       Sun Sep 23 02:51:06 2018 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: pci_intr_machdep.c,v 1.44 2018/09/10 02:49:23 cherry Exp $     */
+/*     $NetBSD: pci_intr_machdep.c,v 1.45 2018/09/23 02:51:06 cherry Exp $     */
 
 /*-
  * Copyright (c) 1997, 1998, 2009 The NetBSD Foundation, Inc.
@@ -73,7 +73,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: pci_intr_machdep.c,v 1.44 2018/09/10 02:49:23 cherry Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pci_intr_machdep.c,v 1.45 2018/09/23 02:51:06 cherry Exp $");
 
 #include <sys/types.h>
 #include <sys/param.h>
@@ -294,7 +294,9 @@
                        return ENOENT;
                *pic = &ioapic->sc_pic;
                *pin = APIC_IRQ_PIN(ih);
-               *irq = -1; /* PCI doesn't use legacy irq */
+               *irq = APIC_IRQ_LEGACY_IRQ(ih);
+               if (*irq < 0 || *irq >= NUM_LEGACY_IRQS)
+                       *irq = -1;
        }
 #endif
 



Home | Main Index | Thread Index | Old Index