The Linux Kernel Mailing List
 help / color / mirror / Atom feed
From: Jean Delvare <khali@linux-fr.org>
To: Daniel Kurtz <djkurtz@chromium.org>
Cc: ben-linux@fluff.org, seth.heasley@intel.com, ben@decadent.org.uk,
	David.Woodhouse@intel.com, linux-i2c@vger.kernel.org,
	linux-kernel@vger.kernel.org, olofj@chromium.org,
	bleung@chromium.org
Subject: Re: [PATCH 0/3 v2] i2c: i801: enable irq
Date: Wed, 27 Jun 2012 16:01:21 +0200	[thread overview]
Message-ID: <20120627160121.3c3c3a88@endymion.delvare> (raw)
In-Reply-To: <CAGS+omDYaPBQiKBiVewbwZR2Vnjv+NfqbZxc+fknpCBNvRFRKw@mail.gmail.com>

On Wed, 27 Jun 2012 21:56:34 +0800, Daniel Kurtz wrote:
> On Wed, Jun 27, 2012 at 5:24 PM, Jean Delvare <khali@linux-fr.org> wrote:
> > I planned on testing this on my ICH3-M system, but it turns out your
> > interrupt-based implementation only works for ICH5 and later chips. As
> > ICH5 and later chips all implement the block buffer, there's no reason
> > for the byte-by-byte-code to ever be used for SMBus block transactions.
> > However, the block buffer feature can be disabled for testing purpose
> > by passing module parameter disable_features=0x0002.
> >
> > I just did, and actually it doesn't work. i2cdump shows 32 bytes no
> > matter what the device said. Debug log shows that the driver reads
> > fewer bytes from the device though, as it is supposed to. So I think
> > the problem is simply that the interrupt path is missing this compared
> > to the polled path:
> >
> >                if (i == 1 && read_write == I2C_SMBUS_READ
> >                 && command != I2C_SMBUS_I2C_BLOCK_DATA) {
> >                        len = inb_p(SMBHSTDAT0(priv));
> >                        (...)
> >                        data->block[0] = len;
> >                }
> >
> > I.e. we don't let the caller know how many bytes we actually read from
> > the device. I fixed it with:
> >
> 
> I was just in the middle of finalizing a new patchset when I saw your
> last email.
> I incorporated (and tested for no-regressions) the snippet below.
> Unfortunately, I'm not set up to test this type of transaction, so
> hopefully you can double check my version of this patch with your
> setup.

Sure, no problem, I will do another full round of testing on the new
patchset.

-- 
Jean Delvare

      reply	other threads:[~2012-06-27 14:01 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-01-06 10:58 [PATCH 0/3 v2] i2c: i801: enable irq Daniel Kurtz
2012-01-06 10:58 ` [PATCH 1/3] i2c: i801: refactor i801_block_transaction_byte_by_byte Daniel Kurtz
2012-06-19 14:42   ` Jean Delvare
2012-01-06 10:58 ` [PATCH 2/3 v2] i2c: i801: enable irq for i801 smbus transactions Daniel Kurtz
2012-06-19 18:47   ` Jean Delvare
2012-06-20  8:58     ` Jean Delvare
2012-06-20 10:21       ` Daniel Kurtz
2012-06-20 10:51         ` Jean Delvare
2012-06-20  7:42   ` Jean Delvare
2012-01-06 10:58 ` [PATCH 3/3 v2] i2c: i801: enable irq for byte_by_byte transactions Daniel Kurtz
2012-06-20 13:34   ` Jean Delvare
2012-06-26 16:24     ` Jean Delvare
2012-01-06 11:35 ` [PATCH 0/3 v2] i2c: i801: enable irq Jean Delvare
2012-02-20 11:23   ` Daniel Kurtz
2012-05-09  6:36     ` Daniel Kurtz
2012-06-27  9:24 ` Jean Delvare
2012-06-27 13:56   ` Daniel Kurtz
2012-06-27 14:01     ` Jean Delvare [this message]

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=20120627160121.3c3c3a88@endymion.delvare \
    --to=khali@linux-fr.org \
    --cc=David.Woodhouse@intel.com \
    --cc=ben-linux@fluff.org \
    --cc=ben@decadent.org.uk \
    --cc=bleung@chromium.org \
    --cc=djkurtz@chromium.org \
    --cc=linux-i2c@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=olofj@chromium.org \
    --cc=seth.heasley@intel.com \
    /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