Re: [PATCH 5/6] usb: dwc3: core: don't access DMA bits directly

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Grygorii Strashko <grygorii.strashko@xxxxxx> writes:

> On 04/02/2016 11:28 AM, Felipe Balbi wrote:
>> instead of manually copying DMA bits from parent
>> device, we should let DMA API do its job.
>> 
>> Signed-off-by: Felipe Balbi <felipe.balbi@xxxxxxxxxxxxxxx>
>> ---
>>   drivers/usb/dwc3/core.c | 6 +-----
>>   1 file changed, 1 insertion(+), 5 deletions(-)
>> 
>> diff --git a/drivers/usb/dwc3/core.c b/drivers/usb/dwc3/core.c
>> index 17fd81447c9f..d601de20e1cd 100644
>> --- a/drivers/usb/dwc3/core.c
>> +++ b/drivers/usb/dwc3/core.c
>> @@ -981,11 +981,7 @@ static int dwc3_probe(struct platform_device *pdev)
>>   
>>   	spin_lock_init(&dwc->lock);
>>   
>> -	if (!dev->dma_mask) {
>> -		dev->dma_mask = dev->parent->dma_mask;
>> -		dev->dma_parms = dev->parent->dma_parms;
>
> Here, and in most of other patches you've dropped dma_parms copying -
> Is it expected?

I mentioned in cover letter that I don't know exactly what's the proper
way of dealing with dma_parms.

>> -		dma_set_coherent_mask(dev, dev->parent->coherent_dma_mask);
>> -	}
>> +	dma_coerce_mask_and_coherent(dev, dma_get_mask(dev->parent));
>
>
> No. Above if case should stay, otherwise, already valid, DMA configuration 
> might be overwritten:

okay.

-- 
balbi

Attachment: signature.asc
Description: PGP signature


[Index of Archives]     [Linux Arm (vger)]     [ARM Kernel]     [ARM MSM]     [Linux Tegra]     [Linux WPAN Networking]     [Linux Wireless Networking]     [Maemo Users]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux