Source-Changes-HG archive

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

[src/riastradh-drm2]: src/sys/external/bsd/drm2/include/linux Add stubs for p...



details:   https://anonhg.NetBSD.org/src/rev/11b887db5e13
branches:  riastradh-drm2
changeset: 788276:11b887db5e13
user:      riastradh <riastradh%NetBSD.org@localhost>
date:      Wed Jul 24 03:02:07 2013 +0000

description:
Add stubs for pci_enable_msi and pci_disable_msi to <linux/pci.h>.

diffstat:

 sys/external/bsd/drm2/include/linux/pci.h |  20 +++++++++++++++++++-
 1 files changed, 19 insertions(+), 1 deletions(-)

diffs (41 lines):

diff -r c08428a42a13 -r 11b887db5e13 sys/external/bsd/drm2/include/linux/pci.h
--- a/sys/external/bsd/drm2/include/linux/pci.h Wed Jul 24 03:01:54 2013 +0000
+++ b/sys/external/bsd/drm2/include/linux/pci.h Wed Jul 24 03:02:07 2013 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: pci.h,v 1.1.2.6 2013/07/24 03:01:54 riastradh Exp $    */
+/*     $NetBSD: pci.h,v 1.1.2.7 2013/07/24 03:02:07 riastradh Exp $    */
 
 /*-
  * Copyright (c) 2013 The NetBSD Foundation, Inc.
@@ -49,6 +49,7 @@
        unsigned int device;
        struct pci_attach_args pd_pa;
        bool pd_kludged;        /* XXX pci_kludgey_find_dev hack */
+       bool msi_enabled;
 };
 
 #define        PCI_CAP_ID_AGP  PCI_CAP_AGP
@@ -72,6 +73,23 @@
        pci_conf_write(pdev->pd_pa.pa_pc, pdev->pd_pa.pa_tag, reg, value);
 }
 
+/*
+ * XXX pci msi
+ */
+static inline void
+pci_enable_msi(struct pci_dev *pdev)
+{
+       KASSERT(!pdev->msi_enabled);
+       pdev->msi_enabled = true;
+}
+
+static inline void
+pci_disable_msi(struct pci_dev *pdev)
+{
+       KASSERT(pdev->msi_enabled);
+       pdev->msi_enabled = false;
+}
+
 #define        PCIBIOS_MIN_MEM 0       /* XXX bogus x86 kludge bollocks */
 
 static inline bus_addr_t



Home | Main Index | Thread Index | Old Index