From nobody Fri Aug 29 20:46:28 2025 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cD9Kd2FqQz66BN7; Fri, 29 Aug 2025 20:46:29 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cD9Kd1c2lz3kSJ; Fri, 29 Aug 2025 20:46:29 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1756500389; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=22B41uJ/qyymYIvh20rz9uQocJrFZUwy0obiFqfmGKQ=; b=RSdpqFdZMWRfjVLIvry4YTzbj5It7wN4bYTFqAn4OVLH75Q5lHhrkFn9Gi1i4ykSsRUuoi 5nOPzxdhGedm/xFHjXTKnOufNE2/H+sHrkkPPZubBcHxcMgKYWQlsIEEqjHSS65U2/GVe1 ndlyhvMS7zoLnBrkNh385mBar4+CGxrd/6mgf5GaXZ6bV+DuzHFmC9Ziw8eoJ1zmU0BOaY 0AiHpyWzNNrUi8/D0q/hDLABqPSKZyc48n8HZ8iJhIk4Dh4aDq8Es0Q+8Yoa6Dnqr9osPC pFx10V/YnV4Hz/ez3iW8yYBBAD7v0OCn7ALn0oe4wT46f15iLTw6mt48H1afBQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1756500389; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=22B41uJ/qyymYIvh20rz9uQocJrFZUwy0obiFqfmGKQ=; b=QyxN8lHKk6arosGwZRxnrn4Dhj9ZIbi/wSWravh9aji6nfbEZWg/uJtd4AqBU4nFla7oJm 0OwOhfsZ0bhZgIce2O30QL8Q8H1w9eyH+bYsRzTXLIhKz0tbfPXBX7l8bWyYKMWWJrZ+xA uLpyO2OL9jnzdpwljZvRcqruhDtTB4r2yRtM0jjufhpQPrV5YjP/i5KcxVqiDfbfTasRPP jcNOQ0gkEKvudABS0y30v7+Nr2Dc5dX3gOariO4WVXZCsJKNhxRPtmu13f6wOzc9duOG76 wXZgIlunRiEUKRaXpujv/cpaMnrHG5++msuzNLi7JSM1rGtB3g15AOGsNimvKw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1756500389; a=rsa-sha256; cv=none; b=xziXZ4yLW7OlOJkeyOv5GI2KOh7xkiqB1PQV53wjFpu6hQ7FJXxOgCo82iGu4xGElN+3k8 8cGmJtnfTfBuZNfdByZiYcwFxYBdVKAIs58Fz0xnCCUftZ2obvC7lG3p1uK7QrFnDrDvn1 cn/1XtxQTw89DhGKfmnqyiXmPg6WM1FEaPG95qkPjCWOkJBB8ee54o7sDOg2Jqfg8K0JRb BDS5Bkgz3iQf0jViutaTNcJye50/vqKUmlKyRfAK0tHHayFsNxrulqrJG7XyUHIIFH1y39 eYRer3JIrYvH3ok7H+b60AmBRDFMZ9tX+b/NPFgZZNLHSpl5NfpOt+5fSX++NA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cD9Kd0gSgzw0k; Fri, 29 Aug 2025 20:46:29 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 57TKkSO9023040; Fri, 29 Aug 2025 20:46:28 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 57TKkS6Y023038; Fri, 29 Aug 2025 20:46:28 GMT (envelope-from git) Date: Fri, 29 Aug 2025 20:46:28 GMT Message-Id: <202508292046.57TKkS6Y023038@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: "Bjoern A. Zeeb" Subject: git: 40652f86b5ef - main - rc: bluetooth: startup improvements List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bz X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 40652f86b5ef17c9016a5eaf4bc89b2f324540e8 Auto-Submitted: auto-generated The branch main has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=40652f86b5ef17c9016a5eaf4bc89b2f324540e8 commit 40652f86b5ef17c9016a5eaf4bc89b2f324540e8 Author: Stephen Hurd AuthorDate: 2025-08-29 20:01:58 +0000 Commit: Bjoern A. Zeeb CommitDate: 2025-08-29 20:45:23 +0000 rc: bluetooth: startup improvements During startup hccontrol reset needs to be run multiple times for iwbt to work more reliably. Add a loop trying up to three times. Tested by: various (original version; I changed test to -eq) MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D44861 --- libexec/rc/rc.d/bluetooth | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/libexec/rc/rc.d/bluetooth b/libexec/rc/rc.d/bluetooth index 22bd5078034d..239944c73dd6 100755 --- a/libexec/rc/rc.d/bluetooth +++ b/libexec/rc/rc.d/bluetooth @@ -127,8 +127,17 @@ bluetooth_setup_stack() > /dev/null 2>&1 || return 1 # Initilalize HCI node - ${hccontrol} -n ${dev}hci reset \ - > /dev/null 2>&1 || return 1 + for loop in 1 2 3 + do + ${hccontrol} -n ${dev}hci reset \ + > /dev/null 2>1 && break + if [ ${loop} -eq 3 ] + then + warn Reset failed three times, giving up. + return 1 + fi + warn Reset failed, retrying. + done ${hccontrol} -n ${dev}hci read_bd_addr \ > /dev/null 2>&1 || return 1