Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/pci make it compile on amd64
details: https://anonhg.NetBSD.org/src/rev/4593fc505208
branches: trunk
changeset: 327907:4593fc505208
user: christos <christos%NetBSD.org@localhost>
date: Thu Mar 20 20:41:11 2014 +0000
description:
make it compile on amd64
diffstat:
sys/dev/pci/oboe.c | 19 ++++++++++---------
1 files changed, 10 insertions(+), 9 deletions(-)
diffs (75 lines):
diff -r 9bf395814057 -r 4593fc505208 sys/dev/pci/oboe.c
--- a/sys/dev/pci/oboe.c Thu Mar 20 20:40:42 2014 +0000
+++ b/sys/dev/pci/oboe.c Thu Mar 20 20:41:11 2014 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: oboe.c,v 1.39 2012/10/27 17:18:35 chs Exp $ */
+/* $NetBSD: oboe.c,v 1.40 2014/03/20 20:41:11 christos Exp $ */
/* XXXXFVDL THIS DRIVER IS BROKEN FOR NON-i386 -- vtophys() usage */
@@ -38,7 +38,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: oboe.c,v 1.39 2012/10/27 17:18:35 chs Exp $");
+__KERNEL_RCSID(0, "$NetBSD: oboe.c,v 1.40 2014/03/20 20:41:11 christos Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -298,9 +298,9 @@
int s;
int slot;
- DPRINTF(("%s: resid=%d, iovcnt=%d, offset=%ld\n",
+ DPRINTF(("%s: resid=%zu, iovcnt=%d, offset=%td\n",
__func__, uio->uio_resid, uio->uio_iovcnt,
- (long)uio->uio_offset));
+ uio->uio_offset));
s = splir();
while (sc->sc_saved == 0) {
@@ -324,7 +324,7 @@
slot = (sc->sc_rxs - sc->sc_saved + RX_SLOTS) % RX_SLOTS;
if (uio->uio_resid < sc->sc_lens[slot]) {
DPRINTF(("oboe_read: uio buffer smaller than frame size"
- "(%d < %d)\n", uio->uio_resid, sc->sc_lens[slot]));
+ "(%zu < %d)\n", uio->uio_resid, sc->sc_lens[slot]));
error = EINVAL;
} else {
DPRINTF(("oboe_read: moving %d bytes from %p\n",
@@ -618,14 +618,14 @@
sc->sc_taskfile->xmit[i].len = 0;
sc->sc_taskfile->xmit[i].control = 0x00;
sc->sc_taskfile->xmit[i].buffer =
- vtophys((u_int)sc->sc_xmit_bufs[i]); /* u_int? */
+ vtophys((uintptr_t)sc->sc_xmit_bufs[i]);
}
for (i = 0; i < RX_SLOTS; ++i) {
sc->sc_taskfile->recv[i].len = 0;
sc->sc_taskfile->recv[i].control = 0x83;
sc->sc_taskfile->recv[i].buffer =
- vtophys((u_int)sc->sc_recv_bufs[i]); /* u_int? */
+ vtophys((uintptr_t)sc->sc_recv_bufs[i]);
}
sc->sc_txpending = 0;
@@ -638,7 +638,8 @@
{
int i;
/* XXX */
- uint32_t addr = (uint32_t)malloc(OBOE_TASK_BUF_LEN, M_DEVBUF, M_WAITOK);
+ uintptr_t addr =
+ (uintptr_t)malloc(OBOE_TASK_BUF_LEN, M_DEVBUF, M_WAITOK);
if (addr == 0) {
goto bad;
}
@@ -686,7 +687,7 @@
OUTB(sc, 0x0f, OBOE_REG_1A);
OUTB(sc, 0xff, OBOE_REG_1B);
- physaddr = vtophys((u_int)sc->sc_taskfile); /* u_int? */
+ physaddr = vtophys((uintptr_t)sc->sc_taskfile);
OUTB(sc, (physaddr >> 0x0a) & 0xff, OBOE_TFP0);
OUTB(sc, (physaddr >> 0x12) & 0xff, OBOE_TFP1);
Home |
Main Index |
Thread Index |
Old Index