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

2012-10-31 Thread Laxman Dewangan
On Tuesday 30 October 2012 04:50 AM, Dmitry Osipenko wrote: Fixed 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 sti

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

2012-10-30 Thread Stephen Warren
On 10/29/2012 05:20 PM, Dmitry Osipenko wrote: > Fixed 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 st

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

2012-10-29 Thread Dmitry Osipenko
Also code looks not thread-safe, is it ok? For example we can protect prepare functions with a spinlock and add tegra_dma_terminate_all_locked for calling on channel freeing under spinlock to avoid reschedule. What do you think? -- To unsubscribe from this list: send the line "unsubscribe linux-ke

[PATCH V2] dma: tegra: avoid channel lock up after free

2012-10-29 Thread Dmitry Osipenko
Fixed 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 selected to handle_once_dma_done. This happens because teg