diff mbox series

[net,v2,3/3] ibmvnic: skip tx timeout reset while in resetting

Message ID 20201120224013.46891-4-ljp@linux.ibm.com
State New
Headers show
Series ibmvnic: fixes in reset path | expand

Commit Message

Lijun Pan Nov. 20, 2020, 10:40 p.m. UTC
Sometimes it takes longer than 5 seconds (watchdog timeout) to complete
failover, migration, and other resets. In stead of scheduling another
timeout reset, we wait for the current one to complete.

Suggested-by: Brian King <brking@linux.vnet.ibm.com>
Signed-off-by: Lijun Pan <ljp@linux.ibm.com>
---
v2: no change

 drivers/net/ethernet/ibm/ibmvnic.c | 6 ++++++
 1 file changed, 6 insertions(+)

Comments

drt Nov. 20, 2020, 10:55 p.m. UTC | #1
On 2020-11-20 14:40, Lijun Pan wrote:
> Sometimes it takes longer than 5 seconds (watchdog timeout) to complete
> failover, migration, and other resets. In stead of scheduling another
> timeout reset, we wait for the current one to complete.
> 
> Suggested-by: Brian King <brking@linux.vnet.ibm.com>
> Signed-off-by: Lijun Pan <ljp@linux.ibm.com>

Reviewed-by: Dany Madden <drt@linux.ibm.com>

> ---
> v2: no change
> 
>  drivers/net/ethernet/ibm/ibmvnic.c | 6 ++++++
>  1 file changed, 6 insertions(+)
> 
> diff --git a/drivers/net/ethernet/ibm/ibmvnic.c
> b/drivers/net/ethernet/ibm/ibmvnic.c
> index 9665532a9ed2..2aa40b2f225c 100644
> --- a/drivers/net/ethernet/ibm/ibmvnic.c
> +++ b/drivers/net/ethernet/ibm/ibmvnic.c
> @@ -2356,6 +2356,12 @@ static void ibmvnic_tx_timeout(struct
> net_device *dev, unsigned int txqueue)
>  {
>  	struct ibmvnic_adapter *adapter = netdev_priv(dev);
> 
> +	if (test_bit(0, &adapter->resetting)) {
> +		netdev_err(adapter->netdev,
> +			   "Adapter is resetting, skip timeout reset\n");
> +		return;
> +	}
> +
>  	ibmvnic_reset(adapter, VNIC_RESET_TIMEOUT);
>  }
diff mbox series

Patch

diff --git a/drivers/net/ethernet/ibm/ibmvnic.c b/drivers/net/ethernet/ibm/ibmvnic.c
index 9665532a9ed2..2aa40b2f225c 100644
--- a/drivers/net/ethernet/ibm/ibmvnic.c
+++ b/drivers/net/ethernet/ibm/ibmvnic.c
@@ -2356,6 +2356,12 @@  static void ibmvnic_tx_timeout(struct net_device *dev, unsigned int txqueue)
 {
 	struct ibmvnic_adapter *adapter = netdev_priv(dev);
 
+	if (test_bit(0, &adapter->resetting)) {
+		netdev_err(adapter->netdev,
+			   "Adapter is resetting, skip timeout reset\n");
+		return;
+	}
+
 	ibmvnic_reset(adapter, VNIC_RESET_TIMEOUT);
 }