Module Name:    src
Committed By:   riastradh
Date:           Wed Jul 24 03:02:07 UTC 2013

Modified Files:
        src/sys/external/bsd/drm2/include/linux [riastradh-drm2]: pci.h

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


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.6 -r1.1.2.7 \
    src/sys/external/bsd/drm2/include/linux/pci.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/external/bsd/drm2/include/linux/pci.h
diff -u src/sys/external/bsd/drm2/include/linux/pci.h:1.1.2.6 src/sys/external/bsd/drm2/include/linux/pci.h:1.1.2.7
--- src/sys/external/bsd/drm2/include/linux/pci.h:1.1.2.6	Wed Jul 24 03:01:54 2013
+++ src/sys/external/bsd/drm2/include/linux/pci.h	Wed Jul 24 03:02:07 2013
@@ -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 @@ struct pci_dev {
 	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_write_config_dword(struct pci_dev *p
 	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

Reply via email to