From patchwork Tue Nov 27 16:06:35 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Genoud X-Patchwork-Id: 10700757 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 8F75814D6 for ; Tue, 27 Nov 2018 16:07:45 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7C43D2BE51 for ; Tue, 27 Nov 2018 16:07:45 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 709772BE59; Tue, 27 Nov 2018 16:07:45 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED,DKIM_VALID,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 2F14B2BE51 for ; Tue, 27 Nov 2018 16:07:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=18hOHmIOAh1Bg2g4fQgFM/ypxPq0tGEZHOvLFemuK0k=; b=e8HoAVHv3JCaR/ jR+BgPP/JQTBJZIxnoA/zPg6MO84eG58tJr1yajhbOvK5NgmjIyA5PoiX9JIAD/oaPegTz+rzgqy9 sERKXUdUnNnUaP7BungHCZvApSTxUFKzHCT7P9hTCyEpmFG/XANf2XW9dB7JvLZw6nO85ciToykGU rc+zGGuIGMlhYDiemuldnfMl81zqt+UwvweLRQV1iKNPC6eAiVIsG3/0dq0lCT0dR0EMHUErZDY+z 0NjaoKKwnQbfJ6shx3LGIuV7RcK9G0T3/Lw80HgzSkgLIJW+vaUys82DE6jKMh7HCV0wb2ThIrKAO IcP3/82RhDMOM6SwukrA==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1gRfto-00081V-F7; Tue, 27 Nov 2018 16:07:44 +0000 Received: from mail-wm1-x343.google.com ([2a00:1450:4864:20::343]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1gRfte-0007oN-I8 for linux-arm-kernel@lists.infradead.org; Tue, 27 Nov 2018 16:07:37 +0000 Received: by mail-wm1-x343.google.com with SMTP id q26so22710945wmf.5 for ; Tue, 27 Nov 2018 08:07:23 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=d4NbTJWphuMJdohuzHDZOP0oH/Mu3HlA/pO53KFZRbc=; b=Nt7lbEA5p85p/aXpYA5/1MwnCfjsGhSFfpejmsYFLmJ6RBk50MfYqKJZ7e+nuQuQVK ceFq1Ct+Nssocpo5mVQZt2vG7pEeEf2cni33sHUATatmdM41SQxgKXiW9ofnh3dSWau8 WAGaYNa1aOsmIsF4EIS8+R+FQD47tvnu4ffI16F00eFFwykqtWWZAkPcjbWyHjUnuWL5 BmsMdCqpFaGaUrEsTu8jZUHbgGgC7HlAwWWQcXJ7Fcc+o2dYadHJJroqaBaFzpoHabiT Qi3wYbgyspzl1TDvBaQCT65T47gW1e1F2gnlD3GyQR9coG+q/zYPYg0tY5lU+acrp7ji viWg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=d4NbTJWphuMJdohuzHDZOP0oH/Mu3HlA/pO53KFZRbc=; b=rX5sN3XN2zDtcgcWF1c4wsIMsBgH9I9kwUGNGet4kUlbXP0JR0H/PGl/wAT7+c/4T0 L9ncI4WGQeJf02g31oIvMglRMFW9yhUljz5Hj6enoNcL9F3hALKCbp2iWIdpVk7CBZJ3 xAxQYgFUwKVaAXrpA5giMpADFS75VLuqgDqZHlt3Y3mY6Z1sfdpJq0+Bh7LZOfxFpWS4 TjMoHYQIfPsLWO2cLvwNWc0lOouiRsXl66sL6Wigogsd1oNtDb28jjDu7F1UdQeOGUYR TC0eQeV/sOqWBbDQsr0YnjCzUFpAmI53q+x4hyhwTZdWVp1po/0W+3WRa18kIcgzox9Y q18Q== X-Gm-Message-State: AA+aEWZVfDTOTphz+U1woYBW6SHwVBrAHd+/7zM82BgMnZSZ7uOzOZPD bOFvzCjE3FGGuQ0pqp3afrY= X-Google-Smtp-Source: AFSGD/U0W8fE/GZhYduX6YrvQviSf81n/KELl2VQZZ4L9rhjaPx9b4znlCIus7tCa6zUz/gK13W8jw== X-Received: by 2002:a1c:7011:: with SMTP id l17mr2667096wmc.34.1543334842142; Tue, 27 Nov 2018 08:07:22 -0800 (PST) Received: from localhost ([46.227.18.67]) by smtp.gmail.com with ESMTPSA id b18sm3014766wrw.83.2018.11.27.08.07.21 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 27 Nov 2018 08:07:21 -0800 (PST) From: Richard Genoud To: Ludovic Desroches , Dan Williams , Vinod Koul Subject: [PATCH] dmaengine: at_hdmac: fix module unloading Date: Tue, 27 Nov 2018 17:06:35 +0100 Message-Id: <20181127160635.11836-2-richard.genoud@gmail.com> X-Mailer: git-send-email 2.19.0 In-Reply-To: <20181127160635.11836-1-richard.genoud@gmail.com> References: <20181127160635.11836-1-richard.genoud@gmail.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20181127_080735_020124_3B1675E5 X-CRM114-Status: GOOD ( 12.69 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Alexandre Belloni , Mario Forner , Maxime Ripard , stable@vger.kernel.org, linux-kernel@vger.kernel.org, Richard Genoud , linux-serial@vger.kernel.org, dmaengine@vger.kernel.org, linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP of_dma_controller_free() was not called on module onloading. This lead to a soft lockup: watchdog: BUG: soft lockup - CPU#0 stuck for 23s! Modules linked in: at_hdmac [last unloaded: at_hdmac] when of_dma_request_slave_channel() tried to call ofdma->of_dma_xlate(). Cc: stable@vger.kernel.org Fixes: bbe89c8e3d59 ("at_hdmac: move to generic DMA binding") Signed-off-by: Richard Genoud Acked-by: Ludovic Desroches --- drivers/dma/at_hdmac.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/dma/at_hdmac.c b/drivers/dma/at_hdmac.c index 1b7f0ca0d5cd..01d936c9fe89 100644 --- a/drivers/dma/at_hdmac.c +++ b/drivers/dma/at_hdmac.c @@ -2006,6 +2006,8 @@ static int at_dma_remove(struct platform_device *pdev) struct resource *io; at_dma_off(atdma); + if (pdev->dev.of_node) + of_dma_controller_free(pdev->dev.of_node); dma_async_device_unregister(&atdma->dma_common); dma_pool_destroy(atdma->memset_pool);