Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1476146

linux-next: manual merge of the tty tree with the slave-dma tree

From Stephen Rothwell <sfr@canb.auug.org.au>
Newsgroups linux.kernel
Subject linux-next: manual merge of the tty tree with the slave-dma tree
Date 2016-09-05 08:50 +0200
Message-ID <sdVTb-6R-3@gated-at.bofh.it> (permalink)
Organization linux.* mail to news gateway

Show all headers | View raw


Hi Greg,

Today's linux-next merge of the tty tree got a conflict in:

  drivers/dma/imx-sdma.c

between commit:

  48dc77e2d4fc ("dmaengine: imx-sdma: convert callback to helper function")

from the slave-dma tree and commit:

  15f30f513111 ("dmaengine: imx-sdma - reduce transfer latency for DMA cyclic clients")

from the tty tree.

I fixed it up (see below) and can carry the fix as necessary. This
is now fixed as far as linux-next is concerned, but any non trivial
conflicts should be mentioned to your upstream maintainer when your tree
is submitted for merging.  You may also want to consider cooperating
with the maintainer of the conflicting tree to minimise any particularly
complex conflicts.

-- 
Cheers,
Stephen Rothwell

diff --cc drivers/dma/imx-sdma.c
index a6bffbc47ee2,3cb47386fbb9..000000000000
--- a/drivers/dma/imx-sdma.c
+++ b/drivers/dma/imx-sdma.c
@@@ -689,12 -664,36 +686,35 @@@ static void sdma_update_channel_loop(st
  		if (bd->mode.status & BD_DONE)
  			break;
  
- 		if (bd->mode.status & BD_RROR)
+ 		if (bd->mode.status & BD_RROR) {
+ 			bd->mode.status &= ~BD_RROR;
  			sdmac->status = DMA_ERROR;
+ 			error = -EIO;
+ 		}
  
+ 	       /*
+ 		* We use bd->mode.count to calculate the residue, since contains
+ 		* the number of bytes present in the current buffer descriptor.
+ 		*/
+ 
+ 		sdmac->chn_real_count = bd->mode.count;
  		bd->mode.status |= BD_DONE;
+ 		bd->mode.count = sdmac->period_len;
+ 
+ 		/*
+ 		 * The callback is called from the interrupt context in order
+ 		 * to reduce latency and to avoid the risk of altering the
+ 		 * SDMA transaction status by the time the client tasklet is
+ 		 * executed.
+ 		 */
+ 
 -		if (sdmac->desc.callback)
 -			sdmac->desc.callback(sdmac->desc.callback_param);
++		dmaengine_desc_get_callback_invoke(&sdmac->desc, NULL);
+ 
  		sdmac->buf_tail++;
  		sdmac->buf_tail %= sdmac->num_bd;
+ 
+ 		if (error)
+ 			sdmac->status = old_status;
  	}
  }
  
@@@ -722,20 -722,10 +743,10 @@@ static void mxc_sdma_handle_channel_nor
  		sdmac->status = DMA_COMPLETE;
  
  	dma_cookie_complete(&sdmac->desc);
 -	if (sdmac->desc.callback)
 -		sdmac->desc.callback(sdmac->desc.callback_param);
 +
 +	dmaengine_desc_get_callback_invoke(&sdmac->desc, NULL);
  }
  
- static void sdma_tasklet(unsigned long data)
- {
- 	struct sdma_channel *sdmac = (struct sdma_channel *) data;
- 
- 	if (sdmac->flags & IMX_DMA_SG_LOOP)
- 		sdma_handle_channel_loop(sdmac);
- 	else
- 		mxc_sdma_handle_channel_normal(sdmac);
- }
- 
  static irqreturn_t sdma_int_handler(int irq, void *dev_id)
  {
  	struct sdma_engine *sdma = dev_id;

Back to linux.kernel | Previous | NextNext in thread | Find similar | Unroll thread


Thread

linux-next: manual merge of the tty tree with the slave-dma tree Stephen Rothwell <sfr@canb.auug.org.au> - 2016-09-05 08:50 +0200
  Re: linux-next: manual merge of the tty tree with the slave-dma tree Vinod Koul <vinod.koul@intel.com> - 2016-09-05 13:30 +0200
    Re: linux-next: manual merge of the tty tree with the slave-dma tree Greg KH <greg@kroah.com> - 2016-09-05 13:40 +0200
      Re: linux-next: manual merge of the tty tree with the slave-dma tree Vinod Koul <vinod.koul@intel.com> - 2016-09-05 14:40 +0200
        Re: linux-next: manual merge of the tty tree with the slave-dma tree Greg KH <greg@kroah.com> - 2016-09-05 16:00 +0200
          Re: linux-next: manual merge of the tty tree with the slave-dma tree Vinod Koul <vinod.koul@intel.com> - 2016-09-05 17:50 +0200
            Re: linux-next: manual merge of the tty tree with the slave-dma tree Vinod Koul <vinod.koul@intel.com> - 2016-09-09 13:50 +0200
              Re: linux-next: manual merge of the tty tree with the slave-dma tree Greg KH <greg@kroah.com> - 2016-09-09 14:30 +0200

csiph-web