Is UPS_PORT_POWER wrong?

Hans Petter Selasky hselasky at c2i.net
Mon Jan 23 17:31:28 UTC 2012


On Monday 23 January 2012 09:12:46 Kohji Okuno wrote:
> Hi HPS,
> 
> I think that UPS_PORT_POWER and UPS_PORT_LINK_STATE overlap.
> And, in xhci.c you set UPS_PORT_POWER as folows.
> 
> When UPS_PORT_POWER is set, UPS_PORT_LINK_STATE_GET() macro will
> return incorrect value.
> 
>                 if (v & XHCI_PS_PP) {
>                         /*
>                          * The USB 3.0 RH is using the
>                          * USB 2.0's power bit
>                          */
>                         i |= UPS_PORT_POWER;
>                 }
> 

Hi,

The USB 3.0 root HUB is special because it defines FULL/HIGH and LOW speed, so 
I had to merge that into the port status register of the XHCI root HUB like 
this:

0: CONNECT_STATUS
1: PORT_ENABLED
2: SUSPEND
3: OVERCURRENT_INDICATOR
4: LINK STATE (USB 3.0)
5: -
6: -
7: -
8: PORT_POWER (USB 2.0)
# Bit 9+10 have 4 combinations which are defined: FS, LW, HS, SS
9: LOW_SPEED (USB 2.0)
10: HIGH_SPEED (USB 2.0)
11: not implemented
12: PORT_INDICATOR
13:
14:
15: MODE_DEVICE (FreeBSD specific)

If you have a better idea, it is possible to change this.

--HPS


More information about the freebsd-current mailing list