]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commitdiff
NTB: Do not advance transport RX on link down
authorAllen Hubbe <Allen.Hubbe@emc.com>
Tue, 12 May 2015 10:24:27 +0000 (06:24 -0400)
committerJon Mason <jdmason@kudzu.us>
Sat, 4 Jul 2015 18:06:24 +0000 (14:06 -0400)
On link down, don't advance RX index to the next entry.  The next entry
should never be valid after receiving the link down flag.

Signed-off-by: Allen Hubbe <Allen.Hubbe@emc.com>
Signed-off-by: Jon Mason <jdmason@kudzu.us>
drivers/ntb/ntb_transport.c

index 8d9b59f7fa07ae167f847047e1f39bd47dfd7406..0f86b60a0c0eeba501d05983e8dbb1907d79e3d2 100644 (file)
@@ -1212,8 +1212,7 @@ static int ntb_process_rxc(struct ntb_transport_qp *qp)
                dev_dbg(&qp->ndev->pdev->dev, "link down flag set\n");
                ntb_qp_link_down(qp);
                hdr->flags = 0;
-               iowrite32(qp->rx_index, &qp->rx_info->entry);
-               return 0;
+               return -EAGAIN;
        }
 
        if (hdr->ver != (u32)qp->rx_pkts) {