]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
Bluetooth: qca: If memdump doesn't work, re-enable IBS
authorDouglas Anderson <dianders@chromium.org>
Wed, 21 Aug 2024 22:43:40 +0000 (15:43 -0700)
committerLuiz Augusto von Dentz <luiz.von.dentz@intel.com>
Fri, 30 Aug 2024 21:48:24 +0000 (17:48 -0400)
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")
Reviewed-by: Guenter Roeck <groeck@chromium.org>
Reviewed-by: Stephen Boyd <swboyd@chromium.org>
Signed-off-by: Douglas Anderson <dianders@chromium.org>
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
drivers/bluetooth/hci_qca.c

index 4b1ad7ea5b95a93ad2d48e4e1a4882651da8312c..678f150229e7796b237f5b538292100383d58407 100644 (file)
@@ -1091,6 +1091,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;
                        }