Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751837AbbHTFSJ (ORCPT ); Thu, 20 Aug 2015 01:18:09 -0400 Received: from mga09.intel.com ([134.134.136.24]:57815 "EHLO mga09.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751787AbbHTFSI (ORCPT ); Thu, 20 Aug 2015 01:18:08 -0400 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.15,713,1432623600"; d="scan'208";a="545179008" Date: Thu, 20 Aug 2015 10:50:14 +0530 From: Vinod Koul To: Ashutosh Dixit Cc: Greg Kroah-Hartman , Dan Williams , linux-kernel@vger.kernel.org, Sudeep Dutt , Nikhil Rao , Siva Yerramreddy Subject: Re: [PATCH char-misc-next 11/19] dma: Add support to program MIC x100 status descriptiors Message-ID: <20150820052014.GU13546@localhost> References: <0c2dec1519fdd81dfe6335efc2a1edb0b142639b.1438040669.git.ashutosh.dixit@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <0c2dec1519fdd81dfe6335efc2a1edb0b142639b.1438040669.git.ashutosh.dixit@intel.com> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1293 Lines: 45 On Mon, Jul 27, 2015 at 04:58:17PM -0700, Ashutosh Dixit wrote: > +/* Program a status descriptor with phys as address and value to be written */ > +static int mic_dma_do_status_update(struct mic_dma_chan *ch, dma_addr_t phys, > + u64 value) > +{ > + int ret = mic_dma_avail_desc_ring_space(ch, 4); > + > + if (ret < 0) > + return ret; > + ret = 0; ? > + mic_dma_prep_status_desc(&ch->desc_ring[ch->head], > + value, phys, false); > + mic_dma_hw_ring_inc_head(ch); > + return ret; return 0 then? > +} > + > static inline void mic_dma_issue_pending(struct dma_chan *ch) > { > struct mic_dma_chan *mic_ch = to_mic_dma_chan(ch); > @@ -287,9 +310,28 @@ mic_dma_prep_memcpy_lock(struct dma_chan *ch, dma_addr_t dma_dest, > return NULL; > > spin_lock(&mic_ch->prep_lock); > + if (len == 8) { magic number? > + /* > + * This is a hack to program status descriptor since > + * DMA engine API doesn't have support for this. > + */ what do you mean by programming status descriptor, what do you need to program? -- ~Vinod -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/