Date: Wed, 9 Feb 2011 11:28:58 +0000 (UTC) From: Marius Strobl <marius@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r218478 - head/sys/dev/sound/pci Message-ID: <201102091128.p19BSw2c081986@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: marius Date: Wed Feb 9 11:28:57 2011 New Revision: 218478 URL: http://svn.freebsd.org/changeset/base/218478 Log: Correct signedness and off-by-one issues in parameters used for DMA tag creation. PR: 154259 Submitted by: Vladislav Movchan (partially) MFC after: 3 days Modified: head/sys/dev/sound/pci/emu10k1.c head/sys/dev/sound/pci/emu10kx.c Modified: head/sys/dev/sound/pci/emu10k1.c ============================================================================== --- head/sys/dev/sound/pci/emu10k1.c Wed Feb 9 10:06:31 2011 (r218477) +++ head/sys/dev/sound/pci/emu10k1.c Wed Feb 9 11:28:57 2011 (r218478) @@ -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: head/sys/dev/sound/pci/emu10kx.c ============================================================================== --- head/sys/dev/sound/pci/emu10kx.c Wed Feb 9 10:06:31 2011 (r218477) +++ head/sys/dev/sound/pci/emu10kx.c Wed Feb 9 11:28:57 2011 (r218478) @@ -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,
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201102091128.p19BSw2c081986>