NetBSD-Bugs archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
port-arm/48932: Raspberry Pi i2c ioctl returns success even though i2c slave device NACKed
>Number: 48932
>Category: port-arm
>Synopsis: Raspberry Pi i2c ioctl returns success even though i2c slave
>device NACKed
>Confidential: no
>Severity: serious
>Priority: high
>Responsible: port-arm-maintainer
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Sat Jun 21 01:25:00 +0000 2014
>Originator: Yunis Mustafa
>Release: evbarm-earmhf/201405181900Z
>Organization:
>Environment:
NetBSD rpi 6.99.42 NetBSD 6.99.42 (RPI) #0: Sun May 18 20:34:46 UTC 2014
builds%b44.netbsd.org@localhost:/home/builds/ab/HEAD/evbarm-earmhf/201405181900Z-obj/home/builds/ab/HEAD/src/sys/arch/evbarm/compile/RPI
evbarm
>Description:
i2c bus protocol analyzer capture shows that the i2cscan utility's
ioctl(I2C_OP_WRITE_WITH_STOP) was NACK-ed (well, devices with most of those
addresses don't exist), but the ioctl returned success. This is causing the
i2cscan utility to detect phantom devices which do not exist.
This was observed with my own application talking to an i2c slave device I am
using. The problem I have with this is that my slave device will NACK when it
is busy, but I cannot programmatically detect this and retry the write request
because the ioctl will return success even when the actual write operation was
NACK-ed/failed.
I have i2c capture screenshots which show the i2c data for further information.
Not sure how to load the screen shots to this PR though.
>How-To-Repeat:
- Setup I2C Bus Capture (I use saleae product)
- Run "i2cscan /dev/iic1"
- Obserce the i2c bus capture output - notice NACKs for devices which do not
exist.
- But i2cscan will print that device was found for that address.
>Fix:
Home |
Main Index |
Thread Index |
Old Index