Received: by 2002:a25:6193:0:0:0:0:0 with SMTP id v141csp4232661ybb; Tue, 7 Apr 2020 03:29:37 -0700 (PDT) X-Google-Smtp-Source: APiQypJ8Pidvwmer75J0Z51odrxH5RlqTu2/JzNaIh49aZGLoMV0dgi92oVhQTHfz7VLmYfTefFp X-Received: by 2002:a9d:6950:: with SMTP id p16mr932285oto.199.1586255377246; Tue, 07 Apr 2020 03:29:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1586255377; cv=none; d=google.com; s=arc-20160816; b=rKsdkL9bHx1XaUd2QKwezVoc9V64qhGhN82d98xgY+ORT0IB+mEpbD2Y2q7KDNfwUR /coDYMJLf4iZJ6vhQnoYboLT6kUMqzd+gRxcAJJZ9QKmc2RY+VgdulkzcKV20KYLL4KV wMWFWQxjw7uztJswiz6JPAc96jIsrbJERWHFHo4/XlML5FiRp83iPRNLOE1AGhCYuxFI sAtalFT0FLTPN1NLalt9ITetYwrfO9Umh4dZHNV+dXIICArpg7tGrqyN3HvEI6MDJ3pv aODPs5Ga0zmz8kMK5f7+rVxRwpEi8P7cf9RtOool6pD7OsGNj2qsey+WYddc407MUcIw S9Kw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=NiSnn5dBo3oBtSBCmYM4iIbMn5zZcoWbSLh3cNKdhp4=; b=wg5tFix0mDqO5TcRqkuepNepSj6V7S30h3hOTLXYxATWRXbBlEFTGVJWfIDe+bPGqP vmmkmQZ+NdiXEgwZaFUJnQWvUK+2zZTBm4Gr71XLhZ88xGS3tnmGM+oJd/2HSdc0aZmD wcPO73ntkkEWONLFjHQSk+Mg6G/9M2wtDh/aqHPISgICoipU3tQADyAwACn3NIlWXhtC A+kWruMMNkim8gz8QsnHGjNS45zN1m0WZB9U+Lr/2jyMw/LvBSho2gMMIMVGKIiwQEPq MQN7rpHNfAZTYN8bix3vBx3y7kwkyE6jWrTnln9ex4dcF8jhX7rZ5YUqJLo+WL7Dt1Qf Yqfg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=gC2LJSFy; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id n125si482137oib.97.2020.04.07.03.29.25; Tue, 07 Apr 2020 03:29:37 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=gC2LJSFy; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728574AbgDGKZX (ORCPT + 99 others); Tue, 7 Apr 2020 06:25:23 -0400 Received: from mail.kernel.org ([198.145.29.99]:35804 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728911AbgDGKZS (ORCPT ); Tue, 7 Apr 2020 06:25:18 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 0508D2074F; Tue, 7 Apr 2020 10:25:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1586255117; bh=hHJhgpsWRpualoY12/XLaw4edCex+4GAUYWIyfeAsjA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=gC2LJSFyqH3etd6zVgcwC4/pjfgss0eLgd5KufWF2eSDkNeIPLqmgaCcmZRjKOqL5 KEZwZT7RIczob31jENkhuxgEUk0BAsVWqXNI/UebxPM0GqUgjODYhJXT4QU17CNTx8 cGrfd+trSELQomgw8zocoDlG+6JdqK+7d0c2P4uE= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Luca Coelho Subject: [PATCH 5.5 37/46] iwlwifi: dbg: dont abort if sending DBGC_SUSPEND_RESUME fails Date: Tue, 7 Apr 2020 12:22:08 +0200 Message-Id: <20200407101503.423514591@linuxfoundation.org> X-Mailer: git-send-email 2.26.0 In-Reply-To: <20200407101459.502593074@linuxfoundation.org> References: <20200407101459.502593074@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Luca Coelho commit 699b760bd29edba736590fffef7654cb079c753e upstream. If the firmware is in a bad state or not initialized fully, sending the DBGC_SUSPEND_RESUME command fails but we can still collect logs. Instead of aborting the entire dump process, simply ignore the error. By removing the last callpoint that was checking the return value, we can also convert the function to return void. Signed-off-by: Luca Coelho Fixes: 576058330f2d ("iwlwifi: dbg: support debug recording suspend resume command") Signed-off-by: Luca Coelho Link: https://lore.kernel.org/r/iwlwifi.20200306151129.dcec37b2efd4.I8dcd190431d110a6a0e88095ce93591ccfb3d78d@changeid Signed-off-by: Greg Kroah-Hartman --- drivers/net/wireless/intel/iwlwifi/fw/dbg.c | 15 +++++---------- drivers/net/wireless/intel/iwlwifi/fw/dbg.h | 6 +++--- 2 files changed, 8 insertions(+), 13 deletions(-) --- a/drivers/net/wireless/intel/iwlwifi/fw/dbg.c +++ b/drivers/net/wireless/intel/iwlwifi/fw/dbg.c @@ -2491,10 +2491,7 @@ static void iwl_fw_dbg_collect_sync(stru goto out; } - if (iwl_fw_dbg_stop_restart_recording(fwrt, ¶ms, true)) { - IWL_ERR(fwrt, "Failed to stop DBGC recording, aborting dump\n"); - goto out; - } + iwl_fw_dbg_stop_restart_recording(fwrt, ¶ms, true); IWL_DEBUG_FW_INFO(fwrt, "WRT: Data collection start\n"); if (iwl_trans_dbg_ini_valid(fwrt->trans)) @@ -2659,14 +2656,14 @@ static int iwl_fw_dbg_restart_recording( return 0; } -int iwl_fw_dbg_stop_restart_recording(struct iwl_fw_runtime *fwrt, - struct iwl_fw_dbg_params *params, - bool stop) +void iwl_fw_dbg_stop_restart_recording(struct iwl_fw_runtime *fwrt, + struct iwl_fw_dbg_params *params, + bool stop) { int ret = 0; if (test_bit(STATUS_FW_ERROR, &fwrt->trans->status)) - return 0; + return; if (fw_has_capa(&fwrt->fw->ucode_capa, IWL_UCODE_TLV_CAPA_DBG_SUSPEND_RESUME_CMD_SUPP)) @@ -2683,7 +2680,5 @@ int iwl_fw_dbg_stop_restart_recording(st iwl_fw_set_dbg_rec_on(fwrt); } #endif - - return ret; } IWL_EXPORT_SYMBOL(iwl_fw_dbg_stop_restart_recording); --- a/drivers/net/wireless/intel/iwlwifi/fw/dbg.h +++ b/drivers/net/wireless/intel/iwlwifi/fw/dbg.h @@ -239,9 +239,9 @@ _iwl_fw_dbg_trigger_simple_stop(struct i _iwl_fw_dbg_trigger_simple_stop((fwrt), (wdev), \ iwl_fw_dbg_get_trigger((fwrt)->fw,\ (trig))) -int iwl_fw_dbg_stop_restart_recording(struct iwl_fw_runtime *fwrt, - struct iwl_fw_dbg_params *params, - bool stop); +void iwl_fw_dbg_stop_restart_recording(struct iwl_fw_runtime *fwrt, + struct iwl_fw_dbg_params *params, + bool stop); #ifdef CONFIG_IWLWIFI_DEBUGFS static inline void iwl_fw_set_dbg_rec_on(struct iwl_fw_runtime *fwrt)