From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wr1-f51.google.com (mail-wr1-f51.google.com [209.85.221.51]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 7F7AD2BFC85 for ; Sat, 15 Aug 2026 11:56:38 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.221.51 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1786795000; cv=none; b=FDrX3Isi8btawTyC9TEn/AOSf3+Of0BC0BqiONoudpWNuSzvgmdtiI3MCfpuCVtkMGx0fp7P5BjiiWuOvpy9asiVR9MnSiV6hVnjDk371YplkSFrGwwW2srJu8bnDx4c+1sb4Tn2tDHAQHj9CxgyckjpJazoe4qP6rvjM1g7rD8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1786795000; c=relaxed/simple; bh=tQfvFLCKRClSk/cNNgEhvXo9/CAf/6rf+siUuBAI1vo=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=OoCX5iSdQ0/+aEThGxH7r1UIx6oAv9zWCYLSvMIhtcknScYvFjPUdSeNf5at6qRZ4GB0ErC6gsYJLqktdJxFOt2TV8UebipXKiWqWJ0Rqnc6gv6Y8p1LkKs2xrjiGj5g5Eldwv1fe0W2jY6bc4Bh5qpAQNqfrwfYUlqeIVDuoUs= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=E7P1Y8qz; arc=none smtp.client-ip=209.85.221.51 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="E7P1Y8qz" Received: by mail-wr1-f51.google.com with SMTP id ffacd0b85a97d-47fd4531020so1119139f8f.3 for ; Sat, 15 Aug 2026 04:56:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1786794997; x=1787399797; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to:content-type; bh=GXrlacljC9jA0dJpbVEtwiza65imm1+twTjzq4FOwK8=; b=E7P1Y8qzt5HwwalA9UFagrUiBtLWkv/jkUmRXSsfq4/xpQky2KJ3qqRuWp8stDFNaZ btI78TTzJSj3TF6AL+/LEupCtP3KfW7ueHgvwGObeQVWKEe6k7zsnczngljBz4zcIdmp 2guaUnAzK6IOumSZxWopiAgDZWLQf+ULcWiUYMRDyCfE0L/J+AEAgX3ve3a38o+vmUuP Q38S5Hx8NPRy8SggR/wffAeTo1DlecfriM2NrlqTSPNVcmqcDxSoMUNHQskNXIBVeuDb eompEwablmJBRG5F92K4IZIAkWULR12rvCCT6dqHcRE0jBgU+WGcH03NaxjEP4wgRbyM I6sA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1786794997; x=1787399797; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-gg:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to:content-type; bh=GXrlacljC9jA0dJpbVEtwiza65imm1+twTjzq4FOwK8=; b=EpW00yru0zrfsGQ01Pdm5Kho0KRgTuJ9WMpDgkCc8q7deDTRhB+8hUve9gHiz6no1J CbGohuLn44AtjwHr2xR15DlM+OVt9dfOtrX7RpuH7I99nFpjYy9D3ngDAhVhmlqBBAa/ 8+dHOLOTK44OrSIDZt0v/2J0XGa8JiXye7VRypK4BFvQUGxx2ON1jJajesqsfAQqB/hs ZdwaR2KEBePnAPklpOhZ1RaIVpSS8ZPUyd+ca3vBSDSkS+sacRJ/ajIGxqNyp6HAa0qT FXb/lpWMzA05HUENOg6Y7wMSbNZVZa8M38eLX4WaL3ZXXjAEzLsCplASS43PdxwbBrSQ KZeA== X-Forwarded-Encrypted: i=1; AHgh+RqbQ7ZXd4i0MZ6EWqLZVm31cQNl7zT51RizMbdUF2hmeeP0cQoORjlopdcVHsN1n/1JAltLsl7zlwUBhSg=@vger.kernel.org X-Gm-Message-State: AOJu0YwwCFgfn9Bcff1yDzw2LPqYRSEv82N0pEG6JTlbCmD7bvT/fjao wV5hcNk3YR/ixRFopJKwsi1mcyHLxIvhnHouWdYj/NSvV1Q8f++B1++F X-Gm-Gg: AR+sD12v0DI0XvMPpv0KPK7jgBknkG4MjlCl+dmS7KT8pb04QJ9FYwlwDWglj9DD2M4 YbQ5dJhPHi5bQYpDlSb9H7N30EVuTiHmyAsowUmCdbWgoBiwvlIe8IE43F4MX/OtBKP8wGdNhUz Vkm6SLGKZ3p4KhkFPEyqMDGOmnW03AHxukb9uo21yWKfigzasmBZ5awbVtClhT6PTA8CkHFPGi5 raZWiU6tgRan4wqb35qJoYB2RfWW6BQN5FbfGMMqVp+4SP96bDGNj+mrZxFHbYfGZ9GVhYYKw/N wQ7XBFHipnr6IYkxmdEPtDmngM2GAMKFqkWfmzmJJ8yv9XVBHp/6csw4dIIsbKkDp9D+8CwikKk xPV4TUN16bYELY0j6zG8cd5Clw3LeipdEdM2asbPQjpaEJDGWc0zQALJl2G4V0MCxLhotoAqzau /9G+05aIelvSIwA9o7ZsUBMuaD1PXby7CrSAgeKItqSD9vx9SYsXKmYZlq1auUYfp/YAO0gqms/ 0kSetMk21f1 X-Received: by 2002:a05:6000:29cf:b0:481:5f33:c2fc with SMTP id ffacd0b85a97d-4816078c9ffmr13200821f8f.29.1786794996637; Sat, 15 Aug 2026 04:56:36 -0700 (PDT) Received: from archlinux.tailbe3ea7.ts.net ([185.19.153.11]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-4815f2c129dsm16085455f8f.26.2026.08.15.04.56.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 15 Aug 2026 04:56:35 -0700 (PDT) From: Ismail Tarim To: Marcel Holtmann , Luiz Augusto von Dentz , linux-bluetooth@vger.kernel.org Cc: Jing Cai , Sean Wang , Chris Lu , linux-mediatek@lists.infradead.org, linux-kernel@vger.kernel.org, Ismail Tarim Subject: [PATCH v2 0/2] Bluetooth: btmtk: fix subsystem reset error reporting Date: Sat, 15 Aug 2026 14:56:22 +0300 Message-ID: <20260815115624.8309-1-ismailtarim7@gmail.com> X-Mailer: git-send-email 2.55.0 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Two bugs in btmtk_usb_subsys_reset() that make it report success to its caller when the subsystem reset has actually failed. Patch 1 covers the case where the post-reset chip id reads back as zero: the function logs "subsys reset fail." and then returns 0. Patch 2 restores propagation of the MTK_BT_RST_DONE poll timeout, which has been silently overwritten since commit 3dcb122b3064 ("Bluetooth: btusb: mediatek: return error for failed reg access") started assigning err at the chip id read. Found while investigating an MT7902 [13d3:3579] whose controller stops responding and never returns to the USB bus. On that device the failing path can be reached on demand by requesting a coredump, since btmtk asks for a reset once the dump completes: # echo 1 > /sys/class/bluetooth/hci0/device/coredump The captured firmware coredump shows the controller asserting inside its ROM rather than in the downloadable blob, which is consistent with the failure surviving a firmware update: system/rom/transport/tra_usb3.c #764 - BTSYS, id=0x4 idle Both patches only correct the error reporting; neither changes the recovery behaviour or makes that controller recoverable. They are a prerequisite for anything that wants to react to a failed reset, since today the failure is not visible to the caller. Compile tested on x86_64 (W=1, no new warnings); checkpatch --strict clean. Changes in v2: - 1/2: shorten the subject so the CI gitlint check passes (was 81 > 80). - 1/2: document how the failing path can be reached on demand. - No functional change; the diff is identical to v1. v1: https://lore.kernel.org/linux-bluetooth/20260815110119.11301-1-ismailtarim7@gmail.com/ Ismail Tarim (2): Bluetooth: btmtk: Do not report success when subsys reset fails Bluetooth: btmtk: Do not discard the subsystem reset timeout drivers/bluetooth/btmtk.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) base-commit: 15ef2f78c49d20d53ec7c0f1c9b40b02e089f2d6 -- 2.55.0