linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Alex Elder <elder@ieee.org>
To: AngeloGioacchino Del Regno 
	<angelogioacchino.delregno@somainline.org>,
	elder@kernel.org
Cc: bjorn.andersson@linaro.org, agross@kernel.org,
	davem@davemloft.net, kuba@kernel.org,
	linux-arm-msm@vger.kernel.org, netdev@vger.kernel.org,
	devicetree@vger.kernel.org, linux-kernel@vger.kernel.org,
	konrad.dybcio@somainline.org, marijn.suijten@somainline.org,
	phone-devel@vger.kernel.org
Subject: Re: [PATCH v1 2/7] net: ipa: endpoint: Don't read unexistant register on IPAv3.1
Date: Mon, 1 Mar 2021 20:05:07 -0600	[thread overview]
Message-ID: <73d19c5a-fddb-05d8-4787-de613091cbeb@ieee.org> (raw)
In-Reply-To: <20210211175015.200772-3-angelogioacchino.delregno@somainline.org>

On 2/11/21 11:50 AM, AngeloGioacchino Del Regno wrote:
> On IPAv3.1 there is no such FLAVOR_0 register so it is impossible
> to read tx/rx channel masks and we have to rely on the correctness
> on the provided configuration.

This works, and is simple.

I think I would rather populate the available mask here
with a mask containing the actual version-specific available
endpoints.  On the other hand, looking at the downstream code,
it looks like almost any of these endpoints could be used.

So, while I don't know for sure the all-1's value here is
*correct*, it's more of a validation check anyway, so it's
probably fine

					-Alex

> Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@somainline.org>
> ---
>  drivers/net/ipa/ipa_endpoint.c | 9 +++++++++
>  1 file changed, 9 insertions(+)
> 
> diff --git a/drivers/net/ipa/ipa_endpoint.c b/drivers/net/ipa/ipa_endpoint.c
> index 06d8aa34276e..10c477e1bb90 100644
> --- a/drivers/net/ipa/ipa_endpoint.c
> +++ b/drivers/net/ipa/ipa_endpoint.c
> @@ -1659,6 +1659,15 @@ int ipa_endpoint_config(struct ipa *ipa)
>  	u32 max;
>  	u32 val;
>  
> +	/* Some IPA versions don't provide a FLAVOR register and we cannot
> +	 * check the rx/tx masks hence we have to rely on the correctness
> +	 * of the provided configuration.
> +	 */
> +	if (ipa->version == IPA_VERSION_3_1) {
> +		ipa->available = U32_MAX;
> +		return 0;
> +	}
> +
>  	/* Find out about the endpoints supplied by the hardware, and ensure
>  	 * the highest one doesn't exceed the number we support.
>  	 */
> 


  reply	other threads:[~2021-03-02  7:47 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-02-11 17:50 [PATCH v1 0/7] Add support for IPA v3.1, GSI v1.0, MSM8998 IPA AngeloGioacchino Del Regno
2021-02-11 17:50 ` [PATCH v1 1/7] net: ipa: Add support for IPA v3.1 with GSI v1.0 AngeloGioacchino Del Regno
2021-02-12 18:49   ` Jakub Kicinski
2021-03-02  2:05   ` Alex Elder
2021-05-05 22:42   ` Alex Elder
2021-02-11 17:50 ` [PATCH v1 2/7] net: ipa: endpoint: Don't read unexistant register on IPAv3.1 AngeloGioacchino Del Regno
2021-03-02  2:05   ` Alex Elder [this message]
2021-05-05 22:42   ` Alex Elder
2021-02-11 17:50 ` [PATCH v1 3/7] net: ipa: gsi: Avoid some writes during irq setup for older IPA AngeloGioacchino Del Regno
2021-03-02  2:05   ` Alex Elder
2021-05-05 22:42   ` Alex Elder
2021-02-11 17:50 ` [PATCH v1 4/7] net: ipa: gsi: Use right masks for GSI v1.0 channels hw param AngeloGioacchino Del Regno
2021-03-02  2:05   ` Alex Elder
2021-05-05 22:42   ` Alex Elder
2021-02-11 17:50 ` [PATCH v1 5/7] net: ipa: Add support for IPA on MSM8998 AngeloGioacchino Del Regno
2021-02-12 18:50   ` Jakub Kicinski
2021-03-02  2:05   ` Alex Elder
2021-05-05 22:42   ` Alex Elder
2021-02-11 17:50 ` [PATCH v1 6/7] dt-bindings: net: qcom-ipa: Document qcom,sc7180-ipa compatible AngeloGioacchino Del Regno
2021-03-02  2:05   ` Alex Elder
2021-03-05 19:32   ` Rob Herring
2021-05-05 22:43   ` Alex Elder
2021-02-11 17:50 ` [PATCH v1 7/7] dt-bindings: net: qcom-ipa: Document qcom,msm8998-ipa compatible AngeloGioacchino Del Regno
2021-03-02  2:05   ` Alex Elder
2021-03-05 19:33   ` Rob Herring
2021-05-05 22:43   ` Alex Elder
2021-02-11 20:27 ` [PATCH v1 0/7] Add support for IPA v3.1, GSI v1.0, MSM8998 IPA Alex Elder
2021-02-11 21:51   ` AngeloGioacchino Del Regno
2021-03-02  2:04 ` Alex Elder
2021-05-05 22:42 ` Alex Elder

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=73d19c5a-fddb-05d8-4787-de613091cbeb@ieee.org \
    --to=elder@ieee.org \
    --cc=agross@kernel.org \
    --cc=angelogioacchino.delregno@somainline.org \
    --cc=bjorn.andersson@linaro.org \
    --cc=davem@davemloft.net \
    --cc=devicetree@vger.kernel.org \
    --cc=elder@kernel.org \
    --cc=konrad.dybcio@somainline.org \
    --cc=kuba@kernel.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=marijn.suijten@somainline.org \
    --cc=netdev@vger.kernel.org \
    --cc=phone-devel@vger.kernel.org \
    /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;
as well as URLs for NNTP newsgroup(s).