lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CACKLOr0fVMknA+HAbgn3d9_f9tdz4L2Z9Bx4yMU7eLmr1mdXBA@mail.gmail.com>
Date:	Mon, 2 Jan 2012 11:08:17 +0100
From:	javier Martin <javier.martin@...ta-silicon.com>
To:	Vinod Koul <vinod.koul@...el.com>
Cc:	linux-kernel@...r.kernel.org, dan.j.williams@...el.com,
	s.hauer@...gutronix.de, linux-arm-kernel@...ts.infradead.org
Subject: Re: [PATCH] dmaengine: Add support for MEMCPY for imx-dma.

Hi Vinod,
thank you for your review.

On 23 December 2011 18:38, Vinod Koul <vinod.koul@...el.com> wrote:
>> @@ -328,6 +329,37 @@ static struct dma_async_tx_descriptor *imxdma_prep_dma_cyclic(
>>       return &imxdmac->desc;
>>  }
>>
>> +static struct dma_async_tx_descriptor *imxdma_prep_dma_memcpy(
>> +     struct dma_chan *chan, dma_addr_t dest,
>> +     dma_addr_t src, size_t len, unsigned long flags)
>> +{
>> +     struct imxdma_channel *imxdmac = to_imxdma_chan(chan);
>> +     struct imxdma_engine *imxdma = imxdmac->imxdma;
>> +     int ret;
>> +
>> +     dev_dbg(imxdma->dev, "%s channel: %d src=0x%x dst=0x%x len=%d\n",
>> +                     __func__, imxdmac->channel, src, dest, len);
>> +
>> +     if (imxdmac->status == DMA_IN_PROGRESS)
>> +             return NULL;
>> +
>> +     imxdmac->status = DMA_IN_PROGRESS;
> why? prepare doesn't mean DMA is in progress. You can get multiple
> descriptors for same channel by calling prepare multiple times.
> Even one descriptor can be memcpy whereas other is slave...
> In issue_pending this should be moved to DMA_IN_PROGRESS

According to the original developer of this file it only supports a
single descriptor. Please, take a look at the following function:

static void imxdma_issue_pending(struct dma_chan *chan)
{
	/*
	 * Nothing to do. We only have a single descriptor
	 */
}


Also, the same behavior is present in the other prepare functions:
"imxdma_prep_slave_sg" and "imxdma_prep_dma_cyclic".

I think the less painful approach here is merging my patch so that
multiple descriptors support can be added later.

--
Javier Martin
Vista Silicon S.L.
CDTUC - FASE C - Oficina S-345
Avda de los Castros s/n
39005- Santander. Cantabria. Spain
+34 942 25 32 60
www.vista-silicon.com
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