Skip to content

Conversation

@opsiff
Copy link
Member

@opsiff opsiff commented Mar 15, 2025

close the feature by default for it break mt7921u init flow.

Test in kernel 6.12.y
Log:
3月 15 17:00:19 uos-PC kernel: Bluetooth: hci0: Failed to read MSFT supported features (-110) 3月 15 17:00:20 uos-PC kernel: xe 0000:00:02.0: [drm] ERROR Atomic update failure on pipe A (start=57761 end=57762) time 139 us, min 1778, max 1799, scanline start 1769, end 1791 3月 15 17:00:21 uos-PC kernel: Bluetooth: hci0: AOSP get vendor capabilities (-110) 3月 15 17:00:21 uos-PC kernel: usb 4-1: reset SuperSpeed USB device number 8 using xhci_hcd 3月 15 17:00:21 uos-PC kernel: mt7921u 4-1:1.3: HW/SW Version: 0x8a108a10, Build Time: 20241106151007a 3月 15 17:00:21 uos-PC kernel: mt7921u 4-1:1.3: WM Firmware Version: ____010000, Build Time: 20241106151045 3月 15 17:00:21 uos-PC kernel: Bluetooth: hci0: HW/SW Version: 0x008a008a, Build Time: 20241106151414 3月 15 17:00:23 uos-PC kernel: mt7921u 4-1:1.3 wlxe0e1a935c9c9: renamed from wlan0 3月 15 17:00:26 uos-PC kernel: Bluetooth: hci0: command 0xfd98 tx timeout 3月 15 17:00:26 uos-PC kernel: Bluetooth: hci0: Failed to apply iso setting (-110) 3月 15 17:00:26 uos-PC kernel: Bluetooth: hci0: Device setup in 4145932 usecs 3月 15 17:00:26 uos-PC kernel: Bluetooth: hci0: HCI Enhanced Setup Synchronous Connection command is advertised, but not supported. 3月 15 17:00:28 uos-PC kernel: Bluetooth: hci0: Opcode 0x0c03 failed: -110 3月 15 17:00:30 uos-PC kernel: Bluetooth: hci0: Failed to read MSFT supported features (-110) 3月 15 17:00:32 uos-PC kernel: Bluetooth: hci0: AOSP get vendor capabilities (-110) 3月 15 17:00:32 uos-PC kernel: usb 4-1: reset SuperSpeed USB device number 8 using xhci_hcd 3月 15 17:00:32 uos-PC kernel: mt7921u 4-1:1.3: HW/SW Version: 0x8a108a10, Build Time: 20241106151007a 3月 15 17:00:32 uos-PC kernel: mt7921u 4-1:1.3: WM Firmware Version: ____010000, Build Time: 20241106151045 3月 15 17:00:32 uos-PC kernel: Bluetooth: hci0: HW/SW Version: 0x008a008a, Build Time: 20241106151414 3月 15 17:00:34 uos-PC kernel: mt7921u 4-1:1.3 wlxe0e1a935c9c9: renamed from wlan0 3月 15 17:00:36 uos-PC kernel: Bluetooth: hci0: command 0xfd98 tx timeout 3月 15 17:00:36 uos-PC kernel: Bluetooth: hci0: Failed to apply iso setting (-110) 3月 15 17:00:36 uos-PC kernel: Bluetooth: hci0: Device setup in 4143932 usecs 3月 15 17:00:36 uos-PC kernel: Bluetooth: hci0: HCI Enhanced Setup Synchronous Connection command is advertised, but not supported. 3月 15 17:00:38 uos-PC kernel: Bluetooth: hci0: Opcode 0x0c03 failed: -110 3月 15 17:00:40 uos-PC kernel: Bluetooth: hci0: Failed to read MSFT supported features (-110) 3月 15 17:00:42 uos-PC kernel: Bluetooth: hci0: AOSP get vendor capabilities (-110) 3月 15 17:00:43 uos-PC kernel: usb 4-1: reset SuperSpeed USB device number 8 using xhci_hcd 3月 15 17:00:43 uos-PC kernel: mt7921u 4-1:1.3: HW/SW Version: 0x8a108a10, Build Time: 20241106151007a 3月 15 17:00:43 uos-PC kernel: mt7921u 4-1:1.3: WM Firmware Version: ____010000, Build Time: 20241106151045 3月 15 17:00:43 uos-PC kernel: Bluetooth: hci0: HW/SW Version: 0x008a008a, Build Time: 20241106151414 3月 15 17:00:44 uos-PC kernel: mt7921u 4-1:1.3 wlxe0e1a935c9c9: renamed from wlan0 3月 15 17:00:47 uos-PC kernel: Bluetooth: hci0: command 0xfd98 tx timeout 3月 15 17:00:47 uos-PC kernel: Bluetooth: hci0: Failed to apply iso setting (-110) 3月 15 17:00:47 uos-PC kernel: Bluetooth: hci0: Device setup in 4104912 usecs 3月 15 17:00:47 uos-PC kernel: Bluetooth: hci0: HCI Enhanced Setup Synchronous Connection command is advertised, but not supported. 3月 15 17:00:49 uos-PC kernel: Bluetooth: hci0: Opcode 0x0c03 failed: -110 3月 15 17:00:51 uos-PC kernel: Bluetooth: hci0: Failed to read MSFT supported features (-110) 3月 15 17:00:53 uos-PC kernel: Bluetooth: hci0: AOSP get vendor capabilities (-110) 3月 15 17:00:54 uos-PC kernel: usb 4-1: reset SuperSpeed USB device number 8 using xhci_hcd 3月 15 17:00:54 uos-PC kernel: mt7921u 4-1:1.3: HW/SW Version: 0x8a108a10, Build Time: 20241106151007a 3月 15 17:00:54 uos-PC kernel: mt7921u 4-1:1.3: WM Firmware Version: ____010000, Build Time: 20241106151045 3月 15 17:00:54 uos-PC kernel: Bluetooth: hci0: HW/SW Version: 0x008a008a, Build Time: 20241106151414 3月 15 17:00:55 uos-PC kernel: mt7921u 4-1:1.3 wlxe0e1a935c9c9: renamed from wlan0 3月 15 17:00:58 uos-PC kernel: Bluetooth: hci0: command 0xfd98 tx timeout 3月 15 17:00:58 uos-PC kernel: Bluetooth: hci0: Failed to apply iso setting (-110) 3月 15 17:00:58 uos-PC kernel: Bluetooth: hci0: Device setup in 4188859 usecs 3月 15 17:00:58 uos-PC kernel: Bluetooth: hci0: HCI Enhanced Setup Synchronous Connection command is advertised, but not supported. 3月 15 17:01:00 uos-PC kernel: Bluetooth: hci0: Opcode 0x0c03 failed: -110 3月 15 17:01:02 uos-PC kernel: Bluetooth: hci0: Failed to read MSFT supported features (-110)

