Received: by 2002:a05:6358:489b:b0:bb:da1:e618 with SMTP id x27csp6222281rwn; Tue, 13 Sep 2022 00:21:37 -0700 (PDT) X-Google-Smtp-Source: AA6agR6bqjib1S9N9BP2e2362SqqBIDLaiFbJOUVrKSIkMHa/JhWgc/U9fqbgVBPqQjjeNR7hKw7 X-Received: by 2002:a63:fd41:0:b0:438:7670:589a with SMTP id m1-20020a63fd41000000b004387670589amr18900070pgj.148.1663053697738; Tue, 13 Sep 2022 00:21:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1663053697; cv=none; d=google.com; s=arc-20160816; b=LMWBgTl9FiCwcN4NlED9NENfFp7eYL4TslVkG4A4SAIg9QhTU7MlddkgdhesYII2PB 6g8Q3nDdBUsJUI5k68eGIpgZy2F0BoIWXm7gM8GxpQG6EirG/Qs0BOmIwiJ+vrzVfI3W H5YRiX21aq1CTN6kbRH9oZLfE+R7NO1Vsablrhk47b+6k2F0utnhf5F1LE2r7fsRDen8 rtUBjvnz+1w1VYr5nc77k/N4puOlQEsP86U3G/FtjSbFnk6/CPClCWR27h6g+F1Ac0AH qNBAyZ+EJ0LC7BPfMSglO3z6g7z9cXs0W6jY+85lWIDCzNy+fC3ge6klm90genllbyOh Utog== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:user-agent:message-id:in-reply-to :date:references:subject:cc:to:from:dkim-signature; bh=Ggmudy6dU/4exGJDvwMnz/avE2Q8o170rHn1QK4HC/s=; b=eypgPFbkvD2KAo6dTjrsUqQseaDsjmZ6d/6k+pDY38PG4EGIUzXXrNru7I+0D1tdx8 4+0uKDOaJvDDG3Os08NWnlHtuQ15cqD8VpQRJYHIyxtIHw/h4QXjNcR9pp9ulSsa3A3O a35X4Yf4lM8TQL3mrPgJ3rT4j/PJzhWAjROcEKx9TGvUVPbw9PDcHQRqR8LAll2nvu2V HpUAABBX4XNAK4lfA93SIbq34mC4qY4lu/JtCGD7mJOnZICQZXnPCfe6KiHi4AnjniiJ DTCJWw9drALR8sVgMH2W7H1jDPW/bf1dbLYekLCaA/QU8mfr240ylDm+P96bumlQQgr+ nYYA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="g/YkRIyA"; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id m11-20020a17090a414b00b00202809c2d75si10529525pjg.45.2022.09.13.00.21.28; Tue, 13 Sep 2022 00:21:37 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="g/YkRIyA"; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230349AbiIMHOW (ORCPT + 64 others); Tue, 13 Sep 2022 03:14:22 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42604 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229749AbiIMHOV (ORCPT ); Tue, 13 Sep 2022 03:14:21 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DBAF220F76 for ; Tue, 13 Sep 2022 00:14:20 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 8F989B80AFA for ; Tue, 13 Sep 2022 07:14:19 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 531AAC433D7; Tue, 13 Sep 2022 07:14:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1663053258; bh=3IAaG5i9BMfJkmrzHP9UDz6S0XKdAG3s8OWpc/wy6eY=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From; b=g/YkRIyA4ttkdZ3mOAFMSN5lOo5mfIgrGn0BA4eLFGYGzy5bgqNbdmImkku4mntg3 rZmOJlZgk75Yi8PUYz7WMAdW6UWLkp0zo3KtwBvQsqJiQbynnJAMGfr9hrTHt0SDNT pYzuy75Le3/s9JNukeOxtXt2AqlSLJKbldoWkej6jWsnUNC3XTsdws2P1Ul4/Y6aVi ChOosgNwdCkM3CKEfmil8J8OFsfR0DLVmXrPL3oH9IwYCW3YP2HNRQfcSBE0yxm/Pw o1+W2qZVsJdOUYKeHKs8C1eTrVFNhk0Pm9PZRFKKJztVFDrxAzMCpO8oORvUDhtVsd awdhvzafw+o1A== From: Kalle Valo To: Baochen Qiang Cc: , Subject: Re: [PATCH v2 2/2] wifi: ath11k: Implement sram dump interface References: <20220802075533.1744-1-quic_bqiang@quicinc.com> <20220802075533.1744-3-quic_bqiang@quicinc.com> <87fsh0962e.fsf@kernel.org> <0e64e270-77c3-5c1a-08bc-577a82c8abac@quicinc.com> Date: Tue, 13 Sep 2022 10:14:14 +0300 In-Reply-To: <0e64e270-77c3-5c1a-08bc-577a82c8abac@quicinc.com> (Baochen Qiang's message of "Tue, 13 Sep 2022 11:06:33 +0800") Message-ID: <87pmfz7nll.fsf@kernel.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org Baochen Qiang writes: >>> + u32 i; >>> + >>> + /* for offset beyond BAR + 4K - 32, may >>> + * need to wakeup the device to access. >>> + */ >>> + wakeup_required = test_bit(ATH11K_FLAG_DEVICE_INIT_DONE, &ab->dev_flags) && >>> + end >= ATH11K_PCI_ACCESS_ALWAYS_OFF; >>> + if (wakeup_required && ab->pci.ops->wakeup) { >>> + ret = ab->pci.ops->wakeup(ab); >>> + if (ret) >>> + ath11k_warn(ab, "%s: failed to do wakeup: %d\n", __func__, ret); >>> + } >> >> I changed the error handling so that if wakeup() fails we do not >> continue and just return an error. > > I prefer to keep the original design, because in that case we still > have something to check after firmware crashes. > > I admit that the dump content may be invalid if wakeup fails, but we > can know that by checking kernel log, so we can avoid misleading. Too late now, I already applied the patch. You need to submit a new patch to change the logic. And if we really want to ignore the wakeup failure there should be a proper comment in the code explaining the idea, and maybe improve the warning message to make it more understandable for the user. -- https://patchwork.kernel.org/project/linux-wireless/list/ https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches