diff mbox series

Bluetooth: btusb: Fix the patch for MT7920 the affected to MT7921

Message ID 20240415141922.25055-1-peter.tsao@mediatek.com
State Accepted
Commit 0b5286e3da9fd4cc2f142afe56d1590c1d1cf9bd
Headers show
Series Bluetooth: btusb: Fix the patch for MT7920 the affected to MT7921 | expand

Commit Message

Peter Tsao April 15, 2024, 2:19 p.m. UTC
Because both MT7920 and MT7921 use the same chip ID.
We use the 8th bit of fw_flavor to distingush MT7920.
The original patch made a mistake to check whole fw_flavor,
that makes the condition both true (dev_id == 0x7961 && fw_flavor),
and makes MT7921 flow wrong.

In this patch, we correct the flow to get the 8th bit value for MT7920.
And the patch is verified pass with both MT7920 and MT7921.

Signed-off-by: Peter Tsao <peter.tsao@mediatek.com>
---
 drivers/bluetooth/btusb.c | 1 +
 1 file changed, 1 insertion(+)

Comments

patchwork-bot+bluetooth@kernel.org April 16, 2024, 3:10 p.m. UTC | #1
Hello:

This patch was applied to bluetooth/bluetooth-next.git (master)
by Luiz Augusto von Dentz <luiz.von.dentz@intel.com>:

On Mon, 15 Apr 2024 22:19:22 +0800 you wrote:
> Because both MT7920 and MT7921 use the same chip ID.
> We use the 8th bit of fw_flavor to distingush MT7920.
> The original patch made a mistake to check whole fw_flavor,
> that makes the condition both true (dev_id == 0x7961 && fw_flavor),
> and makes MT7921 flow wrong.
> 
> In this patch, we correct the flow to get the 8th bit value for MT7920.
> And the patch is verified pass with both MT7920 and MT7921.
> 
> [...]

Here is the summary with links:
  - Bluetooth: btusb: Fix the patch for MT7920 the affected to MT7921
    https://git.kernel.org/bluetooth/bluetooth-next/c/263296438807

You are awesome, thank you!
Linux regression tracking (Thorsten Leemhuis) May 8, 2024, 8:33 a.m. UTC | #2
On 16.04.24 17:10, patchwork-bot+bluetooth@kernel.org wrote:
> 
> This patch was applied to bluetooth/bluetooth-next.git (master)
> by Luiz Augusto von Dentz <luiz.von.dentz@intel.com>:
> 
> On Mon, 15 Apr 2024 22:19:22 +0800 you wrote:
>> Because both MT7920 and MT7921 use the same chip ID.
>> We use the 8th bit of fw_flavor to distingush MT7920.
>> The original patch made a mistake to check whole fw_flavor,
>> that makes the condition both true (dev_id == 0x7961 && fw_flavor),
>> and makes MT7921 flow wrong.
>>
>> In this patch, we correct the flow to get the 8th bit value for MT7920.
>> And the patch is verified pass with both MT7920 and MT7921.
>>
>> [...]
> 
> Here is the summary with links:
>   - Bluetooth: btusb: Fix the patch for MT7920 the affected to MT7921
>     https://git.kernel.org/bluetooth/bluetooth-next/c/263296438807

Hi! 6.9 is only days close and this is fixing a 6.9 regression, so allow
me to quickly ask: do you still plan to submit this for mainline merge
soon? Or did you already and I just missed it? Ciao, Thorsten
Luiz Augusto von Dentz May 8, 2024, 2:18 p.m. UTC | #3
Hi,

On Wed, May 8, 2024 at 4:34 AM Linux regression tracking (Thorsten
Leemhuis) <regressions@leemhuis.info> wrote:
>
> On 16.04.24 17:10, patchwork-bot+bluetooth@kernel.org wrote:
> >
> > This patch was applied to bluetooth/bluetooth-next.git (master)
> > by Luiz Augusto von Dentz <luiz.von.dentz@intel.com>:
> >
> > On Mon, 15 Apr 2024 22:19:22 +0800 you wrote:
> >> Because both MT7920 and MT7921 use the same chip ID.
> >> We use the 8th bit of fw_flavor to distingush MT7920.
> >> The original patch made a mistake to check whole fw_flavor,
> >> that makes the condition both true (dev_id == 0x7961 && fw_flavor),
> >> and makes MT7921 flow wrong.
> >>
> >> In this patch, we correct the flow to get the 8th bit value for MT7920.
> >> And the patch is verified pass with both MT7920 and MT7921.
> >>
> >> [...]
> >
> > Here is the summary with links:
> >   - Bluetooth: btusb: Fix the patch for MT7920 the affected to MT7921
> >     https://git.kernel.org/bluetooth/bluetooth-next/c/263296438807
>
> Hi! 6.9 is only days close and this is fixing a 6.9 regression, so allow
> me to quickly ask: do you still plan to submit this for mainline merge
> soon? Or did you already and I just missed it? Ciao, Thorsten

It wasn't marked with Fixes or stable though which is what I usually
use as an indicator to backport.
diff mbox series

Patch

diff --git a/drivers/bluetooth/btusb.c b/drivers/bluetooth/btusb.c
index 4c0cc13adb47..8bede0a33566 100644
--- a/drivers/bluetooth/btusb.c
+++ b/drivers/bluetooth/btusb.c
@@ -3123,6 +3123,7 @@  static int btusb_mtk_setup(struct hci_dev *hdev)
 			bt_dev_err(hdev, "Failed to get fw flavor (%d)", err);
 			return err;
 		}
+		fw_flavor = (fw_flavor & 0x00000080) >> 7;
 	}
 
 	mediatek = hci_get_priv(hdev);