diff options
author | Dan Williams <dan.j.williams@intel.com> | 2009-08-29 22:09:26 -0400 |
---|---|---|
committer | Dan Williams <dan.j.williams@intel.com> | 2009-08-29 22:09:26 -0400 |
commit | ad283ea4a3ce82cda2efe33163748a397b31b1eb (patch) | |
tree | 11cd739195f336895abe9e4a62d824e49a41c24f /arch | |
parent | d6f38f31f3ad4b0dd33fe970988f14e7c65ef702 (diff) |
async_tx: add sum check flags
Replace the flat zero_sum_result with a collection of flags to contain
the P (xor) zero-sum result, and the soon to be utilized Q (raid6 reed
solomon syndrome) zero-sum result. Use the SUM_CHECK_ namespace instead
of DMA_ since these flags will be used on non-dma-zero-sum enabled
platforms.
Reviewed-by: Andre Noll <maan@systemlinux.org>
Acked-by: Maciej Sosnowski <maciej.sosnowski@intel.com>
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/arm/include/asm/hardware/iop3xx-adma.h | 5 | ||||
-rw-r--r-- | arch/arm/mach-iop13xx/include/mach/adma.h | 12 |
2 files changed, 10 insertions, 7 deletions
diff --git a/arch/arm/include/asm/hardware/iop3xx-adma.h b/arch/arm/include/asm/hardware/iop3xx-adma.h index 83e6ba338e2c..26eefea02314 100644 --- a/arch/arm/include/asm/hardware/iop3xx-adma.h +++ b/arch/arm/include/asm/hardware/iop3xx-adma.h | |||
@@ -756,13 +756,14 @@ static inline void iop_desc_set_block_fill_val(struct iop_adma_desc_slot *desc, | |||
756 | hw_desc->src[0] = val; | 756 | hw_desc->src[0] = val; |
757 | } | 757 | } |
758 | 758 | ||
759 | static inline int iop_desc_get_zero_result(struct iop_adma_desc_slot *desc) | 759 | static inline enum sum_check_flags |
760 | iop_desc_get_zero_result(struct iop_adma_desc_slot *desc) | ||
760 | { | 761 | { |
761 | struct iop3xx_desc_aau *hw_desc = desc->hw_desc; | 762 | struct iop3xx_desc_aau *hw_desc = desc->hw_desc; |
762 | struct iop3xx_aau_desc_ctrl desc_ctrl = hw_desc->desc_ctrl_field; | 763 | struct iop3xx_aau_desc_ctrl desc_ctrl = hw_desc->desc_ctrl_field; |
763 | 764 | ||
764 | iop_paranoia(!(desc_ctrl.tx_complete && desc_ctrl.zero_result_en)); | 765 | iop_paranoia(!(desc_ctrl.tx_complete && desc_ctrl.zero_result_en)); |
765 | return desc_ctrl.zero_result_err; | 766 | return desc_ctrl.zero_result_err << SUM_CHECK_P; |
766 | } | 767 | } |
767 | 768 | ||
768 | static inline void iop_chan_append(struct iop_adma_chan *chan) | 769 | static inline void iop_chan_append(struct iop_adma_chan *chan) |
diff --git a/arch/arm/mach-iop13xx/include/mach/adma.h b/arch/arm/mach-iop13xx/include/mach/adma.h index 5722e86f2174..1cd31df8924d 100644 --- a/arch/arm/mach-iop13xx/include/mach/adma.h +++ b/arch/arm/mach-iop13xx/include/mach/adma.h | |||
@@ -428,18 +428,20 @@ static inline void iop_desc_set_block_fill_val(struct iop_adma_desc_slot *desc, | |||
428 | hw_desc->block_fill_data = val; | 428 | hw_desc->block_fill_data = val; |
429 | } | 429 | } |
430 | 430 | ||
431 | static inline int iop_desc_get_zero_result(struct iop_adma_desc_slot *desc) | 431 | static inline enum sum_check_flags |
432 | iop_desc_get_zero_result(struct iop_adma_desc_slot *desc) | ||
432 | { | 433 | { |
433 | struct iop13xx_adma_desc_hw *hw_desc = desc->hw_desc; | 434 | struct iop13xx_adma_desc_hw *hw_desc = desc->hw_desc; |
434 | struct iop13xx_adma_desc_ctrl desc_ctrl = hw_desc->desc_ctrl_field; | 435 | struct iop13xx_adma_desc_ctrl desc_ctrl = hw_desc->desc_ctrl_field; |
435 | struct iop13xx_adma_byte_count byte_count = hw_desc->byte_count_field; | 436 | struct iop13xx_adma_byte_count byte_count = hw_desc->byte_count_field; |
437 | enum sum_check_flags flags; | ||
436 | 438 | ||
437 | BUG_ON(!(byte_count.tx_complete && desc_ctrl.zero_result)); | 439 | BUG_ON(!(byte_count.tx_complete && desc_ctrl.zero_result)); |
438 | 440 | ||
439 | if (desc_ctrl.pq_xfer_en) | 441 | flags = byte_count.zero_result_err_q << SUM_CHECK_Q; |
440 | return byte_count.zero_result_err_q; | 442 | flags |= byte_count.zero_result_err << SUM_CHECK_P; |
441 | else | 443 | |
442 | return byte_count.zero_result_err; | 444 | return flags; |
443 | } | 445 | } |
444 | 446 | ||
445 | static inline void iop_chan_append(struct iop_adma_chan *chan) | 447 | static inline void iop_chan_append(struct iop_adma_chan *chan) |