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=-1.0 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_PASS,URIBL_BLOCKED autolearn=ham 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 1F665C43381 for ; Mon, 25 Mar 2019 09:52:58 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id DCD9E20870 for ; Mon, 25 Mar 2019 09:52:57 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="CMsJLqPX" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org DCD9E20870 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=i2se.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org 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:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:Date: Message-ID:From:References:To:Subject:Reply-To:Cc:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=753Q59EEqRWvtlojBWMOvyapFWrVyhuPHABgd8EOp1c=; b=CMsJLqPXA7tBLKlb8346d7e4SK z/C0YQ5cqNH/36tm/OsbpZtBbNLqG0XqJdTlwT3V0q1BIuJwHnyRX6DAuQM8wVMLERsksoWamqjEH IaXt/YYDR7Dwlm7IO3ocyxCfq4ls8ucQmwDzYCdEe2GjucJULKjCkh3FFw1/h171m04p/5RJxoSPo Twb8nJ3uj0MkImMdxQtg0YCl4kNtXBHLwfL9SQ5IHZp6Tn+hqCSMVQPiBuDP/gH/i5XxpuUwSlSBX QlGDnxax6fcpRqr4dy8gjvaFNIWNQF2atdPlFAHDsJO+yLIrVbdjjImvstFusR2FuvgmY5UOCjo96 eJWc4tHw==; 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 1h8MHg-0008V3-Ua; Mon, 25 Mar 2019 09:52:48 +0000 Received: from mout.kundenserver.de ([212.227.126.187]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1h8MHa-0008Tm-Qe; Mon, 25 Mar 2019 09:52:45 +0000 Received: from [192.168.178.52] ([109.104.40.77]) by mrelayeu.kundenserver.de (mreue010 [212.227.15.167]) with ESMTPSA (Nemesis) id 1MRC3Y-1hMjs82o2W-00NCb6; Mon, 25 Mar 2019 10:52:36 +0100 Subject: Re: [PATCH V2 3/9] spi: bcm2835aux: use BCM2835_AUX_SPI_STAT_RX_LVL To: kernel@martin.sperl.org, Mark Brown , Eric Anholt , Hubert Denkmair , linux-spi@vger.kernel.org, linux-rpi-kernel@lists.infradead.org, linux-arm-kernel@lists.infradead.org References: <20190324175002.28969-1-kernel@martin.sperl.org> <20190324175002.28969-4-kernel@martin.sperl.org> From: Stefan Wahren Message-ID: Date: Mon, 25 Mar 2019 10:52:35 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.5.1 MIME-Version: 1.0 In-Reply-To: <20190324175002.28969-4-kernel@martin.sperl.org> Content-Language: en-US X-Provags-ID: V03:K1:ftgw8xc0rQZ8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114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190325_025243_159982_763F15DD X-CRM114-Status: GOOD ( 13.00 ) 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: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org Hi Martin, here is my suggestion for a subject: spi: bcm2835aux: fix corruptions for longer spi transfers Am 24.03.19 um 18:49 schrieb kernel@martin.sperl.org: > From: Martin Sperl > > On long running tests with a mcp2517fd can controller it showed that > on rare occations the data read shows corruptions for longer spi transfers. > > Example of a 22 byte transfer: > > expected (as captured on logic analyzer): > FF FF 78 00 00 00 08 06 00 00 91 20 77 56 84 85 86 87 88 89 8a 8b > > read by the driver: > FF FF 78 00 00 00 08 06 00 00 91 20 77 56 84 88 89 8a 00 00 8b 9b > > To fix this use BCM2835_AUX_SPI_STAT_RX_LVL to determine when we may > read data from the fifo reliably without any corruption. > > Surprisingly the only values ever empirically read in > BCM2835_AUX_SPI_STAT_RX_LVL are 0x00, 0x10, 0x20 and 0x30. > So whenever the mask is not 0 we can read from the fifo in a safe manner. > > The patch has now been tested intensively and we are no longer > able to reproduce the "RX" issue any longer. > > Fixes: 1ea29b39f4c812ece2f936065a0a3d6fe44a263e Please use a proper fixes tages in all of your patches. Doesn't checkpatch.pl complain about it? Thanks Stefan _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel