From owner-freebsd-current@FreeBSD.ORG Mon Jan 23 17:31:28 2012 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0023F106566B for ; Mon, 23 Jan 2012 17:31:27 +0000 (UTC) (envelope-from hselasky@c2i.net) Received: from swip.net (mailfe06.c2i.net [212.247.154.162]) by mx1.freebsd.org (Postfix) with ESMTP id 89F8A8FC0A for ; Mon, 23 Jan 2012 17:31:27 +0000 (UTC) X-T2-Spam-Status: No, hits=0.5 required=5.0 tests=ALL_TRUSTED, BAYES_60 Received: from [188.126.198.129] (account mc467741@c2i.net HELO laptop002.hselasky.homeunix.org) by mailfe06.swip.net (CommuniGate Pro SMTP 5.4.2) with ESMTPA id 230006553; Mon, 23 Jan 2012 18:31:23 +0100 From: Hans Petter Selasky To: freebsd-current@freebsd.org Date: Mon, 23 Jan 2012 18:29:19 +0100 User-Agent: KMail/1.13.5 (FreeBSD/8.2-STABLE; KDE/4.4.5; amd64; ; ) References: <20120123.171246.321689433999174416.okuno.kohji@jp.panasonic.com> In-Reply-To: <20120123.171246.321689433999174416.okuno.kohji@jp.panasonic.com> X-Face: 'mmZ:T{)),Oru^0c+/}w'`gU1$ubmG?lp!=R4Wy\ELYo2)@'UZ24N@d2+AyewRX}mAm; Yp |U[@, _z/([?1bCfM{_"B<.J>mICJCHAzzGHI{y7{%JVz%R~yJHIji`y>Y}k1C4TfysrsUI -%GU9V5]iUZF&nRn9mJ'?&>O MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <201201231829.19576.hselasky@c2i.net> Cc: Kohji Okuno Subject: Re: Is UPS_PORT_POWER wrong? X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 23 Jan 2012 17:31:28 -0000 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