From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wm1-f47.google.com (mail-wm1-f47.google.com [209.85.128.47]) (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 125D42E7365 for ; Sat, 15 Aug 2026 11:01:31 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.47 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1786791693; cv=none; b=UFiTmMZhFTC4cW/pL8q+Mf/RJBrIBlCTJeAvZaMseGPnQ4OP/T0ZVN35tgn6JMJwZvahSVrieMWgo3otV5Ed2g9Slggvs8say3NB3sWUQaqHpt/AAbOz4i9nRv9wyB6QOQhVzPB+S1dPynrUkNmnwZwX2QSg7t/ark002ypvMUc= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1786791693; c=relaxed/simple; bh=e3Qa6fFRrhGusC+79pOqhSDTQ9k7dhnThWmC/ID2T9c=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=Y76cC/80ICVQGXMh8Mtq+qq8a739kC0h+eMhgWgApWjwPoRZvU9cf4eZFUj1hw19IIwTeV4Xi2BeQUp+GVZJ7AK+eXUer46d/OIMPsanMLgnXOd/01Ag9P9uo10IhJFOK6yZGQQfNNXcENrX6GcMA01SIVWGFzE6eiZFzI4f0fk= 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=XpARxfcb; arc=none smtp.client-ip=209.85.128.47 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="XpARxfcb" Received: by mail-wm1-f47.google.com with SMTP id 5b1f17b1804b1-49954b88fffso21618235e9.0 for ; Sat, 15 Aug 2026 04:01:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1786791690; x=1787396490; 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=JhpLH96yWQRLag1AzHDPgAFi9pZTcqqLwnfeJZRrbFc=; b=XpARxfcbOmNEe+aZJOU5abry/h/twk7n/MEsDC0NMZtSsRcD3+sWPuiBSEZjXyN9zv IsFlYLl8qumoAfjh479eJSJx78b0ZlFeBPyyfNJJlLrm401+DOyAFp/HDclOIK+8MKdR TXhV+RN3mv54dbDJkUTTvkULyAx+t6npV79qqJkXJynThHuxCcMJS/fR1UdgCZK8Xdmj AaWwJyN7y5KSqHHbQCrcn0dkrtklRm5EcBU2dSbUxUNssMt7lfcY8P2tQGpt5sczCiku KHL9ZhN1MyUaElY+XvlMXO5fY6EHle/Cp33gr1O4tjWnlgZmEPYI+vziWALuzr9umc7e oMvw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1786791690; x=1787396490; 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=JhpLH96yWQRLag1AzHDPgAFi9pZTcqqLwnfeJZRrbFc=; b=nARnRfYpYaUesKct2GcM//jXgGfO4xtsMLQAqOuC1/Ce5G1stn2d7Mxb/O3CJc+lq6 szjhnvqzHBSgAxXF70hn8mnIUMMeTcgq7+ZwA1W/NI4pSON8uuVOa6i4tR/K1KgHP5B6 ken2mi8RfqnOpClaQKC9e9dirfdlTPYhV2avjt20pcPt86NTE2CXz2RfhAcnCcLBeW/9 QPlRmKVZvA+vsQz182SAXSvdsZ1kt1GtkQ8oU4ksM9fJ891ZdHx9bI0mRCOX9k0kw3+S RpQApkxPt8hKJc01HT1nf+WDUZnaKyxZrZL0D/F57QsFX5ypcdul5j97gz0Lqny0Qmo/ qNbA== X-Forwarded-Encrypted: i=1; AHgh+Rr6aeEMgPYQ2L6OEAfguDmQCQWWY9GJWcNW/a2Uh+FQR2iq7EyHJbjfapvZp2PhzC2E185BoH8/Sorhjcg=@vger.kernel.org X-Gm-Message-State: AOJu0YxZVIddwrewWFg7pM6OPG4VkTDg3v/dg5pREpOSoCa6lhI16jlY zcVRHYAGPgaDJXC2uFKm+pZl3GMHg7R6PJaaIbC9tKx8KyzD/ctfJ7rF X-Gm-Gg: AR+sD12940XkyhPf9Oliunh5fyeJkfLyTZjDXAAaZMDNtT4eXnW9CbamiVmwlX8i54y MXtY073TRkdXGKcRBwRtvu+CuCFjd85i/nLj8MIS3Jjwsh2wHWCVBH2gEpI+gUHqmzmWWPbkdY8 y1S6gw4W41U1F8ktGvWf/WEcSYN6hXsniWmMjQNwVM6PwFu79KMfCC0c2eHtkaPake+80joXKZu mHVDTeK/wQOrn5wRqNN7yITjyM7ryjBnPzp2QcfczDdyp8bvIi0bjErdaDIr1j/uq0mTqrSMgzZ W+8Q1Bem24R9EayJq1ZgXyrJeTmokbCFcMR9vwOHDIHiwZZcOe0MFNex/Em+O08B2r09tbi23rF RGyNLAVi2gQkAAseGSkp3290L5pDQORhLA8+Ovez/P83jaZRYWgvpnt8DajGOtR84QRw6snHmGt Vyk4Mp+E/thsPSn8o1KacZzylBUjbRzQqvcUO+qwgxEYwX38UijkARB6EEiaQaMbCyfVJf81Cb9 thxqIwJZEtRWw== X-Received: by 2002:a05:600c:3485:b0:499:726a:a017 with SMTP id 5b1f17b1804b1-49987938e19mr184694055e9.1.1786791690107; Sat, 15 Aug 2026 04:01:30 -0700 (PDT) Received: from archlinux.tailbe3ea7.ts.net ([185.19.153.11]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-49988b1d8f4sm133728035e9.11.2026.08.15.04.01.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 15 Aug 2026 04:01:28 -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 0/2] Bluetooth: btmtk: fix subsystem reset error reporting Date: Sat, 15 Aug 2026 14:01:17 +0300 Message-ID: <20260815110119.11301-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 "Can't get device id, subsys reset fail." and then returns the (zero) return value of the register read, i.e. success. 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 firmware asserts and never returns to the USB bus. 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. Ismail Tarim (2): Bluetooth: btmtk: Fix btmtk_usb_subsys_reset() reporting success on failure 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