On Wed, Nov 5, 2014 at 5:22 AM, Jean Delvare <jdelvare@xxxxxxx> wrote: >> Gentoo stabilized 3.16 a couple weeks ago, and I just realized "oh >> yeah, I forgot to follow up with the i2c guys". 3.16.5 works without >> reverting commit 6676a847. Okay, so I guess I spoke too soon. Using 3.16.5, the sensors can be read for a little while after boot (anywhere from 20–50 minutes), and then it locks up again: any process that tries to read the sensors gets stuck in disk-wait. But using the debug version of the i2c-i801.c that Jean linked to above, I was able to figure out the problem. It's in drivers/i2c/busses/i2c-i801.c:386 (line number in commit 7cfc183b3d63, which is the latest GIT commit at the time I'm writing this): wait_event(priv->waitq, (status = priv->status)); The debug version uses wait_event_timeout() instead of wait_event(). It looks like this call hangs about once an hour at irregular and unpredictable intervals, because the debug version dumps the following message into the kernel logs: Nov 07 10:04:03 jens kernel: i801_smbus 0000:00:1f.3: Timeout waiting for interrupt! Nov 07 10:04:03 jens kernel: i801_smbus 0000:00:1f.3: Reg dump: STS=42 CNT=08 CMD=81 ADD=5d DAT0=40 DAT1=00 BLKDAT=00 Nov 07 10:04:03 jens kernel: i801_smbus 0000:00:1f.3: Reg dump: PEC=00 AUXSTS=00 AUXCTL=00 Nov 07 10:04:03 jens kernel: i801_smbus 0000:00:1f.3: Transaction timeout Nov 07 10:04:03 jens kernel: i801_smbus 0000:00:1f.3: Failed terminating the transaction This error shows up about once an hour, at irregular and unpredictable intervals. The stock kernel doesn't have the timeout, so I infer that that's what causing it to hang. I'm not sure what's actually causing the "timeout waiting for interrupt"; I hope you guys can figure that out from the dumped registers. At the very least, it looks like we need to work around buggy hardware by using wait_event_timeout(). -- Soren Harward -- To unsubscribe from this list: send the line "unsubscribe linux-i2c" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html