From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=74.125.82.44 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796009176; b=D5lklqAumjXvzikEaTVmBmjILA3njjBvcmHsdAKkSr3GRDddDQ8R2Qed6Z0vH4NxHgYW ig6Y2K5LPDtQprdgvXFkRNY7XgwVab4jFsTlanQ3Wu+GvuT66e4bY4DZhw17lqa7DsCY+ WPmOMnGhvRq/gh2gmr8M8Mr8A0o9DPnICeaU73K4Q+I++Q4StUVONrXjyHFq4ogbvjSty Q2OVYQwzjuKZwuyCrCP5GXQ4+254Onz7oRSlqBhMp9+SqEJzG2uh34cJ8P+j8XKsGQrTd w098b4GNgKuvbSMiN6enIln4KZN78sAGXNYS59+1PfkU3Hass6QXEgg7kf/sXscuIWQ== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796009176; h=DMARC-Filter:Received:DKIM-Signature:X-Google-DKIM-Signature: X-Forwarded-Encrypted:X-Gm-Message-State:X-Gm-Gg:X-Received:Received: From:To:Cc:Subject:Date:Message-ID:X-Mailer:In-Reply-To:References: MIME-Version:Content-Transfer-Encoding; bh=1EzjSRhkqZmD792a/JryL2FUwDstHJ+iFZg9MAcqPsY=; b=2VcwMbfptzA8nw1uJ79gVkRjtTNaJjQQ4lBl3b5oHnPpP1g49klVktkfDuA06YlmZkzn sMuOswUb15KsInK/jhkWNTCE+GXMjGBx/UKl7wHniWZTq3jRF9rZ1ptY2UXNgHdN8rAE4 iGNTE9qf1bD2WkfSlrU4Rp3YTqfE47rMGlPagF2p86vYE7YVVjXq0V4iOiWNoM0lkgZ// pfa7j9M/jABI5RM+tKPIH53Bm7jTCGYHQXlqabz2Zvq5maRSLdmJheB3Y42XYNjN1nH5a 9SGD/E/eEKImDiyYnm12kmF8jWk+1oH1xr51kOmAnuGAmZ9BHD6l7tbEEzgX/+n55qg== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass header.from=archive.org; spf=pass smtp.mailfrom=archive.org; dkim=pass header.d=archive.org header.i=@archive.org header.a=rsa-sha256 header.s=google header.b=ejrVgToI; arc=none smtp.remote-ip=74.125.82.44 Received: from mail-dl1-f44.google.com (mail-dl1-f44.google.com [74.125.82.44]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 4A9D1606A325 for ; Mon, 30 Nov 2026 03:26:15 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 4A9D1606A325 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=archive.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=archive.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=archive.org header.i=@archive.org header.a=rsa-sha256 header.s=google header.b=ejrVgToI Received: by mail-dl1-f44.google.com with SMTP id a92af1059eb24-18818daa3e7so4833296c88.0 for ; Sun, 29 Nov 2026 19:26:15 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=archive.org; s=google; t=1796009174; x=1796613974; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to:content-type; bh=1EzjSRhkqZmD792a/JryL2FUwDstHJ+iFZg9MAcqPsY=; b=ejrVgToIPiSd+fgHl+N5z2j1/KCdl5olyc/l4RCdrG9vvojteP+8jWpd6ZK+Pl42JQ PWjtYF3Ry02F3LTyL9byCKNF03VN2Byyhy9JTsmd5XvRnEZbw+tKFND0ukMjPtgulxxP Ni1EuI0aIDooNnMIYdy2FQuP/E72u0dJCmhYdikbqoXxTfY6C7wKG/3xK/+evnoEDYJs wap8ZQi2I+XJGNZGvvRofiWTg4n1jOKxufUCPQlwLV3dIYL/DHsgisq412KfXsfZ7q2l SPWCV3T1Tutc43PBF89IeZJW7B28O4pmPc1XtAj0zQId8Y6feiu90Szy0h2eW9S6lcyv yG6A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1796009174; x=1796613974; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to:content-type; bh=1EzjSRhkqZmD792a/JryL2FUwDstHJ+iFZg9MAcqPsY=; b=xXlYNY4OK9cn/e2tPwuoCqX2hoc9gjXeJhqViqsJWjevqhhuK6DQBmil2LIcYoM6H4 6Cqr6Ty120bYCLcvHz2srZYX8wiuvlzt4KNxT9EkwR9A/kmR6fuUqs59GVRAoALK5lpE JCvM1oo0U9SsVsm/p1QVWra/8alqRuz00GSiCakeqgBCd48LtHcarFdUWkA4mhPE0HJL tLCM4dSLRN/P8eGgUbItHEv/ndpA6Ovk9Ry+bgq25kuLrgzJuPpBqvMHo0y4K+fpG+n+ ON7qxfhy4ajz4/qAnlSg8OZvZoaF6jITG21fpeOzhNwx5M/uzAZ0AI0yqYGQpYp/Pedp fqsQ== X-Forwarded-Encrypted: i=1; AL+hErEHkDUj4W1ylOzBV07X1I4RwH2zq8Rr7uS3ACpjpMmeh/XnOenahKdXNHpYF/bRThfc9DclmiWzxxD7S6M=@vger.kernel.org X-Gm-Message-State: APuU4Z8ILEDWYMr8XoST2+Kmc0LoF5Tf3udWZ+j6TTPMPQ5Yuw88KJh0 Wz2YKMFlDvEBUzCEe/PzfAkFE8tyda29vnvjN5OQGlpFbPS8qBC54/nNpZ96sO48D+0= X-Gm-Gg: AZFdTZfdS4kL+gahLvSRy7NBGc4Ujv1yVVmUaS5WK86jFkNZWENb49ebso9zxrtXqHh QTi99fDg0iIFCfHK5etAtmrgfn3n/M39wv9JfoQzjnFqq8g7sf3f/Oi3Z+4rLNKxQ2GZvO1KWok w2uCICUAcz9ls5bBkO+CPnkjLLH9MOAuehlSQY8TZjrpnTgfLJqh8dSyhP7d9oJi5QJhBq41Isw VUanBLTKQNeyGMV1Ddx3MkdlOEhPXlew9cjgzXmap1Cm5bgkkb+3VhBVJc4fqnX+kd25iP/N6Ra DQAN+XUYKZ4m/sB5TVDez5OJjgP8TldJ5qneLa9JETv3L1ny/z352iWqJ0XBcSKsEucCaEL71PC Ta1ZNKefGBnB9qeuVx2OMJNLD74fEAVoU+PZdb+7MknKjbkxGoSlINndyK2Dg91zYWVSQylB+jz gfizUJLpD2jTcw34GX9KzRu+jhJFv4HoTC9mWRLs3QHpkKoTPORS2QTM5DXXVysGZTew8NTDG3r nBPQSB7dVbGVcH1VUYt7efCetdwk4ayNn19z4nl+hIUjKyBjjCVMK3GIzxq3Fj349NfO/6ouB9D AIrv33AFNaANwqH/3KVBaEtj X-Received: by 2002:a05:7022:4181:b0:14a:a6dc:9cbf with SMTP id a92af1059eb24-1b5568abf0bmr43579250c88.4.1796009174316; Sun, 29 Nov 2026 19:26:14 -0800 (PST) Received: from omarchy ([98.47.114.6]) by smtp.gmail.com with ESMTPSA id a92af1059eb24-1b55ff0e4e6sm66048806c88.11.2026.11.29.19.26.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 29 Nov 2026 19:26:13 -0800 (PST) From: Raymond Berger To: dev@deq.rocks Cc: Sven Peter , Marcel Holtmann , Luiz Augusto von Dentz , Janne Grunau , Neal Gompa , asahi@lists.linux.dev, linux-arm-kernel@lists.infradead.org, linux-bluetooth@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v3 3/3] Bluetooth: hci_bcm4377: keep ASPM off only while the firmware boots Date: Sun, 29 Nov 2026 19:25:06 -0800 Message-ID: <20261130032506.27039-1-ray.berger@archive.org> X-Mailer: git-send-email 2.56.1 In-Reply-To: <20261127132501.262651-4-dev@deq.rocks> References: <20261127132501.262651-1-dev@deq.rocks> <20261127132501.262651-4-dev@deq.rocks> X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Transfer-Encoding: 8bit On Fri, Nov 27, 2026 at 02:25:01PM +0100, Andre Eikmeyer wrote: > static void bcm4377_disable_aspm(struct bcm4377_data *bcm4377) > { [...] > + pcie_capability_read_word(bcm4377->pdev, PCI_EXP_LNKCTL, > + &bcm4377->link_ctl); > pcie_capability_clear_word(bcm4377->pdev, PCI_EXP_LNKCTL, > PCI_EXP_LNKCTL_ASPMC); > } [...] > @@ -2425,6 +2436,9 @@ static int bcm4377_probe(struct pci_dev *pdev, const struct pci_device_id *id) > if (ret) > return ret; > > + if (bcm4377->hw->disable_aspm) > + bcm4377_restore_aspm(bcm4377); > + I think ASPM can end up off for good when a probe fails between these two. Any error return between bcm4377_disable_aspm() and bcm4377_restore_aspm() (enabling the device, BAR mapping, OTP read, IRQ setup, firmware boot, RTI setup) leaves ASPM cleared in LNKCTL. The next probe, after a rebind or a reload, saves that cleared value and later "restores" it, so ASPM stays off until reboot. Restoring the saved value on the error paths, for example with a devm action registered right after bcm4377_disable_aspm(), would avoid that. I haven't written or tested such a change. Failed probes do happen on this MacBookAir9,1. With all three patches, Bluetooth hung during setup on most boots, and on the rebinds that followed, probes often failed with -110 (firmware boot timeout) before one succeeded. On those boots lspci showed ASPM disabled on the Bluetooth function afterwards; after a clean probe it shows L1 enabled. The timeouts themselves came from outside this series: brcmfmac's probe reset the whole chip while hci_bcm4377 was still starting, because my distribution loads hci_bcm4377 first. Loading it after Wi-Fi is up fixed that (50 of 50 clean boots, 10 of them with all three patches). ASPM on the Bluetooth function is what moves the package C-state here. Idle, with its ASPM bits cleared by hand (setpci) and then restored to what 3/3 leaves, each pair measured back to back in one boot: AC, screen on: PC3 28%, 2.49 W -> PC6 22%, 1.97 W (package) AC, screen off: PC3 55%, 1.51 W -> PC6 54%, 0.90 W (package) battery, screen off: PC3 54%, 1.45 W -> PC6 53%, 0.93 W (package) 3.35 W -> 2.67 W (whole system, discharge) Your commit message says this model reaches PC8; here it stops at PC6 (PC7 to PC10 stayed at 0 where I logged them). Did your PC8 run include other changes? With ASPM actually on (after a clean probe; in my earlier runs failed probes had left it off), resumes with all three patches were fine apart from the rtcwake one in my 2/3 reply: 7 of 7 with Bluetooth unbound around suspend from userspace (ASPM on again after each), and 8 of 8 that went through the re-probe from 2/3, alternating ASPM on and off before suspend. That's too few to rule ASPM out, but it doesn't seem to trigger that failure by itself. Tested-by: Raymond Berger I used Claude Opus 5.5 to help run these tests. It spotted this issue while going through the code.