Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 10 Dec 2003 08:51:34 +0100 (CET)
From:      Lukas Ertl <l.ertl@univie.ac.at>
To:        FreeBSD-gnats-submit@FreeBSD.org
Subject:   docs/60107: [PATCH] update sample code in PCI driver chapter of arch handbook
Message-ID:  <200312100751.hBA7pYwd000846@korben.in.tern>
Resent-Message-ID: <200312100800.hBA80h1P083430@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         60107
>Category:       docs
>Synopsis:       [PATCH] update sample code in PCI driver chapter of arch handbook
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-doc
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          doc-bug
>Submitter-Id:   current-users
>Arrival-Date:   Wed Dec 10 00:00:43 PST 2003
>Closed-Date:
>Last-Modified:
>Originator:     Lukas Ertl
>Release:        FreeBSD 5.2-CURRENT i386
>Organization:
Vienna University Computer Center
>Environment:
System: FreeBSD korben 5.2-CURRENT FreeBSD 5.2-CURRENT #71: Mon Dec 8 21:32:27 CET 2003 le@korben:/usr/obj/usr/src/sys/KORBEN i386


	
>Description:

The following patch updates some of the sample code in the PCI driver
chapter of the arch handbook to work correctly on 5.X.

>How-To-Repeat:
	
>Fix:

	

--- archdoc.diff begins here ---
Index: en_US.ISO8859-1/books/arch-handbook/pci/chapter.sgml
===================================================================
RCS file: /usr/local/bsdcvs/doc/en_US.ISO8859-1/books/arch-handbook/pci/chapter.sgml,v
retrieving revision 1.14
diff -u -r1.14 chapter.sgml
--- en_US.ISO8859-1/books/arch-handbook/pci/chapter.sgml	5 Nov 2003 10:50:50 -0000	1.14
+++ en_US.ISO8859-1/books/arch-handbook/pci/chapter.sgml	10 Dec 2003 07:45:43 -0000
@@ -25,18 +25,22 @@
 
 #define MIN(a,b) (((a) < (b)) ? (a) : (b))
 
-#include &lt;sys/types.h&gt;
+#include &lt;sys/param.h&gt;  /* defines used in kernel.h */
 #include &lt;sys/module.h&gt;
 #include &lt;sys/systm.h&gt;  /* uprintf */ 
 #include &lt;sys/errno.h&gt;
-#include &lt;sys/param.h&gt;  /* defines used in kernel.h */
 #include &lt;sys/kernel.h&gt; /* types used in module initialization */
 #include &lt;sys/conf.h&gt;   /* cdevsw struct */
 #include &lt;sys/uio.h&gt;    /* uio struct */
 #include &lt;sys/malloc.h&gt;
 #include &lt;sys/bus.h&gt;	/* structs, prototypes for pci bus stuff */
 
-#include &lt;pci/pcivar.h&gt; /* For get_pci macros! */
+#include &lt;machine/bus.h&gt;
+#include &lt;sys/rman.h&gt;
+#include &lt;machine/resource.h&gt;
+
+#include &lt;dev/pci/pcivar.h&gt; /* For get_pci macros! */
+#include &lt;dev/pci/pcireg.h&gt;
 
 /* Function prototypes */
 d_open_t      mypci_open;
@@ -61,7 +65,7 @@
    open/close/read/write at this point */
 
 int 
-mypci_open(dev_t dev, int oflags, int devtype, struct proc *p)
+mypci_open(dev_t dev, int oflags, int devtype, struct thread *td)
 {
   int err = 0;
 
@@ -70,7 +74,7 @@
 }
 
 int 
-mypci_close(dev_t dev, int fflag, int devtype, struct proc *p)
+mypci_close(dev_t dev, int fflag, int devtype, struct thread *td)
 {
   int err=0;
 
--- archdoc.diff ends here ---


>Release-Note:
>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200312100751.hBA7pYwd000846>