NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

port-arm/48855: i2cscan on RPi NetBSD build finds device for all addresses



>Number:         48855
>Category:       port-arm
>Synopsis:       i2cscan on RPi NetBSD build finds device for all addresses
>Confidential:   no
>Severity:       serious
>Priority:       low
>Responsible:    port-arm-maintainer
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Fri May 30 21:05: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:
i2cscan /dev/iic0 (or iic1) erroneously detects devices and prints out the 
following for pretty much every address:

/dev/iic0: found device at 0x09
/dev/iic0: found device at 0x0a
/dev/iic0: found device at 0x0b
/dev/iic0: found device at 0x0d
/dev/iic0: found device at 0x0e
/dev/iic0: found device at 0x0f
/dev/iic0: found device at 0x10
/dev/iic0: found device at 0x11
/dev/iic0: found device at 0x12
/dev/iic0: found device at 0x13
/dev/iic0: found device at 0x14
/dev/iic0: found device at 0x15
/dev/iic0: found device at 0x16
/dev/iic0: found device at 0x17
/dev/iic0: found device at 0x18
/dev/iic0: found device at 0x19
/dev/iic0: found device at 0x1a
/dev/iic0: found device at 0x1b
/dev/iic0: found device at 0x1c
/dev/iic0: found device at 0x1d
/dev/iic0: found device at 0x1e
/dev/iic0: found device at 0x1f
/dev/iic0: found device at 0x20
/dev/iic0: found device at 0x21
/dev/iic0: found device at 0x22
/dev/iic0: found device at 0x23
/dev/iic0: found device at 0x24
/dev/iic0: found device at 0x25
/dev/iic0: found device at 0x26
/dev/iic0: found device at 0x27
/dev/iic0: found device at 0x29
/dev/iic0: found device at 0x2a
/dev/iic0: found device at 0x2b
/dev/iic0: found device at 0x2c
/dev/iic0: found device at 0x2d
/dev/iic0: found device at 0x2e
/dev/iic0: found device at 0x2f
/dev/iic0: found device at 0x38
/dev/iic0: found device at 0x39
/dev/iic0: found device at 0x3a
/dev/iic0: found device at 0x3b
/dev/iic0: found device at 0x3c
/dev/iic0: found device at 0x3d
/dev/iic0: found device at 0x3e
/dev/iic0: found device at 0x3f
/dev/iic0: found device at 0x40
/dev/iic0: found device at 0x41
/dev/iic0: found device at 0x42
/dev/iic0: found device at 0x43
/dev/iic0: found device at 0x44
/dev/iic0: found device at 0x45
/dev/iic0: found device at 0x46
/dev/iic0: found device at 0x47
/dev/iic0: found device at 0x4c
/dev/iic0: found device at 0x4d
/dev/iic0: found device at 0x4e
/dev/iic0: found device at 0x4f
/dev/iic0: found device at 0x60
/dev/iic0: found device at 0x62
/dev/iic0: found device at 0x63
/dev/iic0: found device at 0x64
/dev/iic0: found device at 0x65
/dev/iic0: found device at 0x66
/dev/iic0: found device at 0x67
/dev/iic0: found device at 0x68
/dev/iic0: found device at 0x69
/dev/iic0: found device at 0x6a
/dev/iic0: found device at 0x6b
/dev/iic0: found device at 0x6c
/dev/iic0: found device at 0x6d
/dev/iic0: found device at 0x6e
/dev/iic0: found device at 0x6f
/dev/iic0: found device at 0x70
/dev/iic0: found device at 0x71
/dev/iic0: found device at 0x72
/dev/iic0: found device at 0x73
/dev/iic0: found device at 0x74
/dev/iic0: found device at 0x75
/dev/iic0: found device at 0x76
/dev/iic0: found device at 0x77
/dev/iic0: 80 devices found
>How-To-Repeat:
i2cscan /dev/iic0

on a Raspberry Pi
>Fix:
On further debugging, it seems that the iic_smbus_quick_write() used by 
i2cscan.c to detect the devices returns success erroneously for some reason. 

If iic_smbus_receive_byte() is used instead to detect the devices, it correctly 
detects only the actual devices connected to the i2c bus (at least in my 
testing with an i2c device with address 0x11)



Home | Main Index | Thread Index | Old Index