hw/dma: Enhance error handling in loading description
authorFea.Wang <fea.wang@sifive.com>
Thu, 13 Jun 2024 01:34:59 +0000 (09:34 +0800)
committerEdgar E. Iglesias <edgar.iglesias@amd.com>
Mon, 17 Jun 2024 19:01:46 +0000 (21:01 +0200)
commite6b45b6bb9ce721119857507a66768b06e8836a2
treea1d1de35bcb5e6b2875ddd5ca68c4f0ba6198e61
parent900536d3e97aed7fdd9cb4dadd3bf7023360e819
hw/dma: Enhance error handling in loading description

Loading a description from memory may cause a bus-error. In this
case, the DMA should stop working, set the error flag, and return
the failure value.

When calling the loading a description function, it should be noticed
that the function may return a failure value. Breaking the loop in this
case is one of the possible ways to handle it.

Signed-off-by: Fea.Wang <fea.wang@sifive.com>
Reviewed-by: Frank Chang <frank.chang@sifive.com>
Reviewed-by: Edgar E. Iglesias <edgar.iglesias@amd.com>
Signed-off-by: Edgar E. Iglesias <edgar.iglesias@amd.com>
hw/dma/xilinx_axidma.c