diff options
author | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2020-07-09 22:49:03 +0200 |
---|---|---|
committer | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2020-07-09 22:51:53 +0200 |
commit | dcf5bfa4f588a97110d52ce7de74ec4633f74461 (patch) | |
tree | 76777e3826e1ca6b02c31985f0dcad5e0c15e2ca /device | |
parent | 19283fdffa782b2e485ef39e0de1574006ec4a1a (diff) | |
parent | 6cd23e1aa4f3557260e0cf75a2de2c142f8d8f48 (diff) |
Merge branch 'master-user_level_drivers' into master-user_level_drivers-debian
Diffstat (limited to 'device')
-rw-r--r-- | device/dev_pager.c | 4 | ||||
-rw-r--r-- | device/ds_routines.c | 1 | ||||
-rw-r--r-- | device/intr.c | 14 | ||||
-rw-r--r-- | device/intr.h | 15 | ||||
-rw-r--r-- | device/io_req.h | 2 | ||||
-rw-r--r-- | device/net_io.h | 10 | ||||
-rw-r--r-- | device/subrs.h | 3 | ||||
-rw-r--r-- | device/tty.h | 2 |
8 files changed, 46 insertions, 5 deletions
diff --git a/device/dev_pager.c b/device/dev_pager.c index 0680b5aa..4508ad14 100644 --- a/device/dev_pager.c +++ b/device/dev_pager.c @@ -328,8 +328,8 @@ kern_return_t device_pager_data_request( dev_pager_t ds; if (device_pager_debug) - printf("(device_pager)data_request: pager=%p, offset=0x%lx, length=0x%x\n", - pager, offset, length); + printf("(device_pager)data_request: pager=%p, offset=0x%lx, length=0x%lx\n", + pager, (unsigned long) offset, (unsigned long) length); ds = dev_pager_hash_lookup(pager); if (ds == DEV_PAGER_NULL) diff --git a/device/ds_routines.c b/device/ds_routines.c index 91862693..cc1b244b 100644 --- a/device/ds_routines.c +++ b/device/ds_routines.c @@ -133,6 +133,7 @@ static struct device_emulation_ops *emulation_list[] = static struct vm_map device_io_map_store; vm_map_t device_io_map = &device_io_map_store; +struct kmem_cache io_inband_cache; #define NUM_EMULATION (sizeof (emulation_list) / sizeof (emulation_list[0])) diff --git a/device/intr.c b/device/intr.c index 1e9ab898..bbbdc92d 100644 --- a/device/intr.c +++ b/device/intr.c @@ -1,3 +1,17 @@ +/* + * Copyright (c) 2010, 2011, 2016, 2019 Free Software Foundation, Inc. + * + * Permission to use, copy, modify and distribute this software and its + * documentation is hereby granted, provided that both the copyright + * notice and this permission notice appear in all copies of the + * software, derivative works or modified versions, and any portions + * thereof, and that both notices appear in supporting documentation. + * + * THE FREE SOFTWARE FOUNDATIONALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS" + * CONDITION. THE FREE SOFTWARE FOUNDATION DISCLAIMS ANY LIABILITY OF ANY KIND + * FOR ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE. + */ + #include <device/intr.h> #include <device/ds_routines.h> #include <kern/queue.h> diff --git a/device/intr.h b/device/intr.h index 48843cf0..df282c05 100644 --- a/device/intr.h +++ b/device/intr.h @@ -1,5 +1,18 @@ -#ifndef __INTR_H__ +/* + * Copyright (c) 2010, 2011, 2019 Free Software Foundation, Inc. + * + * Permission to use, copy, modify and distribute this software and its + * documentation is hereby granted, provided that both the copyright + * notice and this permission notice appear in all copies of the + * software, derivative works or modified versions, and any portions + * thereof, and that both notices appear in supporting documentation. + * + * THE FREE SOFTWARE FOUNDATIONALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS" + * CONDITION. THE FREE SOFTWARE FOUNDATION DISCLAIMS ANY LIABILITY OF ANY KIND + * FOR ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE. + */ +#ifndef __INTR_H__ #define __INTR_H__ #include <device/device_types.h> diff --git a/device/io_req.h b/device/io_req.h index 1ad46801..b80b3dde 100644 --- a/device/io_req.h +++ b/device/io_req.h @@ -137,6 +137,6 @@ void iodone(io_req_t); (kfree((vm_offset_t)(ior), sizeof(struct io_req))) -struct kmem_cache io_inband_cache; /* for inband reads */ +extern struct kmem_cache io_inband_cache; /* for inband reads */ #endif /* _IO_REQ_ */ diff --git a/device/net_io.h b/device/net_io.h index 5baf0678..9468e34b 100644 --- a/device/net_io.h +++ b/device/net_io.h @@ -109,6 +109,14 @@ net_do_filter( unsigned int data_count, const char * header); /* CSPF */ +io_return_t +net_set_filter( + struct ifnet *ifp, + ipc_port_t rcv_port, + int priority, + filter_t *filter, + unsigned int filter_count); + extern int bpf_do_filter( net_rcv_port_t infp, @@ -149,4 +157,6 @@ int bpf_match ( net_hash_entry_t **hash_headpp, net_hash_entry_t *entpp); +boolean_t ethernet_priority(const ipc_kmsg_t kmsg); + #endif /* _DEVICE_NET_IO_H_ */ diff --git a/device/subrs.h b/device/subrs.h index 680aaa6f..60ea6518 100644 --- a/device/subrs.h +++ b/device/subrs.h @@ -27,6 +27,9 @@ #define _SUBRS_H_ #include <mach/std_types.h> +#include <device/if_hdr.h> + +extern void if_init_queues(struct ifnet *ifp); extern void sleep (vm_offset_t channel, int priority); extern void wakeup (vm_offset_t channel); diff --git a/device/tty.h b/device/tty.h index ea6f4404..0bdb2db9 100644 --- a/device/tty.h +++ b/device/tty.h @@ -125,7 +125,7 @@ extern void ttychars( #define TTMINBUF 90 -short tthiwat[NSPEEDS], ttlowat[NSPEEDS]; +extern short tthiwat[NSPEEDS], ttlowat[NSPEEDS]; #define TTHIWAT(tp) tthiwat[(tp)->t_ospeed] #define TTLOWAT(tp) ttlowat[(tp)->t_ospeed] |