From owner-freebsd-doc@FreeBSD.ORG Wed Dec 10 00:00:46 2003 Return-Path: Delivered-To: freebsd-doc@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 95CE816A4CE for ; Wed, 10 Dec 2003 00:00:46 -0800 (PST) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 2435843D1F for ; Wed, 10 Dec 2003 00:00:44 -0800 (PST) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.12.9/8.12.9) with ESMTP id hBA80hFY083431 for ; Wed, 10 Dec 2003 00:00:43 -0800 (PST) (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.12.9/8.12.9/Submit) id hBA80h1P083430; Wed, 10 Dec 2003 00:00:43 -0800 (PST) (envelope-from gnats) Resent-Date: Wed, 10 Dec 2003 00:00:43 -0800 (PST) Resent-Message-Id: <200312100800.hBA80h1P083430@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-doc@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Lukas Ertl Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id C058716A4CE for ; Tue, 9 Dec 2003 23:51:52 -0800 (PST) Received: from mailbox.univie.ac.at (mail.univie.ac.at [131.130.1.27]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3FD8643D13 for ; Tue, 9 Dec 2003 23:51:50 -0800 (PST) (envelope-from le@univie.ac.at) Received: from korben.in.tern (adslle.cc.univie.ac.at [131.130.102.11]) hBA7pevG546650 for ; Wed, 10 Dec 2003 08:51:42 +0100 Received: from korben.in.tern (korben.in.tern [127.0.0.1]) by korben.in.tern (8.12.10/8.12.10) with ESMTP id hBA7pexY000847 for ; Wed, 10 Dec 2003 08:51:40 +0100 (CET) (envelope-from le@korben.in.tern) Received: (from le@localhost) by korben.in.tern (8.12.10/8.12.10/Submit) id hBA7pYwd000846; Wed, 10 Dec 2003 08:51:34 +0100 (CET) (envelope-from le) Message-Id: <200312100751.hBA7pYwd000846@korben.in.tern> Date: Wed, 10 Dec 2003 08:51:34 +0100 (CET) From: Lukas Ertl To: FreeBSD-gnats-submit@FreeBSD.org X-Send-Pr-Version: 3.113 Subject: docs/60107: [PATCH] update sample code in PCI driver chapter of arch handbook X-BeenThere: freebsd-doc@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: Lukas Ertl List-Id: Documentation project List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 10 Dec 2003 08:00:46 -0000 >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 <sys/types.h> +#include <sys/param.h> /* defines used in kernel.h */ #include <sys/module.h> #include <sys/systm.h> /* uprintf */ #include <sys/errno.h> -#include <sys/param.h> /* defines used in kernel.h */ #include <sys/kernel.h> /* types used in module initialization */ #include <sys/conf.h> /* cdevsw struct */ #include <sys/uio.h> /* uio struct */ #include <sys/malloc.h> #include <sys/bus.h> /* structs, prototypes for pci bus stuff */ -#include <pci/pcivar.h> /* For get_pci macros! */ +#include <machine/bus.h> +#include <sys/rman.h> +#include <machine/resource.h> + +#include <dev/pci/pcivar.h> /* For get_pci macros! */ +#include <dev/pci/pcireg.h> /* 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: