From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.5 required=3.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_INVALID,DKIM_SIGNED,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id A5898C433B4 for ; Sat, 24 Apr 2021 00:09:10 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 602DB6115C for ; Sat, 24 Apr 2021 00:09:10 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 602DB6115C Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id CE85F6ECCD; Sat, 24 Apr 2021 00:09:09 +0000 (UTC) Received: from mail-io1-xd30.google.com (mail-io1-xd30.google.com [IPv6:2607:f8b0:4864:20::d30]) by gabe.freedesktop.org (Postfix) with ESMTPS id C18AA6ECCD for ; Sat, 24 Apr 2021 00:09:08 +0000 (UTC) Received: by mail-io1-xd30.google.com with SMTP id b10so50464066iot.4 for ; Fri, 23 Apr 2021 17:09:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=mUIgi8gr2tgzWKj4+8JDnT/+2+iJBvHpF1dlGi1xl7U=; b=eIVk3kWDGLkxI6e7AjS74LPf7mENaT1FX8HKi8JueWU4UuoHBig3oizGT1ntPq+hbt tFqvOi88/997OlaQMY6hKHbHb0cP7bLW4A31KySs7OgfFqPrP7xXw3Tf7xOvwuYRO7tN U8wMXMyT/rmbqquvTLIWV2Pge5r3gtI6p3XlGqMcqM2ZOvKqFNIWyPTRNYFA3jw9elb/ gf/6N2VDaCiDyEDSBJooEq657o73WG9pD3kV8rb3dmsK5x3luSueweF7aDA6t2mKfM4Y c79p1OBa/DJdJCA0N+cTn4qi7jZkVZhOoj/bdrMrHAxn6wt7+lo8xhY/GJiJ6EsvOGfp TK9w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=mUIgi8gr2tgzWKj4+8JDnT/+2+iJBvHpF1dlGi1xl7U=; b=p1d/eFDLhFauSSEoAIUGRAQeSuIfPGCRjufzPmu4crdVKWsmBGG43g7iKCRPn/ToXk gdfk5h4XXGJ0bvECKWgM7kwMYqBbxLH62FftQr+lee+MWifBbPgAu4pOfAyikQjSQSH5 miuX3OluwKNFnUMjtPdIW7xs0Ejvy0GIEutaQfrPhRiaon2wV8rZ2KPS8LdYwwA4zsF6 WSgeu8Dj6dIDNlUjqjpZpHk1jjlmAg7ePtHj4xXiX5kHcW6fph0l7cPLep6k2lBQWm1A fAeo8P/J8bYGFSU5dtv/9TqGSnUGHOWuFV5gBarpakDnMWIVhqV9sviPt4DtREW7CQ3A R4xg== X-Gm-Message-State: AOAM532VFOTuOMQ8dbRTJQtMP4Uz/hTyekp8ejVRJ/Oai58812uECN5T Kc8yAhUO/x9mn8eCnmevsE/L715lFxUCiTzDEBlPmNH9qVMHnGNM X-Google-Smtp-Source: ABdhPJzpqEKzOQAznBrk9weKRq/P/QY2iIQeqtxS3bPY6W15AZaVS8+fIA29w7CgKa8lN9Gg4oFBEDPlkNfMCTJh7/8= X-Received: by 2002:a05:6602:22c9:: with SMTP id e9mr5125249ioe.73.1619222948139; Fri, 23 Apr 2021 17:09:08 -0700 (PDT) MIME-Version: 1.0 References: <20210423034247.992052-1-art@khadas.com> <20210423114735.GA5507@sirena.org.uk> In-Reply-To: <20210423114735.GA5507@sirena.org.uk> From: Art Nikpal Date: Sat, 24 Apr 2021 08:08:57 +0800 Message-ID: Subject: Re: [PATCH] SPI: meson-spifc add missed calls to remove function To: Mark Brown X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Gouwa Wang , Neil Armstrong , Martin Blumenstingl , Kevin Hilman , Christian Hewitt , linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, linux-spi@vger.kernel.org, nick@khadas.com, linux-amlogic@lists.infradead.org, Artem Lapkin , linux-arm-kernel@lists.infradead.org, jbrunet@baylibre.com Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" > I would expect the driver to unregister the controller at the start of > the remove function, suspend doesn't really make sense here It's strange - But without spi_master_suspend i have randomly stucks when i try unload this module - as was written before i was test it (load/unload module in loop) and for me suspend make sense here If anybody has another solution - or real problem not here - please help to find the right way! PS: i have another way for solve this problem (may be it can help us fix problem in kernel) # before unload module need echo -n spi0.0 > /sys/bus/spi/drivers/spi-nor/unbind # after unbind driver we can unload module without problem rmmod spi_meson_spifc # can stuck without unbind driver before ... On Fri, Apr 23, 2021 at 7:48 PM Mark Brown wrote: > > On Fri, Apr 23, 2021 at 11:42:47AM +0800, Artem Lapkin wrote: > > Problem: rmmod meson_gx_mmc - not stable without spi_master_suspend call > > and we can get stuck when try unload this module > > > +++ b/drivers/spi/spi-meson-spifc.c > > @@ -359,6 +359,7 @@ static int meson_spifc_remove(struct platform_device *pdev) > > struct spi_master *master = platform_get_drvdata(pdev); > > struct meson_spifc *spifc = spi_master_get_devdata(master); > > > > + spi_master_suspend(master); > > pm_runtime_get_sync(&pdev->dev); > > clk_disable_unprepare(spifc->clk); > > pm_runtime_disable(&pdev->dev); > > I would expect the driver to unregister the controller at the start of > the remove function, suspend doesn't really make sense here. _______________________________________________ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel