Received: by 2002:a25:868d:0:0:0:0:0 with SMTP id z13csp611597ybk; Wed, 13 May 2020 08:29:01 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwEfdDsM7wCvk7nw2s2ObUqhnwmgTvWQIdROl85CQLUyYHYy3SmGfadntUO0ZVr8RgOqwim X-Received: by 2002:a17:906:2f90:: with SMTP id w16mr11322932eji.252.1589383741481; Wed, 13 May 2020 08:29:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1589383741; cv=none; d=google.com; s=arc-20160816; b=OiOBmF8zfkekBqMnO3sfQK1pPk26FHQegO1hkiJDG66le3Gv99DlxtdF9FzGQc5D6E AToV1j01A1yAsz0zAxLXx68Hq86WRmw5iNZE9wTZoIy3ebs8n5mNjfmMnmfSD1wG7sK3 IEqwDZHSnVGYmO2+0hsjkMI22BuBJr/WT/rV4Mgir+eJXdiKNwg0rm1WKIm7fvgVPXJN JM1mdFBPyQ0NPlZpQH6zP3H2gb5E5ONcQazk5lY9pgYAB0KZ4Fhz53gFiwjcKYFq4b1H nYEOyrhmiKYiBgMnm0ulHr1Vyx/klhSbKa2xttQnccPvgfkjTxoMeouAlfAdr/6L80o/ wiIw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:organization:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:ironport-sdr:ironport-sdr; bh=vnZIwatwu5IF9b6m5NwQ9++MOeay7kNggDN/RJ8ZQpY=; b=PVE4TQ9TAl/8hESIO8/kSZXI3stpVTqMqBG0dfka4X7tAHvNO+qb00WRuOvkp3BR+V DlNtp0GHH37bZ5F0uEuF4DwYk19m/mO5sVSszyRzzgDOgMKpJs6WnVyj0ny/uwaqwjfy ZVY2Hk2zuzv+fENa6CkU5iFIPJ7YnlZhqqOnc9tzr4INDHZ6PEeuSSqLMBLGTGiCNksX SS0Dw+HBOEEc1R18Ql1rVQSHlwnaDbsS1bXJS/vjWr6A/LOQFMHCUq6WskfVEE7kTsef x7dxNlSc+2NMv5ANWeq2P6KVX0evUgCrvpK7ijPjlCBJGr0hD5O05NWYXLkb+/+C7f1M dFaA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id z8si2478ejp.460.2020.05.13.08.28.37; Wed, 13 May 2020 08:29:01 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2389252AbgEMP0P (ORCPT + 99 others); Wed, 13 May 2020 11:26:15 -0400 Received: from mga12.intel.com ([192.55.52.136]:5095 "EHLO mga12.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732300AbgEMP0O (ORCPT ); Wed, 13 May 2020 11:26:14 -0400 IronPort-SDR: 10LHBv/gr9H30UxboA5GwFTYwIqF34ZvabE/C6gG9gfW9qgmxwbqU1P0l2gY63YOpHOmqpyB4/ dutQpTq9ip4Q== X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by fmsmga106.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 13 May 2020 08:26:13 -0700 IronPort-SDR: lpwA1behfMK+YoTYrewJdqYqqwJnbTOvkihSrV8etO4S7L7OrLHQ5L8WJd8nkhoMvqurgnnLd8 ugv8/0/nSPbQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.73,388,1583222400"; d="scan'208";a="253223172" Received: from smile.fi.intel.com (HELO smile) ([10.237.68.40]) by fmsmga008.fm.intel.com with ESMTP; 13 May 2020 08:26:11 -0700 Received: from andy by smile with local (Exim 4.93) (envelope-from ) id 1jYtGv-006Rs4-KZ; Wed, 13 May 2020 18:26:13 +0300 Date: Wed, 13 May 2020 18:26:13 +0300 From: Andy Shevchenko To: Florian Fainelli Cc: Greg Kroah-Hartman , Al Cooper , linux-kernel@vger.kernel.org, Alan Stern , bcm-kernel-feedback-list@broadcom.com, devicetree@vger.kernel.org, Krzysztof Kozlowski , linux-usb@vger.kernel.org, Mathias Nyman , Rob Herring , Yoshihiro Shimoda Subject: Re: [PATCH v10 1/5] usb: xhci: Change the XHCI link order in the Makefile Message-ID: <20200513152613.GR185537@smile.fi.intel.com> References: <20200512150019.25903-1-alcooperx@gmail.com> <20200512150019.25903-2-alcooperx@gmail.com> <20200513122613.GA1023594@kroah.com> <7acc2a4c-caab-11e7-7b3f-4176f19c58cf@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <7acc2a4c-caab-11e7-7b3f-4176f19c58cf@gmail.com> Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, May 13, 2020 at 08:08:07AM -0700, Florian Fainelli wrote: > On 5/13/2020 5:26 AM, Greg Kroah-Hartman wrote: > > On Tue, May 12, 2020 at 11:00:15AM -0400, Al Cooper wrote: > >> Some BRCMSTB USB chips have an XHCI, EHCI and OHCI controller > >> on the same port where XHCI handles 3.0 devices, EHCI handles 2.0 > >> devices and OHCI handles <2.0 devices. Currently the Makefile > >> has XHCI linking at the bottom which will result in the XHIC driver > >> initalizing after the EHCI and OHCI drivers and any installed 3.0 > >> device will be seen as a 2.0 device. Moving the XHCI linking > >> above the EHCI and OHCI linking fixes the issue. > > > > What happens if all of these are modules and they are loaded in a > > different order? This makefile change will not help with that, you need > > to have logic in the code in order to properly coordinate this type of > > mess, sorry. > > I believe we should be using module soft dependencies to instruct the > module loaders to load the modules in the correct order, so something > like this would do (not tested) for xhci-plat-hcd.c: > > MODULE_SOFTDEP("post: ehci-hcd ohci-hcd"); > > and I am not sure whether we need to add the opposite for ehci-hcd and > ohci-hcd: > > MODULE_SOFTDEP("pre: xhci-plat-hcd"); JFYI: not all user space support this (alas, but that's current state of affairs), OTOH I don't really care about those which do not support it (Busybox). -- With Best Regards, Andy Shevchenko