From owner-svn-src-all@FreeBSD.ORG Sat Feb 12 13:41:00 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B5B47106564A; Sat, 12 Feb 2011 13:41:00 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 8901F8FC12; Sat, 12 Feb 2011 13:41:00 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id p1CDf0LG003333; Sat, 12 Feb 2011 13:41:00 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p1CDf0Gi003330; Sat, 12 Feb 2011 13:41:00 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201102121341.p1CDf0Gi003330@svn.freebsd.org> From: Marius Strobl Date: Sat, 12 Feb 2011 13:41:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r218606 - stable/8/sys/dev/sound/pci X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 12 Feb 2011 13:41:00 -0000 Author: marius Date: Sat Feb 12 13:41:00 2011 New Revision: 218606 URL: http://svn.freebsd.org/changeset/base/218606 Log: MFC: r218478 Correct signedness and off-by-one issues in parameters used for DMA tag creation. PR: 154259 Submitted by: Vladislav Movchan (partially) Modified: stable/8/sys/dev/sound/pci/emu10k1.c stable/8/sys/dev/sound/pci/emu10kx.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) Modified: stable/8/sys/dev/sound/pci/emu10k1.c ============================================================================== --- stable/8/sys/dev/sound/pci/emu10k1.c Sat Feb 12 13:28:50 2011 (r218605) +++ stable/8/sys/dev/sound/pci/emu10k1.c Sat Feb 12 13:41:00 2011 (r218606) @@ -2017,7 +2017,7 @@ emu_pci_attach(device_t dev) if (bus_dma_tag_create(/*parent*/bus_get_dma_tag(dev), /*alignment*/2, /*boundary*/0, - /*lowaddr*/1 << 31, /* can only access 0-2gb */ + /*lowaddr*/(1U << 31) - 1, /* can only access 0-2gb */ /*highaddr*/BUS_SPACE_MAXADDR, /*filter*/NULL, /*filterarg*/NULL, /*maxsize*/sc->bufsz, /*nsegments*/1, /*maxsegz*/0x3ffff, Modified: stable/8/sys/dev/sound/pci/emu10kx.c ============================================================================== --- stable/8/sys/dev/sound/pci/emu10kx.c Sat Feb 12 13:28:50 2011 (r218605) +++ stable/8/sys/dev/sound/pci/emu10kx.c Sat Feb 12 13:41:00 2011 (r218606) @@ -2700,7 +2700,7 @@ emu_init(struct emu_sc_info *sc) if (bus_dma_tag_create( /* parent */ bus_get_dma_tag(sc->dev), /* alignment */ 2, /* boundary */ 0, - /* lowaddr */ 1 << 31, /* can only access 0-2gb */ + /* lowaddr */ (1U << 31) - 1, /* can only access 0-2gb */ /* highaddr */ BUS_SPACE_MAXADDR, /* filter */ NULL, /* filterarg */ NULL, /* maxsize */ EMU_MAX_BUFSZ, /* nsegments */ 1, /* maxsegz */ 0x3ffff,