···17071707 if (!sdma->script_number)17081708 sdma->script_number = SDMA_SCRIPT_ADDRS_ARRAY_SIZE_V1;1709170917101710+ if (sdma->script_number > sizeof(struct sdma_script_start_addrs)17111711+ / sizeof(s32)) {17121712+ dev_err(sdma->dev,17131713+ "SDMA script number %d not match with firmware.\n",17141714+ sdma->script_number);17151715+ return;17161716+ }17171717+17101718 for (i = 0; i < sdma->script_number; i++)17111719 if (addr_arr[i] > 0)17121720 saddr_arr[i] = addr_arr[i];
+19
drivers/dma/qcom/bam_dma.c
···694694695695 /* remove all transactions, including active transaction */696696 spin_lock_irqsave(&bchan->vc.lock, flag);697697+ /*698698+ * If we have transactions queued, then some might be committed to the699699+ * hardware in the desc fifo. The only way to reset the desc fifo is700700+ * to do a hardware reset (either by pipe or the entire block).701701+ * bam_chan_init_hw() will trigger a pipe reset, and also reinit the702702+ * pipe. If the pipe is left disabled (default state after pipe reset)703703+ * and is accessed by a connected hardware engine, a fatal error in704704+ * the BAM will occur. There is a small window where this could happen705705+ * with bam_chan_init_hw(), but it is assumed that the caller has706706+ * stopped activity on any attached hardware engine. Make sure to do707707+ * this first so that the BAM hardware doesn't cause memory corruption708708+ * by accessing freed resources.709709+ */710710+ if (!list_empty(&bchan->desc_list)) {711711+ async_desc = list_first_entry(&bchan->desc_list,712712+ struct bam_async_desc, desc_node);713713+ bam_chan_init_hw(bchan, async_desc->dir);714714+ }715715+697716 list_for_each_entry_safe(async_desc, tmp,698717 &bchan->desc_list, desc_node) {699718 list_add(&async_desc->vd.node, &bchan->vc.desc_issued);
···5151 /* End of v2 array */5252 s32 zcanfd_2_mcu_addr;5353 s32 zqspi_2_mcu_addr;5454+ s32 mcu_2_ecspi_addr;5455 /* End of v3 array */5656+ s32 mcu_2_zqspi_addr;5757+ /* End of v4 array */5558};56595760/**