]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commitdiff
ibmvnic: skip send_request_unmap for timeout reset
authorLijun Pan <ljp@linux.ibm.com>
Sat, 13 Feb 2021 02:49:00 +0000 (20:49 -0600)
committerDavid S. Miller <davem@davemloft.net>
Mon, 15 Feb 2021 23:12:26 +0000 (15:12 -0800)
Timeout reset will trigger the VIOS to unmap it automatically,
similarly as FAILVOER and MOBILITY events. If we unmap it
in the linux side, we will see errors like
"30000003: Error 4 in REQUEST_UNMAP_RSP".
So, don't call send_request_unmap for timeout reset.

Fixes: ed651a10875f ("ibmvnic: Updated reset handling")
Signed-off-by: Lijun Pan <ljp@linux.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/ibm/ibmvnic.c

index f6402a20ba320bb36059d7e97eea6690cb980c51..cd201f89ce6c009534b40fc7d6e72ca11ab35a06 100644 (file)
@@ -247,8 +247,13 @@ static void free_long_term_buff(struct ibmvnic_adapter *adapter,
        if (!ltb->buff)
                return;
 
+       /* VIOS automatically unmaps the long term buffer at remote
+        * end for the following resets:
+        * FAILOVER, MOBILITY, TIMEOUT.
+        */
        if (adapter->reset_reason != VNIC_RESET_FAILOVER &&
-           adapter->reset_reason != VNIC_RESET_MOBILITY)
+           adapter->reset_reason != VNIC_RESET_MOBILITY &&
+           adapter->reset_reason != VNIC_RESET_TIMEOUT)
                send_request_unmap(adapter, ltb->map_id);
        dma_free_coherent(dev, ltb->size, ltb->buff, ltb->addr);
 }