2024-02-28 08:13:29

by Krzysztof Kozlowski

[permalink] [raw]
Subject: Re: [PATCH net-next v2 2/6] dt-bindings: net: brcm,asp-v2.0: Add asp-v2.2

On 27/02/2024 19:54, Justin Chen wrote:
> Add support for ASP 2.2.
>
> Signed-off-by: Justin Chen <[email protected]>
> Acked-by: Florian Fainelli <[email protected]>
> ---
> v2

Acked-by: Krzysztof Kozlowski <[email protected]>

Best regards,
Krzysztof


2024-02-28 09:46:51

by Simon Horman

[permalink] [raw]
Subject: Re: [PATCH net-next v2 5/6] net: bcmasp: Keep buffers through power management

On Tue, Feb 27, 2024 at 10:54:53AM -0800, Justin Chen wrote:
> There is no advantage of freeing and re-allocating buffers through
> suspend and resume. This waste cycles and makes suspend/resume time
> longer. We also open ourselves to failed allocations in systems with
> heavy memory fragmentation.
>
> Signed-off-by: Justin Chen <[email protected]>
> Acked-by: Florian Fainelli <[email protected]>

..

> @@ -1118,6 +1083,10 @@ static int bcmasp_open(struct net_device *dev)
>
> netif_dbg(intf, ifup, dev, "bcmasp open\n");
>
> + ret = bcmasp_alloc_buffers(intf);
> + if (ret)
> + return ret;
> +

Hi Justin,

Do the resources allocated by bcmasp_alloc_buffers() need
to be released if an error occurs in bcmasp_open() below this line?

> ret = clk_prepare_enable(intf->parent->clk);
> if (ret)
> return ret;
> --
> 2.34.1
>



2024-02-28 17:54:31

by Justin Chen

[permalink] [raw]
Subject: Re: [PATCH net-next v2 5/6] net: bcmasp: Keep buffers through power management



On 2/28/24 1:45 AM, Simon Horman wrote:
> On Tue, Feb 27, 2024 at 10:54:53AM -0800, Justin Chen wrote:
>> There is no advantage of freeing and re-allocating buffers through
>> suspend and resume. This waste cycles and makes suspend/resume time
>> longer. We also open ourselves to failed allocations in systems with
>> heavy memory fragmentation.
>>
>> Signed-off-by: Justin Chen <[email protected]>
>> Acked-by: Florian Fainelli <[email protected]>
>
> ...
>
>> @@ -1118,6 +1083,10 @@ static int bcmasp_open(struct net_device *dev)
>>
>> netif_dbg(intf, ifup, dev, "bcmasp open\n");
>>
>> + ret = bcmasp_alloc_buffers(intf);
>> + if (ret)
>> + return ret;
>> +
>
> Hi Justin,
>
> Do the resources allocated by bcmasp_alloc_buffers() need
> to be released if an error occurs in bcmasp_open() below this line?
>

Yes good catch. Will send v3.

Thanks,
Justin

>> ret = clk_prepare_enable(intf->parent->clk);
>> if (ret)
>> return ret;
>> --
>> 2.34.1
>>
>
>


Attachments:
smime.p7s (4.11 kB)
S/MIME Cryptographic Signature