diff options
author | wpaul <wpaul@FreeBSD.org> | 2004-01-03 09:20:48 +0000 |
---|---|---|
committer | wpaul <wpaul@FreeBSD.org> | 2004-01-03 09:20:48 +0000 |
commit | 50be20979b31ad104954608328dc1f1ebb65e4ff (patch) | |
tree | e7710fff0be7d66088edf26ae338d9efad40daae /sys/compat/ndis/subr_ndis.c | |
parent | 2d3799107ff75049bef788fec5215335f07adcc6 (diff) | |
download | FreeBSD-src-50be20979b31ad104954608328dc1f1ebb65e4ff.zip FreeBSD-src-50be20979b31ad104954608328dc1f1ebb65e4ff.tar.gz |
subr_hal.c: implement WRITE_PORT_BUFFER_xxx() and READ_PORT_BUFFER_xxx()
subr_ndis.c: implement NdisDprAllocatePacket() and NdisDprFreePacket()
(which are aliased to NdisAllocatePacket() and NdisFreePacket()), and
bump the value we return in ndis_mapreg_cnt() to something ridiculously
large, since some drivers apparently expect to be able to allocate
way more than just 64.
These changes allow the Level 1 1000baseSX driver to work for
the following card:
ndis0: <SMC TigerCard 1000 Adapter> port 0xe000-0xe0ff mem 0xda004000-0xda0043ff irq 10 at device 9.0 on pci0
ndis0: Ethernet address: 00:e0:29:6f:cc:04
This is already supported by the lge(4) driver, but I decided
to take a try at making the Windows driver that came with it work too,
since I still had the floppy diskette for it lying around.
Diffstat (limited to 'sys/compat/ndis/subr_ndis.c')
-rw-r--r-- | sys/compat/ndis/subr_ndis.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/sys/compat/ndis/subr_ndis.c b/sys/compat/ndis/subr_ndis.c index a396a7e..78aa6f1 100644 --- a/sys/compat/ndis/subr_ndis.c +++ b/sys/compat/ndis/subr_ndis.c @@ -1001,7 +1001,11 @@ ndis_cancel_timer(timer, cancelled) { struct callout *ch; + if (timer == NULL) + return; ch = timer->nmt_dpc.nk_deferredctx; + if (ch == NULL) + return; callout_stop(ch); *cancelled = timer->nmt_ktimer.nk_header.dh_sigstate; @@ -1102,7 +1106,7 @@ ndis_mapreg_cnt(bustype, cnt) uint32_t bustype; uint32_t *cnt; { - *cnt = 64; + *cnt = 8192; return(NDIS_STATUS_SUCCESS); } @@ -2376,6 +2380,8 @@ image_patch_table ndis_functbl[] = { { "NdisAllocatePacket", (FUNC)ndis_alloc_packet }, { "NdisFreePacket", (FUNC)ndis_release_packet }, { "NdisFreePacketPool", (FUNC)ndis_free_packetpool }, + { "NdisDprAllocatePacket", (FUNC)ndis_alloc_packet }, + { "NdisDprFreePacket", (FUNC)ndis_release_packet }, { "NdisAllocateBufferPool", (FUNC)ndis_alloc_bufpool }, { "NdisAllocateBuffer", (FUNC)ndis_alloc_buf }, { "NdisQueryBuffer", (FUNC)ndis_query_buf }, |