lkml.org 
[lkml]   [2019]   [Feb]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [RFC PATCH] USB: PCI: set 32bit DMA mask for PCI based USB controllers
From
Date
On 2019/2/1 17:13, Hanjun Guo wrote:
> On 2019/2/1 13:55, Hanjun Guo wrote:
>> Hi John,
>>
>> On 2019/1/31 17:54, John Garry wrote:
>>> On 30/01/2019 07:01, Hanjun Guo wrote:
>>>> From: Hanjun Guo <hanjun.guo@linaro.org>
>> [...]
>>>>
>>>>  drivers/usb/core/hcd-pci.c | 4 ++++
>>>>  1 file changed, 4 insertions(+)
>>>>
>>>> diff --git a/drivers/usb/core/hcd-pci.c b/drivers/usb/core/hcd-pci.c
>>>> index 0343246..a9c33e6 100644
>>>> --- a/drivers/usb/core/hcd-pci.c
>>>> +++ b/drivers/usb/core/hcd-pci.c
>>>> @@ -188,6 +188,10 @@ int usb_hcd_pci_probe(struct pci_dev *dev, const struct pci_device_id *id)
>>>>      if (pci_enable_device(dev) < 0)
>>>>          return -ENODEV;
>>>>
>>>> +    retval = dma_coerce_mask_and_coherent(&dev->dev, DMA_BIT_MASK(32));
>>>> +    if (retval)
>>>> +        return retval;
>>>
>>> Hi Hanjun,
>>>
>>> You're missing tidy-up upon failure.
>>
>> Good catch, needs to disable pci for failure, I will send
>> a updated version to address the comments from you and Christoph.
>
> There is a _DMA method which was introduced in ACPI 6.2 to cover
> this, I will try that solution then report back.

We add a _DMA method under the hostbridge which the EHCI/OHCI being
connected to, the calltrace is gone and EHCI works as expected.

No need for kernel change, so this patch is dropped.

Thanks
Hanjun


\
 
 \ /
  Last update: 2019-02-02 09:11    [W:0.044 / U:9.440 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site