summaryrefslogtreecommitdiff
path: root/sys/arch/sparc64
diff options
context:
space:
mode:
Diffstat (limited to 'sys/arch/sparc64')
-rw-r--r--sys/arch/sparc64/dev/vdsp.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/sys/arch/sparc64/dev/vdsp.c b/sys/arch/sparc64/dev/vdsp.c
index 9fedc903111..009b8b8b4b9 100644
--- a/sys/arch/sparc64/dev/vdsp.c
+++ b/sys/arch/sparc64/dev/vdsp.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: vdsp.c,v 1.16 2012/12/03 19:57:04 kettenis Exp $ */
+/* $OpenBSD: vdsp.c,v 1.17 2012/12/08 12:35:04 kettenis Exp $ */
/*
* Copyright (c) 2009, 2011 Mark Kettenis
*
@@ -719,16 +719,16 @@ vdsp_rx_vio_dring_data(struct vdsp_softc *sc, struct vio_msg_tag *tag)
pmap_extract(pmap_kernel(), va, &pa);
nbytes = min(size, PAGE_SIZE - (off & PAGE_MASK));
err = hv_ldc_copy(sc->sc_lc.lc_id, LDC_COPY_IN,
- sc->sc_dring_cookie.addr | off, pa,
+ sc->sc_dring_cookie.addr + off, pa,
nbytes, &nbytes);
+ if (err != H_EOK) {
+ printf("%s: hv_ldc_copy %d\n", __func__, err);
+ return;
+ }
va += nbytes;
size -= nbytes;
off += nbytes;
}
- if (err != H_EOK) {
- printf("%s: hv_ldc_copy %d\n", __func__, err);
- return;
- }
DPRINTF(("%s: start_idx %d, end_idx %d, operation %x\n",
sc->sc_dv.dv_xname, dm->start_idx, dm->end_idx,
@@ -1575,15 +1575,15 @@ vdsp_ack_desc(struct vdsp_softc *sc, struct vd_desc *vd)
pmap_extract(pmap_kernel(), va, &pa);
nbytes = min(size, PAGE_SIZE - (off & PAGE_MASK));
err = hv_ldc_copy(sc->sc_lc.lc_id, LDC_COPY_OUT,
- sc->sc_dring_cookie.addr | off, pa, nbytes, &nbytes);
+ sc->sc_dring_cookie.addr + off, pa, nbytes, &nbytes);
+ if (err != H_EOK) {
+ printf("%s: hv_ldc_copy %d\n", __func__, err);
+ return;
+ }
va += nbytes;
size -= nbytes;
off += nbytes;
}
- if (err != H_EOK) {
- printf("%s: hv_ldc_copy %d\n", __func__, err);
- return;
- }
/* ACK the descriptor. */
bzero(&dm, sizeof(dm));