Received: by 2002:a05:6358:bb9e:b0:b9:5105:a5b4 with SMTP id df30csp4463331rwb; Tue, 6 Sep 2022 07:55:12 -0700 (PDT) X-Google-Smtp-Source: AA6agR7/4hHk7b0INgRn5PlMSjZXY7g8N+t0DZoJxnM3aLYAEgKF9bu4mPrZh/6BI0WX86PKb2Pz X-Received: by 2002:a63:698a:0:b0:41c:8dfb:29cb with SMTP id e132-20020a63698a000000b0041c8dfb29cbmr46351700pgc.170.1662476111363; Tue, 06 Sep 2022 07:55:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1662476111; cv=none; d=google.com; s=arc-20160816; b=hgfzFeMuyHeShT8fV8ocnxAIGwwSVMLSPqueQd72Y4vZd6CC3fQpTUkwsFwP3E8gQ4 XooM+427B3CPNqKmip3wsHHVic8x0CR4GFFe8k5Kt7c7RZ2Zw6JetTDBHg7tAkkea8UZ GNJEB4t1HfSq7X4prRbL9Vj9BZP6P5lQAqGFbRdKvsUiZgCtb+fScTOxEIG1LPM0CFCq dz59OQ4f1BQyDrsoykikYWo+SvzgCxZ9zzsWDJVNte8zgQZJJLYmI+nYYqMus0IrtTTG mFrd2sIa5CD64BgnjMVp9ZAKnfevgjSwQ/gCxUphGlOfNUtGcKOr4Agpi695ZsZZlYeF v4sg== 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=DMFyeGiVls3iB1hVVY4U+XnDt9XCgfAeOmun9AFLKEI=; b=detIF5AlTEbje1Q0IMTAr6nb2CDBRYpyQhBLSQJcSPxVUr3JRJr94qQw1AW0icXdze s1oh99tnlglnuIE6HEDf6nDtKWO+Sqe7al8owJwe9Q98H8/JltkyJNxuGOHskpdyXDZx 2SoLyjOn4H/7kzc+sR4fTRFER3za2mBMXS8wG5TbziuMhEhWI2tFJiL7SnBHy4P6hREv /3p8hkTVEBIwBVXC5icuoOffipdacMLkLLvuqj7asw6W39hmzn8t47K9zXiiON5vJ/t0 GhM95uyNQEj7OMr2fGnPc35fez74VieNUxL+jyLs7DgD1GN1kSYsmx0R85lLoIr9eKqw OYxw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=iL7qzeKB; 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 me6-20020a17090b17c600b001fe0682652esi16755724pjb.184.2022.09.06.07.55.00; Tue, 06 Sep 2022 07:55:11 -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=iL7qzeKB; 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 S241254AbiIFORU (ORCPT + 99 others); Tue, 6 Sep 2022 10:17:20 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49088 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S241849AbiIFOOV (ORCPT ); Tue, 6 Sep 2022 10:14:21 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AE9998991D; Tue, 6 Sep 2022 06:49:01 -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 5BEA1B818D4; Tue, 6 Sep 2022 13:46:32 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id C7334C433D6; Tue, 6 Sep 2022 13:46:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1662471991; bh=gh8XiKj50FQL6mp4Rsc5LB0h18GzvE3L10AiNAuBAIo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=iL7qzeKBjsXUkG2t3v5sIEGJBl8zC4+iWSqHVZw57/UANWHdRHwuGCJ99SIEBWyXi ZFYiNH5YAx2Stk8MpRhSNOCWcaiu/m7BNyOGcfswDWhH7OK4QifP0nIj5m/oyI6pLE TFsxbeeZpO3VjrvyIhDwInvtgRNuZ3wqqo6NNtV0= 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.19 110/155] usb: dwc3: disable USB core PHY management Date: Tue, 6 Sep 2022 15:30:58 +0200 Message-Id: <20220906132834.125401283@linuxfoundation.org> X-Mailer: git-send-email 2.37.3 In-Reply-To: <20220906132829.417117002@linuxfoundation.org> References: <20220906132829.417117002@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 --- drivers/usb/dwc3/host.c | 10 ++++++++++ 1 file changed, 10 insertions(+) --- a/drivers/usb/dwc3/host.c +++ b/drivers/usb/dwc3/host.c @@ -11,8 +11,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 void dwc3_host_fill_xhci_irq_res(struct dwc3 *dwc, int irq, char *name) { @@ -92,6 +97,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)