]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
Revert "sparc: fix intermittent LDom hang waiting for vdc_port_up"
authorChuck Anderson <chuck.anderson@oracle.com>
Sat, 18 Feb 2017 04:59:43 +0000 (20:59 -0800)
committerChuck Anderson <chuck.anderson@oracle.com>
Thu, 9 Mar 2017 03:30:15 +0000 (19:30 -0800)
This reverts commit 94ac2958dd26064af74f49a966e3b7e3bd4dccfe.

Orabug: 25409637

arch/sparc/kernel/ldc.c
drivers/block/sunvdc.c

index db77bf5c456ec1a58519827b3c0358e6a9193193..3c90408ea2de44482963a3ffbca0386c3623a63e 100644 (file)
@@ -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;
 
index 36246ef85746e5291a0f9fa177cea32708b3745a..d61b7ea943719fdfd8416e7306addffa8bd18b82 100644 (file)
@@ -917,10 +917,7 @@ static int vdc_port_up(struct vdc_port *port)
        comp.waiting_for = WAITING_FOR_LINK_UP;
        port->vio.cmp = &comp;
 
-       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;
 }