Summary by Sourcery

Disable the Bluetooth isopkt feature by default for MediaTek devices to prevent issues during device initialization. A module parameter is added to allow enabling the feature.

@sourcery-ai
Copy link

sourcery-ai bot commented Mar 15, 2025

Reviewer's Guide by Sourcery

This pull request introduces a module parameter enable_isopkt to disable the isopkt feature by default. The ISO interface initialization is now conditional, depending on the value of the enable_isopkt parameter. This change addresses issues observed during mt7921u initialization.

Sequence diagram for Bluetooth device setup with isopkt disabled

sequenceDiagram
  participant hci_dev
  participant btmtk_data
  participant btmtk_usb_setup
  participant btmtk_usb_isointf_init

  btmtk_usb_setup->>hci_dev: hci_set_aosp_capable(hdev)
  alt enable_isopkt && test_bit(BTMTK_ISOPKT_OVER_INTR, &btmtk_data->flags)
    btmtk_usb_setup->>btmtk_usb_isointf_init: btmtk_usb_isointf_init(hdev)
    alt btmtk_usb_isointf_init success
      btmtk_usb_setup->>btmtk_data: set_bit(BTMTK_ISOPKT_RUNNING, &btmtk_data->flags)
    else btmtk_usb_isointf_init fails
      btmtk_usb_setup->>btmtk_data: Do nothing
    end
  else enable_isopkt is false or BTMTK_ISOPKT_OVER_INTR is not set
    btmtk_usb_setup->>btmtk_data: Skip btmtk_usb_isointf_init
  end
Loading

File-Level Changes

Change Details Files
Added a module parameter to control the enabling of isopkt.
  • Introduced a boolean module parameter enable_isopkt with default value false.
  • Added a module parameter description.
drivers/bluetooth/btmtk.c
Conditionally initialize the ISO interface based on the enable_isopkt module parameter.
  • Wrapped the btmtk_usb_isointf_init call within an if statement that checks if enable_isopkt is true.
  • The ISO interface is only initialized if enable_isopkt is true and the BTMTK_ISOPKT_OVER_INTR flag is set.
