Received: by 2002:a05:7412:798b:b0:fc:a2b0:25d7 with SMTP id fb11csp719884rdb; Thu, 22 Feb 2024 18:47:31 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCU3Evuk0V0gneZ8n7fOFbn3huBzBCT+FCsgKAibD/g7flNTRDyhkJCJvzIOtgsTl63LBIOyB6bQeHRoQNutP8q9oVBXeBdAfMFLWpb+uw== X-Google-Smtp-Source: AGHT+IGdCYHVbyM3TZFEQO9KhqlFAKzd6esQTZARFDgcfJue33NMfzCfbspQ/ajdvpmpAOPOIL1d X-Received: by 2002:ad4:4eed:0:b0:68f:144f:4c4 with SMTP id dv13-20020ad44eed000000b0068f144f04c4mr1436170qvb.37.1708656451569; Thu, 22 Feb 2024 18:47:31 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708656451; cv=pass; d=google.com; s=arc-20160816; b=kCnHYOWNE13S7eJwOSPOe7bh4OVZDkCGlWR5MW0ZRqMdwsYtngpTkXyXqqiqJMpKxq AprcgJyaEnhqS5jqQk/yUuLLiY6P8YCchujuk02IrSWrq25voeak2Uzj0Cwj+Hka/cuA pBckkOmR6ISjYBvwfXe+BTumsu2QAJ43MViWqv8DTj07vHwGdq2xxhua8LSTWyaFxdIW M656NkTz4SiMANNVD4gilaumGTvo/EdWiPonLQC9fWuRluBAPaHUUJ3yEXfZnmnNxorl 5Vgs0ILxLTQgXC2woZCLTN49mz66xlXiFb7tZZhyEQXNISfVOGO7YXFfGFy9g0QD2UDk VxFg== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=t46jsw53gYaMNtTjqCW6k9yinF/+RjccQj70uH0zH+Q=; fh=ZRkUIO8LWyPFLfKSho3ZFvVP4ewdRHwiDEY3cFXu+ZM=; b=yCZOtXi3quUbl36DArBl3egxMziUn+0lAVImCnfeW8zw2nQqX1wnz6HsjPq9HzsaUq JREWXXojk2E7QtQ/Iw9Gq9GF4o857BVUDcopWqU/AS0hxDExvESq9MwNd8qJV9gSIKvT gfoqeptpmtcSgrLPsni6+RtXJySPwZ0VBvh0INgSu/ogdXz3iIqdjXU2TOCGZ3UA4hmi /YKXRF3reAdwf7Jl9asEtk2I7T6h575cO+NdvnEKcycTu+tNClx84xsliU0/NwdcCLJl YCASIJbQ/9T+Do8nqPLheeaBpsqc/qxNTzVNy1VVTBxFXTyVgQ3qdAghlkOXxsf1tqo6 91Gw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=Ka3wbHJ2; 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-2089-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-bluetooth+bounces-2089-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id c1-20020ad45ae1000000b0068c74a65f85si14918240qvh.524.2024.02.22.18.47.31 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 22 Feb 2024 18:47:31 -0800 (PST) Received-SPF: pass (google.com: domain of linux-bluetooth+bounces-2089-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=Ka3wbHJ2; 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-2089-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-bluetooth+bounces-2089-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 ny.mirrors.kernel.org (Postfix) with ESMTPS id 54ADF1C21AD5 for ; Fri, 23 Feb 2024 02:47:31 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id D13CBBE5B; Fri, 23 Feb 2024 02:47:20 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=quicinc.com header.i=@quicinc.com header.b="Ka3wbHJ2" X-Original-To: linux-bluetooth@vger.kernel.org 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 AFCECBA5F for ; Fri, 23 Feb 2024 02:47:18 +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=1708656440; cv=none; b=ENR6NHAoSqH9lTVfMrnQxHIYIxJ+49xXH0veid2rzdI33uAt8JIFBobGOX6IyRQk78pxyaHj/WJd4nG8cGfqaa+siuJQ3sxg7/A9hiTTPr759YUDds3hdfbh6kXsckRsiVuyVS5hgiBCN4+ML5Ifil5AbpjswGLXxi4OBV93zy4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708656440; c=relaxed/simple; bh=N1PlpBeb9p0ZNMC/g+rcDApl0dSEb/JPGs8QJauNkAE=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=eXJc/OdKlfBft9sr3sO+fa0Kb9Xi9fYkf0bJiLi92dg3VSlzoLyaie+ZWsebF739ROyYioBJdCV6NSrv8zYqOEy1NSpWefi3qS8lvz8a83+uGoAHygVcXAimIYT9PXfjNOYvIF3ZdyB5gLHfYWr34SFLLClZz07KhAQCuwI+GQs= 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=Ka3wbHJ2; arc=none smtp.client-ip=205.220.168.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 (m0279865.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.17.1.24/8.17.1.24) with ESMTP id 41N1JWtk011899; Fri, 23 Feb 2024 02:47:14 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; h= from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-type; s=qcppdkim1; bh=t46jsw53gYaMNtTjqCW6 k9yinF/+RjccQj70uH0zH+Q=; b=Ka3wbHJ28JYQ0lnK1I5R4d+MjyIKhSLkMzOK qGzIhsI+wzk42RWcNj+WzGByY/byeUlF4ZUhSAc2DuVzJPSTj8eN8crxCKEoGnfB A4daTRSFcBBnV8otIiOVrj/O0qiRoTzj4GlPxXRiQzYqgJKQSLD3d6Ol9XWX5E9w oFdtHRfmYJgXzPOsEAMxaFJRIuS8LQBw4woHwG4Tso/9qwpQBDzcXyqC/UFSAvp2 ejeULkthoc06LncPQZkL75vtEMCfNXDfPJ8MAMmUFO1OhwhLuWHmjOKn+1WuoXxL NTOYPhO2mt0tNOnoXE5ls0jFNa+uZwvGgG2vKSoeEA//a08e+g== Received: from nasanppmta02.qualcomm.com (i-global254.qualcomm.com [199.106.103.254]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3weg88r9tx-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 23 Feb 2024 02:47:14 +0000 (GMT) Received: from nasanex01a.na.qualcomm.com (nasanex01a.na.qualcomm.com [10.52.223.231]) by NASANPPMTA02.qualcomm.com (8.17.1.5/8.17.1.5) with ESMTPS id 41N2ksjg032007 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 23 Feb 2024 02:46: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; Thu, 22 Feb 2024 18:46:53 -0800 From: Zijun Hu To: , CC: , Zijun Hu Subject: [PATCH v2] Bluetooth: btusb: Fix triggering coredump implementation for QCA Date: Fri, 23 Feb 2024 10:46:45 +0800 Message-ID: <1708656405-28017-1-git-send-email-quic_zijuhu@quicinc.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1707023659-4189-1-git-send-email-quic_zijuhu@quicinc.com> References: <1707023659-4189-1-git-send-email-quic_zijuhu@quicinc.com> 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-ORIG-GUID: 8eBjaOysMspHF7Gy1UnK1A9NzFOEuVPK X-Proofpoint-GUID: 8eBjaOysMspHF7Gy1UnK1A9NzFOEuVPK 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-22_15,2024-02-22_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 mlxlogscore=999 malwarescore=0 suspectscore=0 impostorscore=0 clxscore=1011 adultscore=0 phishscore=0 priorityscore=1501 bulkscore=0 mlxscore=0 spamscore=0 lowpriorityscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.19.0-2402120000 definitions=main-2402230018 btusb_coredump_qca() uses __hci_cmd_sync() to send a vendor-specific command to trigger firmware coredump, but the command does not have any event as its sync response, 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 --- Changes since v1: - Correct commit message 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