diff options
author | Alex Smith <alex.smith@imgtec.com> | 2015-07-24 17:24:21 +0100 |
---|---|---|
committer | Vinod Koul <vinod.koul@intel.com> | 2015-08-18 22:28:49 +0530 |
commit | dc578f314e2471ca93a4c1f80988ecc781836f72 (patch) | |
tree | 0862d31388141b3f6228685e1c5cdaeb3a5880d7 /crypto/lzo.c | |
parent | 46fa516869f4b57f9eb63db02c76642abfb9f682 (diff) |
dmaengine: jz4780: Fall back on smaller transfer sizes where necessary
For some reason the controller does not support 8 byte transfers (but
does support all other powers of 2 up to 128). In this case fall back
to 4 bytes. In addition, fall back to 128 bytes when any larger power
of 2 would be possible within the alignment constraints, as this is
the maximum supported.
It makes no sense to outright reject 8 or >128 bytes just because the
alignment constraints make those the maximum possible size given the
parameters for the transaction. For instance, this can result in a DMA
from/to an 8 byte aligned address failing.
It is perfectly safe to fall back to smaller transfer sizes, the only
consequence is reduced transfer efficiency, which is far better than
not allowing the transfer at all.
Signed-off-by: Alex Smith <alex.smith@imgtec.com>
Cc: Vinod Koul <vinod.koul@intel.com>
Cc: Zubair Lutfullah Kakakhel <Zubair.Kakakhel@imgtec.com>
Cc: dmaengine@vger.kernel.org
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Diffstat (limited to 'crypto/lzo.c')
0 files changed, 0 insertions, 0 deletions