• Venkata Lakshmi Narayana Gubba's avatar
    Bluetooth: hci_qca: Bug fixes while collecting controller memory dump · 7c2c3e63
    Venkata Lakshmi Narayana Gubba authored
    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: d841502c ("Bluetooth: hci_qca: Collect controller memory dump during SSR")
    Reported-by: default avatarAbhishek Pandit-Subedi <abhishekpandit@chromium.org>
    Signed-off-by: default avatarVenkata Lakshmi Narayana Gubba <gubbaven@codeaurora.org>
    Reviewed-by: default avatarAbhishek Pandit-Subedi <abhishekpandit@chromium.org>
    Signed-off-by: default avatarMarcel Holtmann <marcel@holtmann.org>
    7c2c3e63
hci_qca.c 51.3 KB