Received: by 2002:a05:6358:bb9e:b0:b9:5105:a5b4 with SMTP id df30csp4449814rwb; Tue, 6 Sep 2022 07:42:39 -0700 (PDT) X-Google-Smtp-Source: AA6agR6goHbo9Jh3E38OrA1Bl4gSff0oPcNn8vbougjBJVidK9D+Wgy6xUQjLgTtdjd0/lJ8H5cK X-Received: by 2002:a17:906:58cf:b0:750:524b:e694 with SMTP id e15-20020a17090658cf00b00750524be694mr14788603ejs.472.1662475358845; Tue, 06 Sep 2022 07:42:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1662475358; cv=none; d=google.com; s=arc-20160816; b=c0dSlWaSCkkC9JZzFtAXx4UFwkG4SRMycqkwuoAyaNYY6AHEvjCrfSZfsx8twpN3vT QEBoEfYpYYMNc87DUFkfXwZ2UyvphgekWfzsM2ljOvGQsmw4RfwUjt8rDxw7QBHOmH6P 1XBhOjPwG+y0guCiZUrkDlHyWEde8efvMB/r/QwHiNn4UWoFpmEG7pJzsm7k7Wc6loGq k4BsRy0q2JOLXeySV23sQSuDpMDyhQhkdFHQgFkGBOX32fc1StTl8waVGBtcbmxhvaJk 104Eiowl24Ij1Jrf3QTmPgsZoydthTw+7FGCBXf+KAlWPLrm/tAb4og4lS6Z/wofuWGV hLqQ== 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=n4SWoRGyVRKokqxGXU0cXQk605DUbCoUhK4UnCpuEto=; b=zK4ayPI3vg1TRTl0aYiyaDJqx4EUoXm+MwmIBa1slikWMmiWHfODzFQ6kn3ttLj7Wx JZWyFrJ2VUHxhMABH5EAFMnGaKXmuCf4b/At+0EOfMj93qaKdwQKmUFC+7DZ+OPvZxms zE3HQQDeKHvzl9zSmos/VCiQ8D6tTxBjunbuOJJTrrPf3fAzoedCfoKRsxX31/77wkUK bka8hAERYudIXfZR3WwTWpWSQS/X1bSXDDR+8Al/RsRUe83WQ0PDQbJox+TyyYd0Rwg/ ovc3ObCvA6N6cZl+mJYnezVdumEmI+muweF9VFVq8zai0BMDfxumJbi0vf/DucbDapDv gcfA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=Gr26nBEb; 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 x97-20020a50baea000000b004482892d410si8569276ede.85.2022.09.06.07.42.12; Tue, 06 Sep 2022 07:42:38 -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=Gr26nBEb; 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 S240972AbiIFOLE (ORCPT + 99 others); Tue, 6 Sep 2022 10:11:04 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33468 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S241237AbiIFOJL (ORCPT ); Tue, 6 Sep 2022 10:09:11 -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 7406D868B0; Tue, 6 Sep 2022 06:46:27 -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 833F1B818C9; Tue, 6 Sep 2022 13:35:49 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id C39F1C433C1; Tue, 6 Sep 2022 13:35:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1662471348; bh=hu6botTHiQm8Tl+D3CgsImgm+NidKmwEjsE9sSec0lo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Gr26nBEbzUPcUzZaxTMIea6Z7nZ49D2TkLTGil6M4herzdiqlX8ti2xDibRDcq4px iooceIze4ekHHw8lRCRlLg7tLmgC7/M9mRQz2QFn5KX1704H9MaRrXIcRUwwYD/Ikd UYq6ZF8DS9FOkwGP9stfdxgyLL2EUSDw8h6ghfhM= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Matthias Kaehlcke , stable , Johan Hovold Subject: [PATCH 5.10 78/80] usb: dwc3: disable USB core PHY management Date: Tue, 6 Sep 2022 15:31:15 +0200 Message-Id: <20220906132820.377911816@linuxfoundation.org> X-Mailer: git-send-email 2.37.3 In-Reply-To: <20220906132816.936069583@linuxfoundation.org> References: <20220906132816.936069583@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,T_SCC_BODY_TEXT_LINE 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: Johan Hovold commit 6000b8d900cd5f52fbcd0776d0cc396e88c8c2ea upstream. The dwc3 driver manages its PHYs itself so the USB core PHY management needs to be disabled. Use the struct xhci_plat_priv hack added by commits 46034a999c07 ("usb: host: xhci-plat: add platform data support") and f768e718911e ("usb: host: xhci-plat: add priv quirk for skip PHY initialization") to propagate the setting for now. Fixes: 4e88d4c08301 ("usb: add a flag to skip PHY initialization to struct usb_hcd") Fixes: 178a0bce05cb ("usb: core: hcd: integrate the PHY wrapper into the HCD core") Tested-by: Matthias Kaehlcke Cc: stable Reviewed-by: Matthias Kaehlcke Signed-off-by: Johan Hovold Link: https://lore.kernel.org/r/20220825131836.19769-1-johan+linaro@kernel.org Signed-off-by: Greg Kroah-Hartman [ johan: adjust context to 5.15 ] Signed-off-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman --- drivers/usb/dwc3/host.c | 10 ++++++++++ 1 file changed, 10 insertions(+) --- a/drivers/usb/dwc3/host.c +++ b/drivers/usb/dwc3/host.c @@ -10,8 +10,13 @@ #include #include +#include "../host/xhci-plat.h" #include "core.h" +static const struct xhci_plat_priv dwc3_xhci_plat_priv = { + .quirks = XHCI_SKIP_PHY_INIT, +}; + static int dwc3_host_get_irq(struct dwc3 *dwc) { struct platform_device *dwc3_pdev = to_platform_device(dwc->dev); @@ -87,6 +92,11 @@ int dwc3_host_init(struct dwc3 *dwc) goto err; } + ret = platform_device_add_data(xhci, &dwc3_xhci_plat_priv, + sizeof(dwc3_xhci_plat_priv)); + if (ret) + goto err; + memset(props, 0, sizeof(struct property_entry) * ARRAY_SIZE(props)); if (dwc->usb3_lpm_capable)