diff -udBbr /tmp/yy/linux-2.6.11/sound/pci/au88x0/au88x0.c sound/pci/au88x0/au88x0.c
--- /tmp/yy/linux-2.6.11/sound/pci/au88x0/au88x0.c	2005-04-25 22:22:07.000000000 +0400
+++ sound/pci/au88x0/au88x0.c	2005-04-25 22:24:36.000000000 +0400
@@ -144,15 +144,18 @@
 	// check PCI availability (DMA).
 	if ((err = pci_enable_device(pci)) < 0)
 		return err;
-	if (!pci_dma_supported(pci, VORTEX_DMA_MASK)) {
+        if (pci_set_dma_mask(pci, VORTEX_DMA_MASK) < 0 ||
+        	pci_set_consistent_dma_mask(pci, VORTEX_DMA_MASK) < 0) {
 		printk(KERN_ERR "error to set DMA mask\n");
+		pci_disable_device(pci);
 		return -ENXIO;
 	}
-	pci_set_dma_mask(pci, VORTEX_DMA_MASK);
 
 	chip = kcalloc(1, sizeof(*chip), GFP_KERNEL);
-	if (chip == NULL)
+	if (chip == NULL) {
+		pci_disable_device(pci);
 		return -ENOMEM;
+	}
 
 	chip->card = card;
 
@@ -202,6 +205,8 @@
 		goto alloc_out;
 	}
 
+	snd_card_set_dev(card, &pci->dev);
+
 	*rchip = chip;
 
 	return 0;
diff -udBbr /tmp/yy/linux-2.6.11/sound/pci/au88x0/au88x0.h sound/pci/au88x0/au88x0.h
--- /tmp/yy/linux-2.6.11/sound/pci/au88x0/au88x0.h	2005-04-25 22:22:07.000000000 +0400
+++ sound/pci/au88x0/au88x0.h	2005-04-25 23:11:14.000000000 +0400
@@ -41,8 +41,8 @@
 
 #define	VORTEX_DMA_MASK	0xffffffff
 
-#define	hwread(x,y) readl((x)+((y)>>2))
-#define	hwwrite(x,y,z) writel((z),(x)+((y)>>2))
+#define	hwread(x,y) readl((x)+(y))
+#define	hwwrite(x,y,z) writel((z),(x)+(y))
 
 /* Vortex MPU401 defines. */
 #define	MIDI_CLOCK_DIV		0x61
@@ -172,7 +172,7 @@
 
 	/* PCI hardware resources */
 	unsigned long io;
-	unsigned long __iomem *mmio;
+	void __iomem *mmio;
 	unsigned int irq;
 	spinlock_t lock;
 
@@ -195,14 +195,14 @@
 				     int count);
 static void vortex_adbdma_setmode(vortex_t * vortex, int adbdma, int ie,
 				  int dir, int fmt, int d,
-				  unsigned long offset);
+				  unsigned int offset);
 static void vortex_adbdma_setstartbuffer(vortex_t * vortex, int adbdma, int sb);
 #ifndef CHIP_AU8810
 static void vortex_wtdma_setbuffers(vortex_t * vortex, int wtdma,
 				    snd_pcm_sgbuf_t * sgbuf, int size,
 				    int count);
 static void vortex_wtdma_setmode(vortex_t * vortex, int wtdma, int ie, int fmt, int d,	/*int e, */
-				 unsigned long offset);
+				 unsigned int offset);
 static void vortex_wtdma_setstartbuffer(vortex_t * vortex, int wtdma, int sb);
 #endif
 
