All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Bluetooth: qca: If memdump doesn't work, re-enable IBS
@ 2024-05-18  0:02 Douglas Anderson
  2024-05-18  1:06 ` bluez.test.bot
                   ` (3 more replies)
  0 siblings, 4 replies; 8+ messages in thread
From: Douglas Anderson @ 2024-05-18  0:02 UTC (permalink / raw)
  To: Marcel Holtmann, Luiz Augusto von Dentz
  Cc: Stephen Boyd, Guenter Roeck, Johan Hovold, Bartosz Golaszewski,
	Douglas Anderson, Sai Teja Aluvala, linux-bluetooth, linux-kernel

On systems in the field, we are seeing this sometimes in the kernel logs:
  Bluetooth: qca_controller_memdump() hci0: hci_devcd_init Return:-95

This means that _something_ decided that it wanted to get a memdump
but then hci_devcd_init() returned -EOPNOTSUPP (AKA -95).

The cleanup code in qca_controller_memdump() when we get back an error
from hci_devcd_init() undoes most things but forgets to clear
QCA_IBS_DISABLED. One side effect of this is that, during the next
suspend, qca_suspend() will always get a timeout.

Let's fix it so that we clear the bit.

Fixes: 06d3fdfcdf5c ("Bluetooth: hci_qca: Add qcom devcoredump support")
Signed-off-by: Douglas Anderson <dianders@chromium.org>
---
I'm nowhere near an expert on this code so please give extra eyes on
this patch. I also have no idea how to reproduce the problem nor even
how to trigger a memdump to test it. I'd love any advice that folks
could give. ;-)

 drivers/bluetooth/hci_qca.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/bluetooth/hci_qca.c b/drivers/bluetooth/hci_qca.c
index 0c9c9ee56592..1ef12f5a115d 100644
--- a/drivers/bluetooth/hci_qca.c
+++ b/drivers/bluetooth/hci_qca.c
@@ -1090,6 +1090,7 @@ static void qca_controller_memdump(struct work_struct *work)
 				qca->memdump_state = QCA_MEMDUMP_COLLECTED;
 				cancel_delayed_work(&qca->ctrl_memdump_timeout);
 				clear_bit(QCA_MEMDUMP_COLLECTION, &qca->flags);
+				clear_bit(QCA_IBS_DISABLED, &qca->flags);
 				mutex_unlock(&qca->hci_memdump_lock);
 				return;
 			}
-- 
2.45.0.rc1.225.g2a3ae87e7f-goog


^ permalink raw reply related	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2024-08-21 22:10 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-05-18  0:02 [PATCH] Bluetooth: qca: If memdump doesn't work, re-enable IBS Douglas Anderson
2024-05-18  1:06 ` bluez.test.bot
2024-05-22 22:13 ` [PATCH] " Stephen Boyd
2024-05-22 22:18 ` Guenter Roeck
2024-06-10 23:52 ` Doug Anderson
2024-07-31 20:29   ` Doug Anderson
2024-08-21 21:18     ` Doug Anderson
2024-08-21 22:10       ` Luiz Augusto von Dentz

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.