From patchwork Sat May 9 04:35:39 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Luis Chamberlain X-Patchwork-Id: 219584 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=-10.1 required=3.0 tests=DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS, URIBL_BLOCKED, USER_AGENT_GIT autolearn=unavailable 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 CBD00C54E49 for ; Sat, 9 May 2020 04:36:08 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id ADDD82184D for ; Sat, 9 May 2020 04:36:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1588998968; bh=UpZGwnSM8yCWwClaXT07mQ86DC2ABKivl/qFQL50cyo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=nLczEMVQbb9SRaTapzDzyhYYtjzpV5Bpsa8FWK/uM9o+Pq1oq6m9xoZaZ9y5xNwMQ quDpN9T6P/neGaVDih3xKD5vBRtmP46Ho4HVEbg63pydiIgpgVa8uKho44uxf4GLSV kgyEfDaksD+FPq0V8siIUtKhZiSxAmVH5Ih47K/Q= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728662AbgEIEgG (ORCPT ); Sat, 9 May 2020 00:36:06 -0400 Received: from mail-pl1-f193.google.com ([209.85.214.193]:32789 "EHLO mail-pl1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725795AbgEIEgF (ORCPT ); Sat, 9 May 2020 00:36:05 -0400 Received: by mail-pl1-f193.google.com with SMTP id t7so1642694plr.0; Fri, 08 May 2020 21:36:04 -0700 (PDT) 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:mime-version:content-transfer-encoding; bh=VkP6GWOio7qtVGJiV0OeaEyHuFiaIWKPQxya3i5GDSA=; b=l82iai2dqocs6iEfllINJe0nVEKcCUXwdS5lX4Pjfx0k+/tUN1vHDaBoNrCYxWa2un 94Ph1y67DrIxZDdfUDpHbIqhkWC0yuJ4gpRFGUQl7bFjmHviAh0MB3BPxPTWn+jLUXmg v9W/gZd9Bcy4v7jQUjhQgQRw/KAyx9qYUthUMMmsSB8Vh/ghiACFRPKopHRtbiP8ByHQ PQML9RjuEViYNSrHEv1zl7QXZNwpTQ5z7no6baNrndLk2vEz/3nv/xSqE282n9+UmWcG rcXwxK5TfpKL9ayLxMG25cKRIJmdssADrz3N94OMmrQ9vmic9Hyw7US7d2J/AVG2OwEG Kdfw== X-Gm-Message-State: AGi0Pub8O12eCz0m5xeyuajFUw33pAntvzncej+WQzEJF6toWCq1DVR+ iXFUgOOGU1Q4gcDqxk0oh6s= X-Google-Smtp-Source: APiQypIXyBqaBXyxzVqzZQbND5CCRopwmyiq2AWa34I4lmbuikMQ9/1Jk5F5GGDOQHUv7bOBuauRqA== X-Received: by 2002:a17:90a:3b42:: with SMTP id t2mr9742401pjf.11.1588998964576; Fri, 08 May 2020 21:36:04 -0700 (PDT) Received: from 42.do-not-panic.com (42.do-not-panic.com. [157.230.128.187]) by smtp.gmail.com with ESMTPSA id 138sm3331874pfz.31.2020.05.08.21.36.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 08 May 2020 21:36:01 -0700 (PDT) Received: by 42.do-not-panic.com (Postfix, from userid 1000) id C70A841405; Sat, 9 May 2020 04:36:00 +0000 (UTC) From: Luis Chamberlain To: jeyu@kernel.org Cc: 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, davem@davemloft.net, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Luis Chamberlain , "Michael S. Tsirkin" , Shannon Nelson , Jakub Kicinski , Heiner Kallweit Subject: [PATCH 02/15] ethernet/839: use new module_firmware_crashed() Date: Sat, 9 May 2020 04:35:39 +0000 Message-Id: <20200509043552.8745-3-mcgrof@kernel.org> X-Mailer: git-send-email 2.23.0.rc1 In-Reply-To: <20200509043552.8745-1-mcgrof@kernel.org> References: <20200509043552.8745-1-mcgrof@kernel.org> MIME-Version: 1.0 Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org 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 S. Tsirkin" Cc: Shannon Nelson Cc: Jakub Kicinski Cc: Heiner Kallweit Signed-off-by: Luis Chamberlain --- drivers/net/ethernet/8390/axnet_cs.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/net/ethernet/8390/axnet_cs.c b/drivers/net/ethernet/8390/axnet_cs.c index aeae7966a082..8ad0200db8e9 100644 --- a/drivers/net/ethernet/8390/axnet_cs.c +++ b/drivers/net/ethernet/8390/axnet_cs.c @@ -1358,9 +1358,11 @@ static void ei_receive(struct net_device *dev) */ if ((netif_msg_rx_err(ei_local)) && this_frame != ei_local->current_page && - (this_frame != 0x0 || rxing_page != 0xFF)) + (this_frame != 0x0 || rxing_page != 0xFF)) { + module_firmware_crashed(); netdev_err(dev, "mismatched read page pointers %2x vs %2x\n", this_frame, ei_local->current_page); + } if (this_frame == rxing_page) /* Read all the frames? */ break; /* Done for now */ From patchwork Sat May 9 04:35:41 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Luis Chamberlain X-Patchwork-Id: 219578 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=-10.1 required=3.0 tests=DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS, URIBL_BLOCKED, USER_AGENT_GIT autolearn=unavailable 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 BDBDCC28CBC for ; Sat, 9 May 2020 04:37:13 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 8EA9024953 for ; Sat, 9 May 2020 04:37:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1588999033; bh=/MZKWkICZt9P66MmniisKKtOYXsV7nWu63G2vbGLU+s=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=kCK+FCu31enjxaTYTB43hvit+CKoeLlfKB0F8JfqjPXS+Z6Gop7hN7x30m7eN51nA f3yd5lFe0d4q6i2aYOb9EqfhVzLpo2bcxyB/cQnPJUAmW+TGtrgyxQizFiqLPDy6rS VeULoEUD9A99bmF5kvldryVrTwo6u7KKYIoED2kY= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728737AbgEIEgJ (ORCPT ); Sat, 9 May 2020 00:36:09 -0400 Received: from mail-pj1-f67.google.com ([209.85.216.67]:55093 "EHLO mail-pj1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728681AbgEIEgI (ORCPT ); Sat, 9 May 2020 00:36:08 -0400 Received: by mail-pj1-f67.google.com with SMTP id y6so5221022pjc.4; Fri, 08 May 2020 21:36:06 -0700 (PDT) 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:mime-version:content-transfer-encoding; bh=QJXnP62KLztaJdrV69YlA0+UUHz93O9d1I2NYSRHz+Q=; b=tbS1EfFIyZcCzJujI8tIg9FF2RZ73FXHNCsKckDenoyW9of7sID1TcNeD8099Uo1th 7HGNeyCrF4OXEvhbZlCFOq7Ro9jxUgGodglVZoP8bSc6vtWq57B4SCeSBwuzv6yUZCi7 D1eCzJW8GbVRNx1szSkXT60ARCskOq89eU12FXcUQhjqB0HC0MydesCb5WpTTuO8BpKr Sicza5F8kLqsH3UJe9IYLZoCcebbpYgHpGeLHpVtW6tpfysrAccS4HmF4bnnHTp7Md/q FDAIlYv5GlZWNsFH7G3PnY8e8LJDxyJ5V5Ie4Ck4GzkiwWgvbzS6aco2IA2P2E5NR+/o IzlA== X-Gm-Message-State: AGi0PuYbYnLJFARC7TctpGsOoZ/sI5pypGKOnZvtYCW7H/9CS+V5YlfG rW5QmvmDqqMLN7lHzPSgSAU= X-Google-Smtp-Source: APiQypJphI7aZtPAxu0REWRaFUCZ5/wgOk5Z6Tw6ri2tWqa9HyhgVhQ/qZ4KCgzlvcw+F2p6JthR1w== X-Received: by 2002:a17:902:347:: with SMTP id 65mr5615196pld.21.1588998966510; Fri, 08 May 2020 21:36:06 -0700 (PDT) Received: from 42.do-not-panic.com (42.do-not-panic.com. [157.230.128.187]) by smtp.gmail.com with ESMTPSA id j23sm3622135pjz.13.2020.05.08.21.36.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 08 May 2020 21:36:01 -0700 (PDT) Received: by 42.do-not-panic.com (Postfix, from userid 1000) id E8A5F41D67; Sat, 9 May 2020 04:36:00 +0000 (UTC) From: Luis Chamberlain To: jeyu@kernel.org Cc: 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, davem@davemloft.net, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Luis Chamberlain , Michael Chan Subject: [PATCH 04/15] bnxt: use new module_firmware_crashed() Date: Sat, 9 May 2020 04:35:41 +0000 Message-Id: <20200509043552.8745-5-mcgrof@kernel.org> X-Mailer: git-send-email 2.23.0.rc1 In-Reply-To: <20200509043552.8745-1-mcgrof@kernel.org> References: <20200509043552.8745-1-mcgrof@kernel.org> MIME-Version: 1.0 Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org 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(); #ifdef CONFIG_TEE_BNXT_FW return tee_bnxt_copy_coredump(buf, 0, dump->len); #endif From patchwork Sat May 9 04:35:43 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Luis Chamberlain X-Patchwork-Id: 219583 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=-10.1 required=3.0 tests=DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,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 51DD8C54E7E for ; Sat, 9 May 2020 04:36:14 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 32EAE2184D for ; Sat, 9 May 2020 04:36:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1588998974; bh=bHG4LlHQK+q57Ev5jCD4Q1hDTtJoIOGQzXC8SCXSye0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=nBGTvbyDn0FKJxYmth190G9cVE4AbJ9LnAsNOUU/NMYzVzaTR2tb5oi6UgK1gJzOK 5kwQj1P5f6NRBN3bie3I4WqIj1gAeMbwCLRm9EpCkVyroN8vKs3MCIuvgZ7IZWpnz/ DIs5rdstNVJcoM31iw7+OHADHs3z5Z/+Q1ExUxZ8= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728810AbgEIEgN (ORCPT ); Sat, 9 May 2020 00:36:13 -0400 Received: from mail-pj1-f67.google.com ([209.85.216.67]:33450 "EHLO mail-pj1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728777AbgEIEgK (ORCPT ); Sat, 9 May 2020 00:36:10 -0400 Received: by mail-pj1-f67.google.com with SMTP id 7so5932064pjo.0; Fri, 08 May 2020 21:36:10 -0700 (PDT) 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:mime-version:content-transfer-encoding; bh=MiQNjcOpznNHJIwN/vJ7Wo/YnTDk8aSjxv7fQy7u2y8=; b=lj3luMkOFKQ6cvW2o87kLMdzWKSobF8LVSQeZVveeXbFlTssYOBB+JZ36k9wEupdLR A+OWE/27n04f6grfjCSPXlciSaM+d7uaX9OfsCJv++NQwcUmyKjDowopkWpM5EUOXHWx YnAX5052oHQ+rpTO2+KKyIYBRxJ/IFPo1JZNI0RqlRSQPD0AcBOXsqzf+aebqNwnhmBC 1Vz4V7L4P7W0mlf2kdfmBBKbVLmEeUcdZRLi3GqcWEo30Xoa2PwTTS0/LW3gtLIc1miX qv0WqwOEDshnfvceeZF4Ft35Q36C8K56dd8EMGyPK9SE5ngT/V+EUA6Tmd2vz5KubXtw WruA== X-Gm-Message-State: AGi0PuYbi8N6nakOQ4M+NPvFvWQObbOyyid1GqcR8Llp/gx9oLbUkKY4 ULceZOm0h0VPjiqhnWRjpI8= X-Google-Smtp-Source: APiQypLiur3keFVKRwB2MQgmwWD89BCGfVHpMjRj2wvjmigHkcG0FJgVA9QEo1AVCFJZLcU3k/L7gg== X-Received: by 2002:a17:90a:2450:: with SMTP id h74mr9662376pje.57.1588998970163; Fri, 08 May 2020 21:36:10 -0700 (PDT) Received: from 42.do-not-panic.com (42.do-not-panic.com. [157.230.128.187]) by smtp.gmail.com with ESMTPSA id p24sm3281813pff.92.2020.05.08.21.36.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 08 May 2020 21:36:07 -0700 (PDT) Received: by 42.do-not-panic.com (Postfix, from userid 1000) id 1208142000; Sat, 9 May 2020 04:36:01 +0000 (UTC) From: Luis Chamberlain To: jeyu@kernel.org Cc: 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, davem@davemloft.net, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Luis Chamberlain , Derek Chickles , Satanand Burla , Felix Manlunas Subject: [PATCH 06/15] liquidio: use new module_firmware_crashed() Date: Sat, 9 May 2020 04:35:43 +0000 Message-Id: <20200509043552.8745-7-mcgrof@kernel.org> X-Mailer: git-send-email 2.23.0.rc1 In-Reply-To: <20200509043552.8745-1-mcgrof@kernel.org> References: <20200509043552.8745-1-mcgrof@kernel.org> MIME-Version: 1.0 Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org 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: Derek Chickles Cc: Satanand Burla Cc: Felix Manlunas Signed-off-by: Luis Chamberlain --- drivers/net/ethernet/cavium/liquidio/lio_main.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/net/ethernet/cavium/liquidio/lio_main.c b/drivers/net/ethernet/cavium/liquidio/lio_main.c index 66d31c018c7e..f18085262982 100644 --- a/drivers/net/ethernet/cavium/liquidio/lio_main.c +++ b/drivers/net/ethernet/cavium/liquidio/lio_main.c @@ -801,6 +801,7 @@ static int liquidio_watchdog(void *param) continue; WRITE_ONCE(oct->cores_crashed, true); + module_firmware_crashed(); other_oct = get_other_octeon_device(oct); if (other_oct) WRITE_ONCE(other_oct->cores_crashed, true); From patchwork Sat May 9 04:35:44 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Luis Chamberlain X-Patchwork-Id: 219579 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=-10.1 required=3.0 tests=DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS, URIBL_BLOCKED, USER_AGENT_GIT autolearn=unavailable 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 EB13CC47257 for ; Sat, 9 May 2020 04:37:00 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id CA99224953 for ; Sat, 9 May 2020 04:37:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1588999020; bh=07whU8E+PdoH4NwOYzR8jGBxm037oXhrsUh4WAxtlNA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=vCuiA6kJMMM1ujMncMdi4PmbpcIsaYmFqQLaEPIggahTLjeA/LAqj6ZPKdrypkK2b GlSekVmDX0G6pSPL5ZV63iIsOAa30/uGL6E1mGKjz52huFc302IIj2GF+lB4jW6PYn pDjWIh5ItuPYO7bq1fCEptMiMvJDplZRhcCxoDU4= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728945AbgEIEg6 (ORCPT ); Sat, 9 May 2020 00:36:58 -0400 Received: from mail-pj1-f65.google.com ([209.85.216.65]:33924 "EHLO mail-pj1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728789AbgEIEgM (ORCPT ); Sat, 9 May 2020 00:36:12 -0400 Received: by mail-pj1-f65.google.com with SMTP id h12so5932031pjz.1; Fri, 08 May 2020 21:36:12 -0700 (PDT) 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:mime-version:content-transfer-encoding; bh=R8OF7M46D8C3jXOaoBlaMReTLKc3NpL8x+JXeBlXDQg=; b=nvcAwBwQZEc1lhm0aTUd7bqmWD0Ukv1tpbmzlUqeSyXpTDA+DZvi+93KaJ9E/NevpC 5TKMOECAxCbY6REFmzfjSMlemCek0BDCl2RFzzNEkCK4jOEYlM5p8ypzLF4EYMsYaNmx CxwjhmEB4Sp6a4BRn8Z2Yu8z0jMVj3/FjzDq+v/FfLsxlGMre0AHHMfEFv4ZKfXorMs/ pDCFgfZusTAFA5vhzjPACurJMs5t7Y2w7aBDGJ/Pj5lEvNpxUlSrEADrhFSo2QFSyrtG cFqAre0aHMEHqoTWVzHjynCj2Vcwyn8gJs852bApLN/kn/gS+soLCFyLDxunT7whWaPl M6PQ== X-Gm-Message-State: AGi0PuaLZVEv3BxSaTUVVKhbikTTSi1jInjMbCp87xE3HDzOJoIA+XOM 2SB4QkbABAnjSrEmk8Yosf0= X-Google-Smtp-Source: APiQypJSSjbk0NmFTzHRNzIfQCloTXWW0xkAQE1qPeAZ/jpIIOTv5jKkbRXhFpIU2ohllZvSDW+DGw== X-Received: by 2002:a17:902:eb4b:: with SMTP id i11mr5451742pli.19.1588998971874; Fri, 08 May 2020 21:36:11 -0700 (PDT) Received: from 42.do-not-panic.com (42.do-not-panic.com. [157.230.128.187]) by smtp.gmail.com with ESMTPSA id l15sm3565848pjk.56.2020.05.08.21.36.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 08 May 2020 21:36:07 -0700 (PDT) Received: by 42.do-not-panic.com (Postfix, from userid 1000) id 1D69742079; Sat, 9 May 2020 04:36:01 +0000 (UTC) From: Luis Chamberlain To: jeyu@kernel.org Cc: 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, davem@davemloft.net, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Luis Chamberlain , Vishal Kulkarni Subject: [PATCH 07/15] cxgb4: use new module_firmware_crashed() Date: Sat, 9 May 2020 04:35:44 +0000 Message-Id: <20200509043552.8745-8-mcgrof@kernel.org> X-Mailer: git-send-email 2.23.0.rc1 In-Reply-To: <20200509043552.8745-1-mcgrof@kernel.org> References: <20200509043552.8745-1-mcgrof@kernel.org> MIME-Version: 1.0 Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org 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: Vishal Kulkarni Signed-off-by: Luis Chamberlain --- drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c b/drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c index a70018f067aa..c67fc86c0e42 100644 --- a/drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c +++ b/drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c @@ -3646,6 +3646,7 @@ void t4_fatal_err(struct adapter *adap) * could be exposed to the adapter. RDMA MWs for example... */ t4_shutdown_adapter(adap); + module_firmware_crashed(); for_each_port(adap, port) { struct net_device *dev = adap->port[port]; From patchwork Sat May 9 04:35:45 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Luis Chamberlain X-Patchwork-Id: 219580 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=-10.1 required=3.0 tests=DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=unavailable 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 E4CA8C47257 for ; Sat, 9 May 2020 04:36:50 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id B308B24953 for ; Sat, 9 May 2020 04:36:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1588999010; bh=HcfK77nS4aKIjEFU+hhPyEW3u3yDaiQ4T8RgmtFvL/8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=vzsXTTQtsQHOeQESr435IQVWx2bwYWUeJ7ERcQEB/42W0PqiuK1E/e1ygBDkdN/X9 H9F7UAyW8GpQ0e/Aj7FzzN2EeAq3FfCv+a6mjz4FiAxCvOSG+qf2szl5jzQwnrhuFB PjBq8+EF8pgm9zvkl0R+HJE0WEw9eQvaNYXCgsWg= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728827AbgEIEgR (ORCPT ); Sat, 9 May 2020 00:36:17 -0400 Received: from mail-pl1-f193.google.com ([209.85.214.193]:44575 "EHLO mail-pl1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728777AbgEIEgO (ORCPT ); Sat, 9 May 2020 00:36:14 -0400 Received: by mail-pl1-f193.google.com with SMTP id b8so1623735plm.11; Fri, 08 May 2020 21:36:13 -0700 (PDT) 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:mime-version:content-transfer-encoding; bh=fkqGWbH5fd6+qOPQE43ttfsUeppV/4L6Bb1ZIdoGWrc=; b=LgvH0QhjjtSDFBKQMOf2MHLZU9gUPc38L1hXb1X5WdNcyKGv+zVdXq4g9y580nFnS7 v0MUQiVP4ATVFg0Su4sjyaKccjliCkHa9uHwPn9VFzs5hMbOTmAGAn2EsUiLoo/aZlNL 9p6Tq6p7T9t43ACDBj+MV2kWQVZDWl6NlXLgODfz1IX9WowbPKeD5spegMdfrDlfRa3V nV0OjXdgBCoEUkZ28x6Z5lZFIbHDiMPJKXhX4YY+6EZgjEXskn4tKpGV9yYOefkB4gzJ Ynea54WsLRenhCxsGqWYOadfGmiBOolXFf7efCf/WXJ3eoZc2cV9/H7HJ9ZQkIlco8uQ yGfw== X-Gm-Message-State: AGi0Pub+hkMRazY5OJfdtnRlQsTLIWGB7eoWZbDM9tRb1BtrGFxDgWh2 LOJnpzCF6D0M59WEH6RFlz0= X-Google-Smtp-Source: APiQypKD38soKAjfYzfpYHiIwmAGTj5kZFhFb+SpFc0hytV+W/MnQnW4pBqhpHlyApNAA3BYg/UBVw== X-Received: by 2002:a17:90a:2401:: with SMTP id h1mr9201853pje.1.1588998973439; Fri, 08 May 2020 21:36:13 -0700 (PDT) Received: from 42.do-not-panic.com (42.do-not-panic.com. [157.230.128.187]) by smtp.gmail.com with ESMTPSA id p8sm3736106pjd.10.2020.05.08.21.36.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 08 May 2020 21:36:07 -0700 (PDT) Received: by 42.do-not-panic.com (Postfix, from userid 1000) id 28AB74223D; Sat, 9 May 2020 04:36:01 +0000 (UTC) From: Luis Chamberlain To: jeyu@kernel.org Cc: 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, davem@davemloft.net, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Luis Chamberlain , Douglas Miller Subject: [PATCH 08/15] ehea: use new module_firmware_crashed() Date: Sat, 9 May 2020 04:35:45 +0000 Message-Id: <20200509043552.8745-9-mcgrof@kernel.org> X-Mailer: git-send-email 2.23.0.rc1 In-Reply-To: <20200509043552.8745-1-mcgrof@kernel.org> References: <20200509043552.8745-1-mcgrof@kernel.org> MIME-Version: 1.0 Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org 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: Douglas Miller Signed-off-by: Luis Chamberlain --- drivers/net/ethernet/ibm/ehea/ehea_main.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/net/ethernet/ibm/ehea/ehea_main.c b/drivers/net/ethernet/ibm/ehea/ehea_main.c index 0273fb7a9d01..6ae35067003f 100644 --- a/drivers/net/ethernet/ibm/ehea/ehea_main.c +++ b/drivers/net/ethernet/ibm/ehea/ehea_main.c @@ -3285,6 +3285,8 @@ static void ehea_crash_handler(void) { int i; + module_firmware_crashed(); + if (ehea_fw_handles.arr) for (i = 0; i < ehea_fw_handles.num_entries; i++) ehea_h_free_resource(ehea_fw_handles.arr[i].adh, From patchwork Sat May 9 04:35:48 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Luis Chamberlain X-Patchwork-Id: 219581 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=-10.1 required=3.0 tests=DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS, URIBL_BLOCKED, USER_AGENT_GIT autolearn=unavailable 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 3BFE4C47257 for ; Sat, 9 May 2020 04:36:40 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 19CAD24957 for ; Sat, 9 May 2020 04:36:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1588999000; bh=3/wHhKjGImSSbMEj6e7NbYewQBL3waDls+kimnDQGtU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=Wl98Pd2egbEazvzw7/HdZT8wer0X17H4aRDXHn4SfQubTR1nnSTCvl5W/FdZQTU6E paNxNbLCC3GbDYdRzXd6ke5NN1kdQP6pQdZ/imHIb6KwAg1xuWgg/zvtqZXVaueoec 6L6M7DhFNWqHKKeDxR8nisoGyGgDNQsEUOtCSgGg= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728903AbgEIEgh (ORCPT ); Sat, 9 May 2020 00:36:37 -0400 Received: from mail-pj1-f67.google.com ([209.85.216.67]:37786 "EHLO mail-pj1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728837AbgEIEgS (ORCPT ); Sat, 9 May 2020 00:36:18 -0400 Received: by mail-pj1-f67.google.com with SMTP id a7so5212352pju.2; Fri, 08 May 2020 21:36:18 -0700 (PDT) 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:mime-version:content-transfer-encoding; bh=d9Crehj1GSqNkWIBx6oBRWEIaOhUeDUKthtt6ioogWY=; b=iSgZ8VMUNNC1vroyE9p1khznIlmX9vwLXbbgnX/9ozZLBrD80Q+i0uYt5Hy8mMC47w oQ/NSF5/CMuVv7HZWvuoEjO9e8DTWVZI9ShhoSOrCBjVmActPlq1jf+bDrsX4Ac51yFW L3QMNpyJi4AWBLmLmOjml/XkrZ/j6YEg6v7bIBcAExuqwxglZGqHeK9hF2BjKrGZE+b5 Q65UwqdlszmJpzBTEqbzsYS8+FtncJu85zVQOUKu7/hmxkOQFLSAdrWtAXS2N7UBGfMI 0eaE3BXZ9NjK0M4nLhh9Ge8R4FtCyQoqNRnzkUy8Nfh9P/mT06x1TLdSuhxVnqj7e2PG Phvg== X-Gm-Message-State: AGi0PuaMrL8ryUsniBCP4a1A4NU3gu4TugicBKqonCCUHypVAvq91lbp hqmOQw33gHgpVVX+wy2XBO4= X-Google-Smtp-Source: APiQypIU4o32j8RS8tQB2eiEqmJBzdWhDYA6pQVk2wb8WK8zzJKAF2L1MoxxJEX40cb2k4hlTVBl6w== X-Received: by 2002:a17:902:b945:: with SMTP id h5mr5552788pls.224.1588998978020; Fri, 08 May 2020 21:36:18 -0700 (PDT) Received: from 42.do-not-panic.com (42.do-not-panic.com. [157.230.128.187]) by smtp.gmail.com with ESMTPSA id o17sm2598387pgv.83.2020.05.08.21.36.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 08 May 2020 21:36:15 -0700 (PDT) Received: by 42.do-not-panic.com (Postfix, from userid 1000) id 4B2314230A; Sat, 9 May 2020 04:36:01 +0000 (UTC) From: Luis Chamberlain To: jeyu@kernel.org Cc: 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, davem@davemloft.net, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Luis Chamberlain , linux-wimax@intel.com, Inaky Perez-Gonzalez Subject: [PATCH 11/15] wimax/i2400m: use new module_firmware_crashed() Date: Sat, 9 May 2020 04:35:48 +0000 Message-Id: <20200509043552.8745-12-mcgrof@kernel.org> X-Mailer: git-send-email 2.23.0.rc1 In-Reply-To: <20200509043552.8745-1-mcgrof@kernel.org> References: <20200509043552.8745-1-mcgrof@kernel.org> MIME-Version: 1.0 Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org 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: linux-wimax@intel.com Cc: Inaky Perez-Gonzalez Signed-off-by: Luis Chamberlain --- drivers/net/wimax/i2400m/rx.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/net/wimax/i2400m/rx.c b/drivers/net/wimax/i2400m/rx.c index c9fb619a9e01..307a62ca183f 100644 --- a/drivers/net/wimax/i2400m/rx.c +++ b/drivers/net/wimax/i2400m/rx.c @@ -712,6 +712,7 @@ void __i2400m_roq_queue(struct i2400m *i2400m, struct i2400m_roq *roq, dev_err(dev, "SW BUG? failed to insert packet\n"); dev_err(dev, "ERX: roq %p [ws %u] skb %p nsn %d sn %u\n", roq, roq->ws, skb, nsn, roq_data->sn); + module_firmware_crashed(); skb_queue_walk(&roq->queue, skb_itr) { roq_data_itr = (struct i2400m_roq_data *) &skb_itr->cb; nsn_itr = __i2400m_roq_nsn(roq, roq_data_itr->sn); From patchwork Sat May 9 04:35:49 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Luis Chamberlain X-Patchwork-Id: 219576 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=-10.1 required=3.0 tests=DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS, URIBL_BLOCKED, USER_AGENT_GIT autolearn=unavailable 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 7157DC47257 for ; Sat, 9 May 2020 04:45:48 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 50608208DB for ; Sat, 9 May 2020 04:45:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1588999548; bh=wSTK54E25Ch1a0hpNUaj3uwvdUAqW3DXrh/a2HNYaZU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=QXjvQzPPbottILBY6juu3Ck9FPyLCP0i6oZiOSudZKTfMSVhANdQP80+N/rdJfxmt hqxgu2fHddJKbMih1tt7bsUgBSfpnTKscrFwUjA6bk4oId/xvd8tnS/G60DLbpmrNH xhCY3ygBKjOjG6EW5P1Lc7HTp+KGXp9KNdBxLkaI= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726980AbgEIEpp (ORCPT ); Sat, 9 May 2020 00:45:45 -0400 Received: from mail-pj1-f68.google.com ([209.85.216.68]:52441 "EHLO mail-pj1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725795AbgEIEpp (ORCPT ); Sat, 9 May 2020 00:45:45 -0400 Received: by mail-pj1-f68.google.com with SMTP id a5so5227716pjh.2; Fri, 08 May 2020 21:45:43 -0700 (PDT) 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:mime-version:content-transfer-encoding; bh=npAHADQxLDEpywMh/GQmSV8cKhjaz9uo2pCJ37X1d7Q=; b=kYhjC2EBjfqXoUxy/zTQ4+eiC42XU2VTyClMoza3b5B+lwSLp/pHM7DMgZ1a1KiBIa WoK2xvFhVw2P+QNluVDvFW9Ht35ULTfrM7U9xn2QM+htptM3Wh94p0hO99VdZQ3sjLvI p++9H47Rq0EhVMgiZhbQmDRxfIxnVHH9xYP9ML/S1pItRwX7KG0Obs2xRIUeQwzUzE5f 3gGj+m3KvZ5cDQhiYUi5f0GhfMRamsIlvh43A3TBki6sMkAry6BOyixXXv79zx59dAcv iRczBExRBCPiseIjKSm/c0vXMIDUhkT3hVYjEwUxBbUX9HdADoOcOBDk/RKnbs41ZnmR zR/w== X-Gm-Message-State: AGi0Pub57GCEKRc6UK0BEzENjDcSZ8p65ZiUhNUJpzXJfYK7snH3Tskd k/Z3rxJ2biXi2joFlE2fD9E= X-Google-Smtp-Source: APiQypLw6+nO2U4QWAJVDVbU2UVUQLz4x2Pd3twtzhhiEU7+VFbAvujZRZehlC9onWqGj3VvwxWp/A== X-Received: by 2002:a17:902:ff09:: with SMTP id f9mr5748286plj.236.1588999542861; Fri, 08 May 2020 21:45:42 -0700 (PDT) Received: from 42.do-not-panic.com (42.do-not-panic.com. [157.230.128.187]) by smtp.gmail.com with ESMTPSA id h13sm2547498pgm.69.2020.05.08.21.45.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 08 May 2020 21:45:41 -0700 (PDT) Received: by 42.do-not-panic.com (Postfix, from userid 1000) id 54DB142337; Sat, 9 May 2020 04:36:01 +0000 (UTC) From: Luis Chamberlain To: jeyu@kernel.org Cc: 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, davem@davemloft.net, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Luis Chamberlain , linux-wireless@vger.kernel.org, ath10k@lists.infradead.org Subject: [PATCH 12/15] ath10k: use new module_firmware_crashed() Date: Sat, 9 May 2020 04:35:49 +0000 Message-Id: <20200509043552.8745-13-mcgrof@kernel.org> X-Mailer: git-send-email 2.23.0.rc1 In-Reply-To: <20200509043552.8745-1-mcgrof@kernel.org> References: <20200509043552.8745-1-mcgrof@kernel.org> MIME-Version: 1.0 Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org 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: linux-wireless@vger.kernel.org Cc: ath10k@lists.infradead.org Cc: Kalle Valo Signed-off-by: Luis Chamberlain --- drivers/net/wireless/ath/ath10k/pci.c | 2 ++ drivers/net/wireless/ath/ath10k/sdio.c | 2 ++ drivers/net/wireless/ath/ath10k/snoc.c | 1 + 3 files changed, 5 insertions(+) diff --git a/drivers/net/wireless/ath/ath10k/pci.c b/drivers/net/wireless/ath/ath10k/pci.c index 1d941d53fdc9..6bd0f3b518b9 100644 --- a/drivers/net/wireless/ath/ath10k/pci.c +++ b/drivers/net/wireless/ath/ath10k/pci.c @@ -1767,6 +1767,7 @@ static void ath10k_pci_fw_dump_work(struct work_struct *work) scnprintf(guid, sizeof(guid), "n/a"); ath10k_err(ar, "firmware crashed! (guid %s)\n", guid); + module_firmware_crashed(); ath10k_print_driver_info(ar); ath10k_pci_dump_registers(ar, crash_data); ath10k_ce_dump_registers(ar, crash_data); @@ -2837,6 +2838,7 @@ static int ath10k_pci_hif_power_up(struct ath10k *ar, if (ret) { if (ath10k_pci_has_fw_crashed(ar)) { ath10k_warn(ar, "firmware crashed during chip reset\n"); + module_firmware_crashed(); ath10k_pci_fw_crashed_clear(ar); ath10k_pci_fw_crashed_dump(ar); } diff --git a/drivers/net/wireless/ath/ath10k/sdio.c b/drivers/net/wireless/ath/ath10k/sdio.c index e2aff2254a40..d34ad289380f 100644 --- a/drivers/net/wireless/ath/ath10k/sdio.c +++ b/drivers/net/wireless/ath/ath10k/sdio.c @@ -794,6 +794,7 @@ static int ath10k_sdio_mbox_proc_dbg_intr(struct ath10k *ar) /* TODO: Add firmware crash handling */ ath10k_warn(ar, "firmware crashed\n"); + module_firmware_crashed(); /* read counter to clear the interrupt, the debug error interrupt is * counter 0. @@ -915,6 +916,7 @@ static int ath10k_sdio_mbox_proc_cpu_intr(struct ath10k *ar) if (cpu_int_status & MBOX_CPU_STATUS_ENABLE_ASSERT_MASK) { ath10k_err(ar, "firmware crashed!\n"); queue_work(ar->workqueue, &ar->restart_work); + module_firmware_crashed(); } return ret; } diff --git a/drivers/net/wireless/ath/ath10k/snoc.c b/drivers/net/wireless/ath/ath10k/snoc.c index 354d49b1cd45..7cfc123c345c 100644 --- a/drivers/net/wireless/ath/ath10k/snoc.c +++ b/drivers/net/wireless/ath/ath10k/snoc.c @@ -1451,6 +1451,7 @@ void ath10k_snoc_fw_crashed_dump(struct ath10k *ar) scnprintf(guid, sizeof(guid), "n/a"); ath10k_err(ar, "firmware crashed! (guid %s)\n", guid); + module_firmware_crashed(); ath10k_print_driver_info(ar); ath10k_msa_dump_memory(ar, crash_data); mutex_unlock(&ar->dump_mutex); From patchwork Sat May 9 04:35:52 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Luis Chamberlain X-Patchwork-Id: 219582 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=-10.1 required=3.0 tests=DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS, URIBL_BLOCKED, USER_AGENT_GIT autolearn=unavailable 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 CDC83C54E49 for ; Sat, 9 May 2020 04:36:24 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id AB35B24955 for ; Sat, 9 May 2020 04:36:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1588998984; bh=FOYhLatQ928gyoxKqUoLRgFuoUjXoj+oErxZGurj3Qk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=M+P4zLMbVI+LYk+jCX5M4UtYxAWfo4AsP73stKkImHbItP2lSLJkkBadlYdGjUlP/ 4il2IgcCUnVpFIjUR0z0oKyOz9DLt/h+UpXf+cjlwZ8wIXCyn8g4aw0zVBSgcRuupw 23fcM87oNF7Efmy2MVuLpZy1KSDR1tY4xWCUAJNg= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728866AbgEIEgW (ORCPT ); Sat, 9 May 2020 00:36:22 -0400 Received: from mail-pl1-f196.google.com ([209.85.214.196]:43377 "EHLO mail-pl1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728846AbgEIEgT (ORCPT ); Sat, 9 May 2020 00:36:19 -0400 Received: by mail-pl1-f196.google.com with SMTP id z6so1625457plk.10; Fri, 08 May 2020 21:36:19 -0700 (PDT) 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:mime-version:content-transfer-encoding; bh=WzAUhm9PAzr7uU8H1Lc2ngEyBupzXwHNyDw+1FmrAuk=; b=ABo2hpRjR7QwDjQAzeVuBVN1+ujsAAnhezO+qg1r3MO1zyxXMWsonIYOiPhSECGsLQ kQ76j5GjlBCf6W1vpagB4SE8W5Dx9bRdB+8RzZhV6MMmboiZ9eALX7JE2MwBQAiNHMe1 J36mVZlOf6FPKwLJodnBjwcfpv55x7hMCfYRQE9YbwtRNT5DfpECsTQAalBAeQgG+JU7 C4Dwel2wfOZpGjBvbMJUOxx9fmnjD874Iw21JqoVc+pPyMzS4u7o8Vvl2Lf8bZ9tX4T2 G3+AD0DeQ8hz89fLXfNEZbIg2YzIUH1o+2qKOT1jzKzC/MQWkJ283b+LI8vhRes+QwCm ldXQ== X-Gm-Message-State: AGi0PuY6fLMTaLNQ2HrtvXDqfM8Ri5e9i8v/X5tFsHa2geKEJYQt5NmT C6wLYzBrJZ0Rdx9SSd09Q18= X-Google-Smtp-Source: APiQypLTFb2RAG3FyXNjeEw4HN1+FeVK1th9HhFtNsa33Z6gZafA063iGaEXxunyudg4OhViLAcglQ== X-Received: by 2002:a17:90b:19c9:: with SMTP id nm9mr9798057pjb.86.1588998978909; Fri, 08 May 2020 21:36:18 -0700 (PDT) Received: from 42.do-not-panic.com (42.do-not-panic.com. [157.230.128.187]) by smtp.gmail.com with ESMTPSA id b20sm3293544pff.8.2020.05.08.21.36.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 08 May 2020 21:36:15 -0700 (PDT) Received: by 42.do-not-panic.com (Postfix, from userid 1000) id 76BD542349; Sat, 9 May 2020 04:36:01 +0000 (UTC) From: Luis Chamberlain To: jeyu@kernel.org Cc: 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, davem@davemloft.net, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Luis Chamberlain , linux-wireless@vger.kernel.org, Lennert Buytenhek , "Gustavo A. R. Silva" , Johannes Berg , Ganapathi Bhat Subject: [PATCH 15/15] mwl8k: use new module_firmware_crashed() Date: Sat, 9 May 2020 04:35:52 +0000 Message-Id: <20200509043552.8745-16-mcgrof@kernel.org> X-Mailer: git-send-email 2.23.0.rc1 In-Reply-To: <20200509043552.8745-1-mcgrof@kernel.org> References: <20200509043552.8745-1-mcgrof@kernel.org> MIME-Version: 1.0 Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org 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: linux-wireless@vger.kernel.org Cc: Lennert Buytenhek Cc: Kalle Valo Cc: "Gustavo A. R. Silva" Cc: Johannes Berg Cc: Ganapathi Bhat Signed-off-by: Luis Chamberlain --- drivers/net/wireless/marvell/mwl8k.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/net/wireless/marvell/mwl8k.c b/drivers/net/wireless/marvell/mwl8k.c index 97f23f93f6e7..d609ef1bb879 100644 --- a/drivers/net/wireless/marvell/mwl8k.c +++ b/drivers/net/wireless/marvell/mwl8k.c @@ -1551,6 +1551,7 @@ static int mwl8k_tx_wait_empty(struct ieee80211_hw *hw) * the firmware has crashed */ if (priv->hw_restart_in_progress) { + module_firmware_crashed(); if (priv->hw_restart_owner == current) return 0; else