From patchwork Mon Aug 7 06:46:26 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rocky Liao X-Patchwork-Id: 13343128 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 3C190C04A94 for ; Mon, 7 Aug 2023 06:47:13 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231252AbjHGGrL (ORCPT ); Mon, 7 Aug 2023 02:47:11 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46412 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230235AbjHGGrK (ORCPT ); Mon, 7 Aug 2023 02:47:10 -0400 Received: from mx0b-0031df01.pphosted.com (mx0b-0031df01.pphosted.com [205.220.180.131]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2FA281B5; Sun, 6 Aug 2023 23:47:09 -0700 (PDT) Received: from pps.filterd (m0279868.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 3774n87B022868; Mon, 7 Aug 2023 06:47:06 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-transfer-encoding : content-type; s=qcppdkim1; bh=VuqF2i1KSXv2OuTyKvF7D6u9nEHqYt6V7gK2npJup9I=; b=bMfL8VYMqwqf8A4rMSA3yNA+6gAZo0uD3UqjgZTbkjzHmOkkZ6qPQpmfT9yuRFa5S66T MmM7O1bQ99splaZDpecb3MgvPvRyURhzf2lN9EcRXuDsgP/1t442v9gcJ/jzjmSJfzgk 1SOReddDtWikarl7RXqwlzUiGlZgg7C6razU7I2T20OWkS2PIDnxLnZr42yKlnUnSEed 7MVmrPrxh2hbugcbKw3FKu1joTEAncgteU0fG1kcVbnopHoxL2GlQ7toGhHW+642N+Z/ fIE/igj6OyA19QJBMKTmOVBXo193VW3rdaUSJk/WSHQWLJXv1+YsvJ78TJx1Il0fe6x1 ig== Received: from nalasppmta04.qualcomm.com (Global_NAT1.qualcomm.com [129.46.96.20]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3s9drrjsd7-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 07 Aug 2023 06:47:06 +0000 Received: from nalasex01b.na.qualcomm.com (nalasex01b.na.qualcomm.com [10.47.209.197]) by NALASPPMTA04.qualcomm.com (8.17.1.5/8.17.1.5) with ESMTPS id 3776klkI008408 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 7 Aug 2023 06:46:47 GMT Received: from rjliao1.ap.qualcomm.com (10.80.80.8) by nalasex01b.na.qualcomm.com (10.47.209.197) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1118.30; Sun, 6 Aug 2023 23:46:45 -0700 From: Rocky Liao To: CC: , , , Rocky Liao Subject: [PATCH v1] Bluetooth: btusb: add shutdown function for QCA6174 Date: Mon, 7 Aug 2023 14:46:26 +0800 Message-ID: <20230807064626.980-1-quic_rjliao@quicinc.com> X-Mailer: git-send-email 2.38.1.windows.1 MIME-Version: 1.0 X-Originating-IP: [10.80.80.8] X-ClientProxiedBy: nasanex01b.na.qualcomm.com (10.46.141.250) To nalasex01b.na.qualcomm.com (10.47.209.197) X-QCInternal: smtphost X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=5800 signatures=585085 X-Proofpoint-ORIG-GUID: INAKSMYEn5psaL1htd92bBye8XfdcArX X-Proofpoint-GUID: INAKSMYEn5psaL1htd92bBye8XfdcArX X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.267,Aquarius:18.0.957,Hydra:6.0.591,FMLib:17.11.176.26 definitions=2023-08-07_03,2023-08-03_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 mlxscore=0 suspectscore=0 phishscore=0 mlxlogscore=999 adultscore=0 spamscore=0 clxscore=1011 bulkscore=0 lowpriorityscore=0 priorityscore=1501 impostorscore=0 malwarescore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2306200000 definitions=main-2308070062 Precedence: bulk List-ID: X-Mailing-List: linux-bluetooth@vger.kernel.org We should send hci reset command before bt turn off, which can reset bt firmware status. Signed-off-by: Rocky Liao Signed-off-by: Rocky Liao --- drivers/bluetooth/btusb.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/bluetooth/btusb.c b/drivers/bluetooth/btusb.c index 1bb3b09013b0..ac4d8cf831df 100644 --- a/drivers/bluetooth/btusb.c +++ b/drivers/bluetooth/btusb.c @@ -4419,6 +4419,7 @@ static int btusb_probe(struct usb_interface *intf, if (id->driver_info & BTUSB_QCA_ROME) { data->setup_on_usb = btusb_setup_qca; + hdev->shutdown = btusb_shutdown_qca; hdev->set_bdaddr = btusb_set_bdaddr_ath3012; hdev->cmd_timeout = btusb_qca_cmd_timeout; set_bit(HCI_QUIRK_SIMULTANEOUS_DISCOVERY, &hdev->quirks);