From: Jean Delvare <khali-PUYAD+kWke1g9hUCZPvPmw@public.gmane.org>
To: Linux I2C <linux-i2c-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>
Cc: Felix Rubinstein
<felixru-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>,
Oleg Ryjkov <oryjkov-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>,
Seth Heasley
<seth.heasley-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
Subject: [PATCH] i2c-i801: Don't use the block buffer for I2C block writes
Date: Thu, 4 Mar 2010 11:01:09 +0100 [thread overview]
Message-ID: <20100304110109.541b846e@hyperion.delvare> (raw)
From: Jean Delvare <khali-PUYAD+kWke1g9hUCZPvPmw@public.gmane.org>
Subject: i2c-i801: Don't use the block buffer for I2C block writes
Experience has shown that the block buffer can only be used for SMBus
(not I2C) block transactions, even though the datasheet doesn't
mention this limitation.
Signed-off-by: Jean Delvare <khali-PUYAD+kWke1g9hUCZPvPmw@public.gmane.org>
Cc: Felix Rubinstein <felixru-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Cc: Oleg Ryjkov <oryjkov-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Cc: Seth Heasley <seth.heasley-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
---
Oleg, can you remember which transaction types you tested when you
added support for the block buffer originally?
Seth, do you have any additional information regarding the use of the
32-byte block buffer with I2C block read and write transactions on
Intel ICH chips? The datasheet doesn't say it won't work, but
experience suggests that this is the case. Which is unfortunate because
it degrades performance quite a bit.
drivers/i2c/busses/i2c-i801.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
--- linux-2.6.34-rc0.orig/drivers/i2c/busses/i2c-i801.c 2010-03-04 10:54:22.000000000 +0100
+++ linux-2.6.34-rc0/drivers/i2c/busses/i2c-i801.c 2010-03-04 10:54:28.000000000 +0100
@@ -416,9 +416,11 @@ static int i801_block_transaction(union
data->block[0] = 32; /* max for SMBus block reads */
}
+ /* Experience has shown that the block buffer can only be used for
+ SMBus (not I2C) block transactions, even though the datasheet
+ doesn't mention this limitation. */
if ((i801_features & FEATURE_BLOCK_BUFFER)
- && !(command == I2C_SMBUS_I2C_BLOCK_DATA
- && read_write == I2C_SMBUS_READ)
+ && command != I2C_SMBUS_I2C_BLOCK_DATA
&& i801_set_block_buffer_mode() == 0)
result = i801_block_transaction_by_block(data, read_write,
hwpec);
--
Jean Delvare
next reply other threads:[~2010-03-04 10:01 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-03-04 10:01 Jean Delvare [this message]
[not found] ` <20100304110109.541b846e-ig7AzVSIIG7kN2dkZ6Wm7A@public.gmane.org>
2010-03-04 10:09 ` [PATCH] i2c-i801: Don't use the block buffer for I2C block writes Wolfram Sang
[not found] ` <20100304100917.GB18304-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
2010-03-04 10:16 ` Jean Delvare
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=20100304110109.541b846e@hyperion.delvare \
--to=khali-puyad+kwke1g9huczpvpmw@public.gmane.org \
--cc=felixru-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
--cc=linux-i2c-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=oryjkov-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
--cc=seth.heasley-ral2JQCrhuEAvxtiuMwx3w@public.gmane.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;
as well as URLs for NNTP newsgroup(s).