From mboxrd@z Thu Jan 1 00:00:00 1970 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 61016C4450E for ; Thu, 16 Jul 2026 11:24:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Type: Content-Transfer-Encoding:MIME-Version:References:In-Reply-To:Message-ID:Date :Subject:CC:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=sxdUfGPBVa6Aw8luxjq4cHzkvDH6P8rvTLiY6Rrhyd8=; b=d75BlkLSqbbZmiHQzYSl/6Z23g eGfrGmR8h4h5oqCNx1LvX71SSxBsBiEW4xXwwQC5mPgznU3hU48xcEcIoZxHDQvt33MIV4BW4f4lP ppN8A0QqRIsllSgz0yFH9FnGLL6+14Ydql4RPRt5XLCsGMNvNTuf7q+d5zbD4VZeKEKgMi8Hwa+xp iXEttl/2LtIGs8WgyYZx8ZoRZxnJzvNh1shsVs6rkOKOBRUjpP3Xz0sLydNrbXScrIJgsrP3qbFYO 1a1UBGbYb996SPywYeaAg2LixTX9or7OKuwwuncHT4wDyI2pFe3hE2z2XuGBy2O53XeY1j1uoAvo2 T+uXMKaw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.99.1 #2 (Red Hat Linux)) id 1wkKCI-0000000H7S5-09RD; Thu, 16 Jul 2026 11:24:10 +0000 Received: from mailgw01.mediatek.com ([216.200.240.184]) by bombadil.infradead.org with esmtps (Exim 4.99.1 #2 (Red Hat Linux)) id 1wkKCF-0000000H7Or-2CDd for linux-mediatek@lists.infradead.org; Thu, 16 Jul 2026 11:24:08 +0000 X-UUID: d69366c6810811f1afed4741b24580c9-20260716 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=mediatek.com; s=dk; h=Content-Type:Content-Transfer-Encoding:MIME-Version:References:In-Reply-To:Message-ID:Date:Subject:CC:To:From; bh=sxdUfGPBVa6Aw8luxjq4cHzkvDH6P8rvTLiY6Rrhyd8=; b=NrMArxrTsOSTyLUTkPOrrKg03CXeP+XIncp8i3pbQ8u511i/RyCR28PCwyWIOtNCmNO0F1zk9ynaymu7hjvCifBtx3zSWSjY5fgfySrCyYRNy71/Kpqw8PZ5rjPfULro7EiqS6LVlxzbKqgHQRwoR1MzLxmKb1hbm+DbCqf1CJA=; X-CID-P-RULE: Release_Ham X-CID-O-INFO: VERSION:1.3.18,REQID:6ca55751-57a9-4b27-8e47-ad77d77a7cfa,IP:0,U RL:0,TC:0,Content:-25,EDM:0,RT:0,SF:0,FILE:0,BULK:0,RULE:Release_Ham,ACTIO N:release,TS:-25 X-CID-META: VersionHash:8a735a6,CLOUDID:221f3219-ab14-4403-9336-76696324c5a8,B ulkID:nil,BulkQuantity:0,SF:81|82|102|836|865|888|898,TC:-5,Content:0|15|5 0|99|200|213,EDM:-3,IP:nil,URL:0,File:130,RT:0,Bulk:nil,QS:nil,BEC:-1,COL: 0,OSI:0,OSA:0,AV:0,LES:1,SPR:NO,DKR:0,DKP:0,BRR:0,BRE:0,ARC:0 X-CID-BVR: 2,SSN|SDN X-CID-BAS: 2,SSN|SDN,0,_ X-CID-FACTOR: TF_CID_SPAM_SNR X-CID-RHF: D41D8CD98F00B204E9800998ECF8427E X-UUID: d69366c6810811f1afed4741b24580c9-20260716 Received: from mtkmbs10n1.mediatek.inc [(172.21.101.34)] by mailgw01.mediatek.com (envelope-from ) (musrelay.mediatek.com ESMTP with TLSv1.2 ECDHE-RSA-AES256-GCM-SHA384 256/256) with ESMTP id 2072880642; Thu, 16 Jul 2026 04:23:58 -0700 Received: from mtkmbs11n2.mediatek.inc (172.21.101.187) by mtkmbs11n1.mediatek.inc (172.21.101.185) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.2562.29; Thu, 16 Jul 2026 19:23:55 +0800 Received: from mtksitap99.mediatek.inc (10.233.130.16) by mtkmbs11n2.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.2.2562.29 via Frontend Transport; Thu, 16 Jul 2026 19:23:55 +0800 From: Chris Lu To: Marcel Holtmann , Johan Hedberg , Luiz Von Dentz CC: Sean Wang , Will Lee , SS Wu , Steve Lee , Paul Menzel , linux-bluetooth , linux-kernel , linux-mediatek , Chris Lu Subject: [PATCH v13 3/7] Bluetooth: btmtksdio: Pass hardware dev_id to mt79xx_setup() Date: Thu, 16 Jul 2026 19:23:48 +0800 Message-ID: <20260716112353.2192865-4-chris.lu@mediatek.com> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20260716112353.2192865-1-chris.lu@mediatek.com> References: <20260716112353.2192865-1-chris.lu@mediatek.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.9.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20260716_042407_624310_4784C348 X-CRM114-Status: GOOD ( 11.56 ) X-BeenThere: linux-mediatek@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "Linux-mediatek" Errors-To: linux-mediatek-bounces+linux-mediatek=archiver.kernel.org@lists.infradead.org mt79xx_setup() hardcodes dev_id=0 when calling btmtk_setup_firmware_79xx(), causing SDIO devices to log incorrect chip ID "BT HW ver: 0x0000" instead of the actual hardware version read from register 0x70010200. Pass the hardware dev_id to mt79xx_setup() and forward it to btmtk_setup_firmware_79xx() to match USB driver behavior and display correct chip identification. Fixes: 28b7c5a6db74 ("Bluetooth: btmtk: Add MT6639 (MT7927) Bluetooth support") Signed-off-by: Chris Lu --- drivers/bluetooth/btmtksdio.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/bluetooth/btmtksdio.c b/drivers/bluetooth/btmtksdio.c index feda1ea8f256..088fdfb56231 100644 --- a/drivers/bluetooth/btmtksdio.c +++ b/drivers/bluetooth/btmtksdio.c @@ -901,14 +901,14 @@ static int mt76xx_setup(struct hci_dev *hdev, const char *fwname) return 0; } -static int mt79xx_setup(struct hci_dev *hdev, const char *fwname) +static int mt79xx_setup(struct hci_dev *hdev, const char *fwname, u32 dev_id) { struct btmtksdio_dev *bdev = hci_get_drvdata(hdev); struct btmtk_hci_wmt_params wmt_params; u8 param = 0x1; int err; - err = btmtk_setup_firmware_79xx(hdev, fwname, mtk_hci_wmt_sync, 0); + err = btmtk_setup_firmware_79xx(hdev, fwname, mtk_hci_wmt_sync, dev_id); if (err < 0) { bt_dev_err(hdev, "Failed to setup 79xx firmware (%d)", err); return err; @@ -1167,7 +1167,7 @@ static int btmtksdio_setup(struct hci_dev *hdev) snprintf(fwname, sizeof(fwname), "mediatek/BT_RAM_CODE_MT%04x_1_%x_hdr.bin", dev_id & 0xffff, (fw_version & 0xff) + 1); - err = mt79xx_setup(hdev, fwname); + err = mt79xx_setup(hdev, fwname, dev_id); if (err < 0) return err; -- 2.45.2