Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp4969152pxu; Thu, 10 Dec 2020 09:39:45 -0800 (PST) X-Google-Smtp-Source: ABdhPJyIFDfgSUvVOyXXqzsT+Z7EXTtPLrCu+8PAJo+/VZLB32aj7CoWvb02iJMe37e2+zG0yGcc X-Received: by 2002:a17:906:5fc9:: with SMTP id k9mr7201978ejv.70.1607621984790; Thu, 10 Dec 2020 09:39:44 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1607621984; cv=none; d=google.com; s=arc-20160816; b=UOwpFycBwlvwUu+9hkTA8gOUMRNrD1ZlKK4OlQOdHv5ooz62plPrfj+bQ6Z93I+3mn jeDPm5kJrYZCklPWn5BS4Xe1cbCf03CUT6lCHxWtfT0HfRgWQY1zxS+2wTOgdKYHLu7O rs5vnvA9D1mAADSyDPQnDppWx9B2TOq2Jn2QUxydtaVHdZTSaqpZn5f4g8VHoKFHINMs OsEkWy3PrGua73jHDtApo4UquUpHyZn52IfoWPr6fl8BMUXjFsllJeB8NriuSfdCci2D 7FzHWgbu8QvgNpsCwwAmszXOqaEd9Rxzc6xR0ruyIDd0/d7J1CFXqJxWrMIk4okAUjTl URPQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-language:content-transfer-encoding :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject:dkim-signature; bh=3OOtstF0oi5Pj3WzkLhAlF1kOotO4HUwZrv4mEkOcmo=; b=Eeu67ZLogcA79nqNVjgnfzrDzxKDdy5r7mS5dVHIc6e6biRkOqKM0M4LfpbM5IOCcO aHUOZHMq4kSuADjq2ZwHiwIG7dN264hCS4qZDUHPk/NSdbPTaCa5oW3wALrb9C+8D4ZM waXAyxp+N9QGyIo0iFdWc4t/FcfnVEot90TFkA9tCDnDWFdmOoXc8xbMjg8MNFaFMWUA SKN5BQGPrbKmRFQzQE6eonGiHL0evNMv2MeaqtZIxg0w1kreYT+qRIy6OPKqgqprDAEj Oj71FSZPVH89vVi3jz8W5/aRp2pR+WDAUUGCjUNQM9qYyLv1wC+vQLpVC4vckbeSfSv6 VZdA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@baylibre-com.20150623.gappssmtp.com header.s=20150623 header.b=xXdMrXB6; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id p1si3036559ejx.531.2020.12.10.09.39.19; Thu, 10 Dec 2020 09:39:44 -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=@baylibre-com.20150623.gappssmtp.com header.s=20150623 header.b=xXdMrXB6; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2392854AbgLJRgc (ORCPT + 99 others); Thu, 10 Dec 2020 12:36:32 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33304 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2392789AbgLJRgD (ORCPT ); Thu, 10 Dec 2020 12:36:03 -0500 Received: from mail-wm1-x343.google.com (mail-wm1-x343.google.com [IPv6:2a00:1450:4864:20::343]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 58C3CC0613D6 for ; Thu, 10 Dec 2020 09:35:23 -0800 (PST) Received: by mail-wm1-x343.google.com with SMTP id a6so5360514wmc.2 for ; Thu, 10 Dec 2020 09:35:23 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20150623.gappssmtp.com; s=20150623; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-transfer-encoding:content-language; bh=3OOtstF0oi5Pj3WzkLhAlF1kOotO4HUwZrv4mEkOcmo=; b=xXdMrXB67v5iPn3t4QpIjOgfd0dw29zJu80kxy5UApfv54VaGek06iQq6xi97NjVI6 k0/UVkzqokkl27JFCGZ0n2FWPtOf+ZNuVm3iw/w+zsbxi4GaB6qQbF8O3i79Hb6a0bNC mlLDtf4o0iLI7B4FuyVmYKeu5WrQm3gNRF1a0IB8KkJts+MLZbi4PYzrliQYm3yBOeUS k1+9098CJumH6wwGAr49YhRKpEa04RyvH8xiKeZnwuo1P9Q82hZrF/0yqV/jvX0wOjSf Hj83mbr2ydtlTm4gXkHZmp7irrssK6GtcROU0JDvmEHvbPl97sx1RWhl65dReJkhOk2Y d/Bg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding :content-language; bh=3OOtstF0oi5Pj3WzkLhAlF1kOotO4HUwZrv4mEkOcmo=; b=FRzMtaNyf8y3kBsepkjxcAPmWNspYL2k+97UxCjDXE+gjg5YuI0kQ7bJ2iieuT/LBq OQ/MbyDFJHQuHgDcekfY44Oy7+SPgtsPHYGQImnMWEON+Fl9datt1ImGPS0+W06slJbB HNSehh9uFKI2da4QMwtmFSYLtYDk3c6+SqMAzgl24GmXK4UABopBB+Xn0xO3kaZdVo+0 oiOTMiF9iQx7RbSelQ17yr9aU1ajDW2bTggedIIJCzkW4HjgOxBqFzqcgGMlIksBX5IP PtNaX7msOkMD352g7iNUN7L3RSOdkCNTjSDrfhoI/vBjLiSiiA/NpBrBmvBbTr4bF3k3 jbmQ== X-Gm-Message-State: AOAM53222c5NmWPdKA/2hRIo2MvaaKNltb5//yEDAnxy9CJa2VOulhiz zsZbZryDSL4kqMIFy1qPuXQ0fA== X-Received: by 2002:a1c:a785:: with SMTP id q127mr5215807wme.25.1607621722139; Thu, 10 Dec 2020 09:35:22 -0800 (PST) Received: from ?IPv6:2001:861:3a84:7260:5514:1343:4704:99a? ([2001:861:3a84:7260:5514:1343:4704:99a]) by smtp.gmail.com with ESMTPSA id o83sm10647057wme.21.2020.12.10.09.35.20 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 10 Dec 2020 09:35:21 -0800 (PST) Subject: Re: [PATCH v2 2/3] usb: dwc3: meson-g12a: fix shared reset control use To: Martin Blumenstingl Cc: Felipe Balbi , Kevin Hilman , linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org, Philipp Zabel , linux-amlogic@lists.infradead.org, Jerome Brunet References: <20201201190100.17831-1-aouledameur@baylibre.com> <20201201190100.17831-3-aouledameur@baylibre.com> From: Amjad Ouled-Ameur Message-ID: Date: Thu, 10 Dec 2020 18:35:19 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Content-Language: en-US Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Martin On 05/12/2020 22:42, Martin Blumenstingl wrote: > > Hello Amjad, > > On Tue, Dec 1, 2020 at 8:01 PM Amjad Ouled-Ameur > wrote: > >> reset_control_(de)assert() calls are called on a shared reset line when >> reset_control_reset has been used. This is not allowed by the reset >> framework. >> >> Use reset_control_rearm() call in suspend() and remove() as a way to state >> that the resource is no longer used, hence the shared reset line >> may be triggered again by other devices. Use reset_control_rearm() also in >> case probe fails after reset() has been called. >> >> reset_control_rearm() keeps use of triggered_count sane in the reset >> framework, use of reset_control_reset() on shared reset line should be >> balanced with reset_control_rearm(). > > I think this should be updated after [0] is applied > The goto from that patch needs to use err_rearm from this patch. > > > Best regards, > Martin > > > [0] https://patchwork.kernel.org/project/linux-usb/patch/20201111095256.10477-1-zhengzengkai@huawei.com/ Thank you Martin for reviewing this patchset. I have reviewed the patch you mentioned, and I think as well that we should use 'err_rearm' instead of 'err_disable_clks' to cleanup things properly in case setup_regmaps fails. Best, Amjad