From 713ba04d262f51651d7fb2e484922996bb36508c Mon Sep 17 00:00:00 2001 From: Dave Kleikamp Date: Tue, 17 Nov 2015 16:05:51 -0600 Subject: [PATCH] sparc: After kexec, ldc_bind needs to reset rx_head Orabug: 21627005 Occasionally, the crash kernel will fail to configure a virtual disk because the hypervisor leaves an old request in the rx queue even after it is reconfigured in ldc_bind(). Fix this with a call to ldc_rx_reset(). Signed-off-by: Dave Kleikamp --- arch/sparc/kernel/ldc.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/arch/sparc/kernel/ldc.c b/arch/sparc/kernel/ldc.c index 0f5aad4da8d4..151ed5cdf546 100644 --- a/arch/sparc/kernel/ldc.c +++ b/arch/sparc/kernel/ldc.c @@ -1394,6 +1394,16 @@ int ldc_bind(struct ldc_channel *lp) lp->tx_acked = lp->tx_head; + hv_err = sun4v_ldc_rx_get_state(lp->id, + &lp->rx_head, + &lp->rx_tail, + &lp->chan_state); + if (hv_err) + goto out_unmap_rx; + + ldc_rx_reset(lp); + lp->rx_head = lp->rx_tail; + lp->hs_state = LDC_HS_OPEN; ldc_set_state(lp, LDC_STATE_BOUND); -- 2.50.1