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=-0.8 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, 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 B79C4C433DF for ; Fri, 15 May 2020 15:58:14 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 95EEE206D8 for ; Fri, 15 May 2020 15:58:14 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726349AbgEOP6O (ORCPT ); Fri, 15 May 2020 11:58:14 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48406 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1726283AbgEOP6O (ORCPT ); Fri, 15 May 2020 11:58:14 -0400 Received: from mailout1.hostsharing.net (mailout1.hostsharing.net [IPv6:2a01:37:1000::53df:5fcc:0]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 17464C061A0C for ; Fri, 15 May 2020 08:58:14 -0700 (PDT) Received: from h08.hostsharing.net (h08.hostsharing.net [IPv6:2a01:37:1000::53df:5f1c:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "*.hostsharing.net", Issuer "COMODO RSA Domain Validation Secure Server CA" (not verified)) by mailout1.hostsharing.net (Postfix) with ESMTPS id D6AF910030DBE; Fri, 15 May 2020 17:58:11 +0200 (CEST) Received: from localhost (unknown [89.246.108.87]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (No client certificate requested) by h08.hostsharing.net (Postfix) with ESMTPSA id 96D0560AA8C2; Fri, 15 May 2020 17:58:11 +0200 (CEST) X-Mailbox-Line: From d0dcbd098401b5d2a486eee7cf2f9dcabacf9605 Mon Sep 17 00:00:00 2001 Message-Id: From: Lukas Wunner Date: Fri, 15 May 2020 17:58:00 +0200 Subject: [PATCH 0/5] Raspberry Pi SPI unbind fixes To: Mark Brown Cc: "Nicolas Saenz Julienne" , Martin Sperl , linux-spi@vger.kernel.org, linux-rpi-kernel@lists.infradead.org, Linus Walleij , Jingoo Han Sender: linux-spi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-spi@vger.kernel.org This series fixes ordering issues occurring on unbind of the Raspberry Pi SPI drivers: Turns out devm_spi_register_controller() is prone to incorrect use and dozens of drivers have gotten it wrong. I'm only documenting this gotcha here and fixing it in the Raspberry Pi drivers. Fixing the rest is for another day. There's also an ordering issue in the core which has been present for 8 years and affects all platforms (patch [1/5]). Doesn't look like unbinding is tested all that often. :-) Lukas Wunner (5): spi: Fix controller unregister order spi: bcm2835: Fix controller unregister order spi: bcm2835aux: Fix controller unregister order spi: bcm2835: Tear down DMA before turning off SPI controller spi: Document devm_spi_register_controller() gotcha drivers/spi/spi-bcm2835.c | 8 +++++--- drivers/spi/spi-bcm2835aux.c | 4 +++- drivers/spi/spi.c | 10 +++++++++- 3 files changed, 17 insertions(+), 5 deletions(-) -- 2.26.2