linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Baolin Wang <baolin.wang@linaro.org>
To: Felipe Balbi <balbi@kernel.org>
Cc: Greg KH <gregkh@linuxfoundation.org>,
	Mark Brown <broonie@kernel.org>, USB <linux-usb@vger.kernel.org>,
	LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v2] usb: dwc3: host: Set the dma_ops for xhci device
Date: Tue, 7 Jun 2016 10:11:41 +0800	[thread overview]
Message-ID: <CAMz4kuKP3=0zjjT3XJuQO21PACnN_zzg_e_nG1EPdZFAhQ4LgA@mail.gmail.com> (raw)
In-Reply-To: <8760tmcqir.fsf@linux.intel.com>

On 6 June 2016 at 22:59, Felipe Balbi <balbi@kernel.org> wrote:
>
> Hi,
>
> Baolin Wang <baolin.wang@linaro.org> writes:
>> On ARM64 platform, it will set 'dummy_dma_ops' for device dma_ops if
>> it did not call 'arch_setup_dma_ops' at device creation time, that will
>> cause failure when setting the dma mask for device.
>>
>> Thus this patch set the xhci device dma_ops from the parent device if
>> the xhci device dma_ops is 'dummy_dma_ops'.
>>
>> Changes since v1:
>>  - Add CONFIG_ARM64 macro.
>>
>> Signed-off-by: Baolin Wang <baolin.wang@linaro.org>
>> ---
>>  drivers/usb/dwc3/host.c |    5 +++++
>>  1 file changed, 5 insertions(+)
>>
>> diff --git a/drivers/usb/dwc3/host.c b/drivers/usb/dwc3/host.c
>> index c679f63..edb666d 100644
>> --- a/drivers/usb/dwc3/host.c
>> +++ b/drivers/usb/dwc3/host.c
>> @@ -32,6 +32,11 @@ int dwc3_host_init(struct dwc3 *dwc)
>>               return -ENOMEM;
>>       }
>>
>> +#ifdef CONFIG_ARM64
>> +     if (get_dma_ops(&xhci->dev) == get_dma_ops(NULL))
>> +             xhci->dev.archdata.dma_ops = get_dma_ops(dwc->dev);
>> +#endif
>
> I don't like the ifdef and also don't like that this is done in dwc3
> itself. Seems like we need something like this done from the
> platform_bus core.

OK. I will try to fix this issue in platform_bus core. Thanks.

>
> --
> balbi



-- 
Baolin.wang
Best Regards

  reply	other threads:[~2016-06-07  2:11 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-06-06  5:56 [PATCH v2] usb: dwc3: host: Set the dma_ops for xhci device Baolin Wang
2016-06-06 14:59 ` Felipe Balbi
2016-06-07  2:11   ` Baolin Wang [this message]
2016-06-08  8:18   ` Baolin Wang

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='CAMz4kuKP3=0zjjT3XJuQO21PACnN_zzg_e_nG1EPdZFAhQ4LgA@mail.gmail.com' \
    --to=baolin.wang@linaro.org \
    --cc=balbi@kernel.org \
    --cc=broonie@kernel.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    /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: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).