public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Ninad Palsule <ninad@linux.ibm.com>
To: jk@ozlabs.org, joel@jms.id.au, alistair@popple.id.au,
	eajames@linux.ibm.com, linux-fsi@lists.ozlabs.org,
	linux-kernel@vger.kernel.org
Cc: Ninad Palsule <ninad@linux.ibm.com>
Subject: [PATCH v1 1/2] fsi: sbefifo: Remove write's max command length
Date: Thu,  7 Sep 2023 17:10:15 -0500	[thread overview]
Message-ID: <20230907221016.2978802-2-ninad@linux.ibm.com> (raw)
In-Reply-To: <20230907221016.2978802-1-ninad@linux.ibm.com>

This commit removes max command length check in the user write path.
This is required to support images larger than 1MB. This should not
create any issues as read path does not have this check either.

As per the original design cronus server was suppose to break up the
image into 1MB pieces but it requires restructuring of the driver.
Today driver sends EOT message on each write request so we will have to
send it only after all pieces are sent which requires large change hence
we decided to remove this check.

Testing:
  Loaded 3 MB image through cronus server.

Signed-off-by: Ninad Palsule <ninad@linux.ibm.com>
---
 drivers/fsi/fsi-sbefifo.c | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/drivers/fsi/fsi-sbefifo.c b/drivers/fsi/fsi-sbefifo.c
index 9912b7a6a4b9..b771dff27f7f 100644
--- a/drivers/fsi/fsi-sbefifo.c
+++ b/drivers/fsi/fsi-sbefifo.c
@@ -113,7 +113,6 @@ enum sbe_state
 #define SBEFIFO_TIMEOUT_IN_RSP		1000
 
 /* Other constants */
-#define SBEFIFO_MAX_USER_CMD_LEN	(0x100000 + PAGE_SIZE)
 #define SBEFIFO_RESET_MAGIC		0x52534554 /* "RSET" */
 
 struct sbefifo {
@@ -870,8 +869,6 @@ static ssize_t sbefifo_user_write(struct file *file, const char __user *buf,
 	if (!user)
 		return -EINVAL;
 	sbefifo = user->sbefifo;
-	if (len > SBEFIFO_MAX_USER_CMD_LEN)
-		return -EINVAL;
 	if (len & 3)
 		return -EINVAL;
 
-- 
2.39.2


  reply	other threads:[~2023-09-07 22:10 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-09-07 22:10 [PATCH v1 0/2] fsi: sbefifo: fixes Ninad Palsule
2023-09-07 22:10 ` Ninad Palsule [this message]
2023-09-11  6:03   ` [PATCH v1 1/2] fsi: sbefifo: Remove write's max command length Joel Stanley
2023-09-11 22:42     ` Ninad Palsule
2023-09-07 22:10 ` [PATCH v1 2/2] fsi: sbefifo: Validate pending user write Ninad Palsule
2023-09-11  5:52   ` Joel Stanley
2023-09-11 22:40     ` Ninad Palsule

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=20230907221016.2978802-2-ninad@linux.ibm.com \
    --to=ninad@linux.ibm.com \
    --cc=alistair@popple.id.au \
    --cc=eajames@linux.ibm.com \
    --cc=jk@ozlabs.org \
    --cc=joel@jms.id.au \
    --cc=linux-fsi@lists.ozlabs.org \
    --cc=linux-kernel@vger.kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox