Skip to contentSkip to conversation

dma: tegra20-apbdma: err message correction

PATCH Applied Dmitry Osipenko 4 participants 8 messages May 11, 2013 – May 30, 2013 4 messages not in the archive

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/2 dma: tegra20-apbdma: err message correction

Fixed err msg params order on irq request fail.

---
Reposting with dma maintainers cc'd as suggested by Stephen. Added Stephen's ack.

 drivers/dma/tegra20-apb-dma.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/dma/tegra20-apb-dma.c +1 -1
index ce19340..a84bb7f 100644
@@ -1339,7 +1339,7 @@ static int tegra_dma_probe(struct platform_device *pdev)
 		if (ret) {
 			dev_err(&pdev->dev,
 				"request_irq failed with err %d channel %d\n",
-				i, ret);
+				ret, i);
 			goto err_irq;
 		}
 
Signature · 1 line
1.8.2.1

A message that is not in the archive (sent off-list or not yet received): 1368289853-20011-1-git-send-email-digetx-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org

#2 lore raw

PATCH 2/2 dma: tegra: avoid channel lock up after free

Lock scenario: Channel 1 was allocated and prepared as slave_sg, used and freed. Now preparation of cyclic dma on channel 1 will fail with err "DMA configuration conflict" because tdc->isr_handler still setted to handle_once_dma_done.

This happens because tegra_dma_abort_all() won't be called on channel freeing if pending list is empty and channel not busy. We need to clear isr_handler on channel freeing to avoid locking.

---
Reposting with dma maintainers cc'd as suggested by Stephen. Added Stephen's ack.

 drivers/dma/tegra20-apb-dma.c | 1 +
 1 file changed, 1 insertion(+)
drivers/dma/tegra20-apb-dma.c +1 -0
index a84bb7f..c541276 100644
@@ -1191,6 +1191,7 @@ static void tegra_dma_free_chan_resources(struct dma_chan *dc)
 	list_splice_init(&tdc->free_dma_desc, &dma_desc_list);
 	INIT_LIST_HEAD(&tdc->cb_desc);
 	tdc->config_init = false;
+	tdc->isr_handler = NULL;
 	spin_unlock_irqrestore(&tdc->lock, flags);
 
 	while (!list_empty(&dma_desc_list)) {
Signature · 1 line
1.8.2.1

A message that is not in the archive (sent off-list or not yet received): 1368289853-20011-2-git-send-email-digetx-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org

#4 lore raw

Re: [PATCH 2/2] dma: tegra: avoid channel lock up after free

Quoted 7 lines · Dmitry Osipenko

Lock scenario: Channel 1 was allocated and prepared as slave_sg, used and freed. Now preparation of cyclic dma on channel 1 will fail with err "DMA configuration conflict" because tdc->isr_handler still setted to handle_once_dma_done.

This happens because tegra_dma_abort_all() won't be called on channel freeing if pending list is empty and channel not busy. We need to clear isr_handler on channel freeing to avoid locking.

...

Quoted 2 lines

Reposting with dma maintainers cc'd as suggested by Stephen. Added Stephen's ack.

Just for reference (not need to repost again): You'd usually send the messages *to* the DMA maintainers since they will be taking the patches through their tree, and then Ccing anyone else.

A message that is not in the archive (sent off-list or not yet received): [email protected]

#6 lore raw

Re: [PATCH 2/2] dma: tegra: avoid channel lock up after free

13.05.2013 20:20, Stephen Warren пишет:

Quoted 8 lines

Just for reference (not need to repost again): You'd usually send the messages *to* the DMA maintainers since they will be taking the patches through their tree, and then Ccing anyone else.
--
To unsubscribe from this list: send the line "unsubscribe linux-tegra" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html

Ok, thx for the note.

Applied
#7 lore raw

Re: [PATCH 2/2] dma: tegra: avoid channel lock up after free

In reply to a message not in the archive
Quoted 11 lines · Stephen Warren
Quoted 7 lines · Dmitry Osipenko

Lock scenario: Channel 1 was allocated and prepared as slave_sg, used and freed. Now preparation of cyclic dma on channel 1 will fail with err "DMA configuration conflict" because tdc->isr_handler still setted to handle_once_dma_done.

This happens because tegra_dma_abort_all() won't be called on channel freeing if pending list is empty and channel not busy. We need to clear isr_handler on channel freeing to avoid locking.

...

Quoted 2 lines

Reposting with dma maintainers cc'd as suggested by Stephen. Added Stephen's ack.

Applied, both thanks

Quoted 4 lines

Just for reference (not need to repost again): You'd usually send the messages *to* the DMA maintainers since they will be taking the patches through their tree, and then Ccing anyone else.

get_maintainer.pl is your friend for this

--
~Vinod

A message that is not in the archive (sent off-list or not yet received): [email protected]