mirror of https://gitee.com/openkylin/qemu.git
9706e0162d
If the guest attempts to talk to a nonexistent device over i2c, the i2c_start_transfer() function will return non-zero, indicating that the bus is signalling a NACK. Similarly, if the i2c_send() function returns nonzero then the target device returned a NACK. Handle this possibility in the bitbang_i2c code, by returning the state machine to the STOPPED state and returning the NACK bit to the guest. This bit of missing functionality was spotted by Coverity (it noticed that we weren't checking the return value from i2c_start_transfer()). Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Message-id: 1477332749-27098-1-git-send-email-peter.maydell@linaro.org |
||
---|---|---|
.. | ||
Makefile.objs | ||
aspeed_i2c.c | ||
bitbang_i2c.c | ||
bitbang_i2c.h | ||
core.c | ||
exynos4210_i2c.c | ||
i2c-ddc.c | ||
imx_i2c.c | ||
omap_i2c.c | ||
pm_smbus.c | ||
smbus.c | ||
smbus_eeprom.c | ||
smbus_ich9.c | ||
versatile_i2c.c |