Module Name: src Committed By: cherry Date: Sun Sep 23 02:51:06 UTC 2018
Modified Files: src/sys/arch/x86/pci: pci_intr_machdep.c Log Message: 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 To generate a diff of this commit: cvs rdiff -u -r1.44 -r1.45 src/sys/arch/x86/pci/pci_intr_machdep.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/sys/arch/x86/pci/pci_intr_machdep.c diff -u src/sys/arch/x86/pci/pci_intr_machdep.c:1.44 src/sys/arch/x86/pci/pci_intr_machdep.c:1.45 --- src/sys/arch/x86/pci/pci_intr_machdep.c:1.44 Mon Sep 10 02:49:23 2018 +++ src/sys/arch/x86/pci/pci_intr_machdep.c Sun Sep 23 02:51:06 2018 @@ -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 @@ pci_intr_find_intx_irq(pci_intr_handle_t 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