]> git.baikalelectronics.ru Git - kernel.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)
committerDavid S. Miller <davem@davemloft.net>
Tue, 1 Dec 2020 18:09:04 +0000 (10:09 -0800)
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>
drivers/net/ethernet/ibm/ibmvnic.c

index 0e34c36c3e86f6576cdcb61a11aef4e1ac481035..da9450f187176a3cada15670365689b14c459bfd 100644 (file)
@@ -3128,11 +3128,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]);
                        if (index & IBMVNIC_TSO_POOL_MASK) {
                                tx_pool = &adapter->tso_pool[pool];