From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: Received: from smtp.codeaurora.org ([198.145.29.96]) by bombadil.infradead.org with esmtps (Exim 4.92.2 #3 (Red Hat Linux)) id 1iBdj6-000171-MA for ath10k@lists.infradead.org; Sat, 21 Sep 2019 11:38:57 +0000 From: Kalle Valo Subject: Re: [PATCH v2] ath10k: add fw coredump for sdio when firmware assert References: <1567132338-7407-1-git-send-email-wgong@codeaurora.org> Date: Sat, 21 Sep 2019 14:38:52 +0300 In-Reply-To: <1567132338-7407-1-git-send-email-wgong@codeaurora.org> (Wen Gong's message of "Fri, 30 Aug 2019 10:32:18 +0800") Message-ID: <874l15c20j.fsf@codeaurora.org> MIME-Version: 1.0 List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "ath10k" Errors-To: ath10k-bounces+kvalo=adurom.com@lists.infradead.org To: Wen Gong Cc: linux-wireless@vger.kernel.org, ath10k@lists.infradead.org Wen Gong writes: > When firmware assert, it need coredump to analyze, this patch will > collect the register and memory info for sdio chip. > > The coredump configuration is different between PCIE and SDIO for > the same reversion, so this patch add bus type to distinguish PCIE > and SDIO chip for coredump. > > Tested with QCA6174 SDIO with firmware > WLAN.RMH.4.4.1-00007-QCARMSWP-1. > > Signed-off-by: Wen Gong [...] > +static int ath10k_sdio_read_mem(struct ath10k *ar, u32 address, void *buf, > + u32 buf_len) > +{ > + u32 val; > + int i, ret; > + > + for (i = 0; i < buf_len; i += 4) { > + ret = ath10k_sdio_hif_diag_read32(ar, address + i, &val); > + if (ret) { > + ath10k_warn(ar, "unable to read mem %d value\n", address + i); > + break; > + } > + memcpy(buf + i, &val, 4); > + } > + > + return ret; > +} What's wrong with ath10k_sdio_hif_diag_read()? AFAICS this whole function duplicates just what it does. -- Kalle Valo _______________________________________________ ath10k mailing list ath10k@lists.infradead.org http://lists.infradead.org/mailman/listinfo/ath10k