]> www.infradead.org Git - users/dwmw2/linux.git/commitdiff
ibmvnic: Fix TX completion error handling
authorThomas Falcon <tlfalcon@linux.ibm.com>
Tue, 1 Dec 2020 15:52:11 +0000 (09:52 -0600)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 8 Dec 2020 09:17:33 +0000 (10:17 +0100)
[ Upstream commit ba246c175116e2e8fa4fdfa5f8e958e086a9a818 ]

TX completions received with an error return code are not
being processed properly. When an error code is seen, do not
proceed to the next completion before cleaning up the existing
entry's data structures.

Fixes: 032c5e82847a ("Driver for IBM System i/p VNIC protocol")
Signed-off-by: Thomas Falcon <tlfalcon@linux.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/net/ethernet/ibm/ibmvnic.c

index 401c54ed49fdb02219c5f0c238326cb973ae1ad4..058b4d0c5a710121cfee56ae083b453596beb348 100644 (file)
@@ -2192,11 +2192,9 @@ restart_loop:
 
                next = ibmvnic_next_scrq(adapter, scrq);
                for (i = 0; i < next->tx_comp.num_comps; i++) {
-                       if (next->tx_comp.rcs[i]) {
+                       if (next->tx_comp.rcs[i])
                                dev_err(dev, "tx error %x\n",
                                        next->tx_comp.rcs[i]);
-                               continue;
-                       }
                        index = be32_to_cpu(next->tx_comp.correlators[i]);
                        txbuff = &adapter->tx_pool[pool].tx_buff[index];