Received: by 2002:a05:6359:c8b:b0:c7:702f:21d4 with SMTP id go11csp970055rwb; Thu, 22 Sep 2022 08:32:00 -0700 (PDT) X-Google-Smtp-Source: AMsMyM7XbW2JkETCvomm7avny/TJMD4/6eLemDXIWcZoCi8N1LocG6xrnb/eBemnbVPCIzf34nju X-Received: by 2002:a17:903:2282:b0:177:faeb:3606 with SMTP id b2-20020a170903228200b00177faeb3606mr3787298plh.135.1663860720479; Thu, 22 Sep 2022 08:32:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1663860720; cv=none; d=google.com; s=arc-20160816; b=nWvD7popUXLp11Vg6pMgSQSWg9gWHpOvrTCjf6/yC+uJCcLAuMW3ZiQ5ZTLXGu30oO jZkpx7w9i5gfIJ8eMBIveFnNeEC5e9fvukV7yW1/QTXiOrMXdB1U0UJ14NleSFaTKrp9 pXFBU9xOxCfjuz044z9cGF3+ekRZyJ0/9YWFOlL8nxYzIgzBHbh/8nOzjNPv+p2Ztgx3 nXj8QLGdd0D1ynyQY7LQc4khnBoyhfTAtqYpEYKGysHisX9qHAdNdtpSx8u0ID72u+wY aOvqR/wd3Q6nHEwdcr36TIFcmohS+fIHUFs8vi0Ql3ROFww/KTMkPAZceiZfpiUfBAuX n7rg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to :content-language:references:cc:to:subject:from:user-agent :mime-version:date:message-id; bh=84ntG6/2Sdng1ZDBJ5X+9ML4LQQJuqQOi5eztAckYiQ=; b=O0ssAiymNR7alQnHa0UrGCkj32iexeKpXcQ46gDuNgK9w+privVM7lVaLyE6CrvzWh yXk6PIzD+cP8Tipa9SsM+afzKBMgqWeRuL/iizOv2qYUHGTMeGRir+aC7Mt7lQiCb4jy znxTZxJWLI7PeGUL/85uX3boZPQaL9qDxSZatRZVoZLv15bcOty4ob9BnNCqLNdMvlze j2CJLNlEhW69kz0mtAY+4EoUglwVwTv+eT56qMCt5yhtfuFyPAC+0EAMT8nTM0p+9IOT PV12FWw3OiggaKosFQh4ti74uwlGBDWJqCkGQrRT7SfA1t8kvwdWksG7YrX97vWmXo6j HHRg== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id g18-20020a056a001a1200b0053abe946910si7027130pfv.349.2022.09.22.08.31.48; Thu, 22 Sep 2022 08:32:00 -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; 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=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230319AbiIVOaS (ORCPT + 99 others); Thu, 22 Sep 2022 10:30:18 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50078 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230257AbiIVOaO (ORCPT ); Thu, 22 Sep 2022 10:30:14 -0400 Received: from radex-web.radex.nl (smtp.radex.nl [178.250.146.7]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 53B8C9C2ED; Thu, 22 Sep 2022 07:30:11 -0700 (PDT) Received: from [192.168.1.35] (cust-178-250-146-69.breedbanddelft.nl [178.250.146.69]) by radex-web.radex.nl (Postfix) with ESMTPS id 1872B2408B; Thu, 22 Sep 2022 16:30:10 +0200 (CEST) Message-ID: Date: Thu, 22 Sep 2022 16:30:09 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.13.0 From: Ferry Toth Subject: Re: [PATCH v4] usb: dwc3: Don't switch OTG -> peripheral if extcon is present To: Andy Shevchenko , Andrey Smirnov Cc: Greg Kroah-Hartman , Felipe Balbi , Thinh Nguyen , linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org, Thinh Nguyen References: <20220403164907.662860-1-andrew.smirnov@gmail.com> Content-Language: en-US In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-1.2 required=5.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, FORGED_GMAIL_RCVD,FREEMAIL_FROM,NICE_REPLY_A,NML_ADSP_CUSTOM_MED, SPF_HELO_NONE,SPF_SOFTFAIL autolearn=no 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 Hi, Resending this due to html reject, sorry. 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. I would be happy to test other approaches too.