diff options
author | Dan Williams <dan.j.williams@intel.com> | 2008-07-17 20:59:56 -0400 |
---|---|---|
committer | Dan Williams <dan.j.williams@intel.com> | 2008-07-17 20:59:56 -0400 |
commit | 5eb907aaaf7a316a0097ff9f8c21bf9fc468a1f1 (patch) | |
tree | 33238b492dc0f823e59586ca2a2ec981c3ba9f74 /drivers/dma/iop-adma.c | |
parent | c7141d005a19d2a0a316b3bf9c170d3bedf07bfd (diff) |
iop_adma: document how to calculate the minimum descriptor pool size
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Diffstat (limited to 'drivers/dma/iop-adma.c')
-rw-r--r-- | drivers/dma/iop-adma.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/drivers/dma/iop-adma.c b/drivers/dma/iop-adma.c index 8acbc3ab0b92..85bfeba4d85e 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) | |||
450 | static void iop_chan_start_null_memcpy(struct iop_adma_chan *iop_chan); | 450 | static void iop_chan_start_null_memcpy(struct iop_adma_chan *iop_chan); |
451 | static void iop_chan_start_null_xor(struct iop_adma_chan *iop_chan); | 451 | static void iop_chan_start_null_xor(struct iop_adma_chan *iop_chan); |
452 | 452 | ||
453 | /* returns the number of allocated descriptors */ | 453 | /** |
454 | * iop_adma_alloc_chan_resources - returns the number of allocated descriptors | ||
455 | * @chan - allocate descriptor resources for this channel | ||
456 | * @client - current client requesting the channel be ready for requests | ||
457 | * | ||
458 | * Note: We keep the slots for 1 operation on iop_chan->chain at all times. To | ||
459 | * avoid deadlock, via async_xor, num_descs_in_pool must at a minimum be | ||
460 | * greater than 2x the number slots needed to satisfy a device->max_xor | ||
461 | * request. | ||
462 | * */ | ||
454 | static int iop_adma_alloc_chan_resources(struct dma_chan *chan, | 463 | static int iop_adma_alloc_chan_resources(struct dma_chan *chan, |
455 | struct dma_client *client) | 464 | struct dma_client *client) |
456 | { | 465 | { |