All of lore.kernel.org
 help / color / mirror / Atom feed
From: Matt Johnston <matt@codeconstruct.com.au>
To: unlisted-recipients:; (no To-header on input)
Cc: Zev Weiss <zev@bewilderbeest.net>, Wolfram Sang <wsa@kernel.org>,
	Rob Herring <robh+dt@kernel.org>,
	"David S . Miller" <davem@davemloft.net>,
	Jakub Kicinski <kuba@kernel.org>,
	Brendan Higgins <brendanhiggins@google.com>,
	Benjamin Herrenschmidt <benh@kernel.crashing.org>,
	Joel Stanley <joel@jms.id.au>, Andrew Jeffery <andrew@aj.id.au>,
	Avi Fishman <avifishman70@gmail.com>,
	Tomer Maimon <tmaimon77@gmail.com>,
	Tali Perry <tali.perry1@gmail.com>,
	Patrick Venture <venture@google.com>,
	Nancy Yuen <yuenn@google.com>,
	Benjamin Fair <benjaminfair@google.com>,
	Jeremy Kerr <jk@codeconstruct.com.au>,
	linux-i2c@vger.kernel.org, netdev@vger.kernel.org
Subject: [PATCH net-next v3 3/6] i2c: aspeed: Allow 255 byte block transfers
Date: Mon, 15 Nov 2021 10:49:23 +0800	[thread overview]
Message-ID: <20211115024926.205385-4-matt@codeconstruct.com.au> (raw)
In-Reply-To: <20211115024926.205385-1-matt@codeconstruct.com.au>

255 byte transfers have been tested on an AST2500 board

Signed-off-by: Matt Johnston <matt@codeconstruct.com.au>
Reviewed-by: Brendan Higgins <brendanhiggins@google.com>
---
 drivers/i2c/busses/i2c-aspeed.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/drivers/i2c/busses/i2c-aspeed.c b/drivers/i2c/busses/i2c-aspeed.c
index 67e8b97c0c95..7395f3702fae 100644
--- a/drivers/i2c/busses/i2c-aspeed.c
+++ b/drivers/i2c/busses/i2c-aspeed.c
@@ -533,7 +533,7 @@ static u32 aspeed_i2c_master_irq(struct aspeed_i2c_bus *bus, u32 irq_status)
 		msg->buf[bus->buf_index++] = recv_byte;
 
 		if (msg->flags & I2C_M_RECV_LEN) {
-			if (unlikely(recv_byte > I2C_SMBUS_BLOCK_MAX)) {
+			if (unlikely(recv_byte > I2C_SMBUS_V3_BLOCK_MAX)) {
 				bus->cmd_err = -EPROTO;
 				aspeed_i2c_do_stop(bus);
 				goto out_no_complete;
@@ -718,7 +718,8 @@ static int aspeed_i2c_master_xfer(struct i2c_adapter *adap,
 
 static u32 aspeed_i2c_functionality(struct i2c_adapter *adap)
 {
-	return I2C_FUNC_I2C | I2C_FUNC_SMBUS_EMUL | I2C_FUNC_SMBUS_BLOCK_DATA;
+	return I2C_FUNC_I2C | I2C_FUNC_SMBUS_EMUL |
+		I2C_FUNC_SMBUS_BLOCK_DATA | I2C_FUNC_SMBUS_V3_BLOCK;
 }
 
 #if IS_ENABLED(CONFIG_I2C_SLAVE)
-- 
2.32.0


  parent reply	other threads:[~2021-11-15  2:49 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-15  2:49 [PATCH net-next v3 0/6] MCTP I2C driver Matt Johnston
2021-11-15  2:49 ` [PATCH net-next v3 1/6] i2c: core: Allow 255 byte transfers for SMBus 3.x Matt Johnston
2021-11-15  2:49 ` [PATCH net-next v3 2/6] i2c: dev: Handle 255 byte blocks for i2c ioctl Matt Johnston
2021-11-25  6:00   ` [PATCH] i2c: dev: fix eno.cocci warnings kernel test robot
2021-11-25  6:03   ` [PATCH net-next v3 2/6] i2c: dev: Handle 255 byte blocks for i2c ioctl kernel test robot
2021-11-15  2:49 ` Matt Johnston [this message]
2021-11-15  2:49 ` [PATCH net-next v3 4/6] i2c: npcm7xx: Allow 255 byte block SMBus transfers Matt Johnston
2021-11-15  2:49 ` [PATCH net-next v3 5/6] dt-bindings: net: New binding mctp-i2c-controller Matt Johnston
2021-11-15  2:49 ` [PATCH net-next v3 6/6] mctp i2c: MCTP I2C binding driver Matt Johnston
2021-11-15 14:20 ` [PATCH net-next v3 0/6] MCTP I2C driver patchwork-bot+netdevbpf
2021-11-15 15:30   ` Wolfram Sang
2021-11-15 16:08     ` Jakub Kicinski
2021-11-15 16:11       ` Wolfram Sang
2021-11-24  3:15     ` Matt Johnston
2021-11-29 19:34       ` Wolfram Sang

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=20211115024926.205385-4-matt@codeconstruct.com.au \
    --to=matt@codeconstruct.com.au \
    --cc=andrew@aj.id.au \
    --cc=avifishman70@gmail.com \
    --cc=benh@kernel.crashing.org \
    --cc=benjaminfair@google.com \
    --cc=brendanhiggins@google.com \
    --cc=davem@davemloft.net \
    --cc=jk@codeconstruct.com.au \
    --cc=joel@jms.id.au \
    --cc=kuba@kernel.org \
    --cc=linux-i2c@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=robh+dt@kernel.org \
    --cc=tali.perry1@gmail.com \
    --cc=tmaimon77@gmail.com \
    --cc=venture@google.com \
    --cc=wsa@kernel.org \
    --cc=yuenn@google.com \
    --cc=zev@bewilderbeest.net \
    /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.