From owner-svn-src-head@FreeBSD.ORG Sun Jan 27 09:31:12 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 368A8D89; Sun, 27 Jan 2013 09:31:12 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 1D26D833; Sun, 27 Jan 2013 09:31:12 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id r0R9VB6L075579; Sun, 27 Jan 2013 09:31:11 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id r0R9VBFw075578; Sun, 27 Jan 2013 09:31:11 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201301270931.r0R9VBFw075578@svn.freebsd.org> From: Konstantin Belousov Date: Sun, 27 Jan 2013 09:31:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r245976 - head/sys/dev/agp 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.14 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: Sun, 27 Jan 2013 09:31:12 -0000 Author: kib Date: Sun Jan 27 09:31:11 2013 New Revision: 245976 URL: http://svnweb.freebsd.org/changeset/base/245976 Log: Fix reversed condition in the logic to wait for the chipset buffers flush wait on the Gen2 chipsets. Confirmed by the inspection of the Linux agp code. Submitted by: Taku YAMAMOTO MFC after: 2 weeks Modified: head/sys/dev/agp/agp_i810.c Modified: head/sys/dev/agp/agp_i810.c ============================================================================== --- head/sys/dev/agp/agp_i810.c Sun Jan 27 07:22:46 2013 (r245975) +++ head/sys/dev/agp/agp_i810.c Sun Jan 27 09:31:11 2013 (r245976) @@ -2228,7 +2228,7 @@ agp_i830_chipset_flush(device_t dev) bus_write_4(sc->sc_res[0], AGP_I830_HIC, hic | (1 << 31)); for (i = 0; i < 20000 /* 1 sec */; i++) { hic = bus_read_4(sc->sc_res[0], AGP_I830_HIC); - if ((hic & (1 << 31)) != 0) + if ((hic & (1 << 31)) == 0) break; DELAY(50); }