Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1580494

Re: [PATCH v13 06/12] usb: xhci: use bus->sysdev for DMA configuration

From Arnd Bergmann <arnd@arndb.de>
Newsgroups linux.kernel
Subject Re: [PATCH v13 06/12] usb: xhci: use bus->sysdev for DMA configuration
Date 2017-02-14 12:50 +0100
Message-ID <taJMl-1mX-7@gated-at.bofh.it> (permalink)
References <tanVv-3DB-7@gated-at.bofh.it> <taE0i-5U6-5@gated-at.bofh.it> <taIGC-HJ-17@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Tue, Feb 14, 2017 at 11:36 AM, Roger Quadros <rogerq@ti.com> wrote:
> On 11/02/17 03:27, Peter Chen wrote:
>> From: Arnd Bergmann <arnd@arndb.de>
>>
>> For xhci-hcd platform device, all the DMA parameters are not
>> configured properly, notably dma ops for dwc3 devices. So, set
>> the dma for xhci from sysdev. sysdev is pointing to device that
>> is known to the system firmware or hardware.
>>
>> Cc: Baolin Wang <baolin.wang@linaro.org>
>> Cc: Vivek Gautam <vivek.gautam@codeaurora.org>
>> Cc: Alexander Sverdlin <alexander.sverdlin@nokia.com>
>> Cc: Mathias Nyman <mathias.nyman@linux.intel.com>
>>
>> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
>> Signed-off-by: Sriram Dash <sriram.dash@nxp.com>
>> ---
>> Hi, Baolin, Vivek and Alexander,
>> I removed your tested-by tag due to add one change that adding sysdev
>> for shared hcd too, if your test shows this change works for you or
>> has no effect for you, please consider adding tested-by tag again,
>> thanks.

>> @@ -222,20 +241,20 @@ static int xhci_plat_probe(struct platform_device *pdev)
>>
>>       xhci->clk = clk;
>>       xhci->main_hcd = hcd;
>> -     xhci->shared_hcd = usb_create_shared_hcd(driver, &pdev->dev,
>> +     xhci->shared_hcd = __usb_create_hcd(driver, sysdev, &pdev->dev,
>>                       dev_name(&pdev->dev), hcd);
>>       if (!xhci->shared_hcd) {
>>               ret = -ENOMEM;
>>               goto disable_clk;
>>       }
>>
>> -     if (device_property_read_bool(&pdev->dev, "usb3-lpm-capable"))
>> +     if (device_property_read_bool(sysdev, "usb3-lpm-capable"))
>
> Why are we using sysdev to read DT property? We should be using the
> XHCI device (&pdev->dev) here, no?

If I remember correctly, this is one of the cases where pdev does not
have a device node attached to it because it was created by the driver
of the parent device on the fly in case of dwc3. When you have a pure xhci
device in DT, the two pointers are the same.

    Arnd

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Re: [PATCH v13 06/12] usb: xhci: use bus->sysdev for DMA  configuration Roger Quadros <rogerq@ti.com> - 2017-02-14 11:40 +0100
  Re: [PATCH v13 06/12] usb: xhci: use bus->sysdev for DMA configuration Arnd Bergmann <arnd@arndb.de> - 2017-02-14 12:50 +0100
    Re: [PATCH v13 06/12] usb: xhci: use bus->sysdev for DMA  configuration Roger Quadros <rogerq@ti.com> - 2017-02-14 13:30 +0100
      Re: [PATCH v13 06/12] usb: xhci: use bus->sysdev for DMA configuration Arnd Bergmann <arnd@arndb.de> - 2017-02-14 14:00 +0100
        Re: [PATCH v13 06/12] usb: xhci: use bus->sysdev for DMA  configuration Peter Chen <hzpeterchen@gmail.com> - 2017-02-15 02:40 +0100
          Re: [PATCH v13 06/12] usb: xhci: use bus->sysdev for DMA  configuration Roger Quadros <rogerq@ti.com> - 2017-02-15 09:20 +0100
            Re: [PATCH v13 06/12] usb: xhci: use bus->sysdev for DMA  configuration Peter Chen <hzpeterchen@gmail.com> - 2017-02-15 10:00 +0100
              Re: [PATCH v13 06/12] usb: xhci: use bus->sysdev for DMA  configuration Roger Quadros <rogerq@ti.com> - 2017-02-15 11:20 +0100
                Re: [PATCH v13 06/12] usb: xhci: use bus->sysdev for DMA configuration Felipe Balbi <balbi@kernel.org> - 2017-02-15 13:00 +0100
                Re: [PATCH v13 06/12] usb: xhci: use bus->sysdev for DMA  configuration Peter Chen <hzpeterchen@gmail.com> - 2017-02-16 02:30 +0100

csiph-web