]> git.baikalelectronics.ru Git - kernel.git/commit
Bluetooth: hci_qca: Bug fixes while collecting controller memory dump
authorVenkata Lakshmi Narayana Gubba <gubbaven@codeaurora.org>
Fri, 14 Feb 2020 16:17:15 +0000 (21:47 +0530)
committerMarcel Holtmann <marcel@holtmann.org>
Tue, 18 Feb 2020 08:29:41 +0000 (09:29 +0100)
commitec0cc3dec6aac04b84069fafdcf0a6fc139e8cd3
tree9d744c3623b20ea035a7e98cb54c28223c8d62a2
parent7119bd4e97135f6c5e60ee11f1d22260b456b16c
Bluetooth: hci_qca: Bug fixes while collecting controller memory dump

This patch will fix the below issues
 1. Discarding memory dump events if memdump state is moved to
    MEMDUMP_TIMEOUT.
 2. Fixed race conditions between qca_hw_error() and qca_controller_memdump
    while free memory dump buffers using mutex lock
 3. Moved timeout timer to delayed work queue
 4. Injecting HW error event in a case when dumps failed to receive and HW
    error event is not yet received.
 5. Clearing hw error and command timeout function callbacks before
    sending pre shutdown command.

 Collecting memory dump will follow any of the below sequence.

 Sequence 1:
   Receiving Memory dump events from the controller
   Received entire dump in stipulated time
   Received HW error event from the controller
   Controller Reset from HOST

 Sequence 2:
   Receiving Memory dump events from the controller
   Failed to Receive entire dump in stipulated time
   A Timeout schedules and if no HW error event received a fake HW
     error event will be injected.
   Controller Reset from HOST.

 Sequence 3:
   Received HW error event
   HOST trigger SSR by sending crash packet to controller.
   Received entire dump in stipulated time
   Controller Reset from HOST

Fixes: 44c60ac308da ("Bluetooth: hci_qca: Collect controller memory dump during SSR")
Reported-by: Abhishek Pandit-Subedi <abhishekpandit@chromium.org>
Signed-off-by: Venkata Lakshmi Narayana Gubba <gubbaven@codeaurora.org>
Reviewed-by: Abhishek Pandit-Subedi <abhishekpandit@chromium.org>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
drivers/bluetooth/hci_qca.c