Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp2720205imm; Sun, 30 Sep 2018 03:29:46 -0700 (PDT) X-Google-Smtp-Source: ACcGV60n/JilSXCK2P35qnCWwlpti69Fw/3rLAVBf08EVU4wFRHKDPAH0c+xbkn5KHsZIPVseFoO X-Received: by 2002:a62:b209:: with SMTP id x9-v6mr6650222pfe.148.1538303386772; Sun, 30 Sep 2018 03:29:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1538303386; cv=none; d=google.com; s=arc-20160816; b=bqgnEp6mqfuHkZyHLx11YFE4Tjv5gXJ4FwSryzMBCzkdh42osqbNI8lKcOxXnC7vOp Vjzpp6gALGJpunrPHY8zp9iFObDixrXdc3NNa80GxwtfilumD3ZGegqTu00ulMoI4iCK Tdc7LA2CawtV4q4J8A/51UHvGTU93k7eU+/s4JJXStTU8l61bcBjLX5sp5wOfEiOHyKt nr0DX/5chTEB1CWM0GgEMfiv/HhimljS7d4eZHIbZIEa/DfXskZWXDZlmsYP8rGHBODo 6EP++s9e1krJs9x/YNV/lgKVIVe3p1MlCDPB27XgKbCgPq2I5ECKtP88+ARK8QGJWw6R Xx7g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:message-id :in-reply-to:date:references:subject:cc:to:from:dkim-signature; bh=L03/iIZ5wIox/kok3JI+Cru7RDwaRW1PuAdZk4oPZ0I=; b=A8fKftKJ9ql0EunXIH4dLjPv1DvIc7hxZ1Pc1A/ii7z4Cp2Y2kJseJjHYPzAyWYhnu dMH+dGUuoGuDc5x1ul1sc/80NuX+QZHKP+Xzd2olrNPnp77PDLdBZ49zimYmPflRLpkJ kOx58Avfwke5pr11qpz8qDHRtYSK1lc6muZHKRG0SrtjKx45Z5GfZLlCL5DjhlXZjKwr xrPxtiKAC/xmNvt3OU9sKlgOOd5kKM7m6Ax2L6apywJ8cI5yuSnJnul8nWbG6urFfZy2 TAeUbwWKQlLRtNjC4nifO9mW3q2KcWwImNZpZc+khL0uHgZbt9DkNl0wZcJ5W8IzafZG a30g== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@gmail.com header.s=20161025 header.b=RnDN5ipG; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id i191-v6si6074632pge.545.2018.09.30.03.29.32; Sun, 30 Sep 2018 03:29:46 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=fail header.i=@gmail.com header.s=20161025 header.b=RnDN5ipG; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728187AbeI3RBp (ORCPT + 99 others); Sun, 30 Sep 2018 13:01:45 -0400 Received: from mail-ed1-f67.google.com ([209.85.208.67]:34848 "EHLO mail-ed1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727501AbeI3RBp (ORCPT ); Sun, 30 Sep 2018 13:01:45 -0400 Received: by mail-ed1-f67.google.com with SMTP id y19-v6so543348edd.2; Sun, 30 Sep 2018 03:29:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=L03/iIZ5wIox/kok3JI+Cru7RDwaRW1PuAdZk4oPZ0I=; b=RnDN5ipGsH+rFhRK2GSoA4o/JRBrKZ0L1BzyBLQS3KXgVINC1k6zsX5EEHkaQxhPOf qsCodg6q60xeQwBumOUSq0zjeQSFObIb7D+ZZThTFjKnLEu3TNvIgDFcCpNxluPRGDU/ M4W0CTgYn30ZDMJlTfqNMXoJ3ddZkiR3uxt5BvDLSfmSD9UbC1zV9Ot0Ykgmxsed2tD6 FnCKocEnkUu1CihXhAu+K62uP6rb0ZgibVIAd0PqIFQg75r+uEbNdlI9JDBsym89g1a6 NhwM0/Uugx7NEw6x8JpTzkcRRhNHohKUlK7mvr0c4epYMLfWzSmhtSuC2XVpbKx8Bg6q KAVw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:references:date :in-reply-to:message-id:user-agent:mime-version; bh=L03/iIZ5wIox/kok3JI+Cru7RDwaRW1PuAdZk4oPZ0I=; b=uA3eT54bsYubGksgMrt+pgNVugZVm8kVswgLbjTaMj+HhyRl0CKvPIg+IZ96z0Cdjp 5foUxrIFAB0QqfEMuEsBQMUOUC3I6ayBN3yaaidfL+Zz0eDgo+OgoImPUqG5QlCgfKGL Fz9s3e/4oOJln2Mv1ax3EAC4aDTYYmEzRQ82Shvugsuoxh1VpsYzOHYKKiRkqcwnkKgn 8oUpAHr/oF4xeE79/8VqQy1iVRaCdTN/MLT+exFUISyaROIYUNe5eNRQdyxvpSx0deIX vdsVs7XLoM0CXwr/BegrzJkOhf46yxiLxzDFXf0ptPC9xo+jVN6QSbOYqz98Wyzma5QZ 61BA== X-Gm-Message-State: ABuFfohTou1XvX4ZpxvMQ1/d2ovunFeHb+XOICwOgHeToXjj75IxP/91 uKSuZIb46YSdo2ofuT080NjXbcUF X-Received: by 2002:a50:eb96:: with SMTP id y22-v6mr12116309edr.38.1538303356623; Sun, 30 Sep 2018 03:29:16 -0700 (PDT) Received: from localhost (87-49-147-65-mobile.dk.customer.tdc.net. [87.49.147.65]) by smtp.gmail.com with ESMTPSA id n25-v6sm3341057edq.27.2018.09.30.03.29.15 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sun, 30 Sep 2018 03:29:15 -0700 (PDT) From: Esben Haabendal To: Chuanhua Han Cc: broonie@kernel.org, linux-spi@vger.kernel.org, linux-kernel@vger.kernel.org, boris.brezillon@bootlin.com Subject: Re: [PATCH v2 2/4] spi: spi-fsl-dspi: Fix delete the processing of undefined bitmask for rxdata References: <20180930092535.24544-1-chuanhua.han@nxp.com> <20180930092535.24544-2-chuanhua.han@nxp.com> Date: Sun, 30 Sep 2018 12:29:14 +0200 In-Reply-To: <20180930092535.24544-2-chuanhua.han@nxp.com> (Chuanhua Han's message of "Sun, 30 Sep 2018 17:25:33 +0800") Message-ID: <87ftxr6zyd.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Chuanhua Han writes: > This patch fixes the problem of rxdata being equal to 0 during the XSPI > mode transfer of the dspi controller. > In XSPI mode, If it is not deleted, the value of rxdata will be equal > to 0, and the data received will not be received correctly, causing the > receiving transfer of the spi to fail. > > Signed-off-by: Chuanhua Han > --- > Changes in v2: > -The original patch is divided into multiple patches(the original > patch theme is "spi: spi-fsl-dspi: Fix support for XSPI transport > mode"),one of which is segmented. > > drivers/spi/spi-fsl-dspi.c | 3 --- > 1 file changed, 3 deletions(-) > > diff --git a/drivers/spi/spi-fsl-dspi.c b/drivers/spi/spi-fsl-dspi.c > index 3082e72e4f6c..4dc1064bf408 100644 > --- a/drivers/spi/spi-fsl-dspi.c > +++ b/drivers/spi/spi-fsl-dspi.c > @@ -243,9 +243,6 @@ static void dspi_push_rx(struct fsl_dspi *dspi, u32 rxdata) > if (!dspi->rx) > return; > > - /* Mask of undefined bits */ > - rxdata &= (1 << dspi->bits_per_word) - 1; What is the dspi->bits_per_word value when your rxdata is set equal to 0? Could this perhaps also be related to byte ordering problems? > if (dspi->bytes_per_word == 1) > *(u8 *)dspi->rx = rxdata; > else if (dspi->bytes_per_word == 2) /Esben