Received: by 2002:a05:7412:bbc7:b0:fc:a2b0:25d7 with SMTP id kh7csp1724252rdb; Sat, 3 Feb 2024 21:16:06 -0800 (PST) X-Google-Smtp-Source: AGHT+IFJ/kJviXrcc/4dbE/+oU+goDrFZe1WTNBf1snRjs59VbbPpdHipwd2EimLDQkOZd5umdqL X-Received: by 2002:a17:902:d50a:b0:1d9:1b3f:b39b with SMTP id b10-20020a170902d50a00b001d91b3fb39bmr13585191plg.67.1707023765845; Sat, 03 Feb 2024 21:16:05 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707023765; cv=pass; d=google.com; s=arc-20160816; b=UOal2AGQKIh1VOM4XuJzrji5LkqjrZchfUZKWGjLkC7ksvyfiVOg+wqLBpNN0HA8q0 pxICqWKaABodgSOh3L2MFXsLXSq/6BvNVa0Gwt8quOFVo6PtF4y60Iwc761AqVrv890C vEnqJIlll6UxADA6W3+fTxPcJkuM1TUXM9b1shTCMAZJSbH5b0ZdOEGLwMw6gXY7681g BZ+VzTFFnv+C862s9qiV4zXh+CSyawVMu5BuEkPWdhqw5CGFMNiYC3vj6KOQOQmzJdU1 4HUYVIqTz77D7CRHKJhEZsVCQE2fhy3vIGoYNrrIJ8CFF9WFIIa3FU0GCnPyU0vekNI6 xLoQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=mime-version:list-unsubscribe:list-subscribe:list-id:precedence :message-id:date:subject:cc:to:from:dkim-signature; bh=y7ibFK+NzAWTuwBb//RAoqmpf+lJdlSGGs4VvVIZo7c=; fh=FoxyzSSdYw4FozAQkXYAqOr4dx7joacRyT3Hwbputjs=; b=sNk0vYwin8CNQ5z56zVmZkYl/3ES22QSlBE+X2ydQ1lsNQrCcj4+vNWmGljnjCHxvu ijoen/uReoM9S44pB0Dp17ALXMOddFvu0h6HgbhCZKov8m7fh1t+4hJflQkgeEssi/Lj yhp0KfjRMEwUtXIGgayD7Uby0VkqtXbDoierpSoitNYKMZQG47Ylpnvz7GVHCSQ1piNN B676+y8n33+I+kHHO7E9MwiWQ8PQWoeD4EtTFTVDAZYPfpX0hG7OXLtag0ysnarLaZsQ a8BdAALuOZZzSJchhAoLfix0P0AR2+oOkX0KZyrqAoiBTYHvGH6UKAdl1+BleY5NbAxS 1AiA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=PPCSSSVJ; arc=pass (i=1 spf=pass spfdomain=quicinc.com dkim=pass dkdomain=quicinc.com dmarc=pass fromdomain=quicinc.com); spf=pass (google.com: domain of linux-bluetooth+bounces-1604-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-bluetooth+bounces-1604-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com X-Forwarded-Encrypted: i=1; AJvYcCUJRVZS1ks8w6XMAfdydk45BiWuMr3wAug+KT6vdeQJXT8DNaw9GZ4JhBQNdLSXnKsQxkTvGjosJ6BdIXypdj6GMouT7F661qlvT4L65g== Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id e15-20020a17090301cf00b001d7297b8542si1973587plh.34.2024.02.03.21.16.05 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 03 Feb 2024 21:16:05 -0800 (PST) Received-SPF: pass (google.com: domain of linux-bluetooth+bounces-1604-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=PPCSSSVJ; arc=pass (i=1 spf=pass spfdomain=quicinc.com dkim=pass dkdomain=quicinc.com dmarc=pass fromdomain=quicinc.com); spf=pass (google.com: domain of linux-bluetooth+bounces-1604-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-bluetooth+bounces-1604-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sy.mirrors.kernel.org (Postfix) with ESMTPS id 02C0EB2380D for ; Sun, 4 Feb 2024 05:15:08 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 79EEA6119; Sun, 4 Feb 2024 05:15:01 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=quicinc.com header.i=@quicinc.com header.b="PPCSSSVJ" X-Original-To: linux-bluetooth@vger.kernel.org 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 E6A1A6FB9 for ; Sun, 4 Feb 2024 05:14:58 +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=1707023700; cv=none; b=QOeyLz+2MWdGNcNqnbmSVY3jQsJF/Ct9lV5FgmLzP9+btMHHjm5QQPnIIf+XwpTa5igNzRrboAX827slXNvFyAacnvtmI0dJPR340nzOWSdQi36/TSEMzIVtJIM1a703ZBynDlDwHc6T9nEtRHcIVU2den6nXR9Eqb0toVid9y0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707023700; c=relaxed/simple; bh=atdLh6bKe2QDCxRtcu7RWfOZQgsLFz34yBttkQaHa1Q=; h=From:To:CC:Subject:Date:Message-ID:MIME-Version:Content-Type; b=HDbE6BltC2fiTS3xvHFjLwANMrHzuluJjO/i9SUbxJV7WZXt8D9fGOo7dFCxc5oGv6LYx422gA7Ny391wQaDme8H6G+x1BPQFXOOY9iOVx4nQctw9Jc59EYYxbZROEZ64gqGaAZHP4yjkJAng6OjgV6h7ZHKqmt5dNoXRE2pWEA= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=quicinc.com; spf=pass smtp.mailfrom=quicinc.com; dkim=pass (2048-bit key) header.d=quicinc.com header.i=@quicinc.com header.b=PPCSSSVJ; arc=none smtp.client-ip=205.220.180.131 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=quicinc.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=quicinc.com Received: from pps.filterd (m0279872.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.17.1.24/8.17.1.24) with ESMTP id 4144cc0Y013461; Sun, 4 Feb 2024 05:14:55 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; h= from:to:cc:subject:date:message-id:mime-version:content-type; s= qcppdkim1; bh=y7ibFK+NzAWTuwBb//RAoqmpf+lJdlSGGs4VvVIZo7c=; b=PP CSSSVJbW4gu1CdqvkA2CnwFrfI2GlQgCcWsUx01MHPF5nrE3gZ0edKt5IcB19YCR koOiuU6acT0ert2oV5ih13V3LKjhkEcUwONJBv/AAH22cbzX+YktSxzNicYjmDja 6sPtCIRS2YD+A3o+xCyQV1YFLOyA0zgQz7b6ap+pGG1flRomh8UMOLHjXEysR2W9 t3ZyqrbbciCysEgIz2yJeUej1kQDM7uoPrnjG3ZPDNVoy3zxvTW+HToM/kbx8eB8 MQeDogPBXmhPeOclDXTbdXbDOE+/cwFHQmXqC8bI/xR9s8ZRpCd3uPGHM+2HAcUc hmr6kcc6z81cofAn+TsQ== Received: from nasanppmta01.qualcomm.com (i-global254.qualcomm.com [199.106.103.254]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3w1f1rsaf9-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Sun, 04 Feb 2024 05:14:55 +0000 (GMT) Received: from nasanex01a.na.qualcomm.com (nasanex01a.na.qualcomm.com [10.52.223.231]) by NASANPPMTA01.qualcomm.com (8.17.1.5/8.17.1.5) with ESMTPS id 4145Esqa017828 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Sun, 4 Feb 2024 05:14:54 GMT Received: from zijuhu-gv.qualcomm.com (10.80.80.8) by nasanex01a.na.qualcomm.com (10.52.223.231) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1118.40; Sat, 3 Feb 2024 21:14:52 -0800 From: Zijun Hu To: , CC: , Zijun Hu Subject: [PATCH v1] Bluetooth: btusb: Fix triggering coredump implementation for QCA Date: Sun, 4 Feb 2024 13:14:19 +0800 Message-ID: <1707023659-4189-1-git-send-email-quic_zijuhu@quicinc.com> X-Mailer: git-send-email 2.7.4 Precedence: bulk X-Mailing-List: linux-bluetooth@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain X-ClientProxiedBy: nasanex01b.na.qualcomm.com (10.46.141.250) To nasanex01a.na.qualcomm.com (10.52.223.231) X-QCInternal: smtphost X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=5800 signatures=585085 X-Proofpoint-GUID: NhR1YTr6O_0bm6HXRVP1JYF6Fg5DAlYF X-Proofpoint-ORIG-GUID: NhR1YTr6O_0bm6HXRVP1JYF6Fg5DAlYF X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.272,Aquarius:18.0.1011,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2024-02-04_02,2024-01-31_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 malwarescore=0 priorityscore=1501 mlxscore=0 suspectscore=0 mlxlogscore=999 phishscore=0 impostorscore=0 adultscore=0 spamscore=0 lowpriorityscore=0 clxscore=1015 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.19.0-2401310000 definitions=main-2402040037 btusb_coredump_qca() uses __hci_cmd_sync() to send a vendor-specific command to trigger firmware coredump, but the command does not have event HCI_Command_Status or HCI_Command_Complete as its response, actually, it does not have any sync response event at all, so it is not suitable to use __hci_cmd_sync(), fixed by using __hci_cmd_send(). Fixes: 20981ce2d5a5 ("Bluetooth: btusb: Add WCN6855 devcoredump support") Signed-off-by: Zijun Hu --- drivers/bluetooth/btusb.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/drivers/bluetooth/btusb.c b/drivers/bluetooth/btusb.c index edfb49bbaa28..ff282cc25710 100644 --- a/drivers/bluetooth/btusb.c +++ b/drivers/bluetooth/btusb.c @@ -3469,13 +3469,12 @@ static void btusb_dump_hdr_qca(struct hci_dev *hdev, struct sk_buff *skb) static void btusb_coredump_qca(struct hci_dev *hdev) { + int err; static const u8 param[] = { 0x26 }; - struct sk_buff *skb; - skb = __hci_cmd_sync(hdev, 0xfc0c, 1, param, HCI_CMD_TIMEOUT); - if (IS_ERR(skb)) - bt_dev_err(hdev, "%s: triggle crash failed (%ld)", __func__, PTR_ERR(skb)); - kfree_skb(skb); + err = __hci_cmd_send(hdev, 0xfc0c, 1, param); + if (err < 0) + bt_dev_err(hdev, "%s: triggle crash failed (%d)", __func__, err); } /* -- 2.7.4