All of lore.kernel.org
 help / color / mirror / Atom feed
From: Chris Lu <chris.lu@mediatek.com>
To: Marcel Holtmann <marcel@holtmann.org>,
	Johan Hedberg <johan.hedberg@gmail.com>,
	Luiz Von Dentz <luiz.dentz@gmail.com>
Cc: Sean Wang <sean.wang@mediatek.com>,
	Will Lee <will-cy.Lee@mediatek.com>, SS Wu <ss.wu@mediatek.com>,
	linux-bluetooth <linux-bluetooth@vger.kernel.org>,
	linux-kernel <linux-kernel@vger.kernel.org>,
	linux-mediatek <linux-mediatek@lists.infradead.org>,
	Chris Lu <chris.lu@mediatek.com>
Subject: [PATCH 0/2] Bluetooth: btmtksdio: Stop discarding the hardware device id
Date: Tue, 25 Aug 2026 11:36:32 +0800	[thread overview]
Message-ID: <20260825033634.499118-1-chris.lu@mediatek.com> (raw)

btmtksdio_setup() reads the device id from register 0x70010200 and then
throws it away twice: an snprintf() overwrites the filename that
btmtk_fw_get_filename() derived from it, and mt79xx_setup() passes a
hardcoded 0 on to btmtk_setup_firmware_79xx().

Neither matters on supported hardware, since the device ids that would
make a difference - 0x6639, 0x7925 and a flavored 0x7961 - all belong to
parts with no SDIO interface. So this targets bluetooth-next with no
Fixes: tags. What it buys is that the two functions stop silently ignoring
their input, which is a trap for the next chip added to this driver.

Both patches come from a larger MT7928 series [1], where they were
described as fixing firmware load failures on MT6639, MT7925 and MT7928.
That does not hold for the SDIO driver and has been dropped.

Tested on a Chromebook with MT7921S, whose chip id register reports
0x7961: before and after, the driver requests
mediatek/BT_RAM_CODE_MT7961_1_2_hdr.bin, the firmware loads, and the
controller powers on and connects to an A2DP device.

[1] https://lore.kernel.org/linux-bluetooth/20260717072133.2858136-1-chris.lu@mediatek.com/

Chris Lu (2):
  Bluetooth: btmtksdio: Remove redundant firmware filename override
  Bluetooth: btmtksdio: Pass the hardware device id to mt79xx_setup()

 drivers/bluetooth/btmtksdio.c | 13 +++++--------
 1 file changed, 5 insertions(+), 8 deletions(-)

-- 
2.45.2



             reply	other threads:[~2026-08-25  3:36 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-25  3:36 Chris Lu [this message]
2026-08-25  3:36 ` [PATCH 1/2] Bluetooth: btmtksdio: Remove redundant firmware filename override Chris Lu
2026-08-25  4:10   ` Bluetooth: btmtksdio: Stop discarding the hardware device id bluez.test.bot
2026-08-25  3:36 ` [PATCH 2/2] Bluetooth: btmtksdio: Pass the hardware device id to mt79xx_setup() Chris Lu
2026-08-31 17:20 ` [PATCH 0/2] Bluetooth: btmtksdio: Stop discarding the hardware device id patchwork-bot+bluetooth

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20260825033634.499118-1-chris.lu@mediatek.com \
    --to=chris.lu@mediatek.com \
    --cc=johan.hedberg@gmail.com \
    --cc=linux-bluetooth@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mediatek@lists.infradead.org \
    --cc=luiz.dentz@gmail.com \
    --cc=marcel@holtmann.org \
    --cc=sean.wang@mediatek.com \
    --cc=ss.wu@mediatek.com \
    --cc=will-cy.Lee@mediatek.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.