From owner-freebsd-hackers@FreeBSD.ORG Fri Mar 13 14:49:37 2009 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3A6391065674 for ; Fri, 13 Mar 2009 14:49:37 +0000 (UTC) (envelope-from avg@freebsd.org) Received: from citadel.icyb.net.ua (citadel.icyb.net.ua [212.40.38.140]) by mx1.freebsd.org (Postfix) with ESMTP id 7C4A98FC19 for ; Fri, 13 Mar 2009 14:49:36 +0000 (UTC) (envelope-from avg@freebsd.org) Received: from odyssey.starpoint.kiev.ua (alpha-e.starpoint.kiev.ua [212.40.38.101]) by citadel.icyb.net.ua (8.8.8p3/ICyb-2.3exp) with ESMTP id QAA10081 for ; Fri, 13 Mar 2009 16:29:36 +0200 (EET) (envelope-from avg@freebsd.org) Message-ID: <49BA6DD0.1080407@freebsd.org> Date: Fri, 13 Mar 2009 16:29:36 +0200 From: Andriy Gapon User-Agent: Thunderbird 2.0.0.19 (X11/20090110) MIME-Version: 1.0 To: freebsd-hackers@freebsd.org References: <49BA5F24.1020105@icyb.net.ua> In-Reply-To: <49BA5F24.1020105@icyb.net.ua> X-Enigmail-Version: 0.95.7 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Subject: Re: intpm: multiple salves, collision ?? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 13 Mar 2009 14:49:37 -0000 on 13/03/2009 15:27 Andriy Gapon said the following: > I observe some quite odd behavior with intpm(4). > I have a program that access two slaves at a high rate (no sleeps or > long calculations). The typical pattern of access is: > 1. SMB_WRITEB slave1 reg1 > 2. SMB_READB slave1 reg2 > 3. SMB_READB *slave2* reg > 4. SMB_READB slave1 reg3 > > There are many iterations of this pattern in a tight loop. > There is definitely only one entity that uses SMBus - no other userland > programs, nothing in kernel, nothing in ACPI and BIOS. > > At random iteration smb ioctl would fail with EIO. This happens > consistently at step 4. Debugging printf in intpm gives this: > intsmb0: error = 8, status = 0x8 > That is, PIIX4_SMBHSTSTAT_BUSC translated to SMB_ECOLLI. > > Error can not be reproduced if only one slave is accessed, no matter in > what patterns. > Sorry for the noise, the problem seems to be in misbehavior on part of one of the slaves used by the original program. I wrote a minimalistic test program and ran it for several different combinations of slaves - the issue only occurs if a certain slave is accessed, no problems for any other slaves. I wonder what could be wrong with that slave. -- Andriy Gapon