All of lore.kernel.org
 help / color / mirror / Atom feed
From: Eddie James <eajames@linux.ibm.com>
To: openbmc@lists.ozlabs.org
Cc: joel@jms.id.au, Brad Bishop <bradleyb@fuzziesquirrel.com>,
	Eddie James <eajames@linux.ibm.com>
Subject: [PATCH linux dev-5.7 1/6] spi: fsi: Handle 9 to 15 byte transfers lengths
Date: Wed, 29 Jul 2020 15:45:23 -0500	[thread overview]
Message-ID: <20200729204528.15157-2-eajames@linux.ibm.com> (raw)
In-Reply-To: <20200729204528.15157-1-eajames@linux.ibm.com>

From: Brad Bishop <bradleyb@fuzziesquirrel.com>

The trailing <len> - 8 bytes of transfer data in this size range is no
longer ignored.

Signed-off-by: Eddie James <eajames@linux.ibm.com>
Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
---
 drivers/spi/spi-fsi.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/spi/spi-fsi.c b/drivers/spi/spi-fsi.c
index 37a3e0f8e752..8f64af0140e0 100644
--- a/drivers/spi/spi-fsi.c
+++ b/drivers/spi/spi-fsi.c
@@ -258,15 +258,15 @@ static int fsi_spi_sequence_transfer(struct fsi_spi *ctx,
 	if (loops > 1) {
 		fsi_spi_sequence_add(seq, SPI_FSI_SEQUENCE_BRANCH(idx));
 
-		if (rem)
-			fsi_spi_sequence_add(seq, rem);
-
 		rc = fsi_spi_write_reg(ctx, SPI_FSI_COUNTER_CFG,
 				       SPI_FSI_COUNTER_CFG_LOOPS(loops - 1));
 		if (rc)
 			return rc;
 	}
 
+	if (rem)
+		fsi_spi_sequence_add(seq, rem);
+
 	return 0;
 }
 
-- 
2.24.0

  reply	other threads:[~2020-07-29 20:45 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-29 20:45 [PATCH linux dev-5.7 0/6] spi: Fix FSI-attached controller and AT25 drivers Eddie James
2020-07-29 20:45 ` Eddie James [this message]
2020-07-29 23:41   ` [PATCH linux dev-5.7 1/6] spi: fsi: Handle 9 to 15 byte transfers lengths Joel Stanley
2020-07-29 20:45 ` [PATCH linux dev-5.7 2/6] spi: fsi: Fix clock running too fast Eddie James
2020-07-29 23:25   ` Joel Stanley
2020-07-30 21:31     ` Eddie James
2020-07-29 20:45 ` [PATCH linux dev-5.7 3/6] spi: fsi: Fix use of the bneq+ sequencer instruction Eddie James
2020-07-29 23:27   ` Joel Stanley
2020-07-29 20:45 ` [PATCH linux dev-5.7 4/6] dt-bindings: fsi: fsi2spi: Document new restricted property Eddie James
2020-07-29 23:27   ` Joel Stanley
2020-07-29 20:45 ` [PATCH linux dev-5.7 5/6] spi: fsi: Implement restricted size for certain controllers Eddie James
2020-07-29 23:33   ` Joel Stanley
2020-07-29 20:45 ` [PATCH linux dev-5.7 6/6] eeprom: at25: Split reads into chunks and cap write size Eddie James
2020-07-29 23:28   ` Milton Miller II
2020-07-29 23:35 ` [PATCH linux dev-5.7 0/6] spi: Fix FSI-attached controller and AT25 drivers Joel Stanley

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200729204528.15157-2-eajames@linux.ibm.com \
    --to=eajames@linux.ibm.com \
    --cc=bradleyb@fuzziesquirrel.com \
    --cc=joel@jms.id.au \
    --cc=openbmc@lists.ozlabs.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.