aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBjoern A. Zeeb <bz@FreeBSD.org>2023-05-17 20:21:14 +0000
committerBjoern A. Zeeb <bz@FreeBSD.org>2023-08-21 01:30:50 +0000
commit734e82fe33aa764367791a7d603b383996c6b40b (patch)
tree01d0ca2e26a445d4ac6626a1343bdb17f423a09d
parentadff403fe7a870c5b7a2d7e003d445c3b409bc0c (diff)
downloadsrc-734e82fe33aa764367791a7d603b383996c6b40b.tar.gz
src-734e82fe33aa764367791a7d603b383996c6b40b.zip
ath10k: specifically mark a debug workaround for an early firmware crash
During the last import a (debug) workaround to avoid an early firmware crash was imported. In order to remember and to separate it from upstream sources put it under #ifdef MFC after: 20 days
-rw-r--r--sys/contrib/dev/athk/ath10k/pci.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/sys/contrib/dev/athk/ath10k/pci.c b/sys/contrib/dev/athk/ath10k/pci.c
index 6a9b0367b2bd..b9fa4792d816 100644
--- a/sys/contrib/dev/athk/ath10k/pci.c
+++ b/sys/contrib/dev/athk/ath10k/pci.c
@@ -1450,14 +1450,23 @@ int ath10k_pci_hif_tx_sg(struct ath10k *ar, u8 pipe_id,
/* `i` is equal to `n_items -1` after for() */
ath10k_dbg(ar, ATH10K_DBG_PCI,
+#if defined(__linux__)
+ "pci tx item %d paddr %pad len %d n_items %d\n",
+ i, &items[i].paddr, items[i].len, n_items);
+#elif defined(__FreeBSD__)
"pci tx item %d paddr %pad len %d n_items %d pipe_id %u\n",
i, &items[i].paddr, items[i].len, n_items, pipe_id);
+ /*
+ * XXX-BZ specific debug; the DELAY makes things work for one chipset.
+ * There's likely a race somewhere (here or LinuxKPI).
+ */
if (n_items == 1 && items[i].len == 140) {
ath10k_dbg_dump(ar, ATH10K_DBG_PCI, NULL, "pci tx data: ",
items[i].vaddr, items[i].len);
dump_stack();
DELAY(500);
}
+#endif
ath10k_dbg_dump(ar, ATH10K_DBG_PCI_DUMP, NULL, "pci tx data: ",
items[i].vaddr, items[i].len);