From: Arend van Spriel <arend.vanspriel@broadcom.com>
To: Hector Martin <marcan@marcan.st>,
Arend van Spriel <aspriel@gmail.com>,
Franky Lin <franky.lin@broadcom.com>,
Hante Meuleman <hante.meuleman@broadcom.com>,
Kalle Valo <kvalo@kernel.org>,
"David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>
Cc: Alexander Prutskov <alep@cypress.com>,
Chi-Hsien Lin <chi-hsien.lin@cypress.com>,
Wright Feng <wright.feng@cypress.com>,
Ian Lin <ian.lin@infineon.com>,
Soontak Lee <soontak.lee@cypress.com>,
Joseph chuang <jiac@cypress.com>, Sven Peter <sven@svenpeter.dev>,
Alyssa Rosenzweig <alyssa@rosenzweig.io>,
asahi@lists.linux.dev, linux-wireless@vger.kernel.org,
brcm80211-dev-list.pdl@broadcom.com,
SHA-cyfmac-dev-list@infineon.com, netdev@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH v1 1/4] wifi: brcmfmac: Rename Cypress 89459 to BCM4355
Date: Wed, 4 Jan 2023 20:26:39 +0100 [thread overview]
Message-ID: <7bcc0e05-d1ec-38c1-2108-1bf9741d954c@broadcom.com> (raw)
In-Reply-To: <d242c9e4-e551-aa7a-0f20-f3f1351648a3@marcan.st>
[-- Attachment #1: Type: text/plain, Size: 5012 bytes --]
On January 4, 2023 5:35:08 PM Hector Martin <marcan@marcan.st> wrote:
> On 04/01/2023 22.29, Arend van Spriel wrote:
>> On 1/4/2023 11:01 AM, 'Hector Martin' via BRCM80211-DEV-LIST,PDL wrote:
>>> The commit that introduced support for this chip incorrectly claimed it
>>> is a Cypress-specific part, while in actuality it is just a variant of
>>> BCM4355 silicon (as evidenced by the chip ID).
>>>
>>> The relationship between Cypress products and Broadcom products isn't
>>> entirely clear, but given what little information is available and prior
>>> art in the driver, it seems the convention should be that originally
>>> Broadcom parts should retain the Broadcom name.
>>>
>>> Thus, rename the relevant constants and firmware file. Also rename the
>>> specific 89459 PCIe ID to BCM43596, which seems to be the original
>>> subvariant name for this PCI ID (as defined in the out-of-tree bcmdhd
>>> driver). Also declare the firmware as CLM-capable, since it is.
>>>
>>> Fixes: dce45ded7619 ("brcmfmac: Support 89459 pcie")
>>> Signed-off-by: Hector Martin <marcan@marcan.st>
>>> ---
>>> drivers/net/wireless/broadcom/brcm80211/brcmfmac/chip.c | 5 ++---
>>> drivers/net/wireless/broadcom/brcm80211/brcmfmac/pcie.c | 8 ++++----
>>> .../net/wireless/broadcom/brcm80211/include/brcm_hw_ids.h | 6 +++---
>>> 3 files changed, 9 insertions(+), 10 deletions(-)
>>>
>>> diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/chip.c
>>> b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/chip.c
>>> index 121893bbaa1d..3e42c2bd0d9a 100644
>>> --- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/chip.c
>>> +++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/chip.c
>>
>> [...]
>>
>>> diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/pcie.c
>>> b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/pcie.c
>>> index ae57a9a3ab05..3264be485e20 100644
>>> --- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/pcie.c
>>> +++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/pcie.c
>>
>> [...]
>>
>>> @@ -2590,6 +2590,7 @@ static const struct pci_device_id
>>> brcmf_pcie_devid_table[] = {
>>> BRCMF_PCIE_DEVICE(BRCM_PCIE_4350_DEVICE_ID, WCC),
>>> BRCMF_PCIE_DEVICE_SUB(0x4355, BRCM_PCIE_VENDOR_ID_BROADCOM, 0x4355, WCC),
>>> BRCMF_PCIE_DEVICE(BRCM_PCIE_4354_RAW_DEVICE_ID, WCC),
>>> + BRCMF_PCIE_DEVICE(BRCM_PCIE_4355_RAW_DEVICE_ID, WCC),
>>
>> A bit of a problem here. If Cypress want to support this device,
>> regardless how they branded it, they will provide its firmware. Given
>> that they initially added it (as 89459) I suppose we should mark it with
>> CYW and not WCC. Actually, see my comment below on RAW dev ids.
>
> Right, I thought we might wind up with this issue. So then the question
> becomes: can we give responsibility over PCI ID 0x4415 to Cypress and
> mark just that one as CYW (if so it probably makes sense to keep that
> labeled CYW89459 instead of BCM43596), and if not, is there some other
> way to tell apart Cypress and Broadcom products we can use? I believe
> the Apple side firmware is developed by Broadcom, not Cypress.
>
> Note that even if we split by PCI device ID here, we still have a
> problem with firmware selection, since that means we're requesting the
> same firmware filename for both vendors (since that only tests the chip
> ID and revision ID). If Apple is the *only* Broadcom customer using
> these chips then we can get away with this, since I can just make sure
> the fancy Apple firmware selection will never collide with the vanilla
> firmware filename. But if other customers of both companies are both
> shipping the same chip with different and incompatible generic firmware,
> we need some way to tell them apart.
AFAIK Apple chips are exclusive. The vendor marking was added by recent
patch series I worked on. So per device id we assign the vendor. If
needed we can use subvendor or subdevid to separate them appropriately.
>
>
>>
>>> BRCMF_PCIE_DEVICE(BRCM_PCIE_4356_DEVICE_ID, WCC),
>>> BRCMF_PCIE_DEVICE(BRCM_PCIE_43567_DEVICE_ID, WCC),
>>> BRCMF_PCIE_DEVICE(BRCM_PCIE_43570_DEVICE_ID, WCC),
>>
>> [...]
>>
>>> diff --git a/drivers/net/wireless/broadcom/brcm80211/include/brcm_hw_ids.h
>>> b/drivers/net/wireless/broadcom/brcm80211/include/brcm_hw_ids.h
>>> index f4939cf62767..cacc43db86eb 100644
>>> --- a/drivers/net/wireless/broadcom/brcm80211/include/brcm_hw_ids.h
>>> +++ b/drivers/net/wireless/broadcom/brcm80211/include/brcm_hw_ids.h
>>
>> [...]
>>
>>> @@ -72,6 +72,7 @@
>>> #define BRCM_PCIE_4350_DEVICE_ID 0x43a3
>>> #define BRCM_PCIE_4354_DEVICE_ID 0x43df
>>> #define BRCM_PCIE_4354_RAW_DEVICE_ID 0x4354
>>> +#define BRCM_PCIE_4355_RAW_DEVICE_ID 0x4355
>>
>> I would remove all RAW device ids. These should not be observed outside
>> chip vendor walls.
>
> Ack, I'll remove this one instead of renaming it (or I can just drop all
> the existing RAW IDs first in one commit at the head of v2 if you prefer
> that).
Let's drop the existing RAW IDs with a separate patch explaining why ;-)
Regards,
Arend
[-- Attachment #2: S/MIME Cryptographic Signature --]
[-- Type: application/pkcs7-signature, Size: 4219 bytes --]
next prev parent reply other threads:[~2023-01-04 19:26 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-01-04 10:01 [PATCH v1 0/4] BCM4355/4364/4377 support & identification fixes Hector Martin
2023-01-04 10:01 ` [PATCH v1 1/4] wifi: brcmfmac: Rename Cypress 89459 to BCM4355 Hector Martin
2023-01-04 13:29 ` Arend van Spriel
2023-01-04 16:35 ` Hector Martin
2023-01-04 19:26 ` Arend van Spriel [this message]
2023-01-04 13:36 ` Arend van Spriel
2023-01-04 10:01 ` [PATCH v1 2/4] brcmfmac: pcie: Add IDs/properties for BCM4355 Hector Martin
2023-01-04 13:35 ` Arend van Spriel
2023-01-04 16:27 ` Hector Martin
2023-01-04 10:01 ` [PATCH v1 3/4] brcmfmac: pcie: Add IDs/properties for BCM4377 Hector Martin
2023-01-04 13:38 ` Arend van Spriel
2023-01-04 10:01 ` [PATCH v1 4/4] brcmfmac: pcie: Perform correct BCM4364 firmware selection Hector Martin
2023-01-04 13:41 ` Arend van Spriel
2023-01-04 15:56 ` Aditya Garg
2023-01-04 19:50 ` 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=7bcc0e05-d1ec-38c1-2108-1bf9741d954c@broadcom.com \
--to=arend.vanspriel@broadcom.com \
--cc=SHA-cyfmac-dev-list@infineon.com \
--cc=alep@cypress.com \
--cc=alyssa@rosenzweig.io \
--cc=asahi@lists.linux.dev \
--cc=aspriel@gmail.com \
--cc=brcm80211-dev-list.pdl@broadcom.com \
--cc=chi-hsien.lin@cypress.com \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=franky.lin@broadcom.com \
--cc=hante.meuleman@broadcom.com \
--cc=ian.lin@infineon.com \
--cc=jiac@cypress.com \
--cc=kuba@kernel.org \
--cc=kvalo@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-wireless@vger.kernel.org \
--cc=marcan@marcan.st \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=soontak.lee@cypress.com \
--cc=sven@svenpeter.dev \
--cc=wright.feng@cypress.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®