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 Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id C4039C352A1 for ; Wed, 7 Dec 2022 13:22:09 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230010AbiLGNWI (ORCPT ); Wed, 7 Dec 2022 08:22:08 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54696 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229998AbiLGNWF (ORCPT ); Wed, 7 Dec 2022 08:22:05 -0500 Received: from madras.collabora.co.uk (madras.collabora.co.uk [46.235.227.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7B7C313E92; Wed, 7 Dec 2022 05:22:02 -0800 (PST) Received: from [192.168.1.100] (2-237-20-237.ip236.fastwebnet.it [2.237.20.237]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) (Authenticated sender: kholk11) by madras.collabora.co.uk (Postfix) with ESMTPSA id 842456602BB7; Wed, 7 Dec 2022 13:22:00 +0000 (GMT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1670419321; bh=5IvuM0VxRR2WGFZC4WAyEDPJdPLpL4jxxdvYzPTnkAw=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=NVdEgp8g1QR/7fKNyrRd+8VM11louL3qmrQWF4rrKPMSGk7HKAOuP2MkyZARtLztG f5gaXhnkZu5m1vvoUzl3bHH2Ld0qa1TXPxzmAkyKJtfsYaRoPLZL6/c5wxKazv7hMC YlFuTgp3dUhZns+ssFjO3xgwnQWct076Cvo+1iUSJgpI6GRs9JfjJrLMeaOX2QZV+S qa3at/oDoCqiOLoeuIOB17hDkJnAA1v/43PBHidZzq/hYY48+6CKgs9iKDy/0bUxMU Gd/3RafdctTZrVARA/SJEvGLglKmlCoaSIh6BHv8L3p+6gsBgQDlYRJoSN6zbmqlhU l62MoP3834h7Q== Message-ID: <8bec1bdb-2e22-d2bd-18bf-505f6dc75024@collabora.com> Date: Wed, 7 Dec 2022 14:21:56 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.5.0 Subject: Re: [PATCH v2] spi: spi-mtk-nor: Add recovery mechanism for dma read timeout Content-Language: en-US To: Bayi Cheng , Mark Brown , Matthias Brugger , Ikjoon Jang Cc: linux-spi@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, linux-kernel@vger.kernel.org, Chuanhong Guo , Project_Global_Chrome_Upstream_Group@mediatek.com References: <20221207055435.30557-1-bayi.cheng@mediatek.com> From: AngeloGioacchino Del Regno In-Reply-To: <20221207055435.30557-1-bayi.cheng@mediatek.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Il 07/12/22 06:54, Bayi Cheng ha scritto: > From: bayi cheng > > The state machine of MTK spi nor controller may be disturbed by some > glitch signals from the relevant BUS during dma read, Although the > possibility of causing the dma read to fail is next to nothing, > However, if error-handling is not implemented, which makes the feature > somewhat risky. > > Add an error-handling mechanism here, reset the state machine and > re-read the data when an error occurs. > > Signed-off-by: bayi cheng Reviewed-by: AngeloGioacchino Del Regno