aboutsummaryrefslogtreecommitdiff
path: root/sys/dev/pci
diff options
context:
space:
mode:
authorPoul-Henning Kamp <phk@FreeBSD.org>1995-11-20 12:42:39 +0000
committerPoul-Henning Kamp <phk@FreeBSD.org>1995-11-20 12:42:39 +0000
commit4b2af45f4ba1f8d8d5a56c4b18f29da6d08146e9 (patch)
tree3c18ee3a32f49eafefcfca9b38f0533552958ab7 /sys/dev/pci
parentfe66bbf4885ee0f3139abafc77baa90493c18a69 (diff)
Notes
Diffstat (limited to 'sys/dev/pci')
-rw-r--r--sys/dev/pci/pci.c19
1 files changed, 7 insertions, 12 deletions
diff --git a/sys/dev/pci/pci.c b/sys/dev/pci/pci.c
index 50337e5c41e3f..a14c96f6e93fe 100644
--- a/sys/dev/pci/pci.c
+++ b/sys/dev/pci/pci.c
@@ -1,6 +1,6 @@
/**************************************************************************
**
-** $Id: pci.c,v 1.31 1995/09/14 23:24:29 se Exp $
+** $Id: pci.c,v 1.32 1995/10/02 13:43:11 davidg Exp $
**
** General subroutines for the PCI bus.
** pci_configure ()
@@ -51,6 +51,7 @@
#include <sys/malloc.h>
#include <sys/errno.h>
#include <sys/kernel.h>
+#include <sys/sysctl.h>
#include <sys/proc.h> /* declaration of wakeup(), used by vm.h */
#include <sys/devconf.h>
@@ -109,11 +110,9 @@ struct pcicb {
u_long pcicb_p_memlimit;
};
-static int
-pci_externalize (struct proc *, struct kern_devconf *, void *, size_t);
+static int pci_externalize (struct kern_devconf *, struct sysctl_req *);
-static int
-pci_internalize (struct proc *, struct kern_devconf *, void *, size_t);
+static int pci_internalize (struct kern_devconf *, struct sysctl_req *);
static void
not_supported (pcici_t tag, u_long type);
@@ -1091,17 +1090,13 @@ int pci_map_mem (pcici_t tag, u_long reg, vm_offset_t* va, vm_offset_t* pa)
*/
static int
-pci_externalize (struct proc *p, struct kern_devconf *kdcp, void *u, size_t l)
+pci_externalize (struct kern_devconf *kdcp, struct sysctl_req *req)
{
struct pci_externalize_buffer buffer;
struct pci_info * pip = kdcp->kdc_parentdata;
pcici_t tag;
int i;
- if (l < sizeof buffer) {
- return ENOMEM;
- };
-
tag = pcibus->pb_tag (pip->pi_bus, pip->pi_device, 0);
buffer.peb_pci_info = *pip;
@@ -1110,12 +1105,12 @@ pci_externalize (struct proc *p, struct kern_devconf *kdcp, void *u, size_t l)
buffer.peb_config[i] = pcibus->pb_read (tag, i*4);
};
- return copyout(&buffer, u, sizeof buffer);
+ return SYSCTL_OUT(req, &buffer, sizeof buffer);
}
static int
-pci_internalize (struct proc *p, struct kern_devconf *kdcp, void *u, size_t s)
+pci_internalize (struct kern_devconf *kdcp, struct sysctl_req *re)
{
return EOPNOTSUPP;
}