Received: by 2002:a25:868d:0:0:0:0:0 with SMTP id z13csp1035709ybk; Fri, 15 May 2020 22:17:44 -0700 (PDT) X-Google-Smtp-Source: ABdhPJytDW+QyBUDOZoRrcjy/gzvl8GXllAMgSDYd+LwA0ViBLeT6oyIR/u5E+X0N4DZ+fphrCBg X-Received: by 2002:a50:d715:: with SMTP id t21mr5611376edi.194.1589606263900; Fri, 15 May 2020 22:17:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1589606263; cv=none; d=google.com; s=arc-20160816; b=ji3W2QRYLqtf9owYpErsV1UhtGLnGEQUn8cLajkJpcDI+8TfgmgfUxoghJKwowe9ee 9YkRU0URNW10HeJKXbDU2gXxP+U6bPuh6X7HjUmccmiE4JmKDmH9qZHNdfMCa3AKjCJD CIVVcLhlbmAfU4+CPC1h2iHKDTKbvZ3OTtEOYyD0eQoCTw0lVMwNlOiZVXCF3zO1xpRQ HCxslYYr+EFGKZmKupo7QAdjXdXLqky5+pE7Dr295iB67KymP9QfPunD2vp52Vc5VNkJ Co+VjjbKCL0yJkerP3xv03c0N1DWXewAfEWeiakNLFq8AhCBUjHQL1O9Zq5/uf2bIz8r ssUg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=6yyioxex56ifLrIATV/+tinyrRUIOpOG6/3b8f+yQzI=; b=AUR/BbUU5sjHBxq0vngx51bvlE6UR8Qep+pHsPJxd2N67ujhAphp4YyvbSYtEHA8NS 0Urmh7cz9Tx5zfSYIQOQv57TarprbsXkq3XTxNPjHYLYWchA8ljji3bxQci2aARELBvR oVuceRExlWenkhMeM/M0uewd094VDHOiuc8xW4+iR8uECX1H7oMdUFhUdGVjr+ccAp/X T8V92q1Col7RX+V/TpozPi0Y5iM08U75wtXcuvQ3yoFetBGYRS+bi+Oy8Vxt9lOcP3t6 7naCQTNni+53qxP4+vXfVuFyfxUEY49P6OgfZW6i9ErbsvPZnHmdmGWWvuigBXH4i0tt d3UQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@broadcom.com header.s=google header.b=MBV0Sp00; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=broadcom.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id m7si2664661edg.244.2020.05.15.22.17.03; Fri, 15 May 2020 22:17:43 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@broadcom.com header.s=google header.b=MBV0Sp00; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=broadcom.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726303AbgEPFO7 (ORCPT + 99 others); Sat, 16 May 2020 01:14:59 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33648 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1725807AbgEPFO7 (ORCPT ); Sat, 16 May 2020 01:14:59 -0400 Received: from mail-lf1-x143.google.com (mail-lf1-x143.google.com [IPv6:2a00:1450:4864:20::143]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 88B8FC05BD09 for ; Fri, 15 May 2020 22:14:58 -0700 (PDT) Received: by mail-lf1-x143.google.com with SMTP id h26so3564697lfg.6 for ; Fri, 15 May 2020 22:14:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=broadcom.com; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=6yyioxex56ifLrIATV/+tinyrRUIOpOG6/3b8f+yQzI=; b=MBV0Sp00vxFqoTFfdMoeBeQBUbIWRxaofSRVlVC7INt4Cymx5p3ugLfLYZEoqysjtK 7Wk3VCC2jsM/9bMy2BKUi9ACtjEmNdCE1HZosAPIK6jLliGHrY1Nw/YvpIP+4GU2jANw CNLlDSVgcF9LvRDYWbqszyvzKwNFYwwmKzJmw= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=6yyioxex56ifLrIATV/+tinyrRUIOpOG6/3b8f+yQzI=; b=Ag+/c61+3AnMznzUtbrALqHEBeoP1Qd8arqwWDaWotSJynzzy5pIlnYE5eZjnw6knd RfTdalxVh5RBEMm0DuV3IXeYv6qMzJm5EhJhdXxXmEK20EQyUn7U4gNHXbdnP9K+iEqI GDRPpJk+z6M3Umg7t3PkmuwMAAzvfjqAH0kF4Jm136z88TX0agN29F9A/hotX5OtivFT VKnpdDBnIi+TZ1r9eIF+cLZOIDNUFeHlgkwCb8Wj5DVmF6/2iETd9zcqhCi26wkee4c2 abUWsYFqyDKKlYqDtPvJ47cPa5SD6z4XUloWjOzOvygschBMQ+xGH/JkDGO0qMqcgMSx n6mA== X-Gm-Message-State: AOAM530ByhfGnrg64rv2RBTLVLUZjrPbLFUzwGNHbXh2ddq5v+9XVTg5 JIoew2ltrwRsyUM2qCEo6SmnaMXjIu2xsF5Kh1Ssuw== X-Received: by 2002:a19:5f04:: with SMTP id t4mr4663539lfb.208.1589606096583; Fri, 15 May 2020 22:14:56 -0700 (PDT) MIME-Version: 1.0 References: <20200515212846.1347-1-mcgrof@kernel.org> <20200515212846.1347-5-mcgrof@kernel.org> In-Reply-To: <20200515212846.1347-5-mcgrof@kernel.org> From: Vasundhara Volam Date: Sat, 16 May 2020 10:44:45 +0530 Message-ID: Subject: Re: [PATCH v2 04/15] bnxt: use new module_firmware_crashed() To: Luis Chamberlain Cc: jeyu@kernel.org, akpm@linux-foundation.org, arnd@arndb.de, rostedt@goodmis.org, mingo@redhat.com, aquini@redhat.com, cai@lca.pw, dyoung@redhat.com, bhe@redhat.com, peterz@infradead.org, tglx@linutronix.de, gpiccoli@canonical.com, pmladek@suse.com, tiwai@suse.de, schlad@suse.de, andriy.shevchenko@linux.intel.com, keescook@chromium.org, daniel.vetter@ffwll.ch, will@kernel.org, mchehab+samsung@kernel.org, kvalo@codeaurora.org, David Miller , Netdev , open list , Michael Chan Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, May 16, 2020 at 3:00 AM Luis Chamberlain wrote: > > This makes use of the new module_firmware_crashed() to help > annotate when firmware for device drivers crash. When firmware > crashes devices can sometimes become unresponsive, and recovery > sometimes requires a driver unload / reload and in the worst cases > a reboot. > > Using a taint flag allows us to annotate when this happens clearly. > > Cc: Michael Chan > Signed-off-by: Luis Chamberlain > --- > drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c b/drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c > index dd0c3f227009..5ba1bd0734e9 100644 > --- a/drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c > +++ b/drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c > @@ -3503,6 +3503,7 @@ static int bnxt_get_dump_data(struct net_device *dev, struct ethtool_dump *dump, > > dump->flag = bp->dump_flag; > if (dump->flag == BNXT_DUMP_CRASH) { > + module_firmware_crashed(); This is not the right place to annotate the taint flag. Here the driver is just copying the dump after error recovery which is collected by firmware to DDR, when firmware detects fatal conditions. Driver and firmware will be healthy when the user calls this command. Also, users can call this command a thousand times when there is no crash. I will propose a patch to use this wrapper in the error recovery path, where the driver may not be able to recover. > #ifdef CONFIG_TEE_BNXT_FW > return tee_bnxt_copy_coredump(buf, 0, dump->len); > #endif > -- > 2.26.2 > Nacked-by: Vasundhara Volam