[U-Boot] [PATCH v2 18/26] dm: usb: Remove inactive children after a bus scan
Simon Glass
sjg at chromium.org
Mon Nov 16 22:08:34 CET 2015
Hi Hans,
On 15 November 2015 at 12:35, Hans de Goede <hdegoede at redhat.com> wrote:
>
> Hi,
>
> On 11/13/2015 10:58 PM, Simon Glass wrote:
>>
>> Hi Hans,
>
>
> <snip>
>
>>>>> Talking about usb-stop, there is still one (BIG!) problem after
>>>>> this patch set when building usb-support with DM_DEVICE_REMOVE
>>>>> not set. This means that the controllers dma engines will not
>>>>> be stopped when booting the actual OS and they will still be
>>>>> accessing parts of the main memory while the actual OS is
>>>>> booting, which is BAD. So I suggest adding something like
>>>>> this to all host drivers which use dma in this way:
>>>>>
>>>>> #if defined CONFIG_DM_USB && !defined CONFIG_DM_DEVICE_REMOVE
>>>>> #error The EHCI driver cannot be used without CONFIG_DM_DEVICE_REMOVE
>>>>> otherwise DMA stays active while booting the OS
>>>>> #endif
>>>>
>>>>
>>>>
>>>> Sounds good. I am not suggesting that we encourage people to build USB
>>>> with out DM_DEVICE_REMOVE. I just want to make sure that we don't
>>>> create unnecessary dependencies such that DM_DEVICE_REMOVE becomes
>>>> impossible to use.
>>>>
>>>> We have a note in the Kconfig for that, but I agree we need to make it
>>>> more explicit. With the #if approach it makes the pitfall much more
>>>> obvious.
>>>
>>>
>>>
>>> Ack, so we need to have patches for this for at least ohci, ehci, xhci
>>> and I guess also uhci ? Who is going to write these patches ?
>>
>>
>> I suppose I could do that. I would like to make sure that any USB fish
>> hooks are removed, and that is part of the solution.
>>
>> I'd really like to resolve this and move things forward. If you still
>> have have strong objections please let me know.
>
>
> There are no objections from my side to move forward with your current
> solution.
>
>> We did discuss this at
>> the time and I was clear that I did not want to keep the solution as
>> it was - I merged it because it fixed a bug, as you pointed out at the
>> time.
>
>
> Ack.
OK thanks. I'll see if I can get some more comments on the other patches.
Regards,
Simon
More information about the U-Boot
mailing list