]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
sparc: After kexec, ldc_bind needs to reset rx_head
authorDave Kleikamp <dave.kleikamp@oracle.com>
Tue, 17 Nov 2015 22:05:51 +0000 (16:05 -0600)
committerDave Kleikamp <dave.kleikamp@oracle.com>
Mon, 18 Apr 2016 16:42:51 +0000 (11:42 -0500)
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 <dave.kleikamp@oracle.com>
arch/sparc/kernel/ldc.c

index 0f5aad4da8d43aa118ea0a3213aea3245baeb827..151ed5cdf5464182aa3c62ff5a03969ff87d835a 100644 (file)
@@ -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);