From patchwork Thu Nov 26 00:04:28 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dany Madden X-Patchwork-Id: 11932377 X-Patchwork-Delegate: kuba@kernel.org Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 999E9C6379D for ; Thu, 26 Nov 2020 00:09:44 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 3E48420B1F for ; Thu, 26 Nov 2020 00:09:44 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=ibm.com header.i=@ibm.com header.b="RMxHKhr6" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729349AbgKZAJn (ORCPT ); Wed, 25 Nov 2020 19:09:43 -0500 Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5]:19396 "EHLO mx0b-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727198AbgKZAJm (ORCPT ); Wed, 25 Nov 2020 19:09:42 -0500 Received: from pps.filterd (m0098417.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id 0AQ02nfg127340; Wed, 25 Nov 2020 19:09:38 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-transfer-encoding; s=pp1; bh=cFw+uSJ1cd8hPDNazQblCyis+UMfYlDD8Y3lfw6qeTk=; b=RMxHKhr6VBCHQzL7NtWFWNuHx2ipp5BwOaLMTnYcV7ZG8E6yssQ6oEWNIiOHqX14AynP 0aMJa15qBthFUiI7xSYRxX69BaxSEgZKaVsAGpLRw2WtOj1hxkG9JzwXADlfq+Vq+USG vh8qUTFINnkGg2Iy15I+nnkk4eFPgR7id95+dcVlqGmhQBe8Z/CZ1qKL9LQ+CWicpmes PCYfnC8/xWGpsjth0hHs3wJQwC+RfR/3KrnkkgiE8kFBzieguDDCAo3f1irrkqWEa9vz YGlYZHPbjmtsQetxUYaMtXnoTfyGkfoOAm5452LkYPsh1/TZfntsYyC+1gNKT0O1Tu9/ sw== Received: from ppma05wdc.us.ibm.com (1b.90.2fa9.ip4.static.sl-reverse.com [169.47.144.27]) by mx0a-001b2d01.pphosted.com with ESMTP id 351yjcjkyq-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 25 Nov 2020 19:09:38 -0500 Received: from pps.filterd (ppma05wdc.us.ibm.com [127.0.0.1]) by ppma05wdc.us.ibm.com (8.16.0.42/8.16.0.42) with SMTP id 0AQ07WZ4001026; Thu, 26 Nov 2020 00:09:37 GMT Received: from b01cxnp23034.gho.pok.ibm.com (b01cxnp23034.gho.pok.ibm.com [9.57.198.29]) by ppma05wdc.us.ibm.com with ESMTP id 34xth9b59j-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 26 Nov 2020 00:09:37 +0000 Received: from b01ledav006.gho.pok.ibm.com (b01ledav006.gho.pok.ibm.com [9.57.199.111]) by b01cxnp23034.gho.pok.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 0AQ09bnr6947382 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 26 Nov 2020 00:09:37 GMT Received: from b01ledav006.gho.pok.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 1CB07AC060; Thu, 26 Nov 2020 00:09:37 +0000 (GMT) Received: from b01ledav006.gho.pok.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id BE5A6AC059; Thu, 26 Nov 2020 00:09:36 +0000 (GMT) Received: from linux-i8xm.aus.stglabs.ibm.com (unknown [9.40.195.200]) by b01ledav006.gho.pok.ibm.com (Postfix) with ESMTP; Thu, 26 Nov 2020 00:09:36 +0000 (GMT) From: Dany Madden To: netdev@vger.kernel.org Cc: ljp@linux.ibm.com, sukadev@linux.ibm.com, linuxppc-dev@lists.ozlabs.org Subject: [PATCH net v3 5/9] ibmvnic: delay next reset if hard reset fails Date: Wed, 25 Nov 2020 18:04:28 -0600 Message-Id: <20201126000432.29897-6-drt@linux.ibm.com> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20201126000432.29897-1-drt@linux.ibm.com> References: <20201126000432.29897-1-drt@linux.ibm.com> MIME-Version: 1.0 X-TM-AS-GCONF: 00 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.312,18.0.737 definitions=2020-11-24_07:2020-11-24,2020-11-24 signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 bulkscore=0 impostorscore=0 suspectscore=1 mlxscore=0 spamscore=0 clxscore=1015 lowpriorityscore=0 phishscore=0 mlxlogscore=999 priorityscore=1501 adultscore=0 malwarescore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2009150000 definitions=main-2011240121 Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org X-Patchwork-Delegate: kuba@kernel.org From: Sukadev Bhattiprolu If auto-priority failover is enabled, the backing device needs time to settle if hard resetting fails for any reason. Add a delay of 60 seconds before retrying the hard-reset. Fixes: 2770a7984db5 ("ibmvnic: Introduce hard reset recovery") Signed-off-by: Sukadev Bhattiprolu --- drivers/net/ethernet/ibm/ibmvnic.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/drivers/net/ethernet/ibm/ibmvnic.c b/drivers/net/ethernet/ibm/ibmvnic.c index ff474a790181..e2f9b0e9dea8 100644 --- a/drivers/net/ethernet/ibm/ibmvnic.c +++ b/drivers/net/ethernet/ibm/ibmvnic.c @@ -2242,6 +2242,14 @@ static void __ibmvnic_reset(struct work_struct *work) rc = do_hard_reset(adapter, rwi, reset_state); rtnl_unlock(); } + if (rc) { + /* give backing device time to settle down */ + netdev_dbg(adapter->netdev, + "[S:%d] Hard reset failed, waiting 60 secs\n", + adapter->state); + set_current_state(TASK_UNINTERRUPTIBLE); + schedule_timeout(60 * HZ); + } } else if (!(rwi->reset_reason == VNIC_RESET_FATAL && adapter->from_passive_init)) { rc = do_reset(adapter, rwi, reset_state);