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] [day] [month] [year] [list]
Date:	Tue, 05 Apr 2016 08:18:24 +0300
From:	Felipe Balbi <felipe.balbi@...ux.intel.com>
To:	santosh shilimkar <santosh.shilimkar@...cle.com>,
	Grygorii Strashko <grygorii.strashko@...com>,
	"Thang Q. Nguyen" <tqnguyen@....com>
Cc:	Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
	linux-usb@...r.kernel.org, linux-omap@...r.kernel.org,
	linux-kernel@...r.kernel.org, linux-arm@...ts.infradead.org,
	Arnd Bergmann <arnd@...db.de>,
	"Karicheri\, Muralidharan" <m-karicheri2@...com>,
	Peter Ujfalusi <peter.ujfalusi@...com>, Phong Vo <pvo@....com>,
	Loc Ho <lho@....com>, patches <patches@....com>,
	Santosh Shilimkar <ssantosh@...nel.org>,
	"Ben Dooks \(embedded platforms\)" <ben-linux@...ff.org>,
	Russell King <linux@....linux.org.uk>
Subject: Re: [PATCH v3 2/2] usb:dwc3: pass arch data to xhci-hcd child

santosh shilimkar <santosh.shilimkar@...cle.com> writes:
> On 4/3/2016 11:28 PM, Felipe Balbi wrote:
>> santosh shilimkar <santosh.shilimkar@...cle.com> writes:
>>> +Arnd, RMK,
>>>
>>> On 4/1/2016 4:57 AM, Felipe Balbi wrote:
>>>>
>>>> Hi,
>>>>
>>>> Grygorii Strashko <grygorii.strashko@...com> writes:
>>>>> On 04/01/2016 01:20 PM, Felipe Balbi wrote:
>>>
>>> [...]
>>>
>>>>> commit 7ace8fc8219e4cbbfd5b4790390d9a01a2541cdf
>>>>> Author: Yoshihiro Shimoda <yoshihiro.shimoda.uh@...esas.com>
>>>>> Date:   Mon Jul 13 18:10:05 2015 +0900
>>>>>
>>>>>       usb: gadget: udc: core: Fix argument of dma_map_single for IOMMU
>>>>>
>>>>>       The dma_map_single and dma_unmap_single should set "gadget->dev.parent"
>>>>>       instead of "&gadget->dev" in the first argument because the parent has
>>>>>       a udc controller's device pointer.
>>>>>       Otherwise, iommu functions are not called in ARM environment.
>>>>>
>>>>>       Signed-off-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@...esas.com>
>>>>>       Signed-off-by: Felipe Balbi <balbi@...com>
>>>>>
>>>>> Above actually means that DMA configuration code can be dropped from
>>>>> usb_add_gadget_udc_release() completely. Right?:
>>>>
>>>> true, but now I'm not sure what's better: copy all necessary bits from
>>>> parent or just pass the parent device to all DMA API.
>>>>
>>>> Anybody to shed a light here ?
>>>>
>>> The expectation is drivers should pass the proper dev pointers and let
>>> core DMA code deal with it since it knows the per device dma properties.
>>
>> okay, so how do you get proper DMA pointers with something like this:
>>
>> 	kdwc3_dma_mask = dma_get_mask(dev);
>> 	dev->dma_mask = &kdwc3_dma_mask;
>>
>> This doesn't anything.
>>
> Drivers actually needs to touch dma_mask(s) only if the core DMA
> code hasn't populated it it.

that's fair, but when driver _do_ touch it, I'd rather it be useful ;-)

> I see Grygorii pointed out couple of things already.

yeah

-- 
balbi

Download attachment "signature.asc" of type "application/pgp-signature" (819 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