[U-Boot] [PATCH 07/16] usb: hub: Translate USB 3.0 hub port status into old version

Simon Glass sjg at chromium.org
Fri Jul 7 03:57:32 UTC 2017


On 5 July 2017 at 23:56, Bin Meng <bmeng.cn at gmail.com> wrote:
>
> Hi Marek,
>
> On Thu, Jun 29, 2017 at 1:25 AM, Marek Vasut <marex at denx.de> wrote:
> > On 06/28/2017 10:28 AM, Bin Meng wrote:
> >> Hi Marek,
> >>
> >> On Tue, Jun 27, 2017 at 7:57 AM, Bin Meng <bmeng.cn at gmail.com> wrote:
> >>> Hi Marek,
> >>>
> >>> On Tue, Jun 27, 2017 at 2:06 AM, Marek Vasut <marex at denx.de> wrote:
> >>>> On 06/24/2017 03:53 AM, Bin Meng wrote:
> >>>>> Hi Marek,
> >>>>>
> >>>>> On Sat, Jun 24, 2017 at 1:59 AM, Marek Vasut <marex at denx.de> wrote:
> >>>>>> On 06/23/2017 11:54 AM, Bin Meng wrote:
> >>>>>>> USB 3.0 hub port status field has different bit positions from 2.0
> >>>>>>> hubs. Since U-Boot only understands the old version, translate the
> >>>>>>> new one into the old one.
> >>>>>>
> >>>>>> This is quite hairy. I'd rather see some protocol version agnostic flag
> >>>>>> field rather than patching the wPortStatus and co.
> >>>>>>
> >>>>>
> >>>>> I am not sure how do do that in a clean way. If we return the raw 3.0
> >>>>> hub port status data, that means we need change lot of hub codes here
> >>>>> and there to do different parsing.
> >>>>
> >>>> How does Linux handle this?
> >>>
> >>> Looks Linux is doing different parsing depending on hub is 3.0 or 2.0,
> >>> at least for the power bit that I was just looking at. Do you want to
> >>> do that?
> >>
> >> OK, I will do something similar like Linux in v2.
> >
> > Thanks
>
> After I checked Linux codes in depth, it looks current way of handling
> 3.0 port status translation in this patch is the minimum way to fix
> the 3.0 hub port status problem in U-Boot. What Linux does is, one
> xHCI controller registers two buses, that one is USB 3.0 and the other
> is USB 2.0. All 3.0 devices will only show on the 3.0 bus, while all
> 1.0/2.0 devices will show on the 2.0 bus. We can certainly do similar
> thing in U-Boot, but I am afraid that will lead to a overhaul to
> current USB stack and xHCI driver. And most important, that support
> will be only under DM, which is something you don't like to see.

IMO we should not be adding features to non-DM USB.

Anyway:

Reviewed-by: Simon Glass <sjg at chromium.org>


More information about the U-Boot mailing list