diff -u -r nvnet.orig/basetype.h nvnet/basetype.h --- nvnet.orig/basetype.h Sat Nov 15 07:26:33 2003 +++ nvnet/basetype.h Mon May 3 16:54:18 2004 @@ -19,11 +19,11 @@ typedef unsigned char UCHAR; typedef unsigned int UINT; typedef unsigned short USHORT; -#ifndef linux +/*#ifndef linux typedef unsigned long ULONG; -#else +#else*/ typedef unsigned int ULONG; -#endif +/*#endif*/ #define VOID void diff -u -r nvnet.orig/if_nv.c nvnet/if_nv.c --- nvnet.orig/if_nv.c Thu Jan 8 18:32:04 2004 +++ nvnet/if_nv.c Mon May 3 20:07:37 2004 @@ -114,7 +114,7 @@ MODULE_DEPEND(nv, ether, 1, 1, 1); MODULE_DEPEND(nv, miibus, 1, 1, 1); -#include "if_nvreg.h" +#include #include "miibus_if.h" static int nv_probe(device_t); @@ -147,20 +147,20 @@ static int nv_osallocex(void *, MEMORY_BLOCKEX *); static int nv_osfreeex(void *, MEMORY_BLOCKEX *); static int nv_osclear(void *, void *, int); -static int nv_osdelay(void *, unsigned long); +static int nv_osdelay(void *, ULONG); static int nv_osallocrxbuf(void *, MEMORY_BLOCK *, void **); static int nv_osfreerxbuf(void *, MEMORY_BLOCK *, void *); -static int nv_ospackettx(void *, void *, unsigned long); -static int nv_ospacketrx(void *, void *, unsigned long, unsigned char *, unsigned char); +static int nv_ospackettx(void *, void *, ULONG); +static int nv_ospacketrx(void *, void *, ULONG, unsigned char *, unsigned char); static int nv_oslinkchg(void *, int); static int nv_osalloctimer(void *, void **); static int nv_osfreetimer(void *, void *); static int nv_osinittimer(void *, void *, PTIMER_FUNC, void *); -static int nv_ossettimer(void *, void *, unsigned long); +static int nv_ossettimer(void *, void *, ULONG); static int nv_oscanceltimer(void *, void *); static int nv_ospreprocpkt(void *, void *, void **, unsigned char *, unsigned char); static void *nv_ospreprocpktnopq(void *, void *); -static int nv_osindicatepkt(void *, void **, unsigned long); +static int nv_osindicatepkt(void *, void **, ULONG); static int nv_oslockalloc(void *, int, void **); static int nv_oslockacquire(void *, int, void *); static int nv_oslockrelease(void *, int, void *); @@ -1180,7 +1180,7 @@ nv_miibus_readreg(device_t dev, int phy, int reg) { struct nv_softc *sc = device_get_softc(dev); - ulong data; + ULONG data; DEBUGOUT(NV_DEBUG_MII, "nv: nv_miibus_readreg - entry\n"); @@ -1250,9 +1250,9 @@ mem_physical = vtophys(mem->pLogical); mem->pPhysical = (PVOID)mem_physical; - DEBUGOUT(NV_DEBUG_API, "nv: nv_osalloc 0x%x/0x%x - %d\n", - (u_int32_t) mem->pLogical, - (u_int32_t) mem->pPhysical, mem->uiLength); + /* DEBUGOUT(NV_DEBUG_API, "nv: nv_osalloc 0x%x/0x%x - %d\n", + mem->pLogical, + mem->pPhysical, mem->uiLength);*/ return (1); } @@ -1261,8 +1261,8 @@ static int nv_osfree(void *ctx, MEMORY_BLOCK *mem) { - DEBUGOUT(NV_DEBUG_API, "nv: nv_osfree - 0x%x - %d\n", - (u_int32_t) mem->pLogical, mem->uiLength); + /* DEBUGOUT(NV_DEBUG_API, "nv: nv_osfree - 0x%x - %d\n", + (u_int32_t) mem->pLogical, mem->uiLength);*/ contigfree(mem->pLogical, PAGE_SIZE, M_DEVBUF); return (1); @@ -1291,7 +1291,7 @@ return (0); } mem_block_ex->pLogicalOrig = mem_block.pLogical; - mem_block_ex->pPhysicalOrigLow = (ULONG)mem_block.pPhysical; + mem_block_ex->pPhysicalOrigLow = (unsigned long)mem_block.pPhysical; mem_block_ex->pPhysicalOrigHigh = 0; mem_block_ex->pPhysical = mem_block.pPhysical; @@ -1302,9 +1302,9 @@ offset = mem_block_ex->pPhysicalOrigLow & (mem_block_ex->AlignmentSize - 1); if (offset) { - mem_block_ex->pPhysical = (PVOID)((ULONG)mem_block_ex->pPhysical + + mem_block_ex->pPhysical = (PVOID)((unsigned long)mem_block_ex->pPhysical + mem_block_ex->AlignmentSize - offset); - mem_block_ex->pLogical = (PVOID)((ULONG)mem_block_ex->pLogical + + mem_block_ex->pLogical = (PVOID)((unsigned long)mem_block_ex->pLogical + mem_block_ex->AlignmentSize - offset); } /* if (offset) */ } /* if (mem_block_ex->uiLength != @@ -1321,7 +1321,7 @@ DEBUGOUT(NV_DEBUG_API, "nv: nv_osfreeex\n"); mem_block.pLogical = mem_block_ex->pLogicalOrig; - mem_block.pPhysical = (PVOID)mem_block_ex->pPhysicalOrigLow; + mem_block.pPhysical = (PVOID)((unsigned long)mem_block_ex->pPhysicalOrigLow); mem_block.uiLength = mem_block_ex->uiLengthOrig; return (nv_osfree(ctx, &mem_block)); @@ -1338,7 +1338,7 @@ /* Sleep for a tick */ static int -nv_osdelay(void *ctx, unsigned long usec) +nv_osdelay(void *ctx, ULONG usec) { DELAY(usec); return (1); @@ -1432,7 +1432,7 @@ /* This gets called by the Nvidia API after our TX packet has been sent */ static int -nv_ospackettx(void *ctx, void *id, unsigned long success) +nv_ospackettx(void *ctx, void *id, ULONG success) { struct nv_softc *sc = ctx; struct nv_map_buffer *buf; @@ -1469,7 +1469,7 @@ /* This gets called by the Nvidia API when a new packet has been received */ /* XXX What is newbuf used for? XXX */ static int -nv_ospacketrx(void *ctx, void *data, unsigned long success, +nv_ospacketrx(void *ctx, void *data, ULONG success, unsigned char *newbuf, unsigned char priority) { struct nv_softc *sc = ctx; @@ -1591,7 +1591,7 @@ /* Set the timer to go off */ static int -nv_ossettimer(void *ctx, void *timer, unsigned long delay) +nv_ossettimer(void *ctx, void *timer, ULONG delay) { struct nv_softc *sc = ctx; @@ -1636,7 +1636,7 @@ } static int -nv_osindicatepkt(void *ctx, void **id, unsigned long pktno) +nv_osindicatepkt(void *ctx, void **id, ULONG pktno) { /* Not implemented */ DEBUGOUT(NV_DEBUG_BROKEN, "nv: nv_osindicatepkt\n"); diff -u -r nvnet.orig/if_nvreg.h nvnet/if_nvreg.h --- nvnet.orig/if_nvreg.h Sat Nov 8 22:03:01 2003 +++ nvnet/if_nvreg.h Mon May 3 20:07:46 2004 @@ -29,9 +29,9 @@ #ifndef _IF_NVREG_H_ #define _IF_NVREG_H_ -#include "basetype.h" -#include "os.h" -#include "adapter.h" +#include +#include +#include #ifndef NVIDIA_VENDORID #define NVIDIA_VENDORID 0x10DE @@ -149,7 +149,7 @@ void *ostimer_params; unsigned int linkup; ulong tx_errors; - ulong phyaddr; + ULONG phyaddr; unsigned char original_mac_addr[6]; }; Only in nvnet: nvnetlib.c diff -u -r nvnet.orig/os.h nvnet/os.h --- nvnet.orig/os.h Sat Nov 15 07:26:33 2003 +++ nvnet/os.h Mon May 3 20:12:31 2004 @@ -9,7 +9,7 @@ #ifndef _OS_H_ #define _OS_H_ -#include "phy.h" +#include #define HDO_VERSION_STRING "HDR O: $Revision: 1.1 $";