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: <519F2756.10809@metafoo.de>
Date:	Fri, 24 May 2013 10:39:50 +0200
From:	Lars-Peter Clausen <lars@...afoo.de>
To:	Vinod Koul <vinod.koul@...el.com>
CC:	linux-mips@...ux-mips.org, alsa-devel@...a-project.org,
	Liam Girdwood <lgirdwood@...il.com>,
	Ralf Baechle <ralf@...ux-mips.org>,
	linux-kernel@...r.kernel.org, Mark Brown <broonie@...nel.org>,
	Maarten ter Huurne <maarten@...ewalker.org>
Subject: Re: [alsa-devel] [PATCH 3/6] dma: Add a jz4740 dmaengine driver

>>>>>> +static int jz4740_dma_alloc_chan_resources(struct dma_chan *c)
>>>>>> +{
>>>>>> +	struct jz4740_dmaengine_chan *chan = to_jz4740_dma_chan(c);
>>>>>> +
>>>>>> +	chan->jz_chan = jz4740_dma_request(chan, NULL);
>>>>>> +	if (!chan->jz_chan)
>>>>>> +		return -EBUSY;
>>>>>> +
>>>>>> +	jz4740_dma_set_complete_cb(chan->jz_chan, jz4740_dma_complete_cb);
>>>>>> +
>>>>>> +	return 0;
>>>>> Zero is not expected value, you need to return the descriptors allocated
>>>>> sucessfully.
>>>>
>>>> Well, zero descriptors have been allocated. As far as I can see only a negative
>>>> return value is treated as an error. Also the core doesn't seem to use the
>>>> return value for anything else but checking if it is an error.
>>> This is the API defination
>>> * @device_alloc_chan_resources: allocate resources and return the
>>> *      number of allocated descriptors
>>>
>>
>> But 0 is still the number of descriptors that have been pre-allocated.
> and that should change, typically the driver will preallocate a pool of
> descriptors. These are to be used later for .device_prep_xxx calls.
> 

Since the size of the descriptor is not know in advance this is not possible.

- Lars
--
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