aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorPeter Maydell <peter.maydell@linaro.org>2016-10-24 19:12:29 +0100
committerPeter Maydell <peter.maydell@linaro.org>2016-11-07 10:01:15 +0000
commit9706e0162d2405218fd7376ffdf13baed8569a4b (patch)
treefc0b5ad553ae5602a69816ffa980695a43311443 /include
parent3823b9db77e753041c04c161ac9f4d4cfc661520 (diff)
hw/i2c/bitbang_i2c: Handle NACKs from devicespull-target-arm-20161107
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
Diffstat (limited to 'include')
0 files changed, 0 insertions, 0 deletions