diff options
author | Luke Zhang <lukez@codeaurora.org> | 2016-01-25 16:45:29 -0800 |
---|---|---|
committer | Prashant Malani <pmalani@google.com> | 2016-03-14 17:06:09 -0700 |
commit | 2bef2d6c7e96f4edf0eb1510b6788ef064fb2193 (patch) | |
tree | 8f4209edb5baaf85825b61eac1cc3a5e6d2867f3 /msm8909 | |
parent | 982edd19a092114c479134cb16e0af54730edf1f (diff) | |
download | platform_hardware_qcom_bt-2bef2d6c7e96f4edf0eb1510b6788ef064fb2193.tar.gz platform_hardware_qcom_bt-2bef2d6c7e96f4edf0eb1510b6788ef064fb2193.tar.bz2 platform_hardware_qcom_bt-2bef2d6c7e96f4edf0eb1510b6788ef064fb2193.zip |
Fixed the problem of ADSP crash while Fuzzing BT
During Fuzzing BT test, BT cannot recover after SSR was triggered
due to command timed out. The reason is that during this test, the
property of wc_transport.force_special_byte was not set, so SOC
stayed in suspend mode.
Change-Id: I41f9dae5ec4c771e078d09213b0d19f23ec9de1f
CRs-fixed: 964802
Diffstat (limited to 'msm8909')
-rw-r--r-- | msm8909/libbt-vendor/src/bt_vendor_qcom.c | 27 |
1 files changed, 25 insertions, 2 deletions
diff --git a/msm8909/libbt-vendor/src/bt_vendor_qcom.c b/msm8909/libbt-vendor/src/bt_vendor_qcom.c index 464defd..294c0c3 100644 --- a/msm8909/libbt-vendor/src/bt_vendor_qcom.c +++ b/msm8909/libbt-vendor/src/bt_vendor_qcom.c @@ -52,6 +52,7 @@ #define CMD_TIMEOUT 0x22 static void wait_for_patch_download(bool is_ant_req); +static bool is_debug_force_special_bytes(void); /****************************************************************************** ** Externs @@ -1087,13 +1088,19 @@ static void ssr_cleanup(int reason) { trig_ssr = 0xEE; ret = write (vnd_userial.fd, &trig_ssr, 1); ALOGI("Trig_ssr is being sent to BT socket, retval(%d) :errno: %s", ret, strerror(errno)); - return; + + if (is_debug_force_special_bytes()) { + //Then we should send special byte to crash SOC in WCNSS_Filter, so we do not + //need to power off UART here. + return; + } } + /*Close both ANT channel*/ op(BT_VND_OP_ANT_USERIAL_CLOSE, NULL); #endif #endif - /*Close both ANT channel*/ + /*Close both BT channel*/ op(BT_VND_OP_USERIAL_CLOSE, NULL); /*CTRL OFF twice to make sure hw * turns off*/ @@ -1144,6 +1151,22 @@ void wait_for_patch_download(bool is_ant_req) { } } +static bool is_debug_force_special_bytes() { + int ret = 0; + char value[PROPERTY_VALUE_MAX] = {'\0'}; + bool enabled = false; + + ret = property_get("wc_transport.force_special_byte", value, NULL); + + if (ret) { + enabled = (strcmp(value, "false") ==0) ? false : true; + ALOGV("%s: wc_transport.force_special_byte: %s, enabled: %d ", + __func__, value, enabled); + } + + return enabled; +} + // Entry point of DLib const bt_vendor_interface_t BLUETOOTH_VENDOR_LIB_INTERFACE = { sizeof(bt_vendor_interface_t), |