summaryrefslogtreecommitdiffstats
path: root/sys/dev/nve
diff options
context:
space:
mode:
Diffstat (limited to 'sys/dev/nve')
-rw-r--r--sys/dev/nve/if_nve.c94
1 files changed, 47 insertions, 47 deletions
diff --git a/sys/dev/nve/if_nve.c b/sys/dev/nve/if_nve.c
index a9b8be8..fe26666 100644
--- a/sys/dev/nve/if_nve.c
+++ b/sys/dev/nve/if_nve.c
@@ -152,30 +152,30 @@ static int nve_miibus_writereg(device_t, int, int, int);
static void nve_dmamap_cb(void *, bus_dma_segment_t *, int, int);
static void nve_dmamap_tx_cb(void *, bus_dma_segment_t *, int, bus_size_t, int);
-static NV_SINT32 nve_osalloc(PNV_VOID, PMEMORY_BLOCK);
-static NV_SINT32 nve_osfree(PNV_VOID, PMEMORY_BLOCK);
-static NV_SINT32 nve_osallocex(PNV_VOID, PMEMORY_BLOCKEX);
-static NV_SINT32 nve_osfreeex(PNV_VOID, PMEMORY_BLOCKEX);
-static NV_SINT32 nve_osclear(PNV_VOID, PNV_VOID, NV_SINT32);
-static NV_SINT32 nve_osdelay(PNV_VOID, NV_UINT32);
-static NV_SINT32 nve_osallocrxbuf(PNV_VOID, PMEMORY_BLOCK, PNV_VOID *);
-static NV_SINT32 nve_osfreerxbuf(PNV_VOID, PMEMORY_BLOCK, PNV_VOID);
-static NV_SINT32 nve_ospackettx(PNV_VOID, PNV_VOID, NV_UINT32);
-static NV_SINT32 nve_ospacketrx(PNV_VOID, PNV_VOID, NV_UINT32, NV_UINT8 *, NV_UINT8);
-static NV_SINT32 nve_oslinkchg(PNV_VOID, NV_SINT32);
-static NV_SINT32 nve_osalloctimer(PNV_VOID, PNV_VOID *);
-static NV_SINT32 nve_osfreetimer(PNV_VOID, PNV_VOID);
-static NV_SINT32 nve_osinittimer(PNV_VOID, PNV_VOID, PTIMER_FUNC, PNV_VOID);
-static NV_SINT32 nve_ossettimer(PNV_VOID, PNV_VOID, NV_UINT32);
-static NV_SINT32 nve_oscanceltimer(PNV_VOID, PNV_VOID);
-
-static NV_SINT32 nve_ospreprocpkt(PNV_VOID, PNV_VOID, PNV_VOID *, NV_UINT8 *, NV_UINT8);
-static PNV_VOID nve_ospreprocpktnopq(PNV_VOID, PNV_VOID);
-static NV_SINT32 nve_osindicatepkt(PNV_VOID, PNV_VOID *, NV_UINT32);
-static NV_SINT32 nve_oslockalloc(PNV_VOID, NV_SINT32, PNV_VOID *);
-static NV_SINT32 nve_oslockacquire(PNV_VOID, NV_SINT32, PNV_VOID);
-static NV_SINT32 nve_oslockrelease(PNV_VOID, NV_SINT32, PNV_VOID);
-static PNV_VOID nve_osreturnbufvirt(PNV_VOID, PNV_VOID);
+static NV_API_CALL NV_SINT32 nve_osalloc(PNV_VOID, PMEMORY_BLOCK);
+static NV_API_CALL NV_SINT32 nve_osfree(PNV_VOID, PMEMORY_BLOCK);
+static NV_API_CALL NV_SINT32 nve_osallocex(PNV_VOID, PMEMORY_BLOCKEX);
+static NV_API_CALL NV_SINT32 nve_osfreeex(PNV_VOID, PMEMORY_BLOCKEX);
+static NV_API_CALL NV_SINT32 nve_osclear(PNV_VOID, PNV_VOID, NV_SINT32);
+static NV_API_CALL NV_SINT32 nve_osdelay(PNV_VOID, NV_UINT32);
+static NV_API_CALL NV_SINT32 nve_osallocrxbuf(PNV_VOID, PMEMORY_BLOCK, PNV_VOID *);
+static NV_API_CALL NV_SINT32 nve_osfreerxbuf(PNV_VOID, PMEMORY_BLOCK, PNV_VOID);
+static NV_API_CALL NV_SINT32 nve_ospackettx(PNV_VOID, PNV_VOID, NV_UINT32);
+static NV_API_CALL NV_SINT32 nve_ospacketrx(PNV_VOID, PNV_VOID, NV_UINT32, NV_UINT8 *, NV_UINT8);
+static NV_API_CALL NV_SINT32 nve_oslinkchg(PNV_VOID, NV_SINT32);
+static NV_API_CALL NV_SINT32 nve_osalloctimer(PNV_VOID, PNV_VOID *);
+static NV_API_CALL NV_SINT32 nve_osfreetimer(PNV_VOID, PNV_VOID);
+static NV_API_CALL NV_SINT32 nve_osinittimer(PNV_VOID, PNV_VOID, PTIMER_FUNC, PNV_VOID);
+static NV_API_CALL NV_SINT32 nve_ossettimer(PNV_VOID, PNV_VOID, NV_UINT32);
+static NV_API_CALL NV_SINT32 nve_oscanceltimer(PNV_VOID, PNV_VOID);
+
+static NV_API_CALL NV_SINT32 nve_ospreprocpkt(PNV_VOID, PNV_VOID, PNV_VOID *, NV_UINT8 *, NV_UINT8);
+static NV_API_CALL PNV_VOID nve_ospreprocpktnopq(PNV_VOID, PNV_VOID);
+static NV_API_CALL NV_SINT32 nve_osindicatepkt(PNV_VOID, PNV_VOID *, NV_UINT32);
+static NV_API_CALL NV_SINT32 nve_oslockalloc(PNV_VOID, NV_SINT32, PNV_VOID *);
+static NV_API_CALL NV_SINT32 nve_oslockacquire(PNV_VOID, NV_SINT32, PNV_VOID);
+static NV_API_CALL NV_SINT32 nve_oslockrelease(PNV_VOID, NV_SINT32, PNV_VOID);
+static NV_API_CALL PNV_VOID nve_osreturnbufvirt(PNV_VOID, PNV_VOID);
static device_method_t nve_methods[] = {
/* Device interface */
@@ -1342,7 +1342,7 @@ nve_watchdog(struct nve_softc *sc)
/* --- Start of NVOSAPI interface --- */
/* Allocate DMA enabled general use memory for API */
-static NV_SINT32
+static NV_API_CALL NV_SINT32
nve_osalloc(PNV_VOID ctx, PMEMORY_BLOCK mem)
{
struct nve_softc *sc;
@@ -1370,7 +1370,7 @@ nve_osalloc(PNV_VOID ctx, PMEMORY_BLOCK mem)
}
/* Free allocated memory */
-static NV_SINT32
+static NV_API_CALL NV_SINT32
nve_osfree(PNV_VOID ctx, PMEMORY_BLOCK mem)
{
DEBUGOUT(NVE_DEBUG_API, "nve: nve_osfree - 0x%x - %d\n",
@@ -1381,7 +1381,7 @@ nve_osfree(PNV_VOID ctx, PMEMORY_BLOCK mem)
}
/* Copied directly from nvnet.c */
-static NV_SINT32
+static NV_API_CALL NV_SINT32
nve_osallocex(PNV_VOID ctx, PMEMORY_BLOCKEX mem_block_ex)
{
MEMORY_BLOCK mem_block;
@@ -1427,7 +1427,7 @@ nve_osallocex(PNV_VOID ctx, PMEMORY_BLOCKEX mem_block_ex)
}
/* Copied directly from nvnet.c */
-static NV_SINT32
+static NV_API_CALL NV_SINT32
nve_osfreeex(PNV_VOID ctx, PMEMORY_BLOCKEX mem_block_ex)
{
MEMORY_BLOCK mem_block;
@@ -1442,7 +1442,7 @@ nve_osfreeex(PNV_VOID ctx, PMEMORY_BLOCKEX mem_block_ex)
}
/* Clear memory region */
-static NV_SINT32
+static NV_API_CALL NV_SINT32
nve_osclear(PNV_VOID ctx, PNV_VOID mem, NV_SINT32 length)
{
DEBUGOUT(NVE_DEBUG_API, "nve: nve_osclear\n");
@@ -1451,7 +1451,7 @@ nve_osclear(PNV_VOID ctx, PNV_VOID mem, NV_SINT32 length)
}
/* Sleep for a tick */
-static NV_SINT32
+static NV_API_CALL NV_SINT32
nve_osdelay(PNV_VOID ctx, NV_UINT32 usec)
{
DELAY(usec);
@@ -1459,7 +1459,7 @@ nve_osdelay(PNV_VOID ctx, NV_UINT32 usec)
}
/* Allocate memory for rx buffer */
-static NV_SINT32
+static NV_API_CALL NV_SINT32
nve_osallocrxbuf(PNV_VOID ctx, PMEMORY_BLOCK mem, PNV_VOID *id)
{
struct nve_softc *sc = ctx;
@@ -1515,7 +1515,7 @@ fail:
}
/* Free the rx buffer */
-static NV_SINT32
+static NV_API_CALL NV_SINT32
nve_osfreerxbuf(PNV_VOID ctx, PMEMORY_BLOCK mem, PNV_VOID id)
{
struct nve_softc *sc = ctx;
@@ -1539,7 +1539,7 @@ nve_osfreerxbuf(PNV_VOID ctx, PMEMORY_BLOCK mem, PNV_VOID id)
}
/* This gets called by the Nvidia API after our TX packet has been sent */
-static NV_SINT32
+static NV_API_CALL NV_SINT32
nve_ospackettx(PNV_VOID ctx, PNV_VOID id, NV_UINT32 success)
{
struct nve_softc *sc = ctx;
@@ -1578,7 +1578,7 @@ fail:
/* This gets called by the Nvidia API when a new packet has been received */
/* XXX What is newbuf used for? XXX */
-static NV_SINT32
+static NV_API_CALL NV_SINT32
nve_ospacketrx(PNV_VOID ctx, PNV_VOID data, NV_UINT32 success, NV_UINT8 *newbuf,
NV_UINT8 priority)
{
@@ -1636,7 +1636,7 @@ nve_ospacketrx(PNV_VOID ctx, PNV_VOID data, NV_UINT32 success, NV_UINT8 *newbuf,
}
/* This gets called by NVIDIA API when the PHY link state changes */
-static NV_SINT32
+static NV_API_CALL NV_SINT32
nve_oslinkchg(PNV_VOID ctx, NV_SINT32 enabled)
{
@@ -1646,7 +1646,7 @@ nve_oslinkchg(PNV_VOID ctx, NV_SINT32 enabled)
}
/* Setup a watchdog timer */
-static NV_SINT32
+static NV_API_CALL NV_SINT32
nve_osalloctimer(PNV_VOID ctx, PNV_VOID *timer)
{
struct nve_softc *sc = (struct nve_softc *)ctx;
@@ -1660,7 +1660,7 @@ nve_osalloctimer(PNV_VOID ctx, PNV_VOID *timer)
}
/* Free the timer */
-static NV_SINT32
+static NV_API_CALL NV_SINT32
nve_osfreetimer(PNV_VOID ctx, PNV_VOID timer)
{
@@ -1672,7 +1672,7 @@ nve_osfreetimer(PNV_VOID ctx, PNV_VOID timer)
}
/* Setup timer parameters */
-static NV_SINT32
+static NV_API_CALL NV_SINT32
nve_osinittimer(PNV_VOID ctx, PNV_VOID timer, PTIMER_FUNC func, PNV_VOID parameters)
{
struct nve_softc *sc = (struct nve_softc *)ctx;
@@ -1686,7 +1686,7 @@ nve_osinittimer(PNV_VOID ctx, PNV_VOID timer, PTIMER_FUNC func, PNV_VOID paramet
}
/* Set the timer to go off */
-static NV_SINT32
+static NV_API_CALL NV_SINT32
nve_ossettimer(PNV_VOID ctx, PNV_VOID timer, NV_UINT32 delay)
{
struct nve_softc *sc = ctx;
@@ -1700,7 +1700,7 @@ nve_ossettimer(PNV_VOID ctx, PNV_VOID timer, NV_UINT32 delay)
}
/* Cancel the timer */
-static NV_SINT32
+static NV_API_CALL NV_SINT32
nve_oscanceltimer(PNV_VOID ctx, PNV_VOID timer)
{
@@ -1711,7 +1711,7 @@ nve_oscanceltimer(PNV_VOID ctx, PNV_VOID timer)
return (1);
}
-static NV_SINT32
+static NV_API_CALL NV_SINT32
nve_ospreprocpkt(PNV_VOID ctx, PNV_VOID readdata, PNV_VOID *id,
NV_UINT8 *newbuffer, NV_UINT8 priority)
{
@@ -1722,7 +1722,7 @@ nve_ospreprocpkt(PNV_VOID ctx, PNV_VOID readdata, PNV_VOID *id,
return (1);
}
-static PNV_VOID
+static NV_API_CALL PNV_VOID
nve_ospreprocpktnopq(PNV_VOID ctx, PNV_VOID readdata)
{
@@ -1732,7 +1732,7 @@ nve_ospreprocpktnopq(PNV_VOID ctx, PNV_VOID readdata)
return (NULL);
}
-static NV_SINT32
+static NV_API_CALL NV_SINT32
nve_osindicatepkt(PNV_VOID ctx, PNV_VOID *id, NV_UINT32 pktno)
{
@@ -1743,7 +1743,7 @@ nve_osindicatepkt(PNV_VOID ctx, PNV_VOID *id, NV_UINT32 pktno)
}
/* Allocate mutex context (already done in nve_attach) */
-static NV_SINT32
+static NV_API_CALL NV_SINT32
nve_oslockalloc(PNV_VOID ctx, NV_SINT32 type, PNV_VOID *pLock)
{
struct nve_softc *sc = (struct nve_softc *)ctx;
@@ -1756,7 +1756,7 @@ nve_oslockalloc(PNV_VOID ctx, NV_SINT32 type, PNV_VOID *pLock)
}
/* Obtain a spin lock */
-static NV_SINT32
+static NV_API_CALL NV_SINT32
nve_oslockacquire(PNV_VOID ctx, NV_SINT32 type, PNV_VOID lock)
{
@@ -1766,7 +1766,7 @@ nve_oslockacquire(PNV_VOID ctx, NV_SINT32 type, PNV_VOID lock)
}
/* Release lock */
-static NV_SINT32
+static NV_API_CALL NV_SINT32
nve_oslockrelease(PNV_VOID ctx, NV_SINT32 type, PNV_VOID lock)
{
@@ -1776,7 +1776,7 @@ nve_oslockrelease(PNV_VOID ctx, NV_SINT32 type, PNV_VOID lock)
}
/* I have no idea what this is for */
-static PNV_VOID
+static NV_API_CALL PNV_VOID
nve_osreturnbufvirt(PNV_VOID ctx, PNV_VOID readdata)
{
OpenPOWER on IntegriCloud