I2C connectivity incompatible with recent Linux kernel

Versions: Linux 4.16.8, 396.24 drivers

The I2C_RDWR ioctl fails to work because nv-i2c.c has a check for “if (msgs[i].flags & ~I2C_M_RD)” and returns EINVAL if any flag besides RD is set. Recently the kernel started passing I2C_M_DMA_SAFE new flag to I2C drivers to indicate that the buffer is DMA safe: https://patchwork.ozlabs.org/patch/816403/ for all RDWR buffers, and so RDWR is now broken.

(my apologies if this is not the correct place to report bugs like this, I’m not sure where they should go)

Thanks for reporting this. I filed bug 2123675.