From owner-svn-src-head@FreeBSD.ORG Wed Nov 12 03:07:47 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 5062454E; Wed, 12 Nov 2014 03:07:47 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3DB5E9D3; Wed, 12 Nov 2014 03:07:47 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sAC37l1S084847; Wed, 12 Nov 2014 03:07:47 GMT (envelope-from loos@FreeBSD.org) Received: (from loos@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sAC37lgI084846; Wed, 12 Nov 2014 03:07:47 GMT (envelope-from loos@FreeBSD.org) Message-Id: <201411120307.sAC37lgI084846@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: loos set sender to loos@FreeBSD.org using -f From: Luiz Otavio O Souza Date: Wed, 12 Nov 2014 03:07:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r274415 - head/sys/arm/broadcom/bcm2835 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Nov 2014 03:07:47 -0000 Author: loos Date: Wed Nov 12 03:07:46 2014 New Revision: 274415 URL: https://svnweb.freebsd.org/changeset/base/274415 Log: Fix the error checking, broken on r273337, to _not_ ignore controller errors. Without this fix you can't even scan the bus (all operations will always succeed). MFC with: r273337 Pointy hat to: loos Modified: head/sys/arm/broadcom/bcm2835/bcm2835_bsc.c Modified: head/sys/arm/broadcom/bcm2835/bcm2835_bsc.c ============================================================================== --- head/sys/arm/broadcom/bcm2835/bcm2835_bsc.c Wed Nov 12 02:44:27 2014 (r274414) +++ head/sys/arm/broadcom/bcm2835/bcm2835_bsc.c Wed Nov 12 03:07:46 2014 (r274415) @@ -441,7 +441,7 @@ bcm_bsc_transfer(device_t dev, struct ii err = mtx_sleep(dev, &sc->sc_mtx, 0, "bsciow", hz); /* Check for errors. */ - if (err != 0 && (sc->sc_flags & BCM_I2C_ERROR)) + if (err == 0 && (sc->sc_flags & BCM_I2C_ERROR)) err = EIO; if (err != 0) break;