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 2452531AF3B for ; Fri, 26 Jun 2026 05:19:49 +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=1782451191; cv=none; b=nCxcPosOj0zvOwjiOKU0dRCSc8hpi5ys0V3ypbWR3Sdbl4uZRMRstjZCeRTqKht07TP5BqC6oVdbQ2sHIgzp2gbFzhhFFwauraRvYdoQRiGAHMQ1fvBUPsL/pLNgnloTWZZTIIH+OCPy8+f/7xzInPLkrhr9901xmlapwUWARSQ= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1782451191; c=relaxed/simple; bh=EKH/Vt/1xTialLQ4sM5W6HNPLWbLhK/YtG65acTMZc4=; h=From:Subject:Date:Message-Id:MIME-Version:Content-Type:To:Cc; b=Nngxw8WOl48A6TvPsuz6fpHuVtOID3CVWHLes5nfRy0BwznqGteHjY5uDI2qhNgMC3eOt1KiimwfqHkZPMaYcYw85ww82xQy8m11QfFF/AFscGF6boxkolLLVbm+RMjPusccRauRQfC1vP5jEH/zsfEu5nyXOxWBFB2//O5GJQ8= 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=OKnuzNpe; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b=IS9ZDk2N; 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="OKnuzNpe"; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b="IS9ZDk2N" Received: from pps.filterd (m0279863.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 65Q2iVOb1169649 for ; Fri, 26 Jun 2026 05:19:49 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qualcomm.com; h= cc:content-transfer-encoding:content-type:date:from:message-id :mime-version:subject:to; s=qcppdkim1; bh=Sgef4m5C7o0jlvPodxBmq1 elfsVOSLLM/9RER5yhqgA=; b=OKnuzNpePxc1QXfLOYYXekrXoUq8/D8ZAY7jgc ITTJHaL/1pE3GwpglIDFY7i7vXP8eO0Rn6yX5p6wsXaQPCKo6hfAczEHt9WZU4v6 07kq5MIcF9XbjQnwZlf+5mavVYhWGu0zAnDdKt8ai/TTMHi5qTil9qzQbFhEdqXe RZTT8dn0YGFZLovE0zbs1u1G7ZqXvj222R4fw5cvaLSagwP1izsQbiBm57w9Rz3q jVqiwBflymLUqDhLR7cpfiOqNc3EoR3qtYsKc6omJ8Dq3Fy8H2SasX4Yk4e3uRgx 2pL1U2bzVgRq+yD98LqSEdNKi+0SSHfCvvuGKsFekQ8R1hvw== Received: from mail-dy1-f199.google.com (mail-dy1-f199.google.com [74.125.82.199]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4f1fgc0sk1-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Fri, 26 Jun 2026 05:19:49 +0000 (GMT) Received: by mail-dy1-f199.google.com with SMTP id 5a478bee46e88-30c8aa3ca3eso62683eec.1 for ; Thu, 25 Jun 2026 22:19:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1782451188; x=1783055988; darn=vger.kernel.org; h=cc:to:content-transfer-encoding:content-type:mime-version :message-id:date:subject:from:from:to:cc:subject:date:message-id :reply-to:content-type; bh=Sgef4m5C7o0jlvPodxBmq1elfsVOSLLM/9RER5yhqgA=; b=IS9ZDk2N402x2VYIh+RUrpdpaDEOdUEDgMnWbfQXA0iIxS4x9hsB3SzgAVpwdQaFOZ uRlTDeD7QtvBMCjcU4I9VMkpsnMtX41rOg+whTjjyDK0MJXR/qJvFYJQgRWOB5X4ac1q Tp6HOtkBNtpiogWpVQ858L+XXMbzunAfT+CkV8gSWJbVqHgxMKBpuwZzNuBBiu7oBowV DixVdLOYG88qcw/cgZdBUNeZ5d0qwbStczdX78UNeWj4uKpQzaVkj2zhMZOZtgEPiOb+ QW9viHaz+eFZ5eb14Q2mHCDKl4xmYUWACeR860VP1fMDaVSoGXW4ftlI7PGB0Si5TVRy 3n4Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1782451188; x=1783055988; h=cc:to:content-transfer-encoding:content-type:mime-version :message-id:date:subject:from:x-gm-gg:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to:content-type; bh=Sgef4m5C7o0jlvPodxBmq1elfsVOSLLM/9RER5yhqgA=; b=jEVGCDZsuH76n7EICQyUX9pd3am1DK62lpYRMU7leSjl2XgwOt1idvA7KhjlSnlFMA AeKhmj2tm9JDdGeZoPc7P70/qoOYrd8dF+VFZR8KXI59O7KO34T2slVnuxFj3mZsGngG iLJC1aOEVaG95dQBQeWs7wA9lrVw73KWXTkSNHTq3QaNii1r0l7Or96AQaXl+AkuST/2 4DlA5ZWFfuW27Ikbf9NzE6QRPh8SRbp+BsyXOhPPvpkr26IwBz4rS621N9mIlZl7Tkls as72iAVmcuXETcJw5bQPGDN4F6Uf32jCHCi0Ze/tGbBvxACqqs6VRgqHF28ZNygmxP25 pSIQ== X-Forwarded-Encrypted: i=1; AHgh+RoO/Btpb43brmThrh25o9ekDYh9nLaY1SZ/hB7dL+dc3AfHZNQq68b7AmQZ2jlTbq4Qqu38CKCrkwVKw4k=@vger.kernel.org X-Gm-Message-State: AOJu0YwlOCvgok0uOs14KIW2h3+EFr4/L87l+a2AQuK7lbk25RKGhnG6 uEDgxvX61RbjWqUrWoXx12DZHoCtIunSYgddNCLvnjaDJyqZEd9AYuauWiHP2/bjd7ceqO8s1DL GwRV56mHIIAWqshdDToxX+CprhtVLjNH5/uk+YXHRktumivIjaMlIe368z5xVHb/02q78/CoVCW I= X-Gm-Gg: AfdE7clh9oidwKjXz6pSrZKEaPnI+UKubzMpsvWTbE39Y3MgQT1JiKR0XR4O18eTUlX wfbrYb+d10xuWiiSh37cuv0ax4vmQbTeab5Aoko8BYCki5jKIJpYXDHRoJ29orWMNjTM1w5Z3fC 5WTebkY/dnQHA4ppLhjMLt7ZY1TWBcpAr6X/lOEt6x552ftsJPG/wCulxKFoXO54VeVb+IGy3Pc RFbostib2xOfzWPXFUCD/sWmQqtkdEIqwRFLl05Oo1CL5lLBbwlCbcSNCFGNPmNrVE98wAINHa/ GutAwkzDeZpbW9+2M9i7G9IJ8s2+LAU4ihEIfm87AABIdhPzwgziiZjBT2eXAHNzv83lEM3uDWJ vkPXAt6v1bevuN/4NNQuPk6R4Z3TYo8+hiyy7XHTPDYN5BgIsgam0ynMvCg== X-Received: by 2002:a05:7300:d517:b0:30c:5197:3a09 with SMTP id 5a478bee46e88-30c84d5fea7mr2311805eec.7.1782451188364; Thu, 25 Jun 2026 22:19:48 -0700 (PDT) X-Received: by 2002:a05:7300:d517:b0:30c:5197:3a09 with SMTP id 5a478bee46e88-30c84d5fea7mr2311782eec.7.1782451187736; Thu, 25 Jun 2026 22:19:47 -0700 (PDT) Received: from hu-zijuhu-lv.qualcomm.com (Global_NAT1.qualcomm.com. [129.46.96.20]) by smtp.gmail.com with ESMTPSA id 5a478bee46e88-30c7c4ca240sm14345291eec.4.2026.06.25.22.19.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 25 Jun 2026 22:19:47 -0700 (PDT) From: Zijun Hu Subject: [PATCH v2 00/12] Bluetooth: btusb/btqca/hci_sync: Clean up btusb and fix several bugs Date: Thu, 25 Jun 2026 22:19:45 -0700 Message-Id: <20260625-bt_bugfix-v2-0-93396a6f7d5e@oss.qualcomm.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit X-B4-Tracking: v=1; b=H4sIAPELPmoC/22MwQrCMBAFf6Xs2ZRklWg9+R9SJEmTdsE2NWmDU vLvxp69PJjhMRtEG8hGuFYbBJsokp8K4KECM6ipt4y6woAcJZeITC8PvfaO3sxpjUIaJZxroPz nYIveW/e28EBx8eGzp5P42X+VJBhnQrjmKLvLyZ7x5mOsX6t6Gj+OdRloc85fo2HUCKkAAAA= X-Change-ID: 20260622-bt_bugfix-fbb216ca1ff9 To: Marcel Holtmann , Luiz Augusto von Dentz , Rocky Liao , Bartosz Golaszewski , Ben Young Tae Kim , Balakrishna Godavarthi , Matthias Kaehlcke , Tim Jiang Cc: Zijun Hu , linux-bluetooth@vger.kernel.org, linux-kernel@vger.kernel.org, Luiz Augusto von Dentz , linux-arm-msm@vger.kernel.org, Zijun Hu , Bartosz Golaszewski , Dmitry Baryshkov X-Mailer: b4 0.14.3 X-Proofpoint-Spam-Info: AW1haW4tMjYwNjI2MDA0MCBTYWx0ZWRfX1r5HBU3inOwI UvN0ARkeIjLSGE6TqHMaN23ZLlym6NYXGo049QbSmO+UPNWTN9x341t8FNQCpXOd8+xtTw3aJMv 8cPwg4Gqbl5kQOO/cHshngU9vNEP8fM= X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYwNjI2MDA0MCBTYWx0ZWRfXzS5cJLAFLaVW CTwzIc/Zh4+a4sbEu8nqTQv63DANKbWjUQ9g3Qr176iP+b+oeXUfHV1nHY5yd5W/Ei1vohMMIeX 5u9GU9qU5BNWmj/2b0jCYHXM1YfGSs5tzxrJ3Aztniz8irUQL3RI76OgxeG/12WiD1E+M7QH1Sy TB+Al82LglzKIQucxmV3sZtnpHomsDKauzfxvoTleug1cA7S4R9uYy0luVZ3RlqN4N3sa+ialNp i234pKVVRDcPT8An/ga/lvH3noZg+/eOm22uLmU6yfYGwxYiEC/Md0yH6imAmYUJl8SFwdnKYBL wf1DBc9UXE1m3qU9j07Rj22TAUSPqUqj8LuX8COgmNdhCOyImPXh+gA/mJL1+eNKLVsDzm7ipZP qQYG/XoYSjvHe4qHsyoWnepOZ/ZMJ3Brs5/UL9YtrgMOjz9PBnTv1GjD5KGG683eEMfm8XcE22E OWKXLc41N6ZZE9dkWRQ== X-Authority-Analysis: v=2.4 cv=O4oJeh9W c=1 sm=1 tr=0 ts=6a3e0bf5 cx=c_pps a=cFYjgdjTJScbgFmBucgdfQ==:117 a=ouPCqIW2jiPt+lZRy3xVPw==:17 a=IkcTkHD0fZMA:10 a=FelO9ux0wxsA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=u7WPNUs3qKkmUXheDGA7:22 a=yOCtJkima9RkubShWh1s:22 a=VwQbUJbxAAAA:8 a=EUspDBNiAAAA:8 a=39u25PDU96R9StkX-l8A:9 a=QEXdDO2ut3YA:10 a=scEy_gLbYbu1JhEsrz4S:22 X-Proofpoint-ORIG-GUID: oVsc1WVEdJl1CVh2a-4Al3TyCgOY-GU- X-Proofpoint-GUID: oVsc1WVEdJl1CVh2a-4Al3TyCgOY-GU- 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-26_01,2026-06-24_01,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 adultscore=0 malwarescore=0 bulkscore=0 clxscore=1015 phishscore=0 priorityscore=1501 impostorscore=0 spamscore=0 suspectscore=0 lowpriorityscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2606150000 definitions=main-2606260040 This series cleans up btusb in preparation for adding a new chip, QCC2072, and fixes several pre-existing bugs found along the way. Bug fixes: - qca_set_bdaddr() waited for HCI_EV_VENDOR, but the controller replies with a Command Complete event. - btusb_set_bdaddr_wcn6855() sent the BD_ADDR without byte-swapping it. - btusb QCA populated devcoredump fields on devices where devcoredump is not enabled. - BTUSB_IGNORE is a bitmask and must be tested with '&', not '=='. Cleanups: - Add __hci_reset_sync() helper and use it in qca_send_reset() and btusb_shutdown_qca() to drop open-coded HCI reset boilerplate. - Simplify hci_reset_sync() and log an error in hci_cc_reset() on a non-zero reset status. - Record the matched usb_device_id in struct btusb_data and move qca_dump into a dedicated struct btqca_data. - Reduce a redundant assignment in btusb_probe(). Signed-off-by: Zijun Hu --- Changes in v2: - Reorder the series so each helper is introduced before its users and related changes are grouped together. - btqca: reword "Fix qca_set_bdaddr()", add the btmon (WCN7850) trace, and add Bartosz's Reviewed-by. - btusb: add the btmon (WCN6855) trace to the BD_ADDR byte-order fix. - btusb: rename and reword the devcoredump fix. - hci_sync: simplify __hci_reset_sync() to return __hci_cmd_sync_status() directly; rename the patch to "Introduce __hci_reset_sync()". - hci_sync: "Simplify hci_reset_sync()" now returns the status directly; drop the separate "Fix return value of hci_reset_sync()" patch. - btqca: replace "Fix undetected error HCI status in qca_send_reset()" with "Simplify qca_send_reset() by using __hci_reset_sync()" (cleanup, not a fix; dropped the Fixes tag). - btusb: reword "Simplify btusb_shutdown_qca()". - btusb: rename "Initialize @priv_size at declaration" -> "Reduce a redundant assignment in btusb_probe()". - New patch: "hci_event: Log error for HCI reset status error in hci_cc_reset()". - Drop "Move struct btusb_data and macros into btusb.h"; deferred to a follow-up series. - Link to v1: https://lore.kernel.org/r/20260622-bt_bugfix-v1-0-11f936d84e72@oss.qualcomm.com --- Zijun Hu (12): Bluetooth: btqca: Fix qca_set_bdaddr() waiting for wrong HCI event Bluetooth: btusb: Fix BD_ADDR byte order in btusb_set_bdaddr_wcn6855() Bluetooth: btusb: Record matched usb_device_id into btusb_data Bluetooth: btusb: QCA: Fix populating devcoredump fields on unenabled devices Bluetooth: btusb: QCA: move qca_dump out of struct btusb_data Bluetooth: hci_sync: Introduce __hci_reset_sync() for device drivers Bluetooth: btqca: Simplify qca_send_reset() by using __hci_reset_sync() Bluetooth: btusb: Simplify btusb_shutdown_qca() by using __hci_reset_sync() Bluetooth: hci_sync: Simplify hci_reset_sync() Bluetooth: hci_event: Log error for HCI reset status error in hci_cc_reset() Bluetooth: btusb: Reduce a redundant assignment in btusb_probe() Bluetooth: btusb: Use & instead of == to test bitflag BTUSB_IGNORE drivers/bluetooth/btqca.c | 25 ++---------- drivers/bluetooth/btusb.c | 86 +++++++++++++++++++++++----------------- include/net/bluetooth/hci_sync.h | 1 + net/bluetooth/hci_event.c | 5 ++- net/bluetooth/hci_sync.c | 16 ++++---- 5 files changed, 66 insertions(+), 67 deletions(-) --- base-commit: cb20f6afc25b2b54c0fec61b45ac0ec9eb875d59 change-id: 20260622-bt_bugfix-fbb216ca1ff9 Best regards, -- Zijun Hu