public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Moritz Fischer <mdf@kernel.org>
To: Enric Balletbo Serra <eballetbo@gmail.com>
Cc: Moritz Fischer <mdf@kernel.org>,
	linux-kernel <linux-kernel@vger.kernel.org>,
	Enric Balletbo i Serra <enric.balletbo@collabora.com>,
	Benson Leung <bleung@chromium.org>,
	Guenter Roeck <groeck@chromium.org>,
	Lee Jones <lee.jones@linaro.org>,
	Moritz Fischer <moritz@ettus.com>
Subject: Re: [PATCH v3] platform/chrome: Add cros_ec_readmem() helpers for I2C/SPI based ECs
Date: Tue, 22 Jan 2019 13:09:12 -0800	[thread overview]
Message-ID: <20190122210912.GA8081@archbook> (raw)
In-Reply-To: <CAFqH_50fsPx1raFReNt719fT2DmgAb0YHwzzbmfdAy9gYigLiA@mail.gmail.com>

Hi Enrico,

On Mon, Jan 21, 2019 at 11:19:34PM +0100, Enric Balletbo Serra wrote:
> I tried with a Samsung Chromebook Plus (arm64 Chromebook)
> 
> > What was the ioctl you ran?
> >
> 
> The code that I ran is this: https://hastebin.com/cupecuvowi.py
> No guarantee :) I'll try to look deeper tomorrow.

I fixed it up to run with python3, but on my device I got either a
protocol error if len is > 120:

root@ni-n3xx-313ABDC:~# python3 foo
Testing EC_DEV_IOCRDMEM cmd
I/O error(71): Protocol error

or it worked for lengths <= 120:

root@ni-n3xx-313ABDC:~# python3 foo
Testing EC_DEV_IOCRDMEM cmd
6b 6f ff ff ff ff ff ff ff ff ff ff ff ff ff ff f0 0f f0 0f ff ff ff ff 
ff ff ff ff ff ff ff ff 45 43 01 02 00 01 01 00 00 00 00 00 00 00 00 00
05 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[...]

Did you try smaller reads? If that works maybe we'll have to filter in
the kernel to prevent large reads from crashing the EC?

Thanks,

Moritz

  reply	other threads:[~2019-01-22 21:09 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-01-10  4:36 [PATCH v3] platform/chrome: Add cros_ec_readmem() helpers for I2C/SPI based ECs Moritz Fischer
2019-01-21 17:32 ` Enric Balletbo Serra
2019-01-21 18:40   ` Moritz Fischer
2019-01-21 22:19     ` Enric Balletbo Serra
2019-01-22 21:09       ` Moritz Fischer [this message]
2019-01-23 11:33         ` Enric Balletbo Serra

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=20190122210912.GA8081@archbook \
    --to=mdf@kernel.org \
    --cc=bleung@chromium.org \
    --cc=eballetbo@gmail.com \
    --cc=enric.balletbo@collabora.com \
    --cc=groeck@chromium.org \
    --cc=lee.jones@linaro.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=moritz@ettus.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