drivers/bluetooth/btmtk.c

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!
  • Generate a plan of action for an issue: Comment @sourcery-ai plan on
    an issue to generate a plan of action for it.

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@opsiff opsiff changed the title Bluetooth: mediatek: use module param to disable isopkt by default [Deepin-Kernel-SIG] [linux 6.6-y] [Deepin] Bluetooth: mediatek: use module param to disable isopkt by default Mar 15, 2025
close the feature by default for it break mt7921u init flow.
for unknown what device show it supports.

Test in kernel 6.12.y
Log:
3月 15 17:00:19 uos-PC kernel: Bluetooth: hci0: Failed to read MSFT supported features (-110)
3月 15 17:00:20 uos-PC kernel: xe 0000:00:02.0: [drm] *ERROR* Atomic update failure on pipe A (start=57761 end=57762) time 139 us, min 1778, max 1799, scanline start 1769, end 1791
3月 15 17:00:21 uos-PC kernel: Bluetooth: hci0: AOSP get vendor capabilities (-110)
3月 15 17:00:21 uos-PC kernel: usb 4-1: reset SuperSpeed USB device number 8 using xhci_hcd
3月 15 17:00:21 uos-PC kernel: mt7921u 4-1:1.3: HW/SW Version: 0x8a108a10, Build Time: 20241106151007a
3月 15 17:00:21 uos-PC kernel: mt7921u 4-1:1.3: WM Firmware Version: ____010000, Build Time: 20241106151045
3月 15 17:00:21 uos-PC kernel: Bluetooth: hci0: HW/SW Version: 0x008a008a, Build Time: 20241106151414
3月 15 17:00:23 uos-PC kernel: mt7921u 4-1:1.3 wlxe0e1a935c9c9: renamed from wlan0
3月 15 17:00:26 uos-PC kernel: Bluetooth: hci0: command 0xfd98 tx timeout
3月 15 17:00:26 uos-PC kernel: Bluetooth: hci0: Failed to apply iso setting (-110)
3月 15 17:00:26 uos-PC kernel: Bluetooth: hci0: Device setup in 4145932 usecs
3月 15 17:00:26 uos-PC kernel: Bluetooth: hci0: HCI Enhanced Setup Synchronous Connection command is advertised, but not supported.
3月 15 17:00:28 uos-PC kernel: Bluetooth: hci0: Opcode 0x0c03 failed: -110
3月 15 17:00:30 uos-PC kernel: Bluetooth: hci0: Failed to read MSFT supported features (-110)
3月 15 17:00:32 uos-PC kernel: Bluetooth: hci0: AOSP get vendor capabilities (-110)
3月 15 17:00:32 uos-PC kernel: usb 4-1: reset SuperSpeed USB device number 8 using xhci_hcd
3月 15 17:00:32 uos-PC kernel: mt7921u 4-1:1.3: HW/SW Version: 0x8a108a10, Build Time: 20241106151007a
3月 15 17:00:32 uos-PC kernel: mt7921u 4-1:1.3: WM Firmware Version: ____010000, Build Time: 20241106151045
3月 15 17:00:32 uos-PC kernel: Bluetooth: hci0: HW/SW Version: 0x008a008a, Build Time: 20241106151414
3月 15 17:00:34 uos-PC kernel: mt7921u 4-1:1.3 wlxe0e1a935c9c9: renamed from wlan0
3月 15 17:00:36 uos-PC kernel: Bluetooth: hci0: command 0xfd98 tx timeout
3月 15 17:00:36 uos-PC kernel: Bluetooth: hci0: Failed to apply iso setting (-110)
3月 15 17:00:36 uos-PC kernel: Bluetooth: hci0: Device setup in 4143932 usecs
3月 15 17:00:36 uos-PC kernel: Bluetooth: hci0: HCI Enhanced Setup Synchronous Connection command is advertised, but not supported.
3月 15 17:00:38 uos-PC kernel: Bluetooth: hci0: Opcode 0x0c03 failed: -110
3月 15 17:00:40 uos-PC kernel: Bluetooth: hci0: Failed to read MSFT supported features (-110)
3月 15 17:00:42 uos-PC kernel: Bluetooth: hci0: AOSP get vendor capabilities (-110)
3月 15 17:00:43 uos-PC kernel: usb 4-1: reset SuperSpeed USB device number 8 using xhci_hcd
3月 15 17:00:43 uos-PC kernel: mt7921u 4-1:1.3: HW/SW Version: 0x8a108a10, Build Time: 20241106151007a
3月 15 17:00:43 uos-PC kernel: mt7921u 4-1:1.3: WM Firmware Version: ____010000, Build Time: 20241106151045
3月 15 17:00:43 uos-PC kernel: Bluetooth: hci0: HW/SW Version: 0x008a008a, Build Time: 20241106151414
3月 15 17:00:44 uos-PC kernel: mt7921u 4-1:1.3 wlxe0e1a935c9c9: renamed from wlan0
3月 15 17:00:47 uos-PC kernel: Bluetooth: hci0: command 0xfd98 tx timeout
3月 15 17:00:47 uos-PC kernel: Bluetooth: hci0: Failed to apply iso setting (-110)
3月 15 17:00:47 uos-PC kernel: Bluetooth: hci0: Device setup in 4104912 usecs
3月 15 17:00:47 uos-PC kernel: Bluetooth: hci0: HCI Enhanced Setup Synchronous Connection command is advertised, but not supported.
3月 15 17:00:49 uos-PC kernel: Bluetooth: hci0: Opcode 0x0c03 failed: -110
3月 15 17:00:51 uos-PC kernel: Bluetooth: hci0: Failed to read MSFT supported features (-110)
3月 15 17:00:53 uos-PC kernel: Bluetooth: hci0: AOSP get vendor capabilities (-110)
3月 15 17:00:54 uos-PC kernel: usb 4-1: reset SuperSpeed USB device number 8 using xhci_hcd
3月 15 17:00:54 uos-PC kernel: mt7921u 4-1:1.3: HW/SW Version: 0x8a108a10, Build Time: 20241106151007a
3月 15 17:00:54 uos-PC kernel: mt7921u 4-1:1.3: WM Firmware Version: ____010000, Build Time: 20241106151045
3月 15 17:00:54 uos-PC kernel: Bluetooth: hci0: HW/SW Version: 0x008a008a, Build Time: 20241106151414
3月 15 17:00:55 uos-PC kernel: mt7921u 4-1:1.3 wlxe0e1a935c9c9: renamed from wlan0
3月 15 17:00:58 uos-PC kernel: Bluetooth: hci0: command 0xfd98 tx timeout
3月 15 17:00:58 uos-PC kernel: Bluetooth: hci0: Failed to apply iso setting (-110)
3月 15 17:00:58 uos-PC kernel: Bluetooth: hci0: Device setup in 4188859 usecs
3月 15 17:00:58 uos-PC kernel: Bluetooth: hci0: HCI Enhanced Setup Synchronous Connection command is advertised, but not supported.
3月 15 17:01:00 uos-PC kernel: Bluetooth: hci0: Opcode 0x0c03 failed: -110
3月 15 17:01:02 uos-PC kernel: Bluetooth: hci0: Failed to read MSFT supported features (-110)