diff -udBbr /tmp/yy/linux-2.6.11/sound/pci/au88x0/au88x0_core.c sound/pci/au88x0/au88x0_core.c
--- /tmp/yy/linux-2.6.11/sound/pci/au88x0/au88x0_core.c	2005-04-25 22:22:07.000000000 +0400
+++ sound/pci/au88x0/au88x0_core.c	2005-04-25 23:17:41.000000000 +0400
@@ -376,7 +376,7 @@
 
 static void vortex_mixer_init(vortex_t * vortex)
 {
-	unsigned long addr;
+	unsigned int addr;
 	int x;
 
 	// FIXME: get rid of this crap.
@@ -639,7 +639,7 @@
 
 static void vortex_srcblock_init(vortex_t * vortex)
 {
-	unsigned long addr;
+	unsigned int addr;
 	int x;
 	hwwrite(vortex->mmio, VORTEX_SRC_SOURCESIZE, 0x1ff);
 	/*
@@ -1035,7 +1035,7 @@
 static void vortex_fifo_init(vortex_t * vortex)
 {
 	int x;
-	unsigned long addr;
+	unsigned int addr;
 
 	/* ADB DMA channels fifos. */
 	addr = VORTEX_FIFO_ADBCTRL + ((NR_ADB - 1) * 4);
@@ -1152,7 +1152,7 @@
 
 static void
 vortex_adbdma_setmode(vortex_t * vortex, int adbdma, int ie, int dir,
-		      int fmt, int d, unsigned long offset)
+		      int fmt, int d, unsigned int offset)
 {
 	stream_t *dma = &vortex->dma_adb[adbdma];
 
@@ -1411,7 +1411,7 @@
 
 static void
 vortex_wtdma_setmode(vortex_t * vortex, int wtdma, int ie, int fmt, int d,
-		     /*int e, */ unsigned long offset)
+		     /*int e, */ unsigned int offset)
 {
 	stream_t *dma = &vortex->dma_wt[wtdma];
 
diff -udBbr /tmp/yy/linux-2.6.11/sound/pci/au88x0/au88x0_eq.c sound/pci/au88x0/au88x0_eq.c
--- /tmp/yy/linux-2.6.11/sound/pci/au88x0/au88x0_eq.c	2005-03-02 10:38:25.000000000 +0300
+++ sound/pci/au88x0/au88x0_eq.c	2005-04-25 23:16:32.000000000 +0400
@@ -377,7 +377,7 @@
 
 #endif
 /* Global Control */
-static void vortex_EqHw_SetControlReg(vortex_t * vortex, unsigned long reg)
+static void vortex_EqHw_SetControlReg(vortex_t * vortex, unsigned int reg)
 {
 	hwwrite(vortex->mmio, 0x2b440, reg);
 }
@@ -388,7 +388,7 @@
 }
 
 #if 0
-static void vortex_EqHw_GetControlReg(vortex_t * vortex, unsigned long *reg)
+static void vortex_EqHw_GetControlReg(vortex_t * vortex, unsigned int *reg)
 {
 	*reg = hwread(vortex->mmio, 0x2b440);
 }
@@ -586,7 +586,7 @@
 }
 
 static int
-vortex_Eqlzr_SetAllBands(vortex_t * vortex, u16 gains[], unsigned long count)
+vortex_Eqlzr_SetAllBands(vortex_t * vortex, u16 gains[], unsigned int count)
 {
 	eqlzr_t *eq = &(vortex->eq);
 	int i;
@@ -604,8 +604,8 @@
 }
 
 static void
-vortex_Eqlzr_SetA3dBypassGain(vortex_t * vortex, unsigned long a,
-			      unsigned long b)
+vortex_Eqlzr_SetA3dBypassGain(vortex_t * vortex, unsigned int a,
+			      unsigned int b)
 {
 	eqlzr_t *eq = &(vortex->eq);
 	int eax, ebx;
@@ -641,7 +641,7 @@
 		vortex_EqHw_ZeroA3DIO(vortex);
 }
 
