From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751761AbcELEAj (ORCPT ); Thu, 12 May 2016 00:00:39 -0400 Received: from relmlor4.renesas.com ([210.160.252.174]:29383 "EHLO relmlie3.idc.renesas.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1750711AbcELEAh convert rfc822-to-8bit (ORCPT ); Thu, 12 May 2016 00:00:37 -0400 X-IronPort-AV: E=Sophos;i="5.22,559,1449500400"; d="scan'208";a="210669242" From: Yoshihiro Shimoda To: Alan Stern , Roger Quadros , "Rob Herring" CC: "peter.chen@freescale.com" , "balbi@kernel.org" , "gregkh@linuxfoundation.org" , "dan.j.williams@intel.com" , "jun.li@freescale.com" , "mathias.nyman@linux.intel.com" , "tony@atomide.com" , "Joao.Pinto@synopsys.com" , "abrestic@chromium.org" , "linux-usb@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "linux-omap@vger.kernel.org" , "devicetree@vger.kernel.org" Subject: RE: [PATCH v7 10/14] usb: otg: add hcd companion support Thread-Topic: [PATCH v7 10/14] usb: otg: add hcd companion support Thread-Index: AQHRpGzxyill0Ohb6kCn6iLmAkYtup+oxaEAgAAIdwCACwJQAIAABUeAgAAJgQCAANCUIA== Date: Thu, 12 May 2016 04:00:29 +0000 Message-ID: References: <57333DFF.3090609@ti.com> In-Reply-To: Accept-Language: ja-JP, en-US Content-Language: ja-JP X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: rowland.harvard.edu; dkim=none (message not signed) header.d=none;rowland.harvard.edu; dmarc=none action=none header.from=renesas.com; x-originating-ip: [211.11.155.144] x-ms-office365-filtering-correlation-id: 01af1d76-8cc9-42ef-8dc2-08d37a19f581 x-microsoft-exchange-diagnostics: 1;SG2PR06MB0919;5:p29LE4QSLiRdil/64tcxUglWaKi3X/ibSttnMKHob9I3ubvIM4t7u3IZ6WVqKGbqAHlT0tb/FEZQ2xe+d2DJnO7cMz4pcGkZ+Vu3yHUGtW7MKtOwqHlYAvemquNl4qOaDdg+/1uciK1Y4XX+jc63cw==;24:4p2xG4d8VnoK40LGRcHdqgGxNQEVu0tYZ4oXrVrLGxDz1FMs+ddYgZQrXSsG7pnZnKaPC4qV3N5SEiIgVRu+vWM1ksRC0XfRf0VO2zJiyJo=;7:Kpp25GPcrMSJ05zolRRoQNBAHf9sluwldCP6Bv2O/U3hd++Lh5OYVhP7FICHfxghmI3MX3wabx9vJ3OKqPQi1ByO321IcsqnVCSpacocHl2Z/mxisJeJBslJMOLua2L6VVogj0maun8RdcKp5n+0MXxYUmatuUGqwmsD7HiULNFU1lzrSi/IB3Rj9BaEk+sj;20:+qrFM7w8G2BcQwe1KRohPBZd4tPaMWXCDLSmx1biC5st6rW/PoiWRlDSuWGU3t9bMKhgfmUZ4xYXNbgYmXDxuY0EqruFaJkFjo7zYGYvGmJxsmWcx28rKfo4KJzwVaSKQ+7d+9LJISqAepgUE9mIG8w2xSYwMswpjjV8WS5DTeM= x-microsoft-antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:SG2PR06MB0919; x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:; x-exchange-antispam-report-cfa-test: BCL:0;PCL:0;RULEID:(601004)(2401047)(5005006)(8121501046)(3002001)(10201501046)(6055026);SRVR:SG2PR06MB0919;BCL:0;PCL:0;RULEID:;SRVR:SG2PR06MB0919; x-forefront-prvs: 0940A19703 x-forefront-antispam-report: SFV:NSPM;SFS:(10019020)(6009001)(377454003)(24454002)(122556002)(2171001)(87936001)(5002640100001)(8936002)(10400500002)(92566002)(86362001)(2950100001)(2900100001)(77096005)(76176999)(50986999)(54356999)(189998001)(5001770100001)(33656002)(74316001)(66066001)(586003)(5008740100001)(11100500001)(102836003)(5004730100002)(3846002)(6116002)(106116001)(1220700001)(4326007)(81166006)(9686002)(3280700002)(2906002)(3660700001)(5003600100002)(345774005)(76576001)(7059030);DIR:OUT;SFP:1102;SCL:1;SRVR:SG2PR06MB0919;H:SG2PR06MB0919.apcprd06.prod.outlook.com;FPR:;SPF:None;MLV:sfv;LANG:en; spamdiagnosticoutput: 1:23 spamdiagnosticmetadata: NSPM Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 8BIT MIME-Version: 1.0 X-OriginatorOrg: renesas.com X-MS-Exchange-CrossTenant-originalarrivaltime: 12 May 2016 04:00:29.9957 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 53d82571-da19-47e4-9cb4-625a166a4a2a X-MS-Exchange-Transport-CrossTenantHeadersStamped: SG2PR06MB0919 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, > From: Alan Stern > Sent: Wednesday, May 11, 2016 11:47 PM > > On Wed, 11 May 2016, Roger Quadros wrote: > > > > What I mean is if you have 2 EHCI controllers with 2 companion > > > controllers, don't you need to know which companion goes with which EHCI > > > controller? Just like you do for the otg-controller property. > > > > > > > That is a very good point. I'm not very sure and it seems that current code won't work > > with multiple EHCI + companion instances. I may misunderstand this topic, but if I use the following environment, it works correctly. < My environment > - an otg controller: Sets hcd-needs-companion. - ehci0 and ohci0 and a function: They connect to the otg controller using "otg-controller" property. - ehci1 and ohci1: No "otg-controller" property. - ehci2 and ohci2: No "otg-controller" property. In this environment, all hosts works correctly. Also I think if we have 2 otg controlelrs, it should be work because otg_dev instance differs. Or, does this topic assume an otg controller handles 2 EHCI controllers? I'm not sure such environment actually exists. > > Alan, does USB core even know which EHCI and OHCI are linked to the same port > > or the handoff is software transparent? > > The core knows. It doesn't use the information for a whole lot of > things, but it does use it in a couple of places. Search for > "companion" in core/hcd-pci.c and you'll see. Thank you for the information. I didn't know this code. If my understanding is correct, the core/hcd-pci.c code will not be used by non-PCI devices. In other words, nobody sets "hcd->self.hs_companion" if we use such a device. So, I will try to add such a code if needed. Best regards, Yoshihiro Shimoda > Alan Stern