From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id C995EC54EE9 for ; Tue, 27 Sep 2022 12:22:34 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232328AbiI0MWc (ORCPT ); Tue, 27 Sep 2022 08:22:32 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36936 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230307AbiI0MWG (ORCPT ); Tue, 27 Sep 2022 08:22:06 -0400 Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BD8A85725A; Tue, 27 Sep 2022 05:21:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1664281310; x=1695817310; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=XpkDDEEchrcj3F5SD5RBgWCP709u3VmyVEynWHWmfZE=; b=Ut1Blr3b8nJp5q9DiiV17rKU+3B1SphfJIahvWX4W5622+57RDgaRTQA UCbRG7gv5oc0/XjhbxUyznya5HqMKQoq/kv5y39TtUfu5HyCIhxm6bA8g vNlgB1LTIif45EDmptfaFzGJnACePMNTu+MB/kqg7cY1bBZ4y9NGMvKlB F8VbWcYpZyStdZmrDgrJmpUrRlA1q9LO6E4QmwTjRID2FFwO6TSVYwzET kEeEtbItNvGhmhxPZ7dERi8AID8dsL1wZUqKDdyi4+p9mgJWqPrTvR5mZ 8SNYrUXCbdgeWh1+ODzb1itimgUQ+qNMeLVEQwpb3aobDCm55wBX25rWt w==; X-IronPort-AV: E=McAfee;i="6500,9779,10482"; a="288452433" X-IronPort-AV: E=Sophos;i="5.93,349,1654585200"; d="scan'208";a="288452433" Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by orsmga101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 27 Sep 2022 05:21:50 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6500,9779,10482"; a="725492545" X-IronPort-AV: E=Sophos;i="5.93,349,1654585200"; d="scan'208";a="725492545" Received: from smile.fi.intel.com ([10.237.72.54]) by fmsmga002.fm.intel.com with ESMTP; 27 Sep 2022 05:21:47 -0700 Received: from andy by smile.fi.intel.com with local (Exim 4.96) (envelope-from ) id 1od9ar-008RLy-1N; Tue, 27 Sep 2022 15:21:45 +0300 Date: Tue, 27 Sep 2022 15:21:45 +0300 From: Andy Shevchenko To: Andrey Smirnov Cc: Ferry Toth , Greg Kroah-Hartman , Felipe Balbi , Thinh Nguyen , linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org, Thinh Nguyen , Sven Peter Subject: Re: [PATCH v4] usb: dwc3: Don't switch OTG -> peripheral if extcon is present Message-ID: References: <691c3073-5105-9a2b-e6f2-ea0a4b8aaea8@gmail.com> <966ef528-455c-5180-fc63-ea77cb933af1@gmail.com> <331b5644-e204-8915-cd08-bd4fabbfcb49@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Sep 26, 2022 at 11:31:58AM -0700, Andrey Smirnov wrote: > On Mon, Sep 26, 2022 at 3:19 AM Andy Shevchenko > wrote: > > On Sun, Sep 25, 2022 at 10:43:07PM -0700, Andrey Smirnov wrote: > > > On Sun, Sep 25, 2022 at 12:21 PM Ferry Toth wrote: ... > > > IMHO instead of trying to rush something in it be prudent to revert my > > > patch _and_ address the fact that above patch was lost during the > > > merge (Andy's revert needs to be updated) > > > > I'm not an expert in your fixes for DWC3, so please come up with > > the solution sooner than later, otherwise I will try to get my > > reverts into the final release, because they obviously fix the > > regression. > > You don't need to be an expert here. All that's required is that your > revert get the code to look like it looks in > > https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?h=v6.0-rc6&id=ab7aa2866d295438dc60522f85c5421c6b4f1507 > > so the last hunk in your patch instead of looking like: > > @@ -538,6 +584,10 @@ int dwc3_drd_init(struct dwc3 *dwc) > { > int ret, irq; > > + dwc->edev = dwc3_get_extcon(dwc); > + if (IS_ERR(dwc->edev)) > + return PTR_ERR(dwc->edev); > + > if (ROLE_SWITCH && > device_property_read_bool(dwc->dev, "usb-role-switch")) > return dwc3_setup_role_switch(dwc); > > should look like > > @@ -538,6 +584,10 @@ int dwc3_drd_init(struct dwc3 *dwc) > { > int ret, irq; > > if (ROLE_SWITCH && > device_property_read_bool(dwc->dev, "usb-role-switch")) > return dwc3_setup_role_switch(dwc); > > + dwc->edev = dwc3_get_extcon(dwc); > + if (IS_ERR(dwc->edev)) > + return PTR_ERR(dwc->edev); > + > > Can you update your series accordingly or do you need me to do that? I > won't have the cycles until the end of the week (Sat). Thanks for elaboration. I will do it (hopefully today). -- With Best Regards, Andy Shevchenko