From patchwork Fri Oct 27 17:59:36 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jacob Keller X-Patchwork-Id: 13438700 X-Patchwork-Delegate: kuba@kernel.org Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net [23.128.96.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 685CB1946F for ; Fri, 27 Oct 2023 17:59:54 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="WzcYYKE2" Received: from mgamail.intel.com (mgamail.intel.com [134.134.136.65]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EDD3812A for ; Fri, 27 Oct 2023 10:59:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1698429592; x=1729965592; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=uWsZiTkODDtNj2q1pQXQ4oTtKgkB/66wuiU6KJaIQWM=; b=WzcYYKE2xemAAr+NCqcrHfs1yKUsp52T2/SfEFz6T/Fng3VJqddhlC6I 8ZBB7gJDMSdiOJ8OntDrY1sYpqV/O5hyDjGfn79WymNQVpj0MNbR0jZmC Of0bFoXtU/0NrG5zbSTge6+BOOPnbH/sN0ktVs7rUokKS/jfjIy/9/t68 i15OxdZ2X661KQFY3q2pdKzg8DdaxbTOcE/cNXZr6yHq5nMzYJ14LyoLb QzNg+vpwOXVL6EnhGpmpcMsDA00depCZhH/ENlYUzreWElelMYA6yFkFB zGMWIa9U/WCdnU2gdjNDZ2NaMk0ljqTKMBiBpbwT+Ej6RZInXDlXkW5f5 w==; X-IronPort-AV: E=McAfee;i="6600,9927,10876"; a="391695515" X-IronPort-AV: E=Sophos;i="6.03,256,1694761200"; d="scan'208";a="391695515" Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by orsmga103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 27 Oct 2023 10:59:49 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10876"; a="830064624" X-IronPort-AV: E=Sophos;i="6.03,256,1694761200"; d="scan'208";a="830064624" Received: from jekeller-desk.amr.corp.intel.com (HELO jekeller-desk.jekeller.internal) ([10.166.241.1]) by fmsmga004-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 27 Oct 2023 10:59:47 -0700 From: Jacob Keller To: netdev@vger.kernel.org, David Miller , Jakub Kicinski Cc: Michal Schmidt , Wojciech Drewek , Rafal Romanowski , Jacob Keller Subject: [PATCH net-next v2 3/8] iavf: in iavf_down, don't queue watchdog_task if comms failed Date: Fri, 27 Oct 2023 10:59:36 -0700 Message-ID: <20231027175941.1340255-4-jacob.e.keller@intel.com> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20231027175941.1340255-1-jacob.e.keller@intel.com> References: <20231027175941.1340255-1-jacob.e.keller@intel.com> Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Patchwork-Delegate: kuba@kernel.org From: Michal Schmidt The reason for queueing watchdog_task is to have it process the aq_required flags that are being set here. If comms failed, there's nothing to do, so return early. Signed-off-by: Michal Schmidt Reviewed-by: Wojciech Drewek Tested-by: Rafal Romanowski Signed-off-by: Jacob Keller --- No changes since v1. drivers/net/ethernet/intel/iavf/iavf_main.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/net/ethernet/intel/iavf/iavf_main.c b/drivers/net/ethernet/intel/iavf/iavf_main.c index 502ebba2e879..38432455fe9e 100644 --- a/drivers/net/ethernet/intel/iavf/iavf_main.c +++ b/drivers/net/ethernet/intel/iavf/iavf_main.c @@ -1420,8 +1420,10 @@ void iavf_down(struct iavf_adapter *adapter) iavf_clear_fdir_filters(adapter); iavf_clear_adv_rss_conf(adapter); - if (!(adapter->flags & IAVF_FLAG_PF_COMMS_FAILED) && - !(test_bit(__IAVF_IN_REMOVE_TASK, &adapter->crit_section))) { + if (adapter->flags & IAVF_FLAG_PF_COMMS_FAILED) + return; + + if (!test_bit(__IAVF_IN_REMOVE_TASK, &adapter->crit_section)) { /* cancel any current operation */ adapter->current_op = VIRTCHNL_OP_UNKNOWN; /* Schedule operations to close down the HW. Don't wait