From 6644224f792447cd0a6edbe206e6ee8aacd15728 Mon Sep 17 00:00:00 2001 From: Chuck Anderson Date: Fri, 17 Feb 2017 20:59:43 -0800 Subject: [PATCH] Revert "sparc: fix intermittent LDom hang waiting for vdc_port_up" This reverts commit 94ac2958dd26064af74f49a966e3b7e3bd4dccfe. Orabug: 25409637 --- arch/sparc/kernel/ldc.c | 39 ++++----------------------------------- drivers/block/sunvdc.c | 3 --- 2 files changed, 4 insertions(+), 38 deletions(-) diff --git a/arch/sparc/kernel/ldc.c b/arch/sparc/kernel/ldc.c index db77bf5c456e..3c90408ea2de 100644 --- a/arch/sparc/kernel/ldc.c +++ b/arch/sparc/kernel/ldc.c @@ -1359,9 +1359,6 @@ EXPORT_SYMBOL(ldc_free); int ldc_bind(struct ldc_channel *lp) { unsigned long hv_err, flags; - unsigned long head, tail, chan_state; - int limit = 1000; - bool wait_for_channel_reset = false; int err = -EINVAL; if (lp->state != LDC_STATE_INIT) @@ -1375,19 +1372,6 @@ int ldc_bind(struct ldc_channel *lp) lp->flags |= LDC_FLAG_REGISTERED_IRQS; err = -ENODEV; - - /* sun4v_ldc_rx_get_state() will return 0 if this ldc channel - * was previously configured. If so, after setting the new - * configuration, we need to wait for the channel to reset - * so that the seqid is reset to 0. - */ - hv_err = sun4v_ldc_rx_get_state(lp->id, - &head, - &tail, - &chan_state); - if (hv_err == 0) - wait_for_channel_reset = true; - hv_err = sun4v_ldc_tx_qconf(lp->id, 0, 0); if (hv_err) goto out_free_irqs; @@ -1416,25 +1400,10 @@ int ldc_bind(struct ldc_channel *lp) lp->tx_acked = lp->tx_head; - /* if the channel was previously configured, wait for - * channel state to go into resetting or wait until we - * have received a packet from the other end. - */ - while (limit-- > 0) { - hv_err = sun4v_ldc_rx_get_state(lp->id, - &lp->rx_head, - &lp->rx_tail, - &lp->chan_state); - if (!wait_for_channel_reset) - break; - if ((lp->chan_state == LDC_CHANNEL_RESETTING) || - (lp->rx_head != lp->rx_tail)) - break; - udelay(1); - } - if (limit <= 0) - pr_warn("ldc: channel %lu failed to reset\n", lp->id); - + 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; diff --git a/drivers/block/sunvdc.c b/drivers/block/sunvdc.c index 36246ef85746..d61b7ea94371 100644 --- a/drivers/block/sunvdc.c +++ b/drivers/block/sunvdc.c @@ -917,10 +917,7 @@ static int vdc_port_up(struct vdc_port *port) comp.waiting_for = WAITING_FOR_LINK_UP; port->vio.cmp = ∁ - ldc_disable_hv_intr(port->vio.lp); vio_port_up(&port->vio); - ldc_enable_hv_intr(port->vio.lp); - wait_for_completion(&comp.com); return comp.err; } -- 2.50.1