From patchwork Tue Apr 30 22:44:35 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Chan X-Patchwork-Id: 13650008 X-Patchwork-Delegate: kuba@kernel.org Received: from mail-pl1-f180.google.com (mail-pl1-f180.google.com [209.85.214.180]) (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 7E3881CD21 for ; Tue, 30 Apr 2024 22:46:17 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.214.180 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714517178; cv=none; b=pyy3VshZU55oCU76P4zM/SOXsYqYUIek/VEdQjcWJxTETVwXeZiwIn4fi+HWfAjAvIKEYwSoQrjY/gmrcbwOqP/EIWivXKcF17s6TAPq0FyfuCDD2feCtlGfx5YUqoVv34XxvqdiTrIY8/seMkPIB5wokZ1ED5k49sVDKpWUDg0= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714517178; c=relaxed/simple; bh=gRJidVXNUR5dQZuMIxt2C+ncIYoQB8UKXg3x2O8bM4I=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version:Content-Type; b=M8rdD3UM1HP1O0yiuvHXFT6oRc6/mTrkJNvfaMdejov4j5IJzgfU0bvT/bApMPpz1s5xIgIYW9b/vHQn3DtACNtDiF0j7+wHlKybU9k0C2g2tDi8pBL38sVl5Xr34mj3hQvTdXELXS39D13FQwJFxs1C+yEvjCnjhzUakUf13uo= 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=Rn423Ypw; arc=none smtp.client-ip=209.85.214.180 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="Rn423Ypw" Received: by mail-pl1-f180.google.com with SMTP id d9443c01a7336-1e5c7d087e1so54315075ad.0 for ; Tue, 30 Apr 2024 15:46:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=broadcom.com; s=google; t=1714517177; x=1715121977; 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=sUDAzuO3n68gKGxKRGquuyLNv4X9EOcJtergvgTofqI=; b=Rn423YpwqE+rIFL/gDwMLSMoK30f+i69Cuz8FNQTIhobZvhKaCQf3EdIlApP8FwS3v O/EeI2kzmzoMK+OcOx/ugYKqtPg/rvgyDzqjqWCTDUQXN7Na/kwt6GoeP+30YA//IUc+ akenbg1fSTeMaoAFYWxAgHExcMff/9ZSEmiRY= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1714517177; x=1715121977; 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=sUDAzuO3n68gKGxKRGquuyLNv4X9EOcJtergvgTofqI=; b=WwzmHS8kSy/nU3s0wGD/6ysTh0W79o7LoaD/ep8Sv+fOjUd6SeBbgdsXVN9OBZW1IG XLb/3Mok4fWLrRyv+UZzghDwjoA3wye6gn93vPjj228A/cvEGDzCIRS9n1aPxD9dpYaU WrwkdeMCCncl6FXJ3sbfaBQgcFrk4nUb6bhzrzPGYFN0wgL6/PWFoZHPcKPhUh29Lfgu AvwRhE891W2vqE6kBRWAq/hiiu1BVRw5N6nvHPwQjJDDjaKatrMu2veQ/YSnVe12z3yn A3u5tf5m7cmlGKY3J6jh33aenlgKNnQ7ahYYwV1J7/auk8qJ6J66wAL8qEX0dLHslK4M G67w== X-Gm-Message-State: AOJu0YzSK0ey9R+VA7RjRpw0uXAShpJjgb1UKPkrz6EEmWm0CgwAwfxm v+6IwjqZjCL3q/6N0dLoZKi7+OfkPGkf7BLcZZVZ6XfYR9UqtPi5i9bhD1hB3g== X-Google-Smtp-Source: AGHT+IEyjlaNLWPgHd9/gYd1mP4YhicFNT6tyh56ozk8YgDw2q4KcqPCo+9wPIy+lc34JO9X3zB8CQ== X-Received: by 2002:a17:902:b201:b0:1e4:4000:a576 with SMTP id t1-20020a170902b20100b001e44000a576mr810658plr.43.1714517176522; Tue, 30 Apr 2024 15:46:16 -0700 (PDT) Received: from lvnvda5233.lvn.broadcom.net ([192.19.161.250]) by smtp.gmail.com with ESMTPSA id s11-20020a170902a50b00b001eb2fb28eabsm7836476plq.227.2024.04.30.15.46.15 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Tue, 30 Apr 2024 15:46:16 -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 4/7] bnxt_en: Don't call ULP_STOP/ULP_START during L2 reset Date: Tue, 30 Apr 2024 15:44:35 -0700 Message-Id: <20240430224438.91494-5-michael.chan@broadcom.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20240430224438.91494-1-michael.chan@broadcom.com> References: <20240430224438.91494-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 --- 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 38134b995478..4d7b4eabe0af 100644 --- a/drivers/net/ethernet/broadcom/bnxt/bnxt.c +++ b/drivers/net/ethernet/broadcom/bnxt/bnxt.c @@ -13085,17 +13085,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); } }