Messages in this thread | | | Date | Tue, 22 Jan 2019 13:09:12 -0800 | From | Moritz Fischer <> | Subject | Re: [PATCH v3] platform/chrome: Add cros_ec_readmem() helpers for I2C/SPI based ECs |
| |
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
| |