Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753292AbbLVQyy (ORCPT ); Tue, 22 Dec 2015 11:54:54 -0500 Received: from mga09.intel.com ([134.134.136.24]:42407 "EHLO mga09.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751178AbbLVQyx (ORCPT ); Tue, 22 Dec 2015 11:54:53 -0500 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.20,465,1444719600"; d="scan'208";a="879162326" From: "Shevchenko, Andriy" To: "mans@mansr.com" , "vireshk@kernel.org" , "linux-kernel@vger.kernel.org" , "Williams, Dan J" , "Koul, Vinod" , "dmaengine@vger.kernel.org" Subject: Re: [PATCH] dmaengine: dw: clear LLP_[SD]_EN bits in last descriptor of a chain Thread-Topic: [PATCH] dmaengine: dw: clear LLP_[SD]_EN bits in last descriptor of a chain Thread-Index: AQHRPNl4/PvJQisL8UuBrmcmgDHHbA== Date: Tue, 22 Dec 2015 16:54:49 +0000 Message-ID: <1450803309.30729.306.camel@intel.com> References: <1450725037-26492-1-git-send-email-mans@mansr.com> <1450726452.30729.259.camel@linux.intel.com> In-Reply-To: <1450726452.30729.259.camel@linux.intel.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.237.72.86] Content-Type: text/plain; charset="utf-8" Content-ID: <6291967A0FD64242BD709873059CD8BA@intel.com> MIME-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from base64 to 8bit by mail.home.local id tBMGsx7W011544 Content-Length: 2405 Lines: 66 On Mon, 2015-12-21 at 21:34 +0200, Andy Shevchenko wrote: > On Mon, 2015-12-21 at 19:10 +0000, Mans Rullgard wrote: > > The datasheet requires that the LLP_[SD]_EN bits be cleared > > whenever > > LLP.LOC is zero, i.e. in the last descriptor of a multi-block > > chain. > > Make the driver do this. > > Acked-by: Andy Shevchenko Vinod, I would like to postpone this patch for a while to make a bit easier back porting of other dw_dmac changes wrt fix SATA on 460EX (*). I will send it later in a bunch. Hope Måns has no objections on this. (*) Now I'm pretty sure that the main issues with SATA are a) wrong master settings for transfers and LLP, and b) endiannes issue with values in LLP. That's why I hope to have those patches coming first with a proper Fixes: tag. > > > > > Signed-off-by: Mans Rullgard > > --- > >  drivers/dma/dw/core.c | 2 ++ > >  1 file changed, 2 insertions(+) > > > > diff --git a/drivers/dma/dw/core.c b/drivers/dma/dw/core.c > > index 7067b6ddc1db..ca7cafc82f6b 100644 > > --- a/drivers/dma/dw/core.c > > +++ b/drivers/dma/dw/core.c > > @@ -751,6 +751,7 @@ dwc_prep_dma_memcpy(struct dma_chan *chan, > > dma_addr_t dest, dma_addr_t src, > >   prev->lli.ctllo |= DWC_CTLL_INT_EN; > >   > >   prev->lli.llp = 0; > > + prev->lli.ctllo &= ~(DWC_CTLL_LLP_D_EN | > > DWC_CTLL_LLP_S_EN); > >   first->txd.flags = flags; > >   first->total_len = len; > >   > > @@ -912,6 +913,7 @@ slave_sg_fromdev_fill_desc: > >   prev->lli.ctllo |= DWC_CTLL_INT_EN; > >   > >   prev->lli.llp = 0; > > + prev->lli.ctllo &= ~(DWC_CTLL_LLP_D_EN | > > DWC_CTLL_LLP_S_EN); > >   first->total_len = total_len; > >   > >   return &first->txd; > -- Andy Shevchenko Intel Finland Oy --------------------------------------------------------------------- Intel Finland Oy Registered Address: PL 281, 00181 Helsinki Business Identity Code: 0357606 - 4 Domiciled in Helsinki This e-mail and any attachments may contain confidential material for the sole use of the intended recipient(s). Any review or distribution by others is strictly prohibited. If you are not the intended recipient, please contact the sender and delete all copies. ????{.n?+???????+%?????ݶ??w??{.n?+????{??G?????{ay?ʇڙ?,j??f???h?????????z_??(?階?ݢj"???m??????G????????????&???~???iO???z??v?^?m???? ????????I?