Received: by 2002:a05:6358:16cc:b0:ea:6187:17c9 with SMTP id r12csp3080826rwl; Tue, 27 Dec 2022 04:10:31 -0800 (PST) X-Google-Smtp-Source: AMrXdXvyCKkK7+Pf/sMpa0b8ZAtWHZPjNUTOu5eKTQloARP4nK+5BEB8ZQt6XqPjdh4fXNDkiRVn X-Received: by 2002:a17:902:b713:b0:190:c550:d295 with SMTP id d19-20020a170902b71300b00190c550d295mr22738111pls.9.1672143030691; Tue, 27 Dec 2022 04:10:30 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1672143030; cv=none; d=google.com; s=arc-20160816; b=txSbHQPD/3ZmAxjJwl0JZqRWAY2CArLv7DEmeCTjEqEfN15kzg0JFPmUwcChECtiUK PqD+a7R7hkT+iGhxVb5GngvV8Z9vDymuGT0nAYHLtDDbrhP78t1lLboZ288XYvDguX8C cv2vg7rUV8M4yNaYoNvay8/4Pmr0BpKizeHepxo+4V4jUwFvzkMs6FnY2oEF/2DR1ym7 TU2sMJ3zTPVgw4fx4V1CljHyXRrsWSg7USOQoU7KsanGfYd1T0Gb40fwfBAS19hyO2dg Y+L72EP/8jzD5HD6Dn1qrWjC0hZTirWEn42UJI2ntTMN0stddrUSptHrV8jkok473I3A +lCw== 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:date :message-id:subject:references:in-reply-to:cc:to:from:dkim-signature; bh=p0yNIP6MpjaHVWcIxbkqNM0AdAjCHiKnAY/z3tGomfQ=; b=FEyrBzxY5MqFwTMi+8W2vQyfHP2qa62J/wObHQzLBCCCBDhulmHSR7mkQhApMkir7d 3Sx3f0OqFq1HBoqM9Z0gCPb2p4UQbSi+Sjrinn7TCfCNaveoSM/P6Y0CJPHTnwslLyrI YbT/sac8Ss84y9fbqfZ0EKJNCPlMatJaYVR8qjTwC6PwoMFACqU8HwyEY+4rCL5QyaJp zBYYfwG/Hkprs/Pit8wYVzvMu9cqznUmU99SHSoWFrKTN2PqOn9t7uYlDw3Dw2nPTesn fv/JekF156sU2fdafExa0S6aqdj5X6brIPayuLjZmxXgltMYh4ARFEyjmyVyqSZ9s0n9 VELg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="XM/8z0a4"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id c16-20020a170903235000b00188ad330242si15487213plh.131.2022.12.27.04.10.19; Tue, 27 Dec 2022 04:10:30 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="XM/8z0a4"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231860AbiL0L6V (ORCPT + 66 others); Tue, 27 Dec 2022 06:58:21 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42878 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231517AbiL0L55 (ORCPT ); Tue, 27 Dec 2022 06:57:57 -0500 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 65C499FD7; Tue, 27 Dec 2022 03:57:56 -0800 (PST) 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 ams.source.kernel.org (Postfix) with ESMTPS id 12E77B80F91; Tue, 27 Dec 2022 11:57:55 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 48F15C433EF; Tue, 27 Dec 2022 11:57:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1672142273; bh=MWHvjZhXqCXibASs7/ji0PRKFTI00JPAvF8xc89D7D8=; h=From:To:Cc:In-Reply-To:References:Subject:Date:From; b=XM/8z0a45B6yUWd7xT3hiXC4zWIB54DuzDwZIcSpMYLn6a76XZGm86Ge8jBR8XwMF 7YXiMtcbVx5r6RV8N3YAs4JJEfndGdWWrt3A6VOiBwCMNUB9jOcJWbx0xIY/6bIjQZ TbkRao9okje45BY8i/2tfuALwz/JAP+rOtJ2+N4CpRj53/4jO9QiMfFVYB9QadmXMh WfzCMUvXiWSUSvOyk99lryaZnSMMdt4ZuCSKqRuBcclTcp4thyAmZz/P3Y63iDt646 V++MOhThhrdFlyMqsncqkCz0VQEq/EXECfFv0Vm9gT8ZY+vSLByzGaCnaeArE0QAbs z4xRQYIwJMJEA== From: Mark Brown To: Matthias Brugger , AngeloGioacchino Del Regno , Ricardo Ribalda Cc: linux-mediatek@lists.infradead.org, linux-arm-kernel@lists.infradead.org, Daniel Golle , linux-spi@vger.kernel.org, linux-kernel@vger.kernel.org In-Reply-To: <20221225-mtk-spi-fixes-v1-0-bb6c14c232f8@chromium.org> References: <20221225-mtk-spi-fixes-v1-0-bb6c14c232f8@chromium.org> Subject: Re: [PATCH] spi: mediatek: Enable irq before the spi registration Message-Id: <167214227202.88639.2335851712877417463.b4-ty@kernel.org> Date: Tue, 27 Dec 2022 11:57:52 +0000 MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit X-Mailer: b4 0.12-dev-7ab1d X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sun, 25 Dec 2022 09:37:12 +0100, Ricardo Ribalda wrote: > If the irq is enabled after the spi si registered, there can be a race > with the initialization of the devices on the spi bus. > > Eg: > mtk-spi 1100a000.spi: spi-mem transfer timeout > spi-nor: probe of spi0.0 failed with error -110 > Unable to handle kernel NULL pointer dereference at virtual address > 0000000000000010 > ... > Call trace: > mtk_spi_can_dma+0x0/0x2c > > [...] Applied to https://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi.git for-next Thanks! [1/1] spi: mediatek: Enable irq before the spi registration commit: b24cded8c065d7cef8690b2c7b82b828cce57708 All being well this means that it will be integrated into the linux-next tree (usually sometime in the next 24 hours) and sent to Linus during the next merge window (or sooner if it is a bug fix), however if problems are discovered then the patch may be dropped or reverted. You may get further e-mails resulting from automated or manual testing and review of the tree, please engage with people reporting problems and send followup patches addressing any issues that are reported if needed. If any updates are required or you are submitting further changes they should be sent as incremental updates against current git, existing patches will not be replaced. Please add any relevant lists and maintainers to the CCs when replying to this mail. Thanks, Mark