From: Torsten Fleischer <torfl6749@gmail.com> To: Torsten Fleischer <torfl6749@gmail.com>, nicolas.ferre@atmel.com, dan.j.williams@intel.com, vinod.koul@intel.com, linux-arm-kernel@lists.infradead.org, dmaengine@vger.kernel.org, "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org> Subject: Re: [PATCH 1/2] dma: at_hdmac: Fix calculation of the residual bytes Date: Thu, 19 Feb 2015 08:54:22 +0100 [thread overview] Message-ID: <CANZ4BrQwEei8GsskU2jrDbd4z+DDoq0U8S3sa947=+EuUMavwQ@mail.gmail.com> (raw) In-Reply-To: <20150218150216.GE32600@odux.rfo.atmel.com> Hello Ludovic, >> >> transfer 1: residue = 975584 >> transfer 2: residue = 1048380 >> > > You're right about these points. Good job. I think it should be sent to > stable if it can be applied properly. > > For multilines comments, please follow the coding rule > /* > * my > * comments > */ > thanks for the hint. I will fix this in the next version of the patch. >> + /* cookie matches to the currently running transfer */ >> + ret = desc_first->total_len; >> + >> + if (desc_first->lli.dscr) { >> + /* hardware linked list transfer */ >> + >> + /* Calculate the residue by removing the length of the child >> + * descriptors already transferred from the total length. >> + * To get the current child descriptor we can use the value of >> + * the channel's DSCR register and compare it against the value >> + * of the hardware linked list structure of each child >> + * descriptor. */ >> + >> + dscr = channel_readl(atchan, DSCR); >> + >> + /* the first descriptor is currently in work */ >> + if (desc_first->lli.dscr == dscr) >> + return ret; >> > > Why returning total_len in this case? I think you can return a more accurate > value as you do for the last descriptor. > Good point. I will add a calculation for the first descriptor. Regards Torsten
WARNING: multiple messages have this Message-ID (diff)
From: torfl6749@gmail.com (Torsten Fleischer) To: linux-arm-kernel@lists.infradead.org Subject: [PATCH 1/2] dma: at_hdmac: Fix calculation of the residual bytes Date: Thu, 19 Feb 2015 08:54:22 +0100 [thread overview] Message-ID: <CANZ4BrQwEei8GsskU2jrDbd4z+DDoq0U8S3sa947=+EuUMavwQ@mail.gmail.com> (raw) In-Reply-To: <20150218150216.GE32600@odux.rfo.atmel.com> Hello Ludovic, >> >> transfer 1: residue = 975584 >> transfer 2: residue = 1048380 >> > > You're right about these points. Good job. I think it should be sent to > stable if it can be applied properly. > > For multilines comments, please follow the coding rule > /* > * my > * comments > */ > thanks for the hint. I will fix this in the next version of the patch. >> + /* cookie matches to the currently running transfer */ >> + ret = desc_first->total_len; >> + >> + if (desc_first->lli.dscr) { >> + /* hardware linked list transfer */ >> + >> + /* Calculate the residue by removing the length of the child >> + * descriptors already transferred from the total length. >> + * To get the current child descriptor we can use the value of >> + * the channel's DSCR register and compare it against the value >> + * of the hardware linked list structure of each child >> + * descriptor. */ >> + >> + dscr = channel_readl(atchan, DSCR); >> + >> + /* the first descriptor is currently in work */ >> + if (desc_first->lli.dscr == dscr) >> + return ret; >> > > Why returning total_len in this case? I think you can return a more accurate > value as you do for the last descriptor. > Good point. I will add a calculation for the first descriptor. Regards Torsten
next prev parent reply other threads:[~2015-02-19 7:54 UTC|newest] Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top 2015-02-08 9:29 [PATCH 0/2] dma: at_hdmac: Fix residue calculation and add mem to mem sg support Torsten Fleischer 2015-02-08 9:29 ` [PATCH 1/2] dma: at_hdmac: Fix calculation of the residual bytes Torsten Fleischer 2015-02-18 15:02 ` Ludovic Desroches 2015-02-18 15:02 ` Ludovic Desroches 2015-02-19 7:54 ` Torsten Fleischer [this message] 2015-02-19 7:54 ` Torsten Fleischer 2015-02-08 9:29 ` [PATCH 2/2] dma: at_hdmac: Add support for memory to memory sg transfers Torsten Fleischer 2015-02-17 11:52 ` [PATCH 0/2] dma: at_hdmac: Fix residue calculation and add mem to mem sg support Torsten Fleischer 2015-02-17 11:52 ` Torsten Fleischer
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to='CANZ4BrQwEei8GsskU2jrDbd4z+DDoq0U8S3sa947=+EuUMavwQ@mail.gmail.com' \ --to=torfl6749@gmail.com \ --cc=dan.j.williams@intel.com \ --cc=dmaengine@vger.kernel.org \ --cc=linux-arm-kernel@lists.infradead.org \ --cc=linux-kernel@vger.kernel.org \ --cc=nicolas.ferre@atmel.com \ --cc=vinod.koul@intel.com \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.