From: Dave Kleikamp Date: Tue, 17 Nov 2015 22:05:51 +0000 (-0600) Subject: sparc: After kexec, ldc_bind needs to reset rx_head X-Git-Tag: v4.1.12-92~147^2~3^2~2 X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=713ba04d262f51651d7fb2e484922996bb36508c;p=users%2Fjedix%2Flinux-maple.git 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 --- 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);