summaryrefslogtreecommitdiff
path: root/sys/arch
diff options
context:
space:
mode:
authorMark Kettenis <kettenis@cvs.openbsd.org>2009-01-17 20:18:17 +0000
committerMark Kettenis <kettenis@cvs.openbsd.org>2009-01-17 20:18:17 +0000
commit734e401a06c3fd1808628861bab9653af16377e5 (patch)
treed0ca0ba0189776cfd2e9db9c9eaa03d5c771439a /sys/arch
parentbd4d74da244c8ef95cf041760072b7d751bbba10 (diff)
Sync vio_sendmsg() with equivalent code in vdsk(4).
Diffstat (limited to 'sys/arch')
-rw-r--r--sys/arch/sparc64/dev/vnet.c18
1 files changed, 3 insertions, 15 deletions
diff --git a/sys/arch/sparc64/dev/vnet.c b/sys/arch/sparc64/dev/vnet.c
index 2ac50979708..436a811014a 100644
--- a/sys/arch/sparc64/dev/vnet.c
+++ b/sys/arch/sparc64/dev/vnet.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: vnet.c,v 1.10 2009/01/16 16:51:30 kettenis Exp $ */
+/* $OpenBSD: vnet.c,v 1.11 2009/01/17 20:18:16 kettenis Exp $ */
/*
* Copyright (c) 2009 Mark Kettenis
*
@@ -797,9 +797,6 @@ vio_sendmsg(struct vnet_softc *sc, void *msg, size_t len)
uint64_t tx_head, tx_tail, tx_state;
int err;
-#if 0
- printf("%s\n", __func__);
-#endif
err = hv_ldc_tx_get_state(lc->lc_id, &tx_head, &tx_tail, &tx_state);
if (err != H_EOK)
return;
@@ -808,20 +805,11 @@ vio_sendmsg(struct vnet_softc *sc, void *msg, size_t len)
bzero(lp, sizeof(struct ldc_pkt));
lp->type = LDC_DATA;
lp->stype = LDC_INFO;
- lp->env = 56 | LDC_FRAG_STOP | LDC_FRAG_START;
+ KASSERT((len & ~LDC_LEN_MASK) == 0);
+ lp->env = len | LDC_FRAG_STOP | LDC_FRAG_START;
lp->seqid = lc->lc_tx_seqid++;
bcopy(msg, &lp->major, len);
-#if 0
-{
- uint64_t *p = (uint64_t *)(sc->sc_txq->lq_va + tx_tail);
- int i;
-
- for (i = 0; i < 8; i++)
- printf("word %d: 0x%016lx\n", i, p[i]);
-}
-#endif
-
tx_tail += sizeof(*lp);
tx_tail &= ((lc->lc_txq->lq_nentries * sizeof(*lp)) - 1);
err = hv_ldc_tx_set_qtail(lc->lc_id, tx_tail);