From: Sinan Kaya <okaya@kernel.org>
To: Dan Carpenter <dan.carpenter@oracle.com>,
Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Cc: agross@kernel.org, bjorn.andersson@linaro.org, vkoul@kernel.org,
dan.j.williams@intel.com, linux-arm-kernel@lists.infradead.org,
linux-arm-msm@vger.kernel.org, dmaengine@vger.kernel.org,
linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org
Subject: Re: [PATCH] dmaengine: qcom_hidma: Simplify error handling path in hidma_probe
Date: Tue, 28 Apr 2020 12:01:15 -0400 [thread overview]
Message-ID: <1efa0186-7fbe-9cb5-2719-2d7192f99e27@kernel.org> (raw)
In-Reply-To: <20200428125426.GE2014@kadam>
On 4/28/2020 8:54 AM, Dan Carpenter wrote:
>> @@ -897,7 +897,6 @@ static int hidma_probe(struct platform_device *pdev)
>> if (msi)
> ^^^
> This test doesn't work. It will call free hidma_free_msis() if the
> hidma_request_msi() call fails. We should do:
>
> if (msi) {
> rc = hidma_request_msi(dmadev, pdev);
> msi = false;
> }
>
> if (!msi) {
> hidma_ll_setup_irq(dmadev->lldev, false);
> rc = devm_request_irq(&pdev->dev, chirq, hidma_chirq_handler,
> 0, "qcom-hidma", dmadev->lldev);
> if (rc)
> goto uninit;
> }
>
>
Let me clarify how this works. MSI capability is not present on all
platforms. Therefore, this is detected by an ACPI/DTS parameter called
HIDMA_MSI_CAP.
msi = hidma_test_capability(&pdev->dev, HIDMA_MSI_CAP);
Therefore,
1. Code will request MSI capability if it is present.
2. Code will fallback to plain IRQ, if MSI allocation also fails.
I hope this helps.
We need both #1 and #2 to be supported.
next prev parent reply other threads:[~2020-04-28 16:01 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-04-27 11:10 [PATCH] dmaengine: qcom_hidma: Simplify error handling path in hidma_probe Christophe JAILLET
2020-04-27 16:08 ` Vinod Koul
2020-04-28 12:54 ` Dan Carpenter
2020-04-28 16:01 ` Sinan Kaya [this message]
2020-04-28 17:21 ` Dan Carpenter
2020-04-28 20:29 ` Sinan Kaya
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=1efa0186-7fbe-9cb5-2719-2d7192f99e27@kernel.org \
--to=okaya@kernel.org \
--cc=agross@kernel.org \
--cc=bjorn.andersson@linaro.org \
--cc=christophe.jaillet@wanadoo.fr \
--cc=dan.carpenter@oracle.com \
--cc=dan.j.williams@intel.com \
--cc=dmaengine@vger.kernel.org \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=vkoul@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