Skip to content

[PW_SID:1053567] driver core: Make deferred_probe_timeout default a Kconfig option#3305

Open
BluezTestBot wants to merge 11 commits intoworkflowfrom
1053567
Open

[PW_SID:1053567] driver core: Make deferred_probe_timeout default a Kconfig option#3305
BluezTestBot wants to merge 11 commits intoworkflowfrom
1053567

Conversation

@BluezTestBot
Copy link
Owner

Code using driver_deferred_probe_check_state() differs from most
EPROBE_DEFER handling in the kernel. Where other EPROBE_DEFER handling
(e.g. clks, gpios and regulators) waits indefinitely for suppliers to
show up, code using driver_deferred_probe_check_state() will fail
after the deferred_probe_timeout.

This is a problem for generic distro kernels which want to support many
boards using a single kernel build. These kernels want as much drivers to
be modular as possible. The initrd also should be as small as possible,
so the initrd will not have drivers not needing to get the rootfs.

Combine this with waiting for a full-disk encryption password in
the initrd and it is pretty much guaranteed that the default 10s timeout
will be hit, causing probe() failures when drivers on the rootfs happen
to get modprobe-d before other rootfs modules providing their suppliers.

Make the default timeout configurable from Kconfig to allow distro kernel
configs where many of the supplier drivers are modules to set the default
through Kconfig and allow using a value of -1 to disable the timeout
(wait indefinitely).

Signed-off-by: Hans de Goede johannes.goede@oss.qualcomm.com

Documentation/admin-guide/kernel-parameters.txt | 2 +-
drivers/base/Kconfig | 9 +++++++++
drivers/base/dd.c | 9 ++++-----
3 files changed, 14 insertions(+), 6 deletions(-)

Maiquel Paiva and others added 11 commits February 9, 2026 14:36
Add a check for the user-provided length in mgmt_mesh_add() against
the size of the param buffer. This prevents a heap buffer overflow
if the user provides a length larger than the destination buffer.

Fixes: b338d91 ("Bluetooth: Implement support for Mesh")
Cc: stable@vger.kernel.org
Signed-off-by: Maiquel Paiva <maiquelpaiva@gmail.com>
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
…short

Test L2CAP/ECFC/BV-26-C expect the response to L2CAP_ECRED_CONN_REQ with
and MTU value < L2CAP_ECRED_MIN_MTU (64) to be L2CAP_CR_LE_INVALID_PARAMS
rather than L2CAP_CR_LE_UNACCEPT_PARAMS.

Also fix not including the correct number of CIDs in the response since
the spec requires all CIDs being rejected to be included in the
response.

Link: bluez/bluez#1868
Fixes: 15f02b9 ("Bluetooth: L2CAP: Add initial code for Enhanced Credit Based Mode")
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
There is no point in having the label since all it does is return the
value in the 'err' variable. Instead make every goto return directly
and remove the label.

Signed-off-by: Dongyang Jin <jindongyang@kylinos.cn>
Reviewed-by: Paul Menzel <pmenzel@molgen.mpg.de>
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
When TX timestamping is enabled via SO_TIMESTAMPING, SKBs may be queued
into sk_error_queue and will stay there until consumed. If userspace never
gets to read the timestamps, or if the controller is removed unexpectedly,
these SKBs will leak.

Fix by adding skb_queue_purge() calls for sk_error_queue in affected
bluetooth destructors. RFCOMM does not currently use sk_error_queue.

Fixes: 134f4b3 ("Bluetooth: add support for skb TX SND/COMPLETION timestamping")
Reported-by: syzbot+7ff4013eabad1407b70a@syzkaller.appspotmail.com
Closes: https://syzbot.org/bug?extid=7ff4013eabad1407b70a
Cc: stable@vger.kernel.org
Signed-off-by: Heitor Alves de Siqueira <halves@igalia.com>
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
If retries are exhausted, driver should not do futher operation.
During mt79xx firmware download process, if the retry count reaches0,
driver will return an -EIO error and release the firmware resources.

Signed-off-by: Chris Lu <chris.lu@mediatek.com>
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
To prevent abnormal controller states, it is necessary to check
status in another part of the mt79xx firmware setup. During this
process, receiving the 'BTMTK_WMT_PATCH_PROGRESS' status is unexpected.
If this occurs, it should be treated as an error, and driver must be
prevented from continuing execution.

Signed-off-by: Chris Lu <chris.lu@mediatek.com>
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
Add a new flag 'BTMTK_FIRMWARE_DL_RETRY'.
If an error occurs during mt79xx firmware download process, this flag
will be set and cleared after a reset. If the flag is already set and
firmware still cannot be loaded successfully after a reset, no further
reset attempts will be made. In other words, if there is a problem during
firmware download, only one reset will be attempted.

Signed-off-by: Chris Lu <chris.lu@mediatek.com>
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
The setup process previously combined error handling and retry gating
under one condition. As a result, the final failed attempt exited
without performing cleanup.

Update the failure path to always perform power and port cleanup on
setup failure, and reopen the port only when retrying.

Fixes: 9e80587 ("Bluetooth: hci_qca: Enhance retry logic in qca_setup")
Signed-off-by: Jinwang Li <jinwang.li@oss.qualcomm.com>
Reviewed-by: Bartosz Golaszewski <bartosz.golaszewski@oss.qualcomm.com>
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
Whenever new chipset support is added to the driver code,
we ended up adding chipset name to the last of the switch case
arising code readability issue because of improper sorting of
the chipset names in various places of the code.

Refactor code such a way that new chipset can be added easily
in the code without compromising code readability.

