diff options
author | wpaul <wpaul@FreeBSD.org> | 2004-03-29 02:15:29 +0000 |
---|---|---|
committer | wpaul <wpaul@FreeBSD.org> | 2004-03-29 02:15:29 +0000 |
commit | 163b236504b7729f12514af9c50a4bc81cacc473 (patch) | |
tree | dc63594c93d33b78ae84eb6b35cca0ced5cae23f /sys | |
parent | 44a5d7ca166f3e88cdab136c1ce02a56dcb7979f (diff) | |
download | FreeBSD-src-163b236504b7729f12514af9c50a4bc81cacc473.zip FreeBSD-src-163b236504b7729f12514af9c50a4bc81cacc473.tar.gz |
Add missing cprd_flags member to partial resource structure in
resource_var.h.
In kern_ndis.c:ndis_convert_res(), fill in the cprd_flags and
cprd_sharedisp fields as best we can.
In if_ndis.c:ndis_setmulti(), don't bother updating the multicast
filter if our multicast address list is empty.
Add some missing updates to ndis_var.h and ntoskrnl_var.h that I
forgot to check in when I added the KeDpc stuff.
Diffstat (limited to 'sys')
-rw-r--r-- | sys/compat/ndis/kern_ndis.c | 10 | ||||
-rw-r--r-- | sys/compat/ndis/ndis_var.h | 1 | ||||
-rw-r--r-- | sys/compat/ndis/ntoskrnl_var.h | 4 | ||||
-rw-r--r-- | sys/compat/ndis/resource_var.h | 1 | ||||
-rw-r--r-- | sys/dev/if_ndis/if_ndis.c | 2 |
5 files changed, 17 insertions, 1 deletions
diff --git a/sys/compat/ndis/kern_ndis.c b/sys/compat/ndis/kern_ndis.c index b59ba87..eb62ed8 100644 --- a/sys/compat/ndis/kern_ndis.c +++ b/sys/compat/ndis/kern_ndis.c @@ -824,18 +824,28 @@ ndis_convert_res(arg) switch (brle->type) { case SYS_RES_IOPORT: prd->cprd_type = CmResourceTypePort; + prd->cprd_flags = CM_RESOURCE_PORT_IO; + prd->cprd_sharedisp = + CmResourceShareDeviceExclusive; prd->u.cprd_port.cprd_start.np_quad = brle->start; prd->u.cprd_port.cprd_len = brle->count; break; case SYS_RES_MEMORY: prd->cprd_type = CmResourceTypeMemory; + prd->cprd_flags = + CM_RESOURCE_MEMORY_READ_WRITE; + prd->cprd_sharedisp = + CmResourceShareDeviceExclusive; prd->u.cprd_port.cprd_start.np_quad = brle->start; prd->u.cprd_port.cprd_len = brle->count; break; case SYS_RES_IRQ: prd->cprd_type = CmResourceTypeInterrupt; + prd->cprd_flags = 0; + prd->cprd_sharedisp = + CmResourceShareDeviceExclusive; prd->u.cprd_intr.cprd_level = brle->start; prd->u.cprd_intr.cprd_vector = brle->start; prd->u.cprd_intr.cprd_affinity = 0; diff --git a/sys/compat/ndis/ndis_var.h b/sys/compat/ndis/ndis_var.h index 47106d5..3c3de04 100644 --- a/sys/compat/ndis/ndis_var.h +++ b/sys/compat/ndis/ndis_var.h @@ -1512,6 +1512,7 @@ extern int ndis_create_sysctls(void *); extern int ndis_add_sysctl(void *, char *, char *, char *, int); extern int ndis_flush_sysctls(void *); extern int ndis_sched(void (*)(void *), void *, int); +extern int ndis_unsched(void (*)(void *), void *, int); __END_DECLS #endif /* _NDIS_VAR_H_ */ diff --git a/sys/compat/ndis/ntoskrnl_var.h b/sys/compat/ndis/ntoskrnl_var.h index ccd9259..a6d2d80 100644 --- a/sys/compat/ndis/ntoskrnl_var.h +++ b/sys/compat/ndis/ntoskrnl_var.h @@ -261,7 +261,7 @@ struct kdpc { void *k_deferredctx; void *k_sysarg1; void *k_sysarg2; - uint32_t *k_lock; + register_t k_lock; }; typedef struct kdpc kdpc; @@ -480,6 +480,8 @@ __BEGIN_DECLS extern int ntoskrnl_libinit(void); extern int ntoskrnl_libfini(void); __stdcall extern void ntoskrnl_init_dpc(kdpc *, void *, void *); +__stdcall extern uint8_t ntoskrnl_queue_dpc(kdpc *, void *, void *); +__stdcall extern uint8_t ntoskrnl_dequeue_dpc(kdpc *); __stdcall extern void ntoskrnl_init_timer(ktimer *); __stdcall extern void ntoskrnl_init_timer_ex(ktimer *, uint32_t); __stdcall extern uint8_t ntoskrnl_set_timer(ktimer *, int64_t, kdpc *); diff --git a/sys/compat/ndis/resource_var.h b/sys/compat/ndis/resource_var.h index 079193b..9386052 100644 --- a/sys/compat/ndis/resource_var.h +++ b/sys/compat/ndis/resource_var.h @@ -97,6 +97,7 @@ typedef enum cm_share_disposition cm_share_disposition; struct cm_partial_resource_desc { uint8_t cprd_type; uint8_t cprd_sharedisp; + uint16_t cprd_flags; union { struct { physaddr cprd_start; diff --git a/sys/dev/if_ndis/if_ndis.c b/sys/dev/if_ndis/if_ndis.c index 2d5f0c6..ddb7c50 100644 --- a/sys/dev/if_ndis/if_ndis.c +++ b/sys/dev/if_ndis/if_ndis.c @@ -153,6 +153,8 @@ ndis_setmulti(sc) return; } + if (TAILQ_EMPTY(&ifp->if_multiaddrs)) + return; len = sizeof(mclistsz); ndis_get_info(sc, OID_802_3_MAXIMUM_LIST_SIZE, &mclistsz, &len); |