Received: by 2002:a05:6358:16cc:b0:ea:6187:17c9 with SMTP id r12csp3213225rwl; Tue, 27 Dec 2022 06:04:54 -0800 (PST) X-Google-Smtp-Source: AMrXdXsfBgL1aQxEVKxdLZVPMDCh0aVzh/PWaoQAsGjUVATEyghOk8lzfutysf48wXI0XxY3neYr X-Received: by 2002:aa7:d719:0:b0:474:a35b:6c17 with SMTP id t25-20020aa7d719000000b00474a35b6c17mr18886284edq.4.1672149894708; Tue, 27 Dec 2022 06:04:54 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1672149894; cv=none; d=google.com; s=arc-20160816; b=PXqav2/rcXeXT5IYa4DFsuai6BYe6M37oRDsXBxYrMRBcFk4NBPFIYue2C6zTP9VXU pRAeRc/NL2Zf2WT+K2lYeR8S7Fm4o+HbpGTeskfK+uO01PDV6oZIRjjnE0vzj+T07XJq lEV/SANEqPfu10daoSaqiqWg4px58TYBdhmCwRK5P7LZliRzMDQaKFMwIDmVjMK7MImd s8dmWzhfHv7D4Y0UIkSu45SWyejKGPZ/4C3pbcWRoAOAWOriRsBm89zKFGqW6CP10Tb4 kXq13w2LIaaB8YuIh4/XqSu6DE35Wk+rxruNMeG/3K3qliW6XghMFVua3mRoCYyfacZH 3YFw== 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=ZIAud6m6dx8eMN6+HNe47OLv7/QkwOGsDtMU7vQJVbPZsh9coz4R2ZV1qmbZ3Z9Acl gB5WhrYe946wep4gHugV+lwgIxei2PxX6HfJwCtWc76q3Q3HRqUc1TjhhLa5qCu8veIO AjDuxMYBx63hl2oNSBu6QNUC2mYOctBXsRVbTfOy5x5vMwE/RXyb6p4BHDIrkyF5LtA7 qm88GbEy7bKtDkEf6zb5veoVauhYIBR8EaSfRYecvJG4oaJtYUZaN70y7zyG6+W/HPPZ OAANh0N4eogrQYdEUqrZkEarsyjb5J2wrXA5Bx/FBRk3fLaVGmQhyRGnTjNzHpEhAfU6 k7Pw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=tIF6qIL8; 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 s5-20020a056402520500b004677d91cdeasi12661197edd.244.2022.12.27.06.04.38; Tue, 27 Dec 2022 06:04:54 -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=tIF6qIL8; 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 S231305AbiL0Nn2 (ORCPT + 66 others); Tue, 27 Dec 2022 08:43:28 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60376 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229452AbiL0Nn1 (ORCPT ); Tue, 27 Dec 2022 08:43:27 -0500 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 67EE23B3; Tue, 27 Dec 2022 05:43:26 -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 dfw.source.kernel.org (Postfix) with ESMTPS id 049AC60F46; Tue, 27 Dec 2022 13:43:26 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id B4B2BC433D2; Tue, 27 Dec 2022 13:43:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1672148605; bh=MWHvjZhXqCXibASs7/ji0PRKFTI00JPAvF8xc89D7D8=; h=From:To:Cc:In-Reply-To:References:Subject:Date:From; b=tIF6qIL8Y0pR593s3NX3Tr29bkjIHPsh+00HkRkm1ZOFp7ltkYgwiE7MKrXRKkA0r r+m8y3/xHBHqRegi7W+eHENxQxGcJbhhWqHxTTPm3nvICgCmym6e+xO9FqvE+PD8CP Jo0dMbESDEOTQoRaB2qanG8VqL1L36wHESRk8ph7DmPinNpIumLvZQrj1C6S8tQirA Q29+aq8d7SouvpPfFKQ8h85ztI66+zLhaAwbMgri3sKw7uoqPJZJvKSnCAwROdqlZn q5zAEtCQ8jfjmZeD/xGyowLqaBNycOi2v7voNPpM3M3Ytj8mDV6F/PYr+ygPMA3VIH F53An4qIZ4WQQ== 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: <167214860344.446872.17166503994226712534.b4-ty@kernel.org> Date: Tue, 27 Dec 2022 13:43:23 +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