Signed-off-by: Vivek Sahu <vivek.sahu@oss.qualcomm.com>
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
This patch adds workflow files for ci:

[sync.yml]
 - The workflow file for scheduled work
 - Sync the repo with upstream repo and rebase the workflow branch
 - Review the patches in the patchwork and creates the PR if needed

[ci.yml]
 - The workflow file for CI tasks
 - Run CI tests when PR is created

Signed-off-by: Tedd Ho-Jeong An <tedd.an@intel.com>
Code using driver_deferred_probe_check_state() differs from most
EPROBE_DEFER handling in the kernel. Where other EPROBE_DEFER handling
(e.g. clks, gpios and regulators) waits indefinitely for suppliers to
show up, code using driver_deferred_probe_check_state() will fail
after the deferred_probe_timeout.

This is a problem for generic distro kernels which want to support many
boards using a single kernel build. These kernels want as much drivers to
be modular as possible. The initrd also should be as small as possible,
so the initrd will *not* have drivers not needing to get the rootfs.

Combine this with waiting for a full-disk encryption password in
the initrd and it is pretty much guaranteed that the default 10s timeout
will be hit, causing probe() failures when drivers on the rootfs happen
to get modprobe-d before other rootfs modules providing their suppliers.

Make the default timeout configurable from Kconfig to allow distro kernel
configs where many of the supplier drivers are modules to set the default
through Kconfig and allow using a value of -1 to disable the timeout
(wait indefinitely).

Signed-off-by: Hans de Goede <johannes.goede@oss.qualcomm.com>
@github-actions
Copy link

CheckPatch
Desc: Run checkpatch.pl script
Duration: 0.35 seconds
Result: PENDING

@github-actions
Copy link

GitLint
Desc: Run gitlint
Duration: 0.34 seconds
Result: PENDING

@github-actions
Copy link

SubjectPrefix
Desc: Check subject contains "Bluetooth" prefix
Duration: 0.46 seconds
Result: FAIL
Output:

"Bluetooth: " prefix is not specified in the subject

@github-actions
Copy link

BuildKernel
Desc: Build Kernel for Bluetooth
Duration: 25.89 seconds
Result: PASS

@github-actions
Copy link

CheckAllWarning
Desc: Run linux kernel with all warning enabled
Duration: 28.03 seconds
Result: PASS

@github-actions
Copy link

CheckSparse
Desc: Run sparse tool with linux kernel
Duration: 31.97 seconds
Result: PASS

@github-actions
Copy link

BuildKernel32
Desc: Build 32bit Kernel for Bluetooth
Duration: 25.10 seconds
Result: PASS

@github-actions
Copy link

TestRunnerSetup
Desc: Setup kernel and bluez for test-runner
Duration: 560.28 seconds
Result: PASS

@github-actions
Copy link

TestRunner_l2cap-tester
Desc: Run l2cap-tester with test-runner
Duration: 28.86 seconds
Result: PASS

@github-actions
Copy link

TestRunner_iso-tester
Desc: Run iso-tester with test-runner
Duration: 83.77 seconds
Result: PASS

@github-actions
Copy link

TestRunner_bnep-tester
Desc: Run bnep-tester with test-runner
Duration: 6.36 seconds
Result: PASS

@github-actions
Copy link

TestRunner_mgmt-tester
Desc: Run mgmt-tester with test-runner
Duration: 122.93 seconds
Result: FAIL
Output:

Total: 494, Passed: 489 (99.0%), Failed: 1, Not Run: 4

Failed Test Cases
Read Exp Feature - Success                           Failed       0.113 seconds

@github-actions
Copy link

TestRunner_rfcomm-tester
Desc: Run rfcomm-tester with test-runner
Duration: 9.59 seconds
Result: PASS

@github-actions
Copy link

TestRunner_sco-tester
Desc: Run sco-tester with test-runner
Duration: 14.75 seconds
Result: FAIL
Output:

WARNING: possible circular locking dependency detected
BUG: sleeping function called from invalid context at net/core/sock.c:3782
Total: 30, Passed: 30 (100.0%), Failed: 0, Not Run: 0

@github-actions
Copy link

TestRunner_ioctl-tester
Desc: Run ioctl-tester with test-runner
Duration: 10.36 seconds
Result: PASS

@github-actions
Copy link

TestRunner_mesh-tester
Desc: Run mesh-tester with test-runner
Duration: 12.50 seconds
Result: FAIL
Output:

Total: 10, Passed: 8 (80.0%), Failed: 2, Not Run: 0

Failed Test Cases
Mesh - Send cancel - 1                               Timed out    2.515 seconds
Mesh - Send cancel - 2                               Timed out    1.999 seconds

@github-actions
Copy link

TestRunner_smp-tester
Desc: Run smp-tester with test-runner
Duration: 8.87 seconds
Result: PASS

@github-actions
Copy link

TestRunner_userchan-tester
Desc: Run userchan-tester with test-runner
Duration: 9.30 seconds
Result: PASS

@github-actions
Copy link

IncrementalBuild
Desc: Incremental build with the patches in the series
Duration: 0.54 seconds
Result: PENDING

@github-actions github-actions bot force-pushed the workflow branch 3 times, most recently from 208468a to 49a9961 Compare February 20, 2026 14:50
@github-actions github-actions bot force-pushed the workflow branch 5 times, most recently from 620c8d9 to 07fb4f1 Compare February 27, 2026 19:20
@github-actions github-actions bot force-pushed the workflow branch 6 times, most recently from 0bcc21a to 40558a3 Compare March 6, 2026 19:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants