Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/sandpoint/pci PCI MSI/MSI-X manipulation stub funct...



details:   https://anonhg.NetBSD.org/src/rev/2aa1d69e00e6
branches:  trunk
changeset: 819316:2aa1d69e00e6
user:      nonaka <nonaka%NetBSD.org@localhost>
date:      Sat Nov 26 15:03:23 2016 +0000

description:
PCI MSI/MSI-X manipulation stub functions are not provided as weak alias.

diffstat:

 sys/arch/sandpoint/pci/pci_machdep.c |  29 +++++++++++++++++++++++++++--
 1 files changed, 27 insertions(+), 2 deletions(-)

diffs (50 lines):

diff -r 3c9af6833da0 -r 2aa1d69e00e6 sys/arch/sandpoint/pci/pci_machdep.c
--- a/sys/arch/sandpoint/pci/pci_machdep.c      Sat Nov 26 13:59:45 2016 +0000
+++ b/sys/arch/sandpoint/pci/pci_machdep.c      Sat Nov 26 15:03:23 2016 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: pci_machdep.c,v 1.35 2016/10/19 00:08:42 nonaka Exp $  */
+/*     $NetBSD: pci_machdep.c,v 1.36 2016/11/26 15:03:23 nonaka Exp $  */
 
 /*
  * Copyright (c) 1996 Christopher G. Demetriou.  All rights reserved.
@@ -43,7 +43,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: pci_machdep.c,v 1.35 2016/10/19 00:08:42 nonaka Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pci_machdep.c,v 1.36 2016/11/26 15:03:23 nonaka Exp $");
 
 #include "opt_pci.h"
 
@@ -497,6 +497,31 @@
 }
 #endif
 
+pci_intr_type_t
+pci_intr_type(pci_chipset_tag_t pc, pci_intr_handle_t ih)
+{
+
+       return PCI_INTR_TYPE_INTX;
+}
+
+int
+pci_intr_alloc(const struct pci_attach_args *pa, pci_intr_handle_t **ihps,
+    int *counts, pci_intr_type_t max_type)
+{
+
+       if (counts != NULL && counts[PCI_INTR_TYPE_INTX] == 0)
+               return EINVAL;
+
+       return pci_intx_alloc(pa, ihps);
+}
+
+void
+pci_intr_release(pci_chipset_tag_t pc, pci_intr_handle_t *pih, int count)
+{
+
+       kmem_free(pih, sizeof(*pih));
+}
+
 int
 pci_intx_alloc(const struct pci_attach_args *pa, pci_intr_handle_t **ihpp)
 {



Home | Main Index | Thread Index | Old Index