Received: by 2002:a05:6359:c8b:b0:c7:702f:21d4 with SMTP id go11csp867115rwb; Thu, 22 Sep 2022 07:22:05 -0700 (PDT) X-Google-Smtp-Source: AMsMyM4nvpAgBxzNO3HvzaVt/8wmUptfrX0hyHNNkb5L9/XGhSiGmifcfL5YTnaS17UKMQaf29HK X-Received: by 2002:a17:906:730b:b0:782:2eaf:a4ad with SMTP id di11-20020a170906730b00b007822eafa4admr3217967ejc.27.1663856524878; Thu, 22 Sep 2022 07:22:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1663856524; cv=none; d=google.com; s=arc-20160816; b=UhvQblo/d2fLhOjXb+Ai5aVh7ydUHAdr0mOjdORe2o2VzETOf8o/1gEnajW51Y91Xy RYIG4dJ3rjR1e7Ayeo5UeT6BG/An16u5T0SO31ACsfjXyDzIPqrfkh1a2L0xT4N0Dqdm fvSSRwuGbDAU4Fju4xcwNNBHdq/1YgzYn7Ym22zgh+1nNuoZsni6Em7cktVUox4Yi1Gl IeBYut1/MXuvw6pf15Fn3gQ8YN3hePZUpvzseAauw799gnlQLR3VfhRae9ivX1v1T7k8 AZGPlVExHfSNSUDFlK7e1ITJjK2+O/7aCeNMCFCF79eXSp/y7xlKPxrFvhO30kqNO6m2 bHPQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:organization:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=YoKwNQEqIhsSOqO9wPC6/z34if8fJgSTOhbc6KNTi8o=; b=ljgGDHQefy4sx1KvIS7gIaFFSckv6ODnMGIcz/og/U9yJxa0AuL5qsO2isWkutZAW/ BP46MVFQMuEqZEm12LizxvVDF+dhZPE7PcbjINEQfdXhAr0zoOvoeEX1V3oS5G9tHG7Z p+G3Wrxe3m+RuNF+a8he7klmvMfWg3y/gkHTyDdeqA3n2w1lv1P984Z+NBw9V4YpQsKs 8MRJN2t+hck07VQ+KTulrgp2g807JKf46R9QeTkkt9PWCx9SzA6cEBPpqWRuXEynwETj 3/yTGBHfNOdGZtzufIAJBe69eQ3YWuwxhBr7zkK/NigGjP4O+B0ZHXuRdDFDaLUguOO7 mwAQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=ehaBS3km; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id ds4-20020a170907724400b00782627f37d6si1505536ejc.778.2022.09.22.07.21.33; Thu, 22 Sep 2022 07:22:04 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=ehaBS3km; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231438AbiIVN3W (ORCPT + 99 others); Thu, 22 Sep 2022 09:29:22 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53576 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229482AbiIVN3S (ORCPT ); Thu, 22 Sep 2022 09:29:18 -0400 Received: from mga12.intel.com (mga12.intel.com [192.55.52.136]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 98EE7D4DC0; Thu, 22 Sep 2022 06:29:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1663853357; x=1695389357; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=tVGkqZN8/I2ZkWPaWKkB3VtQaTi/1qyFWSRkCXAmu1g=; b=ehaBS3kmhZKjZuQ+Wzi5KSCZS7bVF+mxQ8NICanJOeVdhZdqiaBLpBin YPo1h1zaGirM0Gi+pumBO8zWJ9IOXjLqfLYKykhAgMpkIVuMCey2sH2G4 OIyjcitqvnaMBqpnVUH4MN21iyulH/OrqP9j0pC4QIPkx17VJADCnI2EL LKFOq7R+m2Z6vEwIaHhsi0dyb12M+/5oxL+7FOQoL0kmfkzZE8QCMsTXt 6UBaiy7AcMnLRUhU9RyFCXjlX3dQYS88dtRtAeefCkOlBjcE1q7oDv9Tg zy6qSVnHqWSG4H6tXuP4owVJBIELaWOf6VaEGyu2ufgJmKMZCinfn0bzy g==; X-IronPort-AV: E=McAfee;i="6500,9779,10478"; a="280014094" X-IronPort-AV: E=Sophos;i="5.93,335,1654585200"; d="scan'208";a="280014094" Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga106.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 22 Sep 2022 06:29:17 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.93,335,1654585200"; d="scan'208";a="762182614" Received: from smile.fi.intel.com ([10.237.72.54]) by fmsmga001.fm.intel.com with ESMTP; 22 Sep 2022 06:29:13 -0700 Received: from andy by smile.fi.intel.com with local (Exim 4.96) (envelope-from ) id 1obMGO-006198-0F; Thu, 22 Sep 2022 16:29:12 +0300 Date: Thu, 22 Sep 2022 16:29:11 +0300 From: Andy Shevchenko To: Ferry Toth Cc: Andrey Smirnov , Greg Kroah-Hartman , Felipe Balbi , Thinh Nguyen , linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org, Thinh Nguyen Subject: Re: [PATCH v4] usb: dwc3: Don't switch OTG -> peripheral if extcon is present Message-ID: References: <20220403164907.662860-1-andrew.smirnov@gmail.com> <691c3073-5105-9a2b-e6f2-ea0a4b8aaea8@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <691c3073-5105-9a2b-e6f2-ea0a4b8aaea8@gmail.com> Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, SPF_HELO_PASS,SPF_NONE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Sep 22, 2022 at 12:23:04PM +0200, Ferry Toth wrote: > On 22-09-2022 12:08, Andy Shevchenko wrote: > > On Sun, Apr 03, 2022 at 09:49:07AM -0700, Andrey Smirnov wrote: > > > If the extcon device exists, get the mode from the extcon device. If > > > the controller is DRD and the driver is unable to determine the mode, > > > only then default the dr_mode to USB_DR_MODE_PERIPHERAL. > > According to Ferry (Cc'ed) this broke Intel Merrifield platform. Ferry, can you > > share bisect log? > > I can but not right now. But what I did was bisect between 5.18.0 (good) and > 5.19.0 (bad) then when I got near the culprit (~20 remaining) based on the > commit message I tried 0f01017191384e3962fa31520a9fd9846c3d352f "usb: dwc3: > Don't switch OTG -> peripheral if extcon is present" (bad) and commit before > that (good). > > The effect of the patch is that on Merrifield (I tested with Intel Edison > Arduino board which has a HW switch to select between host and device mode) > device mode works but in host mode USB is completely not working. > > Currently on host mode - when working - superfluous error messages from > tusb1210 appear. When host mode is not working there are no tusb1210 > messages in the logs / on the console at all. Seemingly tusb1210 is not > probed, which points in the direction of a relation to extcon. > > > Taking into account the late cycle, I would like to revert the change. And > > Ferry and I would help to test any other (non-regressive) approach). > I have not yet tested if a simple revert fixes the problem but will tonight. For clean revert you might need to revert the merge conflict fixes first: 8bd6b8c4b100 ("USB: fixup for merge issue with "usb: dwc3: Don't switch OTG -> peripheral if extcon is present""). > I would be happy to test other approaches too. -- With Best Regards, Andy Shevchenko