From: <hannah@marvell.com>
To: <dan.j.williams@intel.com>, <vkoul@kernel.org>,
<dmaengine@vger.kernel.org>
Cc: <thomas.petazzoni@bootlin.com>, <linux-kernel@vger.kernel.org>,
<nadavh@marvell.com>, <omrii@marvell.com>, <oferh@marvell.com>,
<gregory.clement@bootlin.com>, Hanna Hawa <hannah@marvell.com>
Subject: [PATCH 1/5] dmaengine: mv_xor_v2: explicitly freeup irq
Date: Tue, 17 Jul 2018 13:29:59 +0300 [thread overview]
Message-ID: <1531823403-3683-2-git-send-email-hannah@marvell.com> (raw)
In-Reply-To: <1531823403-3683-1-git-send-email-hannah@marvell.com>
From: Hanna Hawa <hannah@marvell.com>
dmaengine device should explicitly call devm_free_irq() when using
devm_request_irq().
The irq is still ON when devices remove is executed and irq should be
quiesced before remove is completed.
Signed-off-by: Hanna Hawa <hannah@marvell.com>
---
drivers/dma/mv_xor_v2.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/drivers/dma/mv_xor_v2.c b/drivers/dma/mv_xor_v2.c
index c6589cc..e16083a 100644
--- a/drivers/dma/mv_xor_v2.c
+++ b/drivers/dma/mv_xor_v2.c
@@ -174,6 +174,7 @@ struct mv_xor_v2_device {
int desc_size;
unsigned int npendings;
unsigned int hw_queue_idx;
+ struct msi_desc *msi_desc;
};
/**
@@ -780,6 +781,7 @@ static int mv_xor_v2_probe(struct platform_device *pdev)
msi_desc = first_msi_entry(&pdev->dev);
if (!msi_desc)
goto free_msi_irqs;
+ xor_dev->msi_desc = msi_desc;
ret = devm_request_irq(&pdev->dev, msi_desc->irq,
mv_xor_v2_interrupt_handler, 0,
@@ -897,6 +899,8 @@ static int mv_xor_v2_remove(struct platform_device *pdev)
xor_dev->desc_size * MV_XOR_V2_DESC_NUM,
xor_dev->hw_desq_virt, xor_dev->hw_desq);
+ devm_free_irq(&pdev->dev, xor_dev->msi_desc->irq, xor_dev);
+
platform_msi_domain_free_irqs(&pdev->dev);
clk_disable_unprepare(xor_dev->clk);
--
1.9.1
next prev parent reply other threads:[~2018-07-17 10:33 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-07-17 10:29 [PATCH 0/5] dmaengine: mv_xor_v2: fixes and alignment for XOR-v2 driver hannah
2018-07-17 10:29 ` hannah [this message]
2018-07-17 10:30 ` [PATCH 2/5] dmaengine: mv_xor_v2: kill the tasklets upon exit hannah
2018-07-17 10:30 ` [PATCH 3/5] dmaengine: mv_xor_v2: convert callback to helper function hannah
2018-07-20 9:29 ` Vinod
2018-07-17 10:30 ` [PATCH 4/5] dmaengine: mv_xor_v2: move unmap to before callback hannah
2018-07-17 10:30 ` [PATCH 5/5] dmaengine: mv_xor_v2: enable COMPILE_TEST hannah
2018-07-20 9:32 ` [PATCH 0/5] dmaengine: mv_xor_v2: fixes and alignment for XOR-v2 driver Vinod
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=1531823403-3683-2-git-send-email-hannah@marvell.com \
--to=hannah@marvell.com \
--cc=dan.j.williams@intel.com \
--cc=dmaengine@vger.kernel.org \
--cc=gregory.clement@bootlin.com \
--cc=linux-kernel@vger.kernel.org \
--cc=nadavh@marvell.com \
--cc=oferh@marvell.com \
--cc=omrii@marvell.com \
--cc=thomas.petazzoni@bootlin.com \
--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;
as well as URLs for NNTP newsgroup(s).