The branch main has been updated by bz:

URL: 
https://cgit.FreeBSD.org/src/commit/?id=734e82fe33aa764367791a7d603b383996c6b40b

commit 734e82fe33aa764367791a7d603b383996c6b40b
Author:     Bjoern A. Zeeb <[email protected]>
AuthorDate: 2023-05-17 20:21:14 +0000
Commit:     Bjoern A. Zeeb <[email protected]>
CommitDate: 2023-08-21 01:30:50 +0000

    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
---
 sys/contrib/dev/athk/ath10k/pci.c | 9 +++++++++
 1 file changed, 9 insertions(+)

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);
 

Reply via email to