From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mx0b-0031df01.pphosted.com (mx0b-0031df01.pphosted.com [205.220.180.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 D23E533D6FA for ; Thu, 25 Jun 2026 02:08:41 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=205.220.180.131 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1782353323; cv=none; b=MLS6uu0xyj/lHy2c+DRRuhk3SyP+83ipc9gezquokVxY+wC4GwIvA4o6JuGz791iP60wyvIhztwP19bd5KJUmnW/VR+sgnbgbl/g6C+fc1n7In/Bt3hIvBBCfgrmaUgw5Dcf0NMvUg72lkCJdVrEJChGmyxd0gqPE3rOdc6txN0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1782353323; c=relaxed/simple; bh=2ZmXQtki00OVDs26cp72st4xSOWl+5jurCzLVi+ahfY=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=uYd3bsHxNeimGPzep5atzdwxoTCRjmSkXf887FDaZwWjTW9J4aL+W0N+SmtgByRLdHdZoSIG84HBvRDOZyiaJ/Wd/kmXTfU4gun3XOK7QbN/LhlHed4/wju5YtsuDENqvycYf/aDO8q4d+Wo1p9CHaaiguCXESnD62yffkMhwzo= 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=FjHklYfA; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b=cU5sxb5d; arc=none smtp.client-ip=205.220.180.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="FjHklYfA"; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b="cU5sxb5d" Received: from pps.filterd (m0279868.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 65P269IZ730331 for ; Thu, 25 Jun 2026 02:08:40 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= X9O3LqEnWk1hcXZHFecyP2k3xenALgYADP34G52NT1M=; b=FjHklYfA0K9RSFLa OTei3cXDstjXL1d4Hmahd9pepTj+OtSDiekco8TXhCkp4NZVLB6ueRZFxXiuDt++ 1Ca7izHT/torJQRVzOtfV0TOhhtL+zvjgDW90UTkMLFRmMxl3rlyh+2OAPamN+VV SEyl3X9HUbdx0O3tgRYNh9mS/MZsAGOmfK7cWXWD7XMQKZTGqUprT6zIkQHTv+de nqaI7ue2Mdetn+sJNgF2FAX+FeZlrLKRLz1+kbg4zVRxNpQyUb3NtjX+LaAt0365 pU2loPGhlmUa4O/tS0EDC630k2z4E5I39tXLkQOdP64nDCS8jP9ypeoSitEjdOuM xnY1WA== Received: from mail-pj1-f69.google.com (mail-pj1-f69.google.com [209.85.216.69]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4f0apq40tm-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Thu, 25 Jun 2026 02:08:40 +0000 (GMT) Received: by mail-pj1-f69.google.com with SMTP id 98e67ed59e1d1-37dec2809ddso56837a91.3 for ; Wed, 24 Jun 2026 19:08:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1782353320; x=1782958120; darn=vger.kernel.org; h=content-transfer-encoding:content-type:in-reply-to:from :content-language:references:cc:to:subject:user-agent:mime-version :date:message-id:from:to:cc:subject:date:message-id:reply-to :content-type; bh=X9O3LqEnWk1hcXZHFecyP2k3xenALgYADP34G52NT1M=; b=cU5sxb5dfAYs908pOnZ2RgYn9mJ9qGkPeXCwBK0mF4Du2sIWQSkxUfUnHBVMfpUuar +DYzQlO4SFoL1SoeIRzRVz8XOnKB+75v2X1FIRn6aJwW8E6KmvVLQzWedwv2Oj62H25C omJJuwNocfn8eAGnLc603e/6aWdwbgPxW4zTYLv7G0JU5LcO6o9I+EnyuTx9kq0Fv7Zb DWzPob5bUvtgdsJgP4PS6hmnIGACI0qAmGd6A7Uzb69+kv3ufX6mXOVQbmUFKMc77Di6 MQR5nAorJL+XgHib0sWY2mfHmD3jNQUGplMib9KvKJcZA5/cbSnjPNRn/X0O2r0om9Ks 1UUA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1782353320; x=1782958120; h=content-transfer-encoding:content-type:in-reply-to:from :content-language:references:cc:to:subject:user-agent:mime-version :date:message-id:x-gm-gg:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to:content-type; bh=X9O3LqEnWk1hcXZHFecyP2k3xenALgYADP34G52NT1M=; b=tYIr8xxTj5VJxpeWipLAY4MJx8BlXvU2QR137HXocjaxHxKFCKodzqb41JInrI4Gcb F0JTo2qBQELhcrSLFi+gQl9HXEIb2a6tLq+CXE2fNQ+m3hY7tAaYf4qZwVo2IDbrMOav YAj0sDIGPAwDmoNbgC31Smbmp35iDTk4thnxOw7tiew1AkjorsQ9+MaTHPqjDCOEnCqn Hqh/KjIip0BmsIYPFJy/cbu95FFZluELlG/e8pYryBz/heA2SdCjc6sN1kHkiM3bYS0O PeRrArERhHwwIJb7cttBtgQnhc2SCCUc3grkFJzG2+8QtgFjd6WJesRvR/TLsTzsUbb2 mByw== X-Forwarded-Encrypted: i=1; AHgh+RoWIfuqgXpFVXXvcFMEd0n3yp58j6UKShKSVppG4131vbtlP8N8reY/YVSdarPj99ZkgkJoy0CsYX9lOuY=@vger.kernel.org X-Gm-Message-State: AOJu0Yw8tZUxNvfwmKJMeaUxik48cAkEBKnVIb+J8BdkBjCfMqrfDFgl 51tu9kINmj/XZtpvQtmUVvAZK7Xv7rnn0NBQWEThAdTy3WCFDFJDWkt9b633AzPIzV0iS4cDYLY kLflD+z42mtphN+56a33gUvkkoaHkAcSQr8QHrNuAap3p29PiCLlC2uUXlJz57SVdRjc= X-Gm-Gg: AfdE7cnMQAnrbT6yra2xnjQ9KLnoB9ueM9+dur0vG3Om3pSTFJKJLhpRsVPPsAVb2jl Zvshu2bAGYNLSx99bbdtiwUWogd9dof3/1iwSsz3zhSrbBuKjr/kBuu2IScZd6fIhlqh6NNoqaI Ser+oc3wuSfzUH6q65SuSe9Sf/kU5FGC4a14zSLPPZyOLdnaMcIt2AQbUZoWNqky8CcGt5vdmty cKcAsHWsFc0vaGQ4cGlQZY0uQA6VcQbiM7pljvzMMC6X6/oTYOdObQPDFO34YmkMy4Ywr+Swrrr ctfr3WyAmAL3xtGb10wMUKv2ehH6VQlZTbZVEfXmLsr1BCGVqLOAlrgjJ8whMrtsjjox3bH+CjL wWFVHxgw934H11R+/9d9NsY9MLBg0eQtou9mkHNSXwyBdyEVbC2NzR9I1FOcz6Ch0fLQoRuwl/y V2kw== X-Received: by 2002:a17:90b:1809:b0:36a:5d43:2446 with SMTP id 98e67ed59e1d1-37df9f107a7mr250172a91.2.1782353319784; Wed, 24 Jun 2026 19:08:39 -0700 (PDT) X-Received: by 2002:a17:90b:1809:b0:36a:5d43:2446 with SMTP id 98e67ed59e1d1-37df9f107a7mr250154a91.2.1782353319301; Wed, 24 Jun 2026 19:08:39 -0700 (PDT) Received: from [10.133.33.189] (tpe-colo-wan-fw-bordernet.qualcomm.com. [103.229.16.4]) by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-37df3dfdb99sm771198a91.11.2026.06.24.19.08.35 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 24 Jun 2026 19:08:38 -0700 (PDT) Message-ID: <08d5009c-507d-4c01-b888-e28a8c76bc06@oss.qualcomm.com> Date: Thu, 25 Jun 2026 10:08:33 +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 Subject: Re: [PATCH 12/13] Bluetooth: btqca: Fix undetected error HCI status in qca_send_reset() To: Luiz Augusto von Dentz Cc: Marcel Holtmann , Rocky Liao , Bartosz Golaszewski , Ben Young Tae Kim , Balakrishna Godavarthi , Matthias Kaehlcke , Zijun Hu , linux-bluetooth@vger.kernel.org, linux-kernel@vger.kernel.org, Luiz Augusto von Dentz , linux-arm-msm@vger.kernel.org References: <20260622-bt_bugfix-v1-0-11f936d84e72@oss.qualcomm.com> <20260622-bt_bugfix-v1-12-11f936d84e72@oss.qualcomm.com> Content-Language: en-US From: Zijun Hu In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Proofpoint-Spam-Info: AW1haW4tMjYwNjI1MDAxNiBTYWx0ZWRfX4qO86KxzVmdF d7/Gn/T57Lfh7qFfo729jFzTJiolPBp3FXhckJ0g4iBPZFcS0+MSrpDdqWOa2QIYEbgjSP8gRBt /Mze6VNAig6vEPY6yWaIgZI6TaVV7s4= X-Proofpoint-GUID: _J0bfvzOgmKAfWKKkmWXY325sKC9q5d- X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYwNjI1MDAxNiBTYWx0ZWRfXzFQnjA7cZVQA JXQcQkZlQuQypRDQkcX4wKya0PDgXY9ACrvMm00l5/mpn29tu1qJ9jnbie40/KZ5N28m5br1ymJ Le3nPIlIJNfBT/8smuS6Ak03Fw0RLTuGvC0YDXbWWmAPjKvCjZvAX2YxRa6I2+P29P/tYhVGrkV E7FTu5Rs95/npu3ASC1oDvlhFZn8X4oD1SVNpNL6GbFHxAf25nZK/39DSqXIIyYYrGvK7dcKzEG M0q7w8HLUBF1ShPk9yvmzk5zefvzZAPEah9jG0rRbgq8NcU9S4q+ZMJslcFs8rGfy+kD+HnVKbt FOEP7PDl5w2xCiIfea130dhrCK2ebDm1d+U3TJL/jBv1ORKHy5zVxotb+Xc0CYB5wtq9ZA7ik0Y jwbI+eU5JF7E4ziwPH88Yk1uzOpHww== X-Authority-Analysis: v=2.4 cv=NpbhtcdJ c=1 sm=1 tr=0 ts=6a3c8da8 cx=c_pps a=vVfyC5vLCtgYJKYeQD43oA==:117 a=nuhDOHQX5FNHPW3J6Bj6AA==:17 a=IkcTkHD0fZMA:10 a=FelO9ux0wxsA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=u7WPNUs3qKkmUXheDGA7:22 a=ZpdpYltYx_vBUK5n70dp:22 a=reVOoFzwNVHCOTdQRKoA:9 a=3ZKOabzyN94A:10 a=QEXdDO2ut3YA:10 a=rl5im9kqc5Lf4LNbBjHf:22 X-Proofpoint-ORIG-GUID: _J0bfvzOgmKAfWKKkmWXY325sKC9q5d- X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1143,Hydra:6.1.125,FMLib:17.12.100.49 definitions=2026-06-24_04,2026-06-24_01,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 lowpriorityscore=0 adultscore=0 bulkscore=0 spamscore=0 suspectscore=0 phishscore=0 malwarescore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2606150000 definitions=main-2606250016 On 6/23/2026 11:15 PM, Luiz Augusto von Dentz wrote: >> u8 cmd; >> @@ -990,7 +971,8 @@ int qca_uart_setup(struct hci_dev *hdev, uint8_t baudrate, >> } >> >> /* Perform HCI reset */ >> - err = qca_send_reset(hdev); >> + bt_dev_dbg(hdev, "QCA HCI_RESET"); >> + err = __hci_reset_sync(hdev); > So All the fuss about the reset is just to use it here? Actually the > distinction between -err and status is rather important. The first > means the command didn't run (timeout, cancel, etc), or it did run but > returned a status != 0. If you want to capture both then you must use > if (err). And yes there are parts of the code that test for < 0, but > that is either a bug or they are intentionally ignoring the reset > status as it is probably a non-recoverable error at that point. 1. Agree: > 0 for HCI status code (controller-side error), < 0 for command not executed (timeout, cancel, transport failure). __hci_reset_sync() was introduced in this series and will be refactored to follow this convention in v2. 2. Looking at drivers/bluetooth/, 7 out of 12 HCI reset call sites in the init/setup phase silently ignore the controller status — not sure if this is intentional or not. 3. qca_set_bdaddr() and qca_send_reset() will be fixed to return the HCI status code and let the caller decide whether to ignore it. Will address all of the above in v2.