Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=74.125.82.182 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796009175; b=HPkMEZtlZ1MnaUE2WxBtfvizE2s/YbVEEi9tZ80STY31D9N/fri2yiMefnjqb4qITwcl VNb3DAt6Oi5Tp55nWXxZIfVtF5lItSQL2Vs4enUIkHnOl7Z1OT5DX5OrizxCHhrDkoxBN y7YfXOSkq8vbLAUNQhmrNDrFGI6vlUBrfvG+NCWWIAKwf6nSW3TFmSH8vASLJSxMQmXya cCkPToO7RF7S40xevhtAIBWvICvWg/e+QcgxudNMcRc98omSEUk8UuvSSVigjhpSUSp5I k4GoeV0BU01aAk9b0+N46eyfeTbd0JFAEVTPwi7f3uF34w3yrQUsORLgcFgIZJg0scg== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796009175; 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=cMMUrMnr8ae+dpcPeuuYpaeK/T36Xtc9YDI4Y1w0tAE+edGGgjw/sw92WMz+zAzY9Gx3 CU9sgqHVMoent5gRrX1jlZQfjmFZIW2Y4KEIijrBeqZHNMD856UeUb64lB9lkAgmeEd8W /f1tu6TQGBAUdm25VBv+OHvOUzRt8qH4fPI7nt3wBDz2w7UBYhvqHga+pQ+EZ5mELbJxK wUML+xzZHYNUp2NII/RChyQI0I4xBoxPx59c1qGsL41vS/H5mJp5qxnD7gqKtJ2GNUXa3 3okIuKJKtzXXS//KMNvIPAVwPSHSEdGdwhLrLko6Z1yIc3hrC7T8mtI3Rn74cmFdh1g== 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=Wu3hP+OR; arc=none smtp.remote-ip=74.125.82.182 Received: from mail-dy1-f182.google.com (mail-dy1-f182.google.com [74.125.82.182]) (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 5CAEE606A327 for ; Mon, 30 Nov 2026 03:26:15 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 5CAEE606A327 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=Wu3hP+OR Received: by mail-dy1-f182.google.com with SMTP id 5a478bee46e88-386c336eab8so6979012eec.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=lists.linux.dev; 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=Wu3hP+ORHRzG6iBhwzB+dNh+CwxYkxxVNZuZ9ZmF2bnTMKgV8axa97AhJPikyHk6gj xxszZfTJijyKh97DZdZ0mFK1P/mMJOrRCB57Xw8iuq5Cn7uRQvBb60unts1DFxO+q5fs GTposi4raxLN5R5x454q9Wpguh8tESbL7d6S7T610p8Z+UhnjQIVNAEKIYOxcWCqyp+u 8A2X5VEnEDnMZtu3nLSdoRzq+UFob5Ko3b/+eCKld1hk5QRg/KJO+EO22/cNF7TZqiog dFOt8MwjFXgocc9CJPlfyq1qy5xgGfbAKIPxPFnuXo5fpcXvrOsB3UdXz8+Gd1sBM59j kpHA== 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=DPXuoctH6CPDlRRhVZiUru23X1QF6Cq1UOi3qPfdCI0mLTf4/gs/q36Dvi/2Zpt4GA aJuIcKnxbOH7cPc8xEYs/oAWqPZvlwKRxjUI1KRhwy68M5QzFlJBTqKSHXBTL+KM8fj0 JAAyiOsZRxQ59J9brl6Go0PkK4GuRcfHVYIdfi8qG5aze1rXotgCQcSg7P9Mqp2Xzim+ omf8+ShgX9gSThJJsGMQri+Jn8FQx34/0AVl4fbWg1nVADKgZ0z2Ljtm8hAg9UYFieqQ KoNQmbHjjVsjFfrG+Riv3V5+3OSWsp3fmgp0JIQyayV810ioT8cle4v4t3HCGbZy1j9t vYQQ== X-Forwarded-Encrypted: i=1; AL+hErHDHQEr/RU+aYTDFmk8lvb1M3+WjgFdu+8U3SUCjmTA8UZL585/StU978v80Dthv+79KazqEQ==@lists.linux.dev X-Gm-Message-State: APuU4Z/kOgtVIiVHray1HrVatkrNcr7Ffix3ZHwa6jO27mn1VXYfpkfZ leTxJbE1svIHfSRmtpA2y8Ls2Z7hgo3R+Op2SG6i4Qi61WfL6uTxnve5kGufCU20qQc= X-Gm-Gg: AZFdTZeRdL/YPfTgOkqdhbfhnGSHxSQYSZ2a6Nh7YzTco3mhymz5je5IC6fIIofPLpA 8wIM+++Wp5Na9jFPRIN0Hbqz+/FIP0TDqRfdweKUioukbWgE5PKQgLUDz4jbkdU7WYZSPAtxIWa beNMgB6hD01hUPKeapnkmgs2hq1F1oSRnU+UtEW1FbH6uLgrx2CWtEd/ikCLGb2N+A0ak1ZIr89 G4E5YK4p3VPthNbFXLkA8SRLaE7FGznEktuFf+CrzhmJdXjOo7etHAvBKioXPfdSGyzzucOUB2x o/u/BwgjzzDk1Ogm33/L2LAZWQ3tfMjCEwnjPu1uEcoyaS0jjR1vr+mYhqEVt1zvdSuAG+juneS ywphj43fA+4muYBCnc1mhiGSs7KSUmGONmO7hlP2Vwq1u/xOKsYipXnDmClnqOmDMnNFi5lBHLR EUiUIIpB6fa6gHprtziBL+1Ve3QCCpgj8h2u3bCIX1qH5NfzC3uCVmbNigGpFcsMjo7MCU+jY5x WGdVq3Hz8DHzwyGpwywSH9Nvqhua4ImBGp+BUGp44Qbp386GNjfrKyp+D4IOg+zY44OQldaEx9B 2mQBfhkTW92g4D392cmBLOmg 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: asahi@lists.linux.dev 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.