Re: [PATCH net 5/5] net: ipa: avoid going past end of resource group array

2020-10-28 Thread Alex Elder
On 10/27/20 7:14 PM, Willem de Bruijn wrote: On Tue, Oct 27, 2020 at 12:38 PM Alex Elder wrote: The minimum and maximum limits for resources assigned to a given resource group are programmed in pairs, with the limits for two groups set in a single register. If the number of supported resource

Re: [PATCH net 5/5] net: ipa: avoid going past end of resource group array

2020-10-28 Thread Willem de Bruijn
> >> + /* We program at most 6 source or destination resource group > >> limits */ > >> + BUILD_BUG_ON(IPA_RESOURCE_GROUP_SRC_MAX > 6); > >> + > >> group_count = ipa_resource_group_src_count(ipa->version); > >> - if (!group_count) > >> + if (!group_count || group_co

Re: [PATCH net 5/5] net: ipa: avoid going past end of resource group array

2020-10-28 Thread Alex Elder
On 10/27/20 7:14 PM, Willem de Bruijn wrote: > On Tue, Oct 27, 2020 at 12:38 PM Alex Elder wrote: >> >> The minimum and maximum limits for resources assigned to a given >> resource group are programmed in pairs, with the limits for two >> groups set in a single register. >> >> If the number of sup

Re: [PATCH net 5/5] net: ipa: avoid going past end of resource group array

2020-10-27 Thread Willem de Bruijn
On Tue, Oct 27, 2020 at 12:38 PM Alex Elder wrote: > > The minimum and maximum limits for resources assigned to a given > resource group are programmed in pairs, with the limits for two > groups set in a single register. > > If the number of supported resource groups is odd, only half of the > reg

[PATCH net 5/5] net: ipa: avoid going past end of resource group array

2020-10-27 Thread Alex Elder
The minimum and maximum limits for resources assigned to a given resource group are programmed in pairs, with the limits for two groups set in a single register. If the number of supported resource groups is odd, only half of the register that defines these limits is valid for the last group; that