Module Name: src Committed By: christos Date: Thu Mar 20 20:41:11 UTC 2014
Modified Files: src/sys/dev/pci: oboe.c Log Message: make it compile on amd64 To generate a diff of this commit: cvs rdiff -u -r1.39 -r1.40 src/sys/dev/pci/oboe.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/sys/dev/pci/oboe.c diff -u src/sys/dev/pci/oboe.c:1.39 src/sys/dev/pci/oboe.c:1.40 --- src/sys/dev/pci/oboe.c:1.39 Sat Oct 27 13:18:35 2012 +++ src/sys/dev/pci/oboe.c Thu Mar 20 16:41:11 2014 @@ -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 @@ oboe_read(void *h, struct uio *uio, int 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 @@ oboe_read(void *h, struct uio *uio, int 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 @@ oboe_init_taskfile(struct oboe_softc *sc 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 @@ oboe_alloc_taskfile(struct oboe_softc *s { 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 @@ oboe_startchip (struct oboe_softc *sc) 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);