RE: elan_i2c: failed to read report data: -71

From
jingle <hidden>
Date
2021-03-03 05:38:09
Reply to
Uwe Kleine-König, 2021-03-03
HI uwe:

Please updates this patchs.

https://git.kernel.org/pub/scm/linux/kernel/git/dtor/input.git/commit/?h=nex
t&id=056115daede8d01f71732bc7d778fb85acee8eb6

https://git.kernel.org/pub/scm/linux/kernel/git/dtor/input.git/commit/?h=nex
t&id=e4c9062717feda88900b566463228d1c4910af6d

Thanks
jingle

-----Original Message-----
From: Uwe Kleine-König [mailto:<redacted>] 
Sent: Wednesday, March 03, 2021 5:10 AM
To: Jingle Wu; Dmitry Torokhov; kernel@pengutronix.de
Cc: <redacted>
Subject: elan_i2c: failed to read report data: -71

Hello,

I just installed Linux on a new Thinkpad E15 and I experience a non-working
touchpad. I can move the mouse just fine, but when I press one of the three
buttons or move the trackpoint the kernel log gets flooded with:

	elan_i2c 0-0015: failed to read report data: -71

and nothing happens in the GUI.

This is a kernel from Debian testing, i.e. 5.10.13, during probe of the
device the following is reported:

	elan_i2c 0-0015: supply vcc not found, using dummy regulator
	elan_i2c 0-0015: Elan Touchpad: Module ID: 0x000e, Firmware: 0x0001,
Sample: 0x0000, IAP: 0x0000
	input: Elan Touchpad as
/devices/pci0000:00/0000:00:1f.4/i2c-0/0-0015/input/input21
	input: Elan TrackPoint as
/devices/pci0000:00/0000:00:1f.4/i2c-0/0-0015/input/input22

I backported commits

	056115daede8 Input: elan_i2c - add new trackpoint report type 0x5F
	c7f0169e3bd2 Input: elan_i2c_core - move header inclusion inside

to this kernel, but this didn't help.

When enabling smbus tracing the matching events are:

 irq/159-elan_i2-2207    [003] ....   963.625641: smbus_read: i2c-0 a=015
f=0040 c=a8 BLOCK_DATA
 irq/159-elan_i2-2207    [003] ....   963.629247: smbus_result: i2c-0 a=015
f=0000 c=a8 BLOCK_DATA rd res=-71

The relevant code is:

        len = i2c_smbus_read_block_data(client,
                                        ETP_SMBUS_PACKET_QUERY,
                                        &report[ETP_SMBUS_REPORT_OFFSET]);
        if (len < 0) {
                dev_err(&client->dev, "failed to read report data: %d\n",
len);
                return len;
        }

I think the failing location in the i2c driver is

        if (read_write == I2C_SMBUS_READ ||
            command == I2C_SMBUS_BLOCK_PROC_CALL) {
                len = inb_p(SMBHSTDAT0(priv));
                if (len < 1 || len > I2C_SMBUS_BLOCK_MAX)
                        return -EPROTO;

                data->block[0] = len;
                for (i = 0; i < len; i++)
                        data->block[i + 1] = inb_p(SMBBLKDAT(priv));
        }

in i801_block_transaction_by_block().

Does this ring a bell? Does someone know if there is documentation
available?

Best regards
Uwe

-- 
Pengutronix e.K.                           | Uwe Kleine-König            |
Industrial Linux Solutions                 | https://www.pengutronix.de/ |
Thread (13 messages) 13 messages, 6 authors, 2021-03-26
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help