On Sat, Mar 05, 2011 at 05:10:31PM +0000, Matthias Rampke (via DragonFly issue 
tracker) wrote:
> 
> Matthias Rampke <[email protected]> added the comment:
> 
> The attached patch fixes this problem for me on master in VirtualBox 4.0.4 
> (DragonFly  2.9-DEVELOPMENT DragonFly v2.9.1.826.g04458-DEVELOPMENT #1: Sat 
> Mar  
> 5 10:49:13 CET 2011     root@:/usr/obj/usr/src/sys/X86_64_GENERIC_SMP_HDA  
> x86_64)
> 
> The kernel boots fine and the sound device is attached (dmesg snippet:

I had a more complete look at bus_dma_tag_create() this morning. It really
expects an argument of type bus_addr_t.

I'm afraid your changes only work by chance; the new attached patch should
fix this issue in a more sustainable way.

-- 
Francois Tigeot
>From 398b5d0b8ded4cd6d510cba6ff794d380854efbe Mon Sep 17 00:00:00 2001
From: Francois Tigeot <[email protected]>
Date: Sun, 6 Mar 2011 09:44:24 +0100
Subject: [PATCH] Fix a compilation error on x86_64.

bus_dma_tag_create() expects a bus_addr_t parameter for its lowaddr argument.
---
 sys/dev/sound/pci/hda/hdac.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/sys/dev/sound/pci/hda/hdac.c b/sys/dev/sound/pci/hda/hdac.c
index ae48ca5..6defdb2 100644
--- a/sys/dev/sound/pci/hda/hdac.c
+++ b/sys/dev/sound/pci/hda/hdac.c
@@ -1408,7 +1408,7 @@ hdac_dma_alloc(struct hdac_softc *sc, struct hdac_dma 
*dma, bus_size_t size)
 {
        bus_size_t roundsz;
        int result;
-       int lowaddr;
+       bus_addr_t lowaddr;
 
        roundsz = roundup2(size, HDAC_DMA_ALIGNMENT);
        lowaddr = (sc->support_64bit) ? BUS_SPACE_MAXADDR :
-- 
1.7.3.4

Reply via email to