Re: [PATCH 2/3] dmaengine: xilinx: xdma: Fix synchronization issue

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Lizhi,

> > @@ -376,6 +378,8 @@ static int xdma_xfer_start(struct xdma_chan *xchan)
> >   		return ret;  
> >   >   	xchan->busy = true;  
> > +	xchan->stop_requested = false;
> > +	reinit_completion(&xchan->last_interrupt);  
> 
> If stop_requested is true, it should not start another transfer. So I would suggest to add
> 
>       if (xchan->stop_requested)
> 
>                  return -ENODEV;

Maybe -EBUSY in this case?

I thought synchronize() was mandatory in-between. If that's not the
case then indeed we need to block or error-out if a new transfer
gets started.

> 
> at the beginning of xdma_xfer_start().
> 
> xdma_xfer_start() is protected by chan lock.
> 
> >   >   	return 0;  
> >   }

Thanks,
Miquèl





[Index of Archives]     [Linux Kernel]     [Linux ARM (vger)]     [Linux ARM MSM]     [Linux Omap]     [Linux Arm]     [Linux Tegra]     [Fedora ARM]     [Linux for Samsung SOC]     [eCos]     [Linux PCI]     [Linux Fastboot]     [Gcc Help]     [Git]     [DCCP]     [IETF Announce]     [Security]     [Linux MIPS]     [Yosemite Campsites]

  Powered by Linux