From patchwork Sun Oct 4 19:22:55 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Chan X-Patchwork-Id: 289010 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=-13.5 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, MIME_HEADER_CTYPE_ONLY, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS, T_TVD_MIME_NO_HEADERS, URIBL_BLOCKED, 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 7D62DC4363C for ; Sun, 4 Oct 2020 19:23:34 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 42A61205ED for ; Sun, 4 Oct 2020 19:23:34 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=broadcom.com header.i=@broadcom.com header.b="Fz2WKM/i" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726817AbgJDTXd (ORCPT ); Sun, 4 Oct 2020 15:23:33 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60820 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726294AbgJDTX3 (ORCPT ); Sun, 4 Oct 2020 15:23:29 -0400 Received: from mail-pf1-x430.google.com (mail-pf1-x430.google.com [IPv6:2607:f8b0:4864:20::430]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C9A7EC0613CE for ; Sun, 4 Oct 2020 12:23:29 -0700 (PDT) Received: by mail-pf1-x430.google.com with SMTP id y14so1834955pfp.13 for ; Sun, 04 Oct 2020 12:23:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=broadcom.com; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=1gKq5euPkmDAW4Dm+aNpUQ3PpVuMmDcp5WRrye/+kww=; b=Fz2WKM/i/yI24/2Iqz+ubRtRb+F2nxAcfGUucR9BNyvUuka4r53BVRnX3BS8B8Wr7f iL/0MafBKUoplg+tap/QOU2yh0fjmQh2pJ9ZH7e0oOCvEwaFnFDP2pJwKVjCENq2fyPS zKUk1VR8wGU/jvgysmeW2LHaQshrd0nStZlpM= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=1gKq5euPkmDAW4Dm+aNpUQ3PpVuMmDcp5WRrye/+kww=; b=igd/1AIbJgPQPQFIgzZ4ft/U3QuN52NZgziu+pHEhMnVVtsTar3+Z7g4FgivQu4vSg BYEH4KXTFhcGZsF/NG0dlsadd9jCGwgoDnkNCZW+AOOleOWEWrmzbFDlBO7HG0w7nhaR CawwvKdoyQiTR7UHNzjG1U+kxseEVhHH9DEj7+3LPbJOb+7H7kLYjthOs9SIzWnxmAfy uCST6QIMwU1Wgk9A3owtuFk48d9nu+Qg7OZOOFK/9FMPc5qqnvR3CQQ2ZTggUeOUajUQ uHBRPdvOq1gwHngytUJoJ8zeHJFsh6CE9BcNvmnZAsnOgoMgnv4Z0yfn9zXwAjQOJsZE VVBQ== X-Gm-Message-State: AOAM530PRmFr1WWIAJA3bWtX6Ibm0WFa4Vxk1Zu7hCqzz1bPB9JZCG4W ShqYmcu2bHkaKRF1UvkQyiL9AA== X-Google-Smtp-Source: ABdhPJw06nzmXQtXvLBEqdi2YkpVf9dioC6kyxdqhFgTX2iDt1+Ub9kg0HO59GrRJHNzYSG3Zl8uRA== X-Received: by 2002:a63:d008:: with SMTP id z8mr11006707pgf.357.1601839408815; Sun, 04 Oct 2020 12:23:28 -0700 (PDT) Received: from localhost.swdvt.lab.broadcom.net ([192.19.223.252]) by smtp.gmail.com with ESMTPSA id 138sm9824234pfu.180.2020.10.04.12.23.27 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Sun, 04 Oct 2020 12:23:28 -0700 (PDT) From: Michael Chan To: davem@davemloft.net Cc: netdev@vger.kernel.org, kuba@kernel.org, gospo@broadcom.com Subject: [PATCH net-next 05/11] bnxt_en: Log FW health status info, if reset is aborted. Date: Sun, 4 Oct 2020 15:22:55 -0400 Message-Id: <1601839381-10446-6-git-send-email-michael.chan@broadcom.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1601839381-10446-1-git-send-email-michael.chan@broadcom.com> References: <1601839381-10446-1-git-send-email-michael.chan@broadcom.com> Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org If firmware does not come out of reset, log FW health status info to provide more information on firmware status. Signed-off-by: Michael Chan --- drivers/net/ethernet/broadcom/bnxt/bnxt.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/drivers/net/ethernet/broadcom/bnxt/bnxt.c b/drivers/net/ethernet/broadcom/bnxt/bnxt.c index afa425375cd0..27fbe0cef2a9 100644 --- a/drivers/net/ethernet/broadcom/bnxt/bnxt.c +++ b/drivers/net/ethernet/broadcom/bnxt/bnxt.c @@ -11365,7 +11365,7 @@ static void bnxt_fw_reset_task(struct work_struct *work) if (time_after(jiffies, bp->fw_reset_timestamp + (bp->fw_reset_max_dsecs * HZ / 10))) { netdev_err(bp->dev, "Firmware reset aborted\n"); - goto fw_reset_abort; + goto fw_reset_abort_status; } bnxt_queue_fw_reset_work(bp, HZ / 5); return; @@ -11399,6 +11399,13 @@ static void bnxt_fw_reset_task(struct work_struct *work) } return; +fw_reset_abort_status: + if (bp->fw_health->status_reliable || + (bp->fw_cap & BNXT_FW_CAP_ERROR_RECOVERY)) { + u32 sts = bnxt_fw_health_readl(bp, BNXT_FW_HEALTH_REG); + + netdev_err(bp->dev, "fw_health_status 0x%x\n", sts); + } fw_reset_abort: clear_bit(BNXT_STATE_IN_FW_RESET, &bp->state); if (bp->fw_reset_state != BNXT_FW_RESET_STATE_POLL_VF)