mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Arend van Spriel <arend.vanspriel@broadcom.com>
To: Andre Eikmeyer <dev@deq.rocks>
Cc: arend.vanspriel@broadcom.com, linux-wireless@vger.kernel.org,
	brcm80211@lists.linux.dev, brcm80211-dev-list.pdl@broadcom.com,
	linux-kernel@vger.kernel.org, michael.reeves077@gmail.com,
	marcan@marcan.st, j@jannau.net, asahi@lists.linux.dev,
	sebastian.reichel@collabora.com
Subject: Re: [PATCH v2 2/5] wifi: brcmfmac: pcie: skip the host ready doorbell at init once it is a capability
Date: Thu, 26 Nov 2026 15:29:40 +0100	[thread overview]
Message-ID: <20261126142942.881504-3-arend.vanspriel@broadcom.com> (raw)
In-Reply-To: <20261111120748.23795-3-dev@deq.rocks>

On Wed, 11 Nov 2026 13:07:45 +0100, Andre Eikmeyer <dev@deq.rocks> wrote:
> With host ready in the host capabilities, the BCM4364 firmware halts on
> the doorbell that brcmf_pcie_preinit() rings, before it answers the
> first ioctl. The B3 of the MacBookPro16,1 does so on every load, the B2
> of the MacBookPro15,1 on some:
>
>   brcmf_pcie_handle_mb_data D2H_MB_DATA: FW HALT
>   brcmf_attach: dongle is not responding: err=-5
>
> The BCM4377 stays silent without the capability, so it stays. Once host
> ready is a capability the firmware takes the doorbell as the exit from
> D3, where Broadcom's DHD driver rings it, after D0_INFORM. Ring it at
> init only when host ready is not a capability.
>
> Signed-off-by: Andre Eikmeyer <dev@deq.rocks>

The sentence "The BCM4377 stays silent without the capability, so it stays." is
unclear. What stays, the capability or the doorbell? Also please add a Fixes: tag
for a83a99d063a0 ("wifi: brcmfmac: Negotiate PCIe mailbox transport with
firmware"), which introduced the host ready capability.

[...]

> ---
>  .../net/wireless/broadcom/brcm80211/brcmfmac/pcie.c | 13 +++++++++++--
>  1 file changed, 11 insertions(+), 2 deletions(-)

[...]

> diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/pcie.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/pcie.c
> @@ -1599,7 +1600,13 @@ static int brcmf_pcie_preinit(struct device *dev)
>  	brcmf_dbg(PCIE, "Enter\n");
>
>  	brcmf_pcie_intr_enable(buspub->devinfo);
> -	brcmf_pcie_hostready(buspub->devinfo);
> +	/*
> +	 * Once the host capabilities enable host ready, the firmware takes the
> +	 * doorbell as the exit from D3 only. The BCM4364 firmware halts on it
> +	 * here.
> +	 */
> +	if (!buspub->devinfo->shared.hostrdy)
> +		brcmf_pcie_hostready(buspub->devinfo);
>
>  	return 0;
>  }

This skips the doorbell at init for every firmware with shared version >= 6 and
HOSTRDY_DB1, not only the BCM4364. That includes the newer chips the BCM4388 series
was written for, which as far as I know ran with the doorbell at init. Doorbell 1 was
introduced to tell the firmware that the common rings are initialized, so I would not
drop it for chips we have no data on. The B2 only halting on some loads also suggests
the doorbell is rung too early rather than that it must not be rung. Please either
limit this to the chips that need it, or ring it at a later point if that avoids the
halt. Otherwise I would like Michael and Hector to confirm that the other chips do
not need it at init.

Regards,
Arend

  reply	other threads:[~2026-11-26 14:29 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-11 12:07 [PATCH v2 0/5] wifi: brcmfmac: pcie: S3 and deep sleep on the T2 Mac chips Andre Eikmeyer
2026-11-11 12:07 ` [PATCH v2 1/5] wifi: brcmfmac: pcie: set the state before D0_INFORM on resume Andre Eikmeyer
2026-11-26 14:29   ` Arend van Spriel
2026-11-11 12:07 ` [PATCH v2 2/5] wifi: brcmfmac: pcie: skip the host ready doorbell at init once it is a capability Andre Eikmeyer
2026-11-26 14:29   ` Arend van Spriel [this message]
2026-11-11 12:07 ` [PATCH v2 3/5] wifi: brcmfmac: pcie: probe again after a resume through firmware Andre Eikmeyer
2026-11-26 14:29   ` Arend van Spriel
2026-11-11 12:07 ` [PATCH v2 4/5] wifi: brcmfmac: msgbuf: send the flowring delete without waiting for tx status Andre Eikmeyer
2026-11-26 14:29   ` Arend van Spriel
2026-11-11 12:07 ` [PATCH v2 5/5] wifi: brcmfmac: pcie: support inband device wake and deep sleep Andre Eikmeyer
2026-11-26 14:29   ` Arend van Spriel

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20261126142942.881504-3-arend.vanspriel@broadcom.com \
    --to=arend.vanspriel@broadcom.com \
    --cc=asahi@lists.linux.dev \
    --cc=brcm80211-dev-list.pdl@broadcom.com \
    --cc=brcm80211@lists.linux.dev \
    --cc=dev@deq.rocks \
    --cc=j@jannau.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-wireless@vger.kernel.org \
    --cc=marcan@marcan.st \
    --cc=michael.reeves077@gmail.com \
    --cc=sebastian.reichel@collabora.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®