Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp3472219imu; Sun, 11 Nov 2018 15:53:51 -0800 (PST) X-Google-Smtp-Source: AJdET5cl0d64tIFe/xDOBDYuCDH2adWVGL5WTUiCdidWtUHL/XFm+LqLQeXGnAhUHLhgzcmpzf4C X-Received: by 2002:a63:1b1f:: with SMTP id b31mr15361926pgb.66.1541980431869; Sun, 11 Nov 2018 15:53:51 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1541980431; cv=none; d=google.com; s=arc-20160816; b=wuMmrv0RkXxKdSR5AP11XMbE/KgJhJ4T4MJVihx1d9FmSe/NvDLDIdIPdo0HK9Dmkv zslARVlg6jUqF/UwpO1W3j67Vo3n7gP4H4T7TuH5tMDn61hwj/tcDI3vd6gebP37A60M zzn7zwM5xiW8UM0qT91ClxFHzYygnCSV3hhtH0z/g/zL1s5IRPItKrOX7EAQnppniDX2 L/eLfH38aNPLnOM7nQF6zfHBpjSj8HSz8KZUzpetPsLKrgJEIB1ooCpSCTujylYFfPXk BpQ79WlBTJMEli0LYvwn/n1j4nb1GBfY80xPMy8xL4gI80JlB+MJKR71GPg9LSr8NKFr G9fg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=aWdii/qb7BbkZTajBj1HFhh81B1/sytT4jLGty0/AQ4=; b=eDWEXl9vODE2tePARpxdsJ4pZcJ921MlUYvxl5YY3E2+XdbTR74LOqgta14rNLyW0E Y/TPple2tRsTeY1Xa3keaVaSN7cwiuxvAexwc6HTWnce7qMBq1ChODaIt4qfzJu2Ezgz cF0cwVUHT9x22voPDcCNmm83SnHf4RJbvMyMwIb7hCciy+Koi8yxGbkolxEJnyzB5lqZ hjN9MpPqd6p2BJNtbuViRmbO/9JHKY11DwMMHTe3Bq+qdtmFUr9dTDayWK1VakxMGKTx t125mZxtMPZvsRxk9uvNRATUfA1xPhC1SbVvRGUPCCAzuXrv74//v/R67ztCXIMKgfTV GXLw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=P+95XI51; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id s192si15058422pgc.144.2018.11.11.15.53.36; Sun, 11 Nov 2018 15:53:51 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=P+95XI51; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1733043AbeKLJng (ORCPT + 99 others); Mon, 12 Nov 2018 04:43:36 -0500 Received: from mail-qk1-f193.google.com ([209.85.222.193]:44871 "EHLO mail-qk1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732794AbeKLJng (ORCPT ); Mon, 12 Nov 2018 04:43:36 -0500 Received: by mail-qk1-f193.google.com with SMTP id n12so10614351qkh.11 for ; Sun, 11 Nov 2018 15:53:14 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=aWdii/qb7BbkZTajBj1HFhh81B1/sytT4jLGty0/AQ4=; b=P+95XI51NTK0orYCAypZgCjmq8DZwcVvzEgmVhQPV9do2Vvr6T0yvo9rCgyml8a8VN dvgFV7OhVZKKpbRwluJR/fWpjpcVwoc5ooo25CBTqssNitrWHazNWmKFTLLRosdnXOKZ 7JCdePW4zYcd5IK3N+zbQrUCXdQcpVYvcvRGd5eszm7zBm1AZsgd58TU1fj038ERAP7B hzK9IOIf6qA7Mu1hNjig2JVtoTu0NCKsjgUM+jdh6XtG1YT9VptzgKxVpzyjzBMTXE2F jl+iSqor6DYVSKfLTxK9JTvvjBl/hmt4sJiYKAY4hFFAHj/P49GPGTtZpyqlLsYE+K4F B6fA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=aWdii/qb7BbkZTajBj1HFhh81B1/sytT4jLGty0/AQ4=; b=kHnIk2V64QlD85HcUXLDpeEkd4cT6ORQjZ1x/AmVjfb6ECMRnu7nR6GY7CMd5f8eSa 7TCaDoS0XLQATc4iNn8RtFKkY3PT+fPJ04DELYbaOe14wkPjZN2EY5FGweC/GHHN0w66 PkU6mTPxfxSgvgJDUrNy4H227+JdFu1ftG3AXVJ2u9BCzhwaAKi5BAMDqnKkUedU4OwK sYm1BZfe9detZf6ldQ2Io56wthAErHHgkq58MsFQJy7UrqqnRtEx0CeR4eqMwuPV/ziH 5qMVxtEwCbprWQJxfc7CHh4RixyCyk3toV5Zj/3Iw3wFwXzkOeoXRY0xy+DfRXJZXbBq Y07w== X-Gm-Message-State: AGRZ1gKUHNqEKltsNGj3kITAQRPmI9jH8xGunNzetXxWkOAX5JbcvVub P+402pp6N31fpSYi3i+JnbCvdbBJRdEWWoJ781c= X-Received: by 2002:a0c:d268:: with SMTP id o37mr17450613qvh.136.1541980393742; Sun, 11 Nov 2018 15:53:13 -0800 (PST) MIME-Version: 1.0 References: <20181110181101.24557-1-andriy.shevchenko@linux.intel.com> In-Reply-To: From: Andy Shevchenko Date: Mon, 12 Nov 2018 01:53:02 +0200 Message-ID: Subject: Re: [PATCH v1 1/5] drivercore: Revert "deferral race condition fix" To: Rob Herring Cc: Andy Shevchenko , "Rafael J. Wysocki" , Greg Kroah-Hartman , Linux Kernel Mailing List , Hans de Goede , Peter Ujfalusi , Andrzej Hajda , grant.likely@arm.com Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sun, Nov 11, 2018 at 9:26 PM Rob Herring wrote: > On Sun, Nov 11, 2018 at 7:04 AM Andy Shevchenko > wrote: > > I seems Grant's mail delivery bounces messages. I delibirately reduced > > the Cc list for sake of ping Grant in case it would pass. > > That would be because he is not at Linaro anymore. Added his ARM account. Thanks! > > On Sat, Nov 10, 2018 at 8:12 PM Andy Shevchenko > > wrote: > > > > > > Consider the following scenario. > > > > > > There are two independent devices coupled together by functional dependencies: > > > - USB OTG (dwc3-pci) > > > - extcon (tested with extcon-intel-mrfld, not yet in upstream) > > > > > > Each of the driver services a corresponding device is built as a module. In the > > > Buildroot environment the modules are probed by alphabetical ordering of their > > > modaliases. The latter comes to the case when USB OTG driver will be probed > > > first followed by extcon one. > > > > > > So, if the platform anticipates extcon device to be appeared, in the above case > > > we will get deferred probe of USB OTG, because of ordering. > > > > > > Now, a cherry on top of the cake, the deferred probing list contains > > > the only two modules, i.e. USB OTG and extcon. Due to above circumstances, > > > values in the local_trigger_count and deferred_trigger_count are not the same, > > > and thus provokes deferred probe triggering again and again. > > > > > > ... > > > [ 20.678332] platform dwc3.0.auto: Retrying from deferred list > > > [ 20.694743] platform dwc3.0.auto: Driver dwc3 requests probe deferral > > > [ 20.701254] platform dwc3.0.auto: Added to deferred list > > > [ 20.706620] platform dwc3.0.auto: driver_deferred_probe_add_trigger 1 2 > > > [ 20.713732] platform dwc3.0.auto: Retrying from deferred list > > > [ 20.730035] platform dwc3.0.auto: Driver dwc3 requests probe deferral > > > [ 20.736540] platform dwc3.0.auto: Added to deferred list > > > [ 20.741889] platform dwc3.0.auto: driver_deferred_probe_add_trigger 3 4 > > > [ 20.748991] platform dwc3.0.auto: Retrying from deferred list > > > [ 20.765416] platform dwc3.0.auto: Driver dwc3 requests probe deferral > > > [ 20.771914] platform dwc3.0.auto: Added to deferred list > > > [ 20.777279] platform dwc3.0.auto: driver_deferred_probe_add_trigger 5 6 > > > ... > > > > > > Deeper investigation shows the culprit commit 58b116bce136 > > > ("drivercore: deferral race condition fix") which was dedicated to fix some > > > other issue while bringing a regression. > > > > > > This reverts commit 58b116bce13612e5aa6fcd49ecbd4cf8bb59e835 for good until > > > we will have better solution. > > How is behavior that's been there for 4.5 years a regression? Aren't > we going to break Davinci that this commit was supposed to fix? What > else could be relying on current behavior? I guess we are purerly on a side of luck. I don't remember people build usb and extcon as modules and using Buildroot, or anything that probes modules let's say,in "arbitrary" way. (That is one of the reason why I didn't dare to put Fixes tag there). Nevertheless, I have actual issue. I'm all ears to know about another possibility how to fix the issue on my side. -- With Best Regards, Andy Shevchenko