Skip to content
Snippets Groups Projects
Commit acce2edf authored by Ying Hsu's avatar Ying Hsu Committed by Gerrit Code Review
Browse files

Merge "floss: Reset BT controller on HW error event" into main

parents 9a4cff38 dc27b22b
No related branches found
No related tags found
No related merge requests found
......@@ -16,6 +16,10 @@
#include "hci/hci_layer.h"
#ifdef TARGET_FLOSS
#include <signal.h>
#endif
#include "common/bind.h"
#include "common/init_flags.h"
#include "common/stop_watch.h"
......@@ -443,7 +447,15 @@ struct HciLayer::impl {
void on_hardware_error(EventView event) {
HardwareErrorView event_view = HardwareErrorView::Create(event);
ASSERT(event_view.IsValid());
#ifdef TARGET_FLOSS
LOG_WARN("Hardware Error Event with code 0x%02x", event_view.GetHardwareCode());
// Sending SIGINT to process the exception from BT controller.
// The Floss daemon will be restarted. HCI reset during restart will clear the
// error state of the BT controller.
kill(getpid(), SIGINT);
#else
LOG_ALWAYS_FATAL("Hardware Error Event with code 0x%02x", event_view.GetHardwareCode());
#endif
}
void on_le_meta_event(EventView event) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment