Search Linux Wireless

Re: [PATCH 1/2] dt-bindings: wireless: restore constraint for brcm,bcm4329-fmac compatible property

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 20/08/2024 14:50, Arend van Spriel wrote:
> On 8/20/2024 1:39 PM, Krzysztof Kozlowski wrote:
>> On 20/08/2024 13:27, Krzysztof Kozlowski wrote:
>>> On Tue, Aug 20, 2024 at 12:12:15PM +0200, Arend van Spriel wrote:
>>>> When extending the bindings for Apple PCIe devices the compatible property
>>>> specification was changed. However, it was changed such that for these
>>>> devices it was no longer necessary to have "brcm,bcm4329-fmac" listed as
>>>> string in the compatible list property as it was before that extension.
>>>
>>> Apart that this was never tested... That statement is not true. Look at
>>> "fixed" commit - it is not doing like that at all.
>>>
>>> I don't understand the reasoning.
>>>
>>>> This patch restores that constraint.
>>>>
>>>> Fixes: e2e37224e8b3 ("dt-bindings: net: bcm4329-fmac: Add Apple properties & chips")
>>>> Signed-off-by: Arend van Spriel <arend.vanspriel@xxxxxxxxxxxx>
>>>> ---
>>>>   .../net/wireless/brcm,bcm4329-fmac.yaml       | 19 ++++++++++---------
>>>>   1 file changed, 10 insertions(+), 9 deletions(-)
>>>>
>>>> diff --git a/Documentation/devicetree/bindings/net/wireless/brcm,bcm4329-fmac.yaml b/Documentation/devicetree/bindings/net/wireless/brcm,bcm4329-fmac.yaml
>>>> index e564f20d8f41..47f90446322f 100644
>>>> --- a/Documentation/devicetree/bindings/net/wireless/brcm,bcm4329-fmac.yaml
>>>> +++ b/Documentation/devicetree/bindings/net/wireless/brcm,bcm4329-fmac.yaml
>>>> @@ -7,7 +7,7 @@ $schema: http://devicetree.org/meta-schemas/core.yaml#
>>>>   title: Broadcom BCM4329 family fullmac wireless SDIO/PCIE devices
>>>>   
>>>>   maintainers:
>>>> -  - Arend van Spriel <arend@xxxxxxxxxxxx>
>>>> +  - Arend van Spriel <arend.vanspriel@xxxxxxxxxxxx>
>>>>   
>>>>   description:
>>>>     The Broadcom Single chip MAC part for the BCM4329 family and
>>>> @@ -27,7 +27,6 @@ properties:
>>>>                 - brcm,bcm4341b0-fmac
>>>>                 - brcm,bcm4341b4-fmac
>>>>                 - brcm,bcm4341b5-fmac
>>>> -              - brcm,bcm4329-fmac
>>>>                 - brcm,bcm4330-fmac
>>>>                 - brcm,bcm4334-fmac
>>>>                 - brcm,bcm43340-fmac
>>>> @@ -46,13 +45,15 @@ properties:
>>>>                 - cypress,cyw43012-fmac
>>>>                 - infineon,cyw43439-fmac
>>>>             - const: brcm,bcm4329-fmac
>>>> -      - enum:
>>>> -          - brcm,bcm4329-fmac
>>>> -          - pci14e4,43dc  # BCM4355
>>>> -          - pci14e4,4464  # BCM4364
>>>> -          - pci14e4,4488  # BCM4377
>>>> -          - pci14e4,4425  # BCM4378
>>>> -          - pci14e4,4433  # BCM4387
>>>> +    - items:
>>>> +          - enum:
>>>> +              - pci14e4,43dc  # BCM4355
>>>> +              - pci14e4,4464  # BCM4364
>>>> +              - pci14e4,4488  # BCM4377
>>>> +              - pci14e4,4425  # BCM4378
>>>> +              - pci14e4,4433  # BCM4387
>>>> +          - const: brcm,bcm4329-fmac
>>>> +    - const: brcm,bcm4329-fmac
>>>
>>> And this does not make sense... You claim that some constrained was
>>> droppped and you re-add it, but in fact you still add the same code as
>>> it was before.
>>>
>>> NAK.
>>
>> Ah, the last "const" actually makes sense, I missed that.
>>
>> Commit still however lacks rationale why these devices are compatible.
>> Plus existing rationale that e2e37224e8b3 changed something is entirely
>> WRONG. It changed nothing. ZERO. It only added new devices, which was
>> claimed are not compatible with brcm,bcm4329-fmac.
> 
> So is that claim true? What does it mean that these new devices are not 
> compatible. If they are they should be in a separate binding or the 

Whether binding is separate or not, is just way of organizing things.

> applicable properties for these devices should be made conditional.

Could be if they are not applicable.

> 
>> Now if you claim that original commit which said "these devices are not
>> compatible with brcm,bcm4329-fmac", then please provide arguments, not
>> just say "other commit did something". It did nothing...
> 
> Not entirely true. Indeed new devices were added for which no 
> "brcm,bcm4329-fmac" string is required in the compatible property. Also 
> the commit added new properties for these new devices. Now in my opinion 
> a driver should not use these properties without a "compatible" check. 
> Hope we can agree to that. However, the driver patch for supporting the 

Sorry, I don't follow. Why the driver would need to check for compatible?

> binding change does no such thing. So if we leave the binding as it 
> currently is the driver will have to check if compatible has any of the 
> listed PCI IDs before processing the properties. As all properties old

Why driver needs to check it? Are these properties not valid?

> and new are marked as optional I can not come up with an argument that 
> these new devices are *not* compatible with brcm,bcm4329-fmac.

Compatibility is expressed by implementing same programming interfasce
(or its subset) thus being able to bind via fallback and correctly
operate in given SW.

I don't know whether that's the case here, so rephrasing my earlier
comments - the commit msg should focus on this aspect and tell that
devices are fully compatible, thus they should use fallback.

Quick look at drivers told me that not - they are not compatible...

Best regards,
Krzysztof





[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Wireless Personal Area Network]     [Linux Bluetooth]     [Wireless Regulations]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite Hiking]     [MIPS Linux]     [ARM Linux]     [Linux RAID]

  Powered by Linux