From patchwork Wed May 1 00:30:53 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Chan X-Patchwork-Id: 13650146 X-Patchwork-Delegate: kuba@kernel.org Received: from mail-qt1-f169.google.com (mail-qt1-f169.google.com [209.85.160.169]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id BD2D41396 for ; Wed, 1 May 2024 00:31:43 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.160.169 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714523505; cv=none; b=Vj8YmlbxOkIt+RG6HgyT/eWL+LH25Tr+skUWzToWM3PkEXqN3vkawrwvle0Pxb4a9ewdCPDWYqCMCnn8oyvrbYmMuPk6UBfbI754C/VuOrCcJK3REm/7aHWXtNHDwEJTsr/2P973kwzzrDq3txMCxX3joKZVYj8/PR4a3y/cZI0= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714523505; c=relaxed/simple; bh=8EkBrHADJG17oSsEjpxI/Il8OptYj/7D0e4WPrJXm/M=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version:Content-Type; b=Wsk14Y+DUiaXWP5lRZk2yDWF1rkwjlfFE5U0Zfg45ZfpYRQo//OnQH/F1Fndsa0HLJEHcyOsNvDIoQMCPuI7qvKLsTK/M5l1DzMhBOvFh+h6AmNtuQHaZPjqwGQaCK9+8NNSkK9ICx/tVYxwbGryMPNxG9Wp7sAAnkaSoQIiUfw= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=broadcom.com; spf=fail smtp.mailfrom=broadcom.com; dkim=pass (1024-bit key) header.d=broadcom.com header.i=@broadcom.com header.b=G9mMnzOe; arc=none smtp.client-ip=209.85.160.169 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=broadcom.com Authentication-Results: smtp.subspace.kernel.org; spf=fail smtp.mailfrom=broadcom.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=broadcom.com header.i=@broadcom.com header.b="G9mMnzOe" Received: by mail-qt1-f169.google.com with SMTP id d75a77b69052e-4376e3fd7e4so36026491cf.2 for ; Tue, 30 Apr 2024 17:31:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=broadcom.com; s=google; t=1714523502; x=1715128302; darn=vger.kernel.org; h=mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:from:to:cc:subject:date:message-id:reply-to; bh=M0wieHZd7Yq81x5Pn5y7/Ee4GnAJ/TlYf6hO6rbzXrY=; b=G9mMnzOe+5htpzaobhJ6lHhsguYSRXf1/oUr/bx1+CcfRRvjBFrrO7xXqfIyjUs3X2 OVTH+M8d1SvKNUqglqzNGo80WcNKNpWGvS+7XbtyXhd6u83+9bnahcTMOBrBeWK1cJmA GVlomKWcUf8iMUBTCMBMtPeB+Rcv1E6W3fJRU= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1714523502; x=1715128302; h=mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=M0wieHZd7Yq81x5Pn5y7/Ee4GnAJ/TlYf6hO6rbzXrY=; b=jgHNOVp0DDZ8RXP1dCb5M2heaCVaqrRwFMRMMij7bcNILpddTuERo86/osgdT5D7kM G+4y2rqJGWdZJR48VumcbHURuRGSPWYzd5RwjWPchq4HYO8DmkcJ6g/xBWrLzxypqJeV Y5Ob6qCHAkBeWYm+XMscnXxQnQvbL8PnmgLDay0mItvMUzw+CZAYBcjNuwbI736oqD4f Ii9da6ieTL0Ac6bElP7nYV4H8phzNn5jn20/yhl0VQVrKUnFmmPoNBHi2adiIZxD6MHS f5fROhL4MZa30amfOBXkmlpvbMXwZDbUTvvrxjEJ/tKsJiqiZbSyyUeShyHJpzdy8X3w SuCA== X-Gm-Message-State: AOJu0YwyDue4D9lKa06JkJbcrPJJ3b/aahG6i2Ra8H7DkTJpqJqvCJWi 3rIWT1yoQFFJGUS2cjbh3vLt6ZU8FsrIaPa1lIpEB00gHw5oj7+//33J5gBfsg== X-Google-Smtp-Source: AGHT+IEJCK4LesfDo9rWb51qaWvPKaFpWTtAij/KYBvYalRJA0ZCrDkyYyyzi+9gNzNa2JdddoLt9A== X-Received: by 2002:a05:622a:1355:b0:43a:f262:ec6e with SMTP id w21-20020a05622a135500b0043af262ec6emr975505qtk.32.1714523502384; Tue, 30 Apr 2024 17:31:42 -0700 (PDT) Received: from lvnvda5233.lvn.broadcom.net ([192.19.161.250]) by smtp.gmail.com with ESMTPSA id f15-20020ac8470f000000b0043a7cb47069sm4337935qtp.9.2024.04.30.17.31.40 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Tue, 30 Apr 2024 17:31:41 -0700 (PDT) From: Michael Chan To: davem@davemloft.net Cc: netdev@vger.kernel.org, edumazet@google.com, kuba@kernel.org, pabeni@redhat.com, andrew.gospodarek@broadcom.com, Pavan Chebbi Subject: [PATCH net-next v2 3/6] bnxt_en: Don't call ULP_STOP/ULP_START during L2 reset Date: Tue, 30 Apr 2024 17:30:53 -0700 Message-Id: <20240501003056.100607-4-michael.chan@broadcom.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20240501003056.100607-1-michael.chan@broadcom.com> References: <20240501003056.100607-1-michael.chan@broadcom.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 There is no need to call ULP_STOP and ULP_START before and after the L2 reset in bnxt_reset_task(). This L2 reset is done after detecting TX timeout, RX ring errors, or VF config changes. The L2 reset does not affect RoCE since the firmware is not reset and the backing store is left alone. Reviewed-by: Andy Gospodarek Reviewed-by: Pavan Chebbi Signed-off-by: Michael Chan Reviewed-by: Simon Horman --- drivers/net/ethernet/broadcom/bnxt/bnxt.c | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/drivers/net/ethernet/broadcom/bnxt/bnxt.c b/drivers/net/ethernet/broadcom/bnxt/bnxt.c index 98bff01b89ff..a4ab1b09b27b 100644 --- a/drivers/net/ethernet/broadcom/bnxt/bnxt.c +++ b/drivers/net/ethernet/broadcom/bnxt/bnxt.c @@ -13089,17 +13089,8 @@ static void bnxt_reset_task(struct bnxt *bp, bool silent) if (!silent) bnxt_dbg_dump_states(bp); if (netif_running(bp->dev)) { - int rc; - - if (silent) { - bnxt_close_nic(bp, false, false); - bnxt_open_nic(bp, false, false); - } else { - bnxt_ulp_stop(bp); - bnxt_close_nic(bp, true, false); - rc = bnxt_open_nic(bp, true, false); - bnxt_ulp_start(bp, rc); - } + bnxt_close_nic(bp, !silent, false); + bnxt_open_nic(bp, !silent, false); } }