Signed-off-by: Wentao Guan <[email protected]>
@opsiff opsiff force-pushed the linux-6.6.y-2025-03-15-mtk branch from 08ec487 to 1d45ebc Compare March 15, 2025 09:19
Copy link

@sourcery-ai sourcery-ai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey @opsiff - I've reviewed your changes - here's some feedback:

Overall Comments:

  • Consider adding a comment explaining why the module parameter is being introduced.
  • It would be good to have a Kconfig option instead of a module parameter.
Here's what I looked at during the review
  • 🟢 General issues: all looks good
  • 🟢 Security: all looks good
  • 🟢 Testing: all looks good
  • 🟢 Complexity: all looks good
  • 🟢 Documentation: all looks good

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

@opsiff opsiff closed this Mar 15, 2025
@opsiff opsiff reopened this Mar 19, 2025
@deepin-ci-robot
Copy link

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: hello666888999
Once this PR has been reviewed and has the lgtm label, please ask for approval from opsiff. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@opsiff
Copy link
Member Author

opsiff commented Mar 21, 2025

/ok-to-test

@opsiff opsiff merged commit 8169493 into deepin-community:linux-6.6.y Mar 21, 2025
8 of 13 checks passed
@deepin-ci-robot
Copy link

deepin pr auto review

关键摘要:

  • btmtk_usb_setup函数中,新增的enable_isopkt变量被用来控制是否启用ISO数据包传输,但未提供相应的文档说明其用途和默认值。
  • 新增的module_paramMODULE_PARM_DESC宏用于在模块加载时允许用户配置enable_isopkt的值,这是一个好的实践,但需要确保模块文档中详细说明了如何使用这些参数。

是否建议立即修改:

  • 是,建议添加更多的文档说明,以便其他开发者理解enable_isopkt参数的用途和默认行为。
  • 是,如果enable_isopkt的默认值不是预期的,应该明确指定默认值,并在文档中说明。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants