diff mbox series

[RESEND,2/2] damengine: dw-edma: Add msi wartermark configuration

Message ID SY4P282MB26243F37A69E54C2B469DFB2F9DF2@SY4P282MB2624.AUSP282.PROD.OUTLOOK.COM (mailing list archive)
State Changes Requested
Headers show
Series dmaengine: dw-edma: Fixed transmission issues | expand

Commit Message

zheng.dongxiong July 5, 2024, 10:57 a.m. UTC
HDMA trigger wartermark interrupt, When use the RIE flag.
PCIe RC will trigger AER, If msi wartermark addr is not configuration.
This patch fix it by add msi wartermark configuration

Signed-off-by: zheng.dongxiong <zheng.dongxiong@outlook.com>
---
 drivers/dma/dw-edma/dw-hdma-v0-core.c | 3 +++
 1 file changed, 3 insertions(+)

Comments

Manivannan Sadhasivam July 5, 2024, 2:11 p.m. UTC | #1
On Fri, Jul 05, 2024 at 06:57:35PM +0800, zheng.dongxiong wrote:
> HDMA trigger wartermark interrupt, When use the RIE flag.
> PCIe RC will trigger AER, If msi wartermark addr is not configuration.
> This patch fix it by add msi wartermark configuration
> 
> Signed-off-by: zheng.dongxiong <zheng.dongxiong@outlook.com>

HDMA driver is not at all using watermark interrupts. So we should be disabling
them altogether.

See: https://lore.kernel.org/dmaengine/1720187733-5380-3-git-send-email-quic_msarkar@quicinc.com/

- Mani

> ---
>  drivers/dma/dw-edma/dw-hdma-v0-core.c | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/drivers/dma/dw-edma/dw-hdma-v0-core.c b/drivers/dma/dw-edma/dw-hdma-v0-core.c
> index d77051d1e..c4d15a7a7 100644
> --- a/drivers/dma/dw-edma/dw-hdma-v0-core.c
> +++ b/drivers/dma/dw-edma/dw-hdma-v0-core.c
> @@ -280,6 +280,9 @@ static void dw_hdma_v0_core_ch_config(struct dw_edma_chan *chan)
>  	/* MSI done addr - low, high */
>  	SET_CH_32(dw, chan->dir, chan->id, msi_stop.lsb, chan->msi.address_lo);
>  	SET_CH_32(dw, chan->dir, chan->id, msi_stop.msb, chan->msi.address_hi);
> +	/* MSI watermark addr - low, high */
> +	SET_CH_32(dw, chan->dir, chan->id, msi_watermark.lsb, chan->msi.address_lo);
> +	SET_CH_32(dw, chan->dir, chan->id, msi_watermark.msb, chan->msi.address_hi);
>  	/* MSI abort addr - low, high */
>  	SET_CH_32(dw, chan->dir, chan->id, msi_abort.lsb, chan->msi.address_lo);
>  	SET_CH_32(dw, chan->dir, chan->id, msi_abort.msb, chan->msi.address_hi);
> -- 
> 2.34.1
>
dongxiong zheng July 6, 2024, 7:59 a.m. UTC | #2
> On Fri, Jul 05, 2024 at 06:57:35PM +0800, zheng.dongxiong wrote:
> > HDMA trigger wartermark interrupt, When use the RIE flag.
> > PCIe RC will trigger AER, If msi wartermark addr is not configuration.
> > This patch fix it by add msi wartermark configuration
> >
> > Signed-off-by: zheng.dongxiong <zheng.dongxiong@outlook.com>
>
> HDMA driver is not at all using watermark interrupts. So we should be disabling
> them altogether.
>
> See: https://lore.kernel.org/dmaengine/1720187733-5380-3-git-send-email-quic_msarkar@quicinc.com/
>
> - Mani
>

Hi Mani:

Ok, Thanks you!

> > ---
> >  drivers/dma/dw-edma/dw-hdma-v0-core.c | 3 +++
> >  1 file changed, 3 insertions(+)
> >
> > diff --git a/drivers/dma/dw-edma/dw-hdma-v0-core.c b/drivers/dma/dw-edma/dw-hdma-v0-core.c
> > index d77051d1e..c4d15a7a7 100644
> > --- a/drivers/dma/dw-edma/dw-hdma-v0-core.c
> > +++ b/drivers/dma/dw-edma/dw-hdma-v0-core.c
> > @@ -280,6 +280,9 @@ static void dw_hdma_v0_core_ch_config(struct dw_edma_chan *chan)
> >  	/* MSI done addr - low, high */
> >  	SET_CH_32(dw, chan->dir, chan->id, msi_stop.lsb, chan->msi.address_lo);
> >  	SET_CH_32(dw, chan->dir, chan->id, msi_stop.msb, chan->msi.address_hi);
> > +	/* MSI watermark addr - low, high */
> > +	SET_CH_32(dw, chan->dir, chan->id, msi_watermark.lsb, chan->msi.address_lo);
> > +	SET_CH_32(dw, chan->dir, chan->id, msi_watermark.msb, chan->msi.address_hi);
> >  	/* MSI abort addr - low, high */
> >  	SET_CH_32(dw, chan->dir, chan->id, msi_abort.lsb, chan->msi.address_lo);
> >  	SET_CH_32(dw, chan->dir, chan->id, msi_abort.msb, chan->msi.address_hi);
> > --
> > 2.34.1
> >
>

Regards,
dongxiong zheng
diff mbox series

Patch

diff --git a/drivers/dma/dw-edma/dw-hdma-v0-core.c b/drivers/dma/dw-edma/dw-hdma-v0-core.c
index d77051d1e..c4d15a7a7 100644
--- a/drivers/dma/dw-edma/dw-hdma-v0-core.c
+++ b/drivers/dma/dw-edma/dw-hdma-v0-core.c
@@ -280,6 +280,9 @@  static void dw_hdma_v0_core_ch_config(struct dw_edma_chan *chan)
 	/* MSI done addr - low, high */
 	SET_CH_32(dw, chan->dir, chan->id, msi_stop.lsb, chan->msi.address_lo);
 	SET_CH_32(dw, chan->dir, chan->id, msi_stop.msb, chan->msi.address_hi);
+	/* MSI watermark addr - low, high */
+	SET_CH_32(dw, chan->dir, chan->id, msi_watermark.lsb, chan->msi.address_lo);
+	SET_CH_32(dw, chan->dir, chan->id, msi_watermark.msb, chan->msi.address_hi);
 	/* MSI abort addr - low, high */
 	SET_CH_32(dw, chan->dir, chan->id, msi_abort.lsb, chan->msi.address_lo);
 	SET_CH_32(dw, chan->dir, chan->id, msi_abort.msb, chan->msi.address_hi);