Received: by 2002:a05:6a10:af89:0:0:0:0 with SMTP id iu9csp3603331pxb; Mon, 24 Jan 2022 13:17:29 -0800 (PST) X-Google-Smtp-Source: ABdhPJykcMzIihVaqyYDkUpeFP7AN/4QTMveZ3u9jSxyVrHNCo19gxUwsSind0xUZismwZamqqUG X-Received: by 2002:aa7:88c9:0:b0:4c9:319e:ecb7 with SMTP id k9-20020aa788c9000000b004c9319eecb7mr5812579pff.58.1643059049371; Mon, 24 Jan 2022 13:17:29 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1643059049; cv=none; d=google.com; s=arc-20160816; b=eNBhWrQf2t5WNg8XwQbPzTTZiTYhaVjOfRS8kPkra09Zh3lHGYX+KmSl79/7RmhaB2 0PQ0Ny7rCWj7iyyfZ6xz/GZN0ObUpCcLnR7kmWvr9x+doWIt0VGzsRCIJlVcayzJFJgK xUMqJED+8R9WwElGC3i5SBTCm4mphJgjuLtdEI7WD9ybodzCm5drX7LljQsy0mW/0ppD OiBqCjYw3TJQRo7iPcHoMeX6ZUhP95svxOjyh0niLYlCLqAAhRM8ZeJ5fqByQCbdG6im yURtg/n6t3OI1FM2rFP47e6D4f4tf/ezDkOJy8TUXdqYS1hV7MaZx2Il1zrutJCZOZkQ OjBg== 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=nqZiTE1/sqJizw7yT2oIX3eDbZyoqIGUU2/5GDMBYWs=; b=NhceuhL1x/aVmQsSKFFqg8nGhWhYf2ssGMjFDw03ZTtYcpijVTKxXc6ieaw2Q76QYt 4kuFEfulEcKaCxYNm8Lxg8hcY1UC0inVjCFORpijwUh7BAG7GqaYjwLOpHmVZR5dQl9D QQZkpvjvb/WE9HiYK4icrp3hWEHxbkC2/5mzXA+W0eJWPG9n+DLVmbxwqZt7mEGVm8l6 KXXSxpubKpbCpj9CUT5WBTO2s3iX5F5zTfMwjrL7hsPUileCIzpyQ/YeI1mZGNCwggWL RHaJigPsJyhUq0FrbzdmiS9pP78MjeimE9sZPMDWJGPikRkWZ+MaKgiGWhrS60ZHThj/ tEgg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b="eL/8Y5Fp"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id nl12si488316pjb.6.2022.01.24.13.17.17; Mon, 24 Jan 2022 13:17:29 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b="eL/8Y5Fp"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 S1358009AbiAXUwA (ORCPT + 99 others); Mon, 24 Jan 2022 15:52:00 -0500 Received: from dfw.source.kernel.org ([139.178.84.217]:53096 "EHLO dfw.source.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1351194AbiAXU2O (ORCPT ); Mon, 24 Jan 2022 15:28:14 -0500 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 dfw.source.kernel.org (Postfix) with ESMTPS id 1651161512; Mon, 24 Jan 2022 20:28:14 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id ECDB8C340E7; Mon, 24 Jan 2022 20:28:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1643056093; bh=kQOPCzJ23KjmzmDDzdiGqkriF7MkqANtBTl5JNAMDM4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=eL/8Y5Fphm4D+QQgGjjAjCtr+vILIZ0MBAFJOvG/3nawGgx0UHMXf08EC8y9tb/Yz NjIamYr4dFCkQ8ooJWwGKvj26IwOW+eTaxFJPu6u0wVCcOh5MeTiqghVUYyr/AyICy GYnlU2Crbwrau1YflyLvlU1otZDv8Xtrsaf8hvQs= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Minas Harutyunyan , Dinh Nguyen , Sasha Levin Subject: [PATCH 5.15 325/846] usb: dwc2: do not gate off the hardware if it does not support clock gating Date: Mon, 24 Jan 2022 19:37:22 +0100 Message-Id: <20220124184112.112781068@linuxfoundation.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220124184100.867127425@linuxfoundation.org> References: <20220124184100.867127425@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Dinh Nguyen [ Upstream commit 34146c68083f1aef6709196b3dc888c1ceffd357 ] We should not be clearing the HCD_FLAG_HW_ACCESSIBLE bit if the hardware does not support clock gating. Fixes: 50fb0c128b6e ("usb: dwc2: Add clock gating entering flow by system suspend") Acked-by: Minas Harutyunyan Signed-off-by: Dinh Nguyen Link: https://lore.kernel.org/r/20220104135922.734776-1-dinguyen@kernel.org Signed-off-by: Greg Kroah-Hartman Signed-off-by: Sasha Levin --- drivers/usb/dwc2/hcd.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/drivers/usb/dwc2/hcd.c b/drivers/usb/dwc2/hcd.c index a215ec9e172e6..657dbd50faf11 100644 --- a/drivers/usb/dwc2/hcd.c +++ b/drivers/usb/dwc2/hcd.c @@ -4403,11 +4403,12 @@ static int _dwc2_hcd_suspend(struct usb_hcd *hcd) * If not hibernation nor partial power down are supported, * clock gating is used to save power. */ - if (!hsotg->params.no_clock_gating) + if (!hsotg->params.no_clock_gating) { dwc2_host_enter_clock_gating(hsotg); - /* After entering suspend, hardware is not accessible */ - clear_bit(HCD_FLAG_HW_ACCESSIBLE, &hcd->flags); + /* After entering suspend, hardware is not accessible */ + clear_bit(HCD_FLAG_HW_ACCESSIBLE, &hcd->flags); + } break; default: goto skip_power_saving; -- 2.34.1