From: Dan Williams Date: Fri, 18 Jul 2008 00:59:56 +0000 (-0700) Subject: iop_adma: document how to calculate the minimum descriptor pool size X-Git-Tag: v2.6.27-rc1~852^2~4 X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=5eb907aaaf7a316a0097ff9f8c21bf9fc468a1f1;p=linux-2.6-omap-h63xx.git iop_adma: document how to calculate the minimum descriptor pool size Signed-off-by: Dan Williams --- diff --git a/drivers/dma/iop-adma.c b/drivers/dma/iop-adma.c index 8acbc3ab0b9..85bfeba4d85 100644 --- a/drivers/dma/iop-adma.c +++ b/drivers/dma/iop-adma.c @@ -450,7 +450,16 @@ iop_adma_tx_submit(struct dma_async_tx_descriptor *tx) static void iop_chan_start_null_memcpy(struct iop_adma_chan *iop_chan); static void iop_chan_start_null_xor(struct iop_adma_chan *iop_chan); -/* returns the number of allocated descriptors */ +/** + * iop_adma_alloc_chan_resources - returns the number of allocated descriptors + * @chan - allocate descriptor resources for this channel + * @client - current client requesting the channel be ready for requests + * + * Note: We keep the slots for 1 operation on iop_chan->chain at all times. To + * avoid deadlock, via async_xor, num_descs_in_pool must at a minimum be + * greater than 2x the number slots needed to satisfy a device->max_xor + * request. + * */ static int iop_adma_alloc_chan_resources(struct dma_chan *chan, struct dma_client *client) {