* [PATCH] DMA ENGINE: Do not reset 'private' of channel
@ 2010-05-04 9:22 Jassi Brar
2010-05-08 0:09 ` Dan Williams
0 siblings, 1 reply; 2+ messages in thread
From: Jassi Brar @ 2010-05-04 9:22 UTC (permalink / raw)
To: linux-kernel; +Cc: dan.j.williams, maciej.sosnowski, Jassi Brar
The member 'private' of 'struct dma_chan' is meant for passing
data between client and the controller driver.
The DMA client driver may point it to platform specific stuff after
acquiring the channel. So, it is the responsiblity of the same code
to reset it, if it must.
The DMA engine doesn't set it and hence, shouldn't reset it either.
Signed-off-by: Jassi Brar <jassi.brar@samsung.com>
This reseting of private by DMA Engine comes in the way of implementing
default channel settings during DMAC probe. That capability is useful
for not having the clients to always provide platform specific data,
like Rx/Tx FIFO addresses, which usually doesn't change across channel
requests.
---
drivers/dma/dmaengine.c | 2 --
1 files changed, 0 insertions(+), 2 deletions(-)
diff --git a/drivers/dma/dmaengine.c b/drivers/dma/dmaengine.c
index 6f51a0a..d911e38 100644
--- a/drivers/dma/dmaengine.c
+++ b/drivers/dma/dmaengine.c
@@ -514,7 +514,6 @@ struct dma_chan *__dma_request_channel(dma_cap_mask_t *mask, dma_filter_fn fn, v
break;
if (--device->privatecnt == 0)
dma_cap_clear(DMA_PRIVATE, device->cap_mask);
- chan->private = NULL;
chan = NULL;
}
}
@@ -536,7 +535,6 @@ void dma_release_channel(struct dma_chan *chan)
/* drop PRIVATE cap enabled by __dma_request_channel() */
if (--chan->device->privatecnt == 0)
dma_cap_clear(DMA_PRIVATE, chan->device->cap_mask);
- chan->private = NULL;
mutex_unlock(&dma_list_mutex);
}
EXPORT_SYMBOL_GPL(dma_release_channel);
--
1.6.2.5
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] DMA ENGINE: Do not reset 'private' of channel
2010-05-04 9:22 [PATCH] DMA ENGINE: Do not reset 'private' of channel Jassi Brar
@ 2010-05-08 0:09 ` Dan Williams
0 siblings, 0 replies; 2+ messages in thread
From: Dan Williams @ 2010-05-08 0:09 UTC (permalink / raw)
To: Jassi Brar; +Cc: linux-kernel, maciej.sosnowski
On Tue, May 4, 2010 at 2:22 AM, Jassi Brar <jassi.brar@samsung.com> wrote:
> The member 'private' of 'struct dma_chan' is meant for passing
> data between client and the controller driver.
>
> The DMA client driver may point it to platform specific stuff after
> acquiring the channel. So, it is the responsiblity of the same code
> to reset it, if it must.
>
> The DMA engine doesn't set it and hence, shouldn't reset it either.
>
> Signed-off-by: Jassi Brar <jassi.brar@samsung.com>
>
> This reseting of private by DMA Engine comes in the way of implementing
> default channel settings during DMAC probe. That capability is useful
> for not having the clients to always provide platform specific data,
> like Rx/Tx FIFO addresses, which usually doesn't change across channel
> requests.
>
Ok I like this explanation better than the changelog you have above
because it clarifies that the driver is setting a default that the
client can override at registration time, but when this is happening
dmaengine should get out of the way.
Applied.
Thanks,
Dan
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2010-05-08 0:09 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-05-04 9:22 [PATCH] DMA ENGINE: Do not reset 'private' of channel Jassi Brar
2010-05-08 0:09 ` Dan Williams
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®