summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorMark Kettenis <kettenis@cvs.openbsd.org>2015-03-21 18:02:59 +0000
committerMark Kettenis <kettenis@cvs.openbsd.org>2015-03-21 18:02:59 +0000
commita1256b58c51cc0c0da3b3a16de4666f0f78790e6 (patch)
treea7003a62edc2842f58fe9e162251b0660cd8e46e /sys
parent682c33310efe8880ad42f1dd6d9868bd2809ac4c (diff)
Only reconfigure LDC queues ipon reset instead of unconfiguring them first.
This makes sure the other side correctly sees the channel being reset.
Diffstat (limited to 'sys')
-rw-r--r--sys/arch/sparc64/dev/ldc.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/sys/arch/sparc64/dev/ldc.c b/sys/arch/sparc64/dev/ldc.c
index ad7fa4b267c..d7e0de58fda 100644
--- a/sys/arch/sparc64/dev/ldc.c
+++ b/sys/arch/sparc64/dev/ldc.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ldc.c,v 1.11 2014/09/29 17:43:29 kettenis Exp $ */
+/* $OpenBSD: ldc.c,v 1.12 2015/03/21 18:02:58 kettenis Exp $ */
/*
* Copyright (c) 2009 Mark Kettenis
*
@@ -474,10 +474,6 @@ ldc_reset(struct ldc_conn *lc)
DPRINTF(("Resetting connection\n"));
mtx_enter(&lc->lc_txq->lq_mtx);
- hv_ldc_tx_qconf(lc->lc_id, 0, 0);
- hv_ldc_rx_qconf(lc->lc_id, 0, 0);
- lc->lc_tx_state = lc->lc_rx_state = LDC_CHANNEL_DOWN;
-
err = hv_ldc_tx_qconf(lc->lc_id,
lc->lc_txq->lq_map->dm_segs[0].ds_addr, lc->lc_txq->lq_nentries);
if (err != H_EOK)
@@ -490,6 +486,7 @@ ldc_reset(struct ldc_conn *lc)
lc->lc_tx_seqid = 0;
lc->lc_state = 0;
+ lc->lc_tx_state = lc->lc_rx_state = LDC_CHANNEL_DOWN;
mtx_leave(&lc->lc_txq->lq_mtx);
lc->lc_reset(lc);