Received: by 2002:a05:6358:1087:b0:cb:c9d3:cd90 with SMTP id j7csp1341204rwi; Thu, 13 Oct 2022 12:16:18 -0700 (PDT) X-Google-Smtp-Source: AMsMyM7iJn9iSppnj6iucZqbHyKu9euTbKNO9lG91CdP6x1jxwZFdORGp06pDWJUTTQ2TZt0REXp X-Received: by 2002:a05:6a00:998:b0:563:3428:65a0 with SMTP id u24-20020a056a00099800b00563342865a0mr1037460pfg.22.1665688577999; Thu, 13 Oct 2022 12:16:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1665688577; cv=none; d=google.com; s=arc-20160816; b=amcQd42PgSd3qYNGxZ/Hta50KBUpLyee6U19+ziPEZMJvbwaHZxNCF2EoVLQQX73kA Z/366OWi8aQ+p63RDFACUZJfjXyqL+FvOvJ8IWU91cjgyEKAiskbgzekuuT1RR3xMZLs iiS3Zvf5f0vFdlHxfGP8GcW6OE6jrKhCxdgL5mIgsD0izwBj544KXkNcSRgGV/9wYMM1 sDINH+O8Tr+1xkJS6ytsfQizK9nss5/xq/WcHfZvZEFLoDz2ySMDmIBVNTYMbu22CjAe DuRaxcRxTb/n7iy+TCnUUonltwJMOIu1LftdoxPOTqpqb/K592M5eizFkboPIq30nfZl tXiQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=n6xVL3UlxLU6iy5NOymQXgLssD5FLiavWN35R9FmrRU=; b=Czl387IAYsbWWUF01Fqz1BhwleBpqaFIMG1Kch2HC1dQTy7z8AOX/XJsfHGWkx5KUP 10+MSe44aUlPXJVHuQdSHYdih1O55AqkW1hW/9gav4u32ffNDgT7ppEwmA9c/7SvZ+Vi fTYqvUgZMeyO73pPWsIkKbXD1pDaj1GL/522LUWoGfsUtzoFsv1UTAppI5x9kT9ktfbc OuU70Ws1Ku5y2eRc+kWPIQX1nwNGXbgS2Ak8OrGwuX1eMLp4e5AMxeSyd2MQaOxOLVaG wZgJ/l7+Dh7vzQOwgZLnVF+5AVl974cL6dyso0QLYbAPaK3Ysz0G5caHmpYap9g8lAKI bWKA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=pg2lnftp; 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=linuxfoundation.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id y23-20020aa79437000000b0056187ae2798si163908pfo.179.2022.10.13.12.16.04; Thu, 13 Oct 2022 12:16:17 -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=@linuxfoundation.org header.s=korg header.b=pg2lnftp; 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=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231979AbiJMSjs (ORCPT + 99 others); Thu, 13 Oct 2022 14:39:48 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42170 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232013AbiJMSje (ORCPT ); Thu, 13 Oct 2022 14:39:34 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DFA61E52ED; Thu, 13 Oct 2022 11:37:17 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id B2A68B82088; Thu, 13 Oct 2022 18:01:09 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 20486C433B5; Thu, 13 Oct 2022 18:01:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1665684068; bh=LZaqBYHcuIQk2aCRBz6Wyb3wafhltmWSwGIA3LWDVLs=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=pg2lnftp3t0pKetKpRqvheCsL29mWACkln/gfDvF2gdL59dNOoirVBqUlpfRl7UtC sWJlT1QE8Caf1EdKOIs1GUwRTp/AVw2IMEXJ8DPpyTVN79y7KsKbbkgKQCvaUhqSzq d1hIcqB5AaGRbUsllkdYpaDXUAYI2CFF1vzaafm8= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Ferry Toth , Andy Shevchenko Subject: [PATCH 6.0 15/34] Revert "USB: fixup for merge issue with "usb: dwc3: Dont switch OTG -> peripheral if extcon is present"" Date: Thu, 13 Oct 2022 19:52:53 +0200 Message-Id: <20221013175146.916141650@linuxfoundation.org> X-Mailer: git-send-email 2.38.0 In-Reply-To: <20221013175146.507746257@linuxfoundation.org> References: <20221013175146.507746257@linuxfoundation.org> User-Agent: quilt/0.67 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS 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 From: Andy Shevchenko commit 2adc960ce79d3231b02f820daeee434542fe2911 upstream. This reverts commit 8bd6b8c4b1009d7d2662138d6bdc6fe58a9274c5. Prerequisite revert for the reverting of the original commit 0f0101719138. Fixes: 8bd6b8c4b100 ("USB: fixup for merge issue with "usb: dwc3: Don't switch OTG -> peripheral if extcon is present"") Fixes: 0f0101719138 ("usb: dwc3: Don't switch OTG -> peripheral if extcon is present") Reported-by: Ferry Toth Cc: stable@vger.kernel.org Signed-off-by: Andy Shevchenko Tested-by: Ferry Toth # for Merrifield Link: https://lore.kernel.org/r/20220927155332.10762-2-andriy.shevchenko@linux.intel.com Signed-off-by: Greg Kroah-Hartman --- drivers/usb/dwc3/core.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) --- a/drivers/usb/dwc3/core.c +++ b/drivers/usb/dwc3/core.c @@ -1684,8 +1684,13 @@ static struct extcon_dev *dwc3_get_extco * This device property is for kernel internal use only and * is expected to be set by the glue code. */ - if (device_property_read_string(dev, "linux,extcon-name", &name) == 0) - return extcon_get_extcon_dev(name); + if (device_property_read_string(dev, "linux,extcon-name", &name) == 0) { + edev = extcon_get_extcon_dev(name); + if (!edev) + return ERR_PTR(-EPROBE_DEFER); + + return edev; + } /* * Try to get an extcon device from the USB PHY controller's "port"