From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mx0a-0031df01.pphosted.com (mx0a-0031df01.pphosted.com [205.220.168.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 9D9B62F7445 for ; Mon, 25 May 2026 04:54:33 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=205.220.168.131 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779684874; cv=none; b=QWeGbHaJdnQZLfQ3/v3gg1pbORpcIJkGExbLqX5ZJN9i9RGRXYSem40MhjiR0Wu6pw3RMnNgWfMhAT1cZfvimjQtAa794HuEeA1Qt06z6WLDx+P/OvMcORHtsnBjA7RuIcyMePikhCsMBNq7kRXENj2PvQ6NOGvhcPOE2XJP8Xs= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779684874; c=relaxed/simple; bh=mLKpSdg5UZFpJKCKH2pdp7Peb+6WwPB+uVGIggRnO4w=; h=Message-ID:Date:MIME-Version:From:Subject:To:Cc:References: In-Reply-To:Content-Type; b=NCPAnpbLDe+Ko0FZF78qJ8ho26FDqc/r6hd8ExrfKCwZXe8FqPwAPOKR+AP7OlLuNKGt8K4Ry+uhWL98zYBYJCRupWTDNJy2O7cafyBRTkLAocJ5M31MgmHu6olQ0si3TOz8qVX+4y2cvZRWUnG8TxSJfNJ8xBqNphlthf0C6nQ= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=oss.qualcomm.com; spf=pass smtp.mailfrom=oss.qualcomm.com; dkim=pass (2048-bit key) header.d=qualcomm.com header.i=@qualcomm.com header.b=Hb6Xo9KY; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b=EZJB7xAv; arc=none smtp.client-ip=205.220.168.131 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=oss.qualcomm.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=oss.qualcomm.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=qualcomm.com header.i=@qualcomm.com header.b="Hb6Xo9KY"; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b="EZJB7xAv" Received: from pps.filterd (m0279864.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 64OJ7qRC1508064 for ; Mon, 25 May 2026 04:54:33 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qualcomm.com; h= cc:content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to; s=qcppdkim1; bh= n0Rs6oaK/jqTub1cx6UO6JWIsXdV1vKT7AXCB2yogII=; b=Hb6Xo9KYv//g1fLV 1vC3sk2gtWb5ZAtlbZAwV4tZ9K/XU5SkQawELNH1e3B3pE+sRwxxya9gqIuJtIPD Uv3vMvMiYaTov2Ork8PeSRwyZLdyR9HLWids/TF0dyXndIuPet9XgUyRWFN288GV w1bZZkJUDrKjwxDszG5BSR70H3oVekswagSwnuuti4HzcFU5ahntIQPX68oYnDhS nhpcFOKso9ZgFDC7h5cBA18KD3pvh+1ViW6vBXP8sc6zKSreqYbbY1N1ZFY5TxK+ PmiX3e7pbP9p78fS+Q/uL/1vQL7YVBy6O3o0xIJgCvzMr0Y1b0iNepm13Nq8xyFv /Y/0lQ== Received: from mail-dy1-f197.google.com (mail-dy1-f197.google.com [74.125.82.197]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4ebba0v67p-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Mon, 25 May 2026 04:54:32 +0000 (GMT) Received: by mail-dy1-f197.google.com with SMTP id 5a478bee46e88-2ef62078ee7so10234874eec.0 for ; Sun, 24 May 2026 21:54:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1779684872; x=1780289672; darn=vger.kernel.org; h=content-transfer-encoding:in-reply-to:content-language:references :cc:to:subject:from:user-agent:mime-version:date:message-id:from:to :cc:subject:date:message-id:reply-to; bh=n0Rs6oaK/jqTub1cx6UO6JWIsXdV1vKT7AXCB2yogII=; b=EZJB7xAvQsQeDemIK/S5YO+2+ipcxs0hAd2d5a5ueihQ0x9IQwkQktSueAVCZHrHPW UFrLO6bo4i/dDsqgyOgX+Q1cNvjpV7G05c5Kz0BfIyg4ddvj6x51oAFI6csvC1S/sq4u pxMqCgM0WuiuDDmC4LQ6ELQea2LLbYXl92uY9aBHNIqf79C4g0dm6/AUyL9QLRV1gg43 ALrvJpzsFhjldd7K4xl9c/PCuHU1mDg8pgb3wG++xW1OoYGQ4q5gj6vIdZtaWXcoGT8w mKHzKqts3yE7KMzopUKatYU/d8PU1MT7Pixo3xwilsdr3au4BrMCiOzcX4IrPjSQ8YNS iIaQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1779684872; x=1780289672; h=content-transfer-encoding:in-reply-to:content-language:references :cc:to:subject:from:user-agent:mime-version:date:message-id:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=n0Rs6oaK/jqTub1cx6UO6JWIsXdV1vKT7AXCB2yogII=; b=WvDKGccenDUuuUyjrjqW9blgLWZg5OE895ZeszWfFiYrO4tuN3vopR/fLfsF1h3yCu /CXS6xdPQLO6omqylI6UJTYQl6ddzLvuCJW6yAxIZx0R5fNrKxD6qcIF67PHrR39bZHT ongseIo+6HQ7Op/pYGYbGIAZ49B8rOfEHGwdDh6tBPdaIKcNmjCcrzLshuFQB6DfSVyH KfN6sS1cGofGflKJ6LX7qAHyS+WrobHqNk57O6iUVJFf0sdrFAzo9NdA/KHgBuNN7IBI 5tQlZiu/yq6y101QJTJT1U7FiT2vZQM3GFjLx1YMwmkXFPYgbd/BsFPQVRdAbFj4I/Kq mLNw== X-Forwarded-Encrypted: i=1; AFNElJ+t9ToXIhpZ+iPFcK1w9iF67gczm+GfKb76Vh1+61olgGCrVZy56HtbSMjpIt/J3iV8zZzd+EybV36TPEA=@vger.kernel.org X-Gm-Message-State: AOJu0Yzw2dqdF2qnMrKWPyigODqxIG8UMUGTKjMDtQJZ9KGnWX/E5v90 MWe3y+hf2qtBkZZ0HAUrC0aQl5JLRkSPUy9gSbZkDTerMwUKX52pI1UQnad8cirOWhbcflg6Ajt nQYjraaKfw1B6gHdL87DZKCGV2hWUcAwI4ZMlJaZg/vAiLwhZUNOPEWD2ascpJnxUdhs= X-Gm-Gg: Acq92OF0vJfV9NaZq4MDH9HwfxU92mv/0W1l+mFQRItYP/Htd1jtGSZwxDh1YmR9ngF ISTCehaOo6RTYEUGnQO36XHQSj2ktKGBNHkxVmz6btCNbrFZMlpJ7eSc71/0davy8e2Arx/6I1a bUM5aWqNkagbL8rY/XDuOeDPWGsot9rQd7+xoe+MLbCgDDdhkOv/bCs5mQpwuwe4hdeH5IRqqdf 3kQAzwfmccIKGWB/8nzJ/nPTSYd8Gt04Mbz0rPyvEa3A0YYZUhxsbsG9j9T7GZrdU7zroIiLCZN hkoS/pzD0PxpcztEjV6hOUEUKMf6mDvru4nL6T7bGsNQAJYQwSz0cV5+39GGf7q7OK25MKSucdi IpkB4pFtvCxZr4bv3fJQwNXb2vGXybv/mfxbE2QXmBBLxYpFhheJwDoQIGv58r/MW2cXmlOBNq9 UVjw== X-Received: by 2002:a05:7022:913:b0:136:5631:bfed with SMTP id a92af1059eb24-1365fa355cfmr4334353c88.20.1779684871982; Sun, 24 May 2026 21:54:31 -0700 (PDT) X-Received: by 2002:a05:7022:913:b0:136:5631:bfed with SMTP id a92af1059eb24-1365fa355cfmr4334343c88.20.1779684871402; Sun, 24 May 2026 21:54:31 -0700 (PDT) Received: from [10.110.81.142] (i-global254.qualcomm.com. [199.106.103.254]) by smtp.gmail.com with ESMTPSA id a92af1059eb24-1366aba39d7sm5189913c88.14.2026.05.24.21.54.28 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 24 May 2026 21:54:31 -0700 (PDT) Message-ID: <9f898fe2-0b38-489a-b3d0-e13b00a68ab8@oss.qualcomm.com> Date: Mon, 25 May 2026 12:54:21 +0800 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird From: Shuai Zhang Subject: Re: [PATCH v1] Bluetooth: hci_qca: Increase SSR delay for rampatch and NVM loading To: Paul Menzel Cc: Bartosz Golaszewski , Marcel Holtmann , Luiz Augusto von Dentz , linux-arm-msm@vger.kernel.org, linux-bluetooth@vger.kernel.org, linux-kernel@vger.kernel.org, cheng.jiang@oss.qualcomm.com, quic_chezhou@quicinc.com, wei.deng@oss.qualcomm.com, jinwang.li@oss.qualcomm.com, mengshi.wu@oss.qualcomm.com, stable@vger.kernel.org References: <20260522110838.1158643-1-shuai.zhang@oss.qualcomm.com> <1b8e8129-4f42-429e-bd70-5e368551739c@molgen.mpg.de> Content-Language: en-US In-Reply-To: <1b8e8129-4f42-429e-bd70-5e368551739c@molgen.mpg.de> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Proofpoint-ORIG-GUID: idpeWViJlwGIXymKNtdkZWeoc1FGSIFX X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYwNTI1MDA0NSBTYWx0ZWRfX0Zav9+0ImFmh EZ9Tcz/UFSIL3ueV6rf78AdlnGuoe1DHY0kLYQREO0ATXdA0c8hDcsmNVGfoIOomA0Nf7tlynRC qvmIuKg+5TsTxtCG4XLLq/o9nDYSZpNkSGDt5zHP00+cbVNO8baeKd4XQduBA7eQ4TqhRQobk8Q Wf2R1OC71t3u/Yb904aPNCwKDOFAaZkaGhdHchvk6J69Vc65bZKr7MJRHSfOkilWmbHPJzpOWK9 MFYZUAMEA+I+NPJCyiXC+6SoKrifBmlvTIAyTI9njz292YLpMXujya/yUcjPYH5hAfZUF1qXRDs wH443/ibjz2tSmDnVzIayTr3A5qMOfXX4vSY/otWHYA7eC1KIQCkcPVL73qxopWorG6rtUcGfCW QGKTWVStLTlrRqsvECm7j07ers9WMwd3+pCMXZFR4zoNAwVP3JWYIyxzvh3gxCfP71u+rmUx8UK I3Iw7AR8bDMx98HC9Gw== X-Proofpoint-GUID: idpeWViJlwGIXymKNtdkZWeoc1FGSIFX X-Authority-Analysis: v=2.4 cv=Xca5Co55 c=1 sm=1 tr=0 ts=6a13d608 cx=c_pps a=Uww141gWH0fZj/3QKPojxA==:117 a=JYp8KDb2vCoCEuGobkYCKw==:17 a=IkcTkHD0fZMA:10 a=NGcC8JguVDcA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=u7WPNUs3qKkmUXheDGA7:22 a=DJpcGTmdVt4CTyJn9g5Z:22 a=VwQbUJbxAAAA:8 a=EUspDBNiAAAA:8 a=k2v91a5pJgHk7pTncY4A:9 a=3ZKOabzyN94A:10 a=QEXdDO2ut3YA:10 a=PxkB5W3o20Ba91AHUih5:22 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1143,Hydra:6.1.51,FMLib:17.12.100.49 definitions=2026-05-25_01,2026-05-18_01,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 spamscore=0 malwarescore=0 adultscore=0 priorityscore=1501 impostorscore=0 clxscore=1015 lowpriorityscore=0 bulkscore=0 phishscore=0 suspectscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2605130000 definitions=main-2605250045 Hi Paul Thanks for your review and suggestions. On 5/22/2026 10:50 PM, Paul Menzel wrote: > Dear Shuai, > > > Thank you for your patch. Please mention the delay in the > summary/title. Maybe: > > Use 100 ms SSR delay for rampatch and NVM loading > > Am 22.05.26 um 13:08 schrieb Shuai Zhang: >> When bt_en is pulled high by hardware, the host does not re-download >> the firmware after SSR. The controller loads the rampatch and NVM >> internally. >> >> On HMT chip, due to the large firmware file size, the > > Please document the size (> X MB) On HMT chip, the rampatch size is ~264 KB and the NVM is ~9.4 KB. I will update this information in the next version of the patch. > >> loading process takes approximately 70ms. The previous 50ms delay is >> too short, causing the controller to not respond to the reset command >> sent by the host, which leads to BT initialization failure. > > Maybe paste the log?  Bluetooth: hci0: QCA memdump Done, received 458752, total 458752  Bluetooth: hci0: mem_dump_status: 2  Bluetooth: hci0: Opcode 0x0c03 failed: -110 I will update this information in the next version of the patch. > >> Increase the delay to 100ms to ensure the controller has finished >> loading the firmware before the host sends commands. > > Why can’t it be increased to 1 s? > >> Steps to reproduce: >> 1. Trigger SSR and wait for SSR to complete: >>     hcitool cmd 0x3f 0c 26 >> 2. Run "bluetoothctl power on" and observe that BT fails to start. >> >> Fixes: fce1a9244a0f ("Bluetooth: hci_qca: Fix SSR (SubSystem Restart) >> fail when BT_EN is pulled up by hw") >> Cc: stable@vger.kernel.org >> Signed-off-by: Shuai Zhang >> --- >>   drivers/bluetooth/hci_qca.c | 4 ++-- >>   1 file changed, 2 insertions(+), 2 deletions(-) >> >> diff --git a/drivers/bluetooth/hci_qca.c b/drivers/bluetooth/hci_qca.c >> index ed280399b..184f52f9c 100644 >> --- a/drivers/bluetooth/hci_qca.c >> +++ b/drivers/bluetooth/hci_qca.c >> @@ -1680,8 +1680,8 @@ static void qca_hw_error(struct hci_dev *hdev, >> u8 code) >>           mod_timer(&qca->tx_idle_timer, jiffies + >>                     msecs_to_jiffies(qca->tx_idle_delay)); >>   -        /* Controller reset completion time is 50ms */ >> -        msleep(50); >> +        /* Wait for the controller to load the rampatch and NVM.*/ > > Missing space at the end. > >> +        msleep(100); >>             clear_bit(QCA_SSR_TRIGGERED, &qca->flags); >>           clear_bit(QCA_IBS_DISABLED, &qca->flags); > > Is the time it took to load the rampatch and NVM visible in the logs? No, the loading time of the rampatch and NVM is not visible in the host logs, as the firmware is loaded internally by the controller. > > > Kind regards, > > Paul Thanks, Shuai