-static void vortex_Eqlzr_SetBypass(vortex_t * vortex, long bp)
+static void vortex_Eqlzr_SetBypass(vortex_t * vortex, int bp)
 {
 	eqlzr_t *eq = &(vortex->eq);
 	
diff -udBbr /tmp/yy/linux-2.6.11/sound/pci/au88x0/au88x0_eq.h sound/pci/au88x0/au88x0_eq.h
--- /tmp/yy/linux-2.6.11/sound/pci/au88x0/au88x0_eq.h	2005-03-02 10:38:14.000000000 +0300
+++ sound/pci/au88x0/au88x0_eq.h	2005-04-25 23:15:06.000000000 +0400
@@ -19,8 +19,8 @@
 
 typedef struct {
 	unsigned int *this00;	/*CAsp4HwIO */
-	long this04;		/* How many filters for each side (default = 10) */
-	long this08;		/* inited to cero. Stereo flag? */
+	int this04;		/* How many filters for each side (default = 10) */
+	int this08;		/* inited to cero. Stereo flag? */
 } eqhw_t;
 
 typedef struct {
@@ -31,13 +31,13 @@
 	short this0c;		/* SetBypassGain: bypass gain when this28 is not set. */
 	short this0e;
 
-	long this10;		/* How many gains are used for each side (right or left). */
+	int this10;		/* How many gains are used for each side (right or left). */
 	u16 this14[32];		/* SetLeftGainsTarget: Left (and right?) EQ gains  */
-	long this24;
-	long this28;		/* flag related to EQ enabled or not. Gang flag ? */
-	long this54;		/* SetBypass */
-	long this58;
-	long this5c;
+	int this24;
+	int this28;		/* flag related to EQ enabled or not. Gang flag ? */
+	int this54;		/* SetBypass */
+	int this58;
+	int this5c;
 	/*0x60 */ auxxEqCoeffSet_t coefset;
 	/* 50 u16 word each channel. */
 	u16 this130[20];	/* Left and Right gains */
diff -udBbr /tmp/yy/linux-2.6.11/sound/pci/au88x0/au88x0_eqdata.c sound/pci/au88x0/au88x0_eqdata.c
--- /tmp/yy/linux-2.6.11/sound/pci/au88x0/au88x0_eqdata.c	2005-03-02 10:38:09.000000000 +0300
+++ sound/pci/au88x0/au88x0_eqdata.c	2005-04-25 23:07:06.000000000 +0400
@@ -104,7 +104,7 @@
 };
 
 /*_rodataba0:*/
-static long eq_levels[32] = {
+static int eq_levels[32] = {
 	0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
 	0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
 	0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
diff -udBbr /tmp/yy/linux-2.6.11/sound/pci/au88x0/au88x0_mpu401.c sound/pci/au88x0/au88x0_mpu401.c
--- /tmp/yy/linux-2.6.11/sound/pci/au88x0/au88x0_mpu401.c	2005-03-02 10:38:13.000000000 +0300
+++ sound/pci/au88x0/au88x0_mpu401.c	2005-04-25 22:43:56.000000000 +0400
@@ -95,7 +95,7 @@
 		return temp;
 	}
 #else
-	port = (unsigned long)(vortex->mmio + (VORTEX_MIDI_DATA >> 2));
+	port = (unsigned long)(vortex->mmio + VORTEX_MIDI_DATA);
 	if ((temp =
 	     snd_mpu401_uart_new(vortex->card, 0, MPU401_HW_AUREAL, port,
 				 1, 0, 0, &rmidi)) != 0) {
@@ -105,7 +105,7 @@
 		return temp;
 	}
 	mpu = rmidi->private_data;
-	mpu->cport = (unsigned long)(vortex->mmio + (VORTEX_MIDI_CMD >> 2));
+	mpu->cport = (unsigned long)(vortex->mmio + VORTEX_MIDI_CMD);
 #endif
 	vortex->rmidi = rmidi;
 	return 0;
diff -udBbr /tmp/yy/linux-2.6.11/sound/pci/au88x0/au88x0_synth.c sound/pci/au88x0/au88x0_synth.c
--- /tmp/yy/linux-2.6.11/sound/pci/au88x0/au88x0_synth.c	2005-03-02 10:38:13.000000000 +0300
+++ sound/pci/au88x0/au88x0_synth.c	2005-04-25 23:13:54.000000000 +0400
@@ -32,7 +32,7 @@
 					unsigned char mix, int a);
 static void vortex_fifo_wtinitialize(vortex_t * vortex, int fifo, int j);
 static int vortex_wt_SetReg(vortex_t * vortex, unsigned char reg, int wt,
-			    unsigned long val);
+			    unsigned int val);
 
 /* WT */
 
@@ -190,7 +190,7 @@
 #endif
 static int
 vortex_wt_SetReg(vortex_t * vortex, unsigned char reg, int wt,
-		 unsigned long val)
+		 unsigned int val)
 {
 	int ecx;
 
diff -udBbr /tmp/yy/linux-2.6.11/sound/pci/au88x0/au88x0_xtalk.h sound/pci/au88x0/au88x0_xtalk.h
--- /tmp/yy/linux-2.6.11/sound/pci/au88x0/au88x0_xtalk.h	2005-03-02 10:37:59.000000000 +0300
+++ sound/pci/au88x0/au88x0_xtalk.h	2005-04-25 23:02:43.000000000 +0400
@@ -39,7 +39,7 @@
 #define XT_SPEAKER1		3
 #define XT_DIAMOND		4
 
-typedef long xtalk_dline_t[XTDLINE_SZ];
+typedef int   xtalk_dline_t[XTDLINE_SZ];
 typedef short xtalk_gains_t[XTGAINS_SZ];
 typedef short xtalk_instate_t[XTINST_SZ];
 typedef short xtalk_coefs_t[5][5];
