[6.0,15/34] Revert "USB: fixup for merge issue with "usb: dwc3: Dont switch OTG -> peripheral if extcon is present""
Message ID | 20221013175146.916141650@linuxfoundation.org |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4ac7:0:0:0:0:0 with SMTP id y7csp428604wrs; Thu, 13 Oct 2022 11:52:25 -0700 (PDT) X-Google-Smtp-Source: AMsMyM4CQh5XaJTnwXCRp8SNnJeGaWYZrZ5xhZWPsvOqxrrnJzBJ6u5ML8vpR5uQUvmmxNz58jsL X-Received: by 2002:a17:90a:ac11:b0:20b:10d2:e837 with SMTP id o17-20020a17090aac1100b0020b10d2e837mr1287767pjq.165.1665687145519; Thu, 13 Oct 2022 11:52:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1665687145; cv=none; d=google.com; s=arc-20160816; b=VMHx172Oh1R+2uyGO9iON4rj0d1hg7whs5t0mnjPTwChDZwcb1YewRm00wCNR9aja6 WVURBUqleTWTyTRYEauId8b8r75ecdo9jXm4YjDIR4sM3qimIk37FQVMQZ+Fin/o2JEZ DWW0sxaaMcab0tbjKC0aj4tUHVa4WtC72MYsy6UcXPgHmoDcCE/pyYEIFoT8htXSd5/S QDhOsnbhc53LPzytQIcAPsR0wpr1Uy47H709KCRzXZ+YOHX+nCO2B7yduZLl8p0Rxa9V 4A29xynZb38VbTmmF6hIgIF/lsGOnVNKwD6FvzKQfIh/8EzU0PB1mjH+6Eum96QqcN4x XUWA== 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 Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id y13-20020a056a00190d00b00562cafb2856si237749pfi.78.2022.10.13.11.52.13; Thu, 13 Oct 2022 11:52:25 -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 <rfc822;ouuuleilei@gmail.com> + 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 <rfc822;linux-kernel@vger.kernel.org>); 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 <gregkh@linuxfoundation.org> To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>, stable@vger.kernel.org, Ferry Toth <fntoth@gmail.com>, Andy Shevchenko <andriy.shevchenko@linux.intel.com> 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: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1746599564389395130?= X-GMAIL-MSGID: =?utf-8?q?1746599564389395130?= |
Series |
None
|
|
Commit Message
Greg KH
Oct. 13, 2022, 5:52 p.m. UTC
From: Andy Shevchenko <andriy.shevchenko@linux.intel.com> 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 <fntoth@gmail.com> Cc: stable@vger.kernel.org Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Ferry Toth <fntoth@gmail.com> # for Merrifield Link: https://lore.kernel.org/r/20220927155332.10762-2-andriy.shevchenko@linux.intel.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> --- 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"