From patchwork Wed Jan 17 23:45:11 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Chan X-Patchwork-Id: 13522254 X-Patchwork-Delegate: kuba@kernel.org Received: from mail-qk1-f176.google.com (mail-qk1-f176.google.com [209.85.222.176]) (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 8557E26AC2 for ; Wed, 17 Jan 2024 23:45:28 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.222.176 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1705535131; cv=none; b=kBTkIrK0GMxOClocB3ZGUttYc6LDyHaW8k+LCMXZxiuG9UK6ZaR7y9cjZLLMqUmG3qYdgimaXJhplFGLRd2GWmj2koIpqGRkl6v/woURXRa5+MSn8YoXhp9BmUV6ocRvw+vbNM3cOULB/Ss6d0Z8XsZkvsbsqhM0xCDGaF4iHH0= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1705535131; c=relaxed/simple; bh=yVbWnnFl+u2CdCYmBe+QAUFpR+BrhPe8Go1AbEdooHQ=; h=Received:DKIM-Signature:X-Google-DKIM-Signature: X-Gm-Message-State:X-Google-Smtp-Source:X-Received:Received:From: To:Cc:Subject:Date:Message-Id:X-Mailer:In-Reply-To:References: MIME-Version:Content-Type; b=h9UQIbpXXkb3QvzvjdjQxg9oSKuZRiCWTpKItLJHLaanJPGzf5Xlq5R/cH74HXzcB6+GE3GIy2BsGJ57Lco270rm0GicUyaQCdkgcbG2zcI9Zy5RyAjoK57K7s0kDVEYLSP7ku4aEgigWUNXLUfrkWVotO7j90WxPd0S31ZkZPU= 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=FhwssnY1; arc=none smtp.client-ip=209.85.222.176 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="FhwssnY1" Received: by mail-qk1-f176.google.com with SMTP id af79cd13be357-7831e87ba13so1016349085a.0 for ; Wed, 17 Jan 2024 15:45:28 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=broadcom.com; s=google; t=1705535127; x=1706139927; 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=4FkqRDXt/6lrBj/zdTu060S9mitynjaL4ZEs3gg4+bg=; b=FhwssnY1J+0Gou3XL7tMtTwjIkNluEmjXf3gakdNoRG5kWXInR2YWqGMxc/GoY8M0Y xhb/dbHQShzMnUNiKKw4oO6zgufhdWEas1eagOfSaZSGmmOVP5pZ10x4hERyuaUPWjjU 7c9E8W4BhECAZ+RWBIka0ZDLXcqiKG6F0evp8= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1705535127; x=1706139927; 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=4FkqRDXt/6lrBj/zdTu060S9mitynjaL4ZEs3gg4+bg=; b=ORxzkfr4WaE4XubSFXlQfpoB4j4+E1wXaJ1k9kt4UvVVVpvBcImz620HJNIf8ovQYt VvA8x7QlZ9vrIMXMgd+ET0P10be/3+ERqq2gHU3+gK9bwZIsKdwzBhY8ZDClDPosAJrR cOSs+h+jnnDEjEHJyF9a4enmkosniTBz4XIAlCp8nRgU72pjUbEu9AKddnt6xHQBY9ch uZecyTFLvsHI7XihFhw/kY72ULZRKzGME8OZ4F2F38UoIlQ9NuuOExeq1+r6u4HSsDFH TG8/beBojL1PowiJuVTESj5Jhvt2zZCdvhkDgYYbiazS+/7s4Mjyy8Jd6A/WQZgBt0hH /HXQ== X-Gm-Message-State: AOJu0Ywsl7YckVanK7NYuLv1iUKK6cq+i50+QRNbisq1rXEWLTOMcu67 6HpUznlEGea3iuKhZU8g4I9wqaY++CTK X-Google-Smtp-Source: AGHT+IGVsz4R7Y1iy3BnQxMjAzGrEEgXnQQvcPOZeUwRpMHe3Akk25fDLPl6aH8tHg8DoZehuIEZxw== X-Received: by 2002:a05:620a:66d:b0:783:25ef:818e with SMTP id a13-20020a05620a066d00b0078325ef818emr9903057qkh.116.1705535127016; Wed, 17 Jan 2024 15:45:27 -0800 (PST) Received: from lvnvda5233.lvn.broadcom.net ([192.19.161.250]) by smtp.gmail.com with ESMTPSA id b8-20020a05620a126800b0077d78c5b575sm4851105qkl.111.2024.01.17.15.45.25 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Wed, 17 Jan 2024 15:45:26 -0800 (PST) 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, Damodharam Ammepalli Subject: [PATCH net 1/5] bnxt_en: Wait for FLR to complete during probe Date: Wed, 17 Jan 2024 15:45:11 -0800 Message-Id: <20240117234515.226944-2-michael.chan@broadcom.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20240117234515.226944-1-michael.chan@broadcom.com> References: <20240117234515.226944-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 The first message to firmware may fail if the device is undergoing FLR. The driver has some recovery logic for this failure scenario but we must wait 100 msec for FLR to complete before proceeding. Otherwise the recovery will always fail. Fixes: ba02629ff6cb ("bnxt_en: log firmware status on firmware init failure") Reviewed-by: Damodharam Ammepalli Signed-off-by: Michael Chan --- drivers/net/ethernet/broadcom/bnxt/bnxt.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/drivers/net/ethernet/broadcom/bnxt/bnxt.c b/drivers/net/ethernet/broadcom/bnxt/bnxt.c index 0aacd3c6ed5c..0866aba35d9b 100644 --- a/drivers/net/ethernet/broadcom/bnxt/bnxt.c +++ b/drivers/net/ethernet/broadcom/bnxt/bnxt.c @@ -13232,6 +13232,11 @@ static int bnxt_fw_init_one_p1(struct bnxt *bp) bp->fw_cap = 0; rc = bnxt_hwrm_ver_get(bp); + /* FW may be unresponsive after FLR. FLR must complete within 100 msec + * so wait before continuing with recovery. + */ + if (rc) + msleep(100); bnxt_try_map_fw_health_reg(bp); if (rc) { rc = bnxt_try_recover_fw(bp);