All of lore.kernel.org
 help / color / mirror / Atom feed
* Change of iomem types
@ 2004-09-16 18:54 Takashi Iwai
  0 siblings, 0 replies; 10+ messages in thread
From: Takashi Iwai @ 2004-09-16 18:54 UTC (permalink / raw)
  To: alsa-devel

Hi,

I commited a big patch to cvs for changing the iomem variable types
introduced in the very latest kernel (2.6.9-rc2).  In the new style,
__iomem prefix is used for the iomem type pointers, while most of
drivers used unsigned long.
Now they are converted to void __iomem *.

I believe I didn't break many things by this change, but please check
the cvs version, if possible, whether your driver gets broken.

The affected drivers are:
- cs46xx
- cs4281
- ymfpci
- atiixp
- atiixp-modem
- cs4281
- intel8x0
- intel8x0m
- rme32
- rme96
- rme9652
- hdsp
- au88x0
- korg1212
- mixart
- nm256
- powermac
- hdspm
- pdplus


thanks,

Takashi


-------------------------------------------------------
This SF.Net email is sponsored by: YOU BE THE JUDGE. Be one of 170
Project Admins to receive an Apple iPod Mini FREE for your judgement on
who ports your project to Linux PPC the best. Sponsored by IBM.
Deadline: Sept. 24. Go here: http://sf.net/ppc_contest.php

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Change of iomem types
@ 2004-09-16 19:27 thewade
  2004-09-17 10:37 ` Takashi Iwai
  0 siblings, 1 reply; 10+ messages in thread
From: thewade @ 2004-09-16 19:27 UTC (permalink / raw)
  To: alsa-devel

This sounds like it may fix my hdsploader/AMD64 problem.
I tried last night to patch 2.6.8.1 using the 2.6.9-rc2 patch
but patch -p2 < patch-2.6.9-rc2 wouldnt work. It wouldnt strip the 
a/ or b/ before the file path, so I edited the patch file and fixed 
all the paths: s/ a\\// linux\\// and s/ b\\// linux\\//

How can I get this new fix: kernel.org has the latest patch as
2.6.9-rc2 2004-09-13?

btw, I couldnt get the patched 2.6.9-rc2 kernel to boot. Because of the
above patch modification?

Thanks for the help, and thanks for the work Takashi!
-thewade


-------------------------------------------------------
This SF.Net email is sponsored by: YOU BE THE JUDGE. Be one of 170
Project Admins to receive an Apple iPod Mini FREE for your judgement on
who ports your project to Linux PPC the best. Sponsored by IBM.
Deadline: Sept. 24. Go here: http://sf.net/ppc_contest.php

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Change of iomem types
  2004-09-16 19:27 thewade
@ 2004-09-17 10:37 ` Takashi Iwai
  0 siblings, 0 replies; 10+ messages in thread
From: Takashi Iwai @ 2004-09-17 10:37 UTC (permalink / raw)
  To: thewade; +Cc: alsa-devel

At Thu, 16 Sep 2004 13:27:56 -0600,
thewade wrote:
> 
> This sounds like it may fix my hdsploader/AMD64 problem.

Could be.  Let's see...

> I tried last night to patch 2.6.8.1 using the 2.6.9-rc2 patch
> but patch -p2 < patch-2.6.9-rc2 wouldnt work. It wouldnt strip the 
> a/ or b/ before the file path, so I edited the patch file and fixed 
> all the paths: s/ a\\// linux\\// and s/ b\\// linux\\//

You should use -p1, then :)

> How can I get this new fix: kernel.org has the latest patch as
> 2.6.9-rc2 2004-09-13?

Take the bk patch from v2.6/snapshot directory.

Note that my last patch is still not merged to 2.6 kernel tree.
You'll need to get the latest alsa driver code from ALSA CVS.


Takashi


-------------------------------------------------------
This SF.Net email is sponsored by: YOU BE THE JUDGE. Be one of 170
Project Admins to receive an Apple iPod Mini FREE for your judgement on
who ports your project to Linux PPC the best. Sponsored by IBM.
Deadline: Sept. 24. Go here: http://sf.net/ppc_contest.php

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Change of iomem types
@ 2004-09-18  1:35 thewade
  0 siblings, 0 replies; 10+ messages in thread
From: thewade @ 2004-09-18  1:35 UTC (permalink / raw)
  To: alsa-devel

So, I swear I tried patch -p1 and it didnt work, but it did this time.

I patche kernel 2.6.8.1 with the rc2 patch and the bk3 patch to see if
the iomem fix by Takashi Iwai repaired my nonworking hdsp and Oops
causing hdsploader.

The kernel built fine, but on boot the kernel freezes at usb activation
if my USB mouse is pluged in. If I unplug it the kernel crashes on boot
at starting the loopback device.

Is there a patch I can run on my 2.6.8.1 kernel to fix the iomem stuff that doesnt mess with everything else?

When is the official release of 2.6.9 scheduled? Or 2.6.8.2?

Thanks again!
-thewade


-------------------------------------------------------
This SF.Net email is sponsored by: YOU BE THE JUDGE. Be one of 170
Project Admins to receive an Apple iPod Mini FREE for your judgement on
who ports your project to Linux PPC the best. Sponsored by IBM.
Deadline: Sept. 24. Go here: http://sf.net/ppc_contest.php

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Change of iomem types
@ 2004-09-18  3:43 thewade
  2004-09-20  9:42 ` Takashi Iwai
  0 siblings, 1 reply; 10+ messages in thread
From: thewade @ 2004-09-18  3:43 UTC (permalink / raw)
  To: alsa-devel

I answered my own question (I thought).
I checked out the CVS version of alsa and copied the alsa-kernel contents to linux/sound but when I compiled I get this, any ideas why? Thanks!

sound/core/hwdep.c: In function `snd_hwdep_new\':
sound/core/hwdep.c:367: warning: implicit declaration of function `kcalloc\'
sound/core/hwdep.c:367: warning: assignment makes pointer from integer without a cast
  CC      sound/core/memalloc.o
sound/core/memalloc.c:334: error: conflicting types for \'snd_dma_alloc_pages\'
include/sound/memalloc.h:101: error: previous declaration of \'snd_dma_alloc_pages\' was here
sound/core/memalloc.c:334: error: conflicting types for \'snd_dma_alloc_pages\'
include/sound/memalloc.h:101: error: previous declaration of \'snd_dma_alloc_pages\' was here
sound/core/memalloc.c: In function `snd_dma_alloc_pages\':
sound/core/memalloc.c:338: error: structure has no member named `dev\'
sound/core/memalloc.c:339: error: structure has no member named `dev\'
sound/core/memalloc.c: At top level:
sound/core/memalloc.c:386: error: conflicting types for \'snd_dma_alloc_pages_fallback\'
include/sound/memalloc.h:103: error: previous declaration of \'snd_dma_alloc_pages_fallback\' was here
sound/core/memalloc.c:386: error: conflicting types for \'snd_dma_alloc_pages_fallback\'
include/sound/memalloc.h:103: error: previous declaration of \'snd_dma_alloc_pages_fallback\' was here
sound/core/memalloc.c:412: error: conflicting types for \'snd_dma_free_pages\'
include/sound/memalloc.h:104: error: previous declaration of \'snd_dma_free_pages\' was here
sound/core/memalloc.c:412: error: conflicting types for \'snd_dma_free_pages\'
include/sound/memalloc.h:104: error: previous declaration of \'snd_dma_free_pages\' was here
sound/core/memalloc.c: In function `snd_dma_free_pages\':
sound/core/memalloc.c:413: error: structure has no member named `dev\'
sound/core/memalloc.c:423: error: structure has no member named `dev\'
sound/core/memalloc.c:429: error: structure has no member named `dev\'
sound/core/memalloc.c: In function `snd_dma_get_reserved_buf\':
sound/core/memalloc.c:455: error: structure has no member named `dev\'
sound/core/memalloc.c:455: error: structure has no member named `dev\'
sound/core/memalloc.c:455: error: structure has no member named `dev\'
sound/core/memalloc.c: In function `preallocate_cards\':
sound/core/memalloc.c:584: warning: implicit declaration of function `snd_dma_pci_buf_id\'
sound/core/memalloc.c: In function `snd_mem_proc_read\':
sound/core/memalloc.c:617: error: structure has no member named `dev\'
make[2]: *** [sound/core/memalloc.o] Error 1
make[1]: *** [sound/core] Error 2
make: *** [sound] Error 2

Thanks,
-thewade


-------------------------------------------------------
This SF.Net email is sponsored by: YOU BE THE JUDGE. Be one of 170
Project Admins to receive an Apple iPod Mini FREE for your judgement on
who ports your project to Linux PPC the best. Sponsored by IBM.
Deadline: Sept. 24. Go here: http://sf.net/ppc_contest.php

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Change of iomem types
  2004-09-18  3:43 thewade
@ 2004-09-20  9:42 ` Takashi Iwai
  0 siblings, 0 replies; 10+ messages in thread
From: Takashi Iwai @ 2004-09-20  9:42 UTC (permalink / raw)
  To: thewade; +Cc: alsa-devel

At Fri, 17 Sep 2004 21:43:32 -0600,
thewade wrote:
> 
> I answered my own question (I thought).
> I checked out the CVS version of alsa and copied the alsa-kernel contents to linux/sound but when I compiled I get this, any ideas why? Thanks!

Apparently, you didn't copy the header files to linux/include/sound.
Also, the alsa-kernel tree is kept for the very recent linux-kernel
version (2.6.9-rc2) only.  So, this way won't work for you anyway.


Takashi


-------------------------------------------------------
This SF.Net email is sponsored by: YOU BE THE JUDGE. Be one of 170
Project Admins to receive an Apple iPod Mini FREE for your judgement on
who ports your project to Linux PPC the best. Sponsored by IBM.
Deadline: Sept. 24. Go here: http://sf.net/ppc_contest.php

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Change of iomem types
@ 2004-09-20 21:20 thewade
  2004-09-21 10:03 ` Takashi Iwai
  0 siblings, 1 reply; 10+ messages in thread
From: thewade @ 2004-09-20 21:20 UTC (permalink / raw)
  To: alsa-devel

> > I answered my own question (I thought).
> > I checked out the CVS version of alsa and copied the alsa-kernel contents to 
> > linux/sound
> > but when I compiled I get this, any ideas why? Thanks!
> 
> Apparently, you didn\'t copy the header files to linux/include/sound.
> Also, the alsa-kernel tree is kept for the very recent linux-kernel
> version (2.6.9-rc2) only.  So, this way won\'t work for you anyway.

As usual you are correct Mr. Iwai. I downloaded and patched 2.6.8.1 to 2.6.9-rc2 and copied the alsa-kernel contents to sound and alsa-kernel/include to include/sound but now it doesnt detect the cardbus on boot and running hdsploader freezes my machine.

You had mentioned that you merged your iomem code with the kernel; if I
download and patch kernel 2.6.8.1 to 2.6.9-rc2-bk6 will I then have the
iomem code in the kernel?

Thanks for your work and your patience with newbies like me whos coding
skills cannot save themselves.

-thewade


-------------------------------------------------------
This SF.Net email is sponsored by: YOU BE THE JUDGE. Be one of 170
Project Admins to receive an Apple iPod Mini FREE for your judgement on
who ports your project to Linux PPC the best. Sponsored by IBM.
Deadline: Sept. 24. Go here: http://sf.net/ppc_contest.php

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Change of iomem types
  2004-09-20 21:20 thewade
@ 2004-09-21 10:03 ` Takashi Iwai
  2004-09-21 10:24   ` Takashi Iwai
  0 siblings, 1 reply; 10+ messages in thread
From: Takashi Iwai @ 2004-09-21 10:03 UTC (permalink / raw)
  To: thewade; +Cc: alsa-devel

At Mon, 20 Sep 2004 15:20:28 -0600,
thewade wrote:
> 
> > > I answered my own question (I thought).
> > > I checked out the CVS version of alsa and copied the alsa-kernel contents to 
> > > linux/sound
> > > but when I compiled I get this, any ideas why? Thanks!
> > 
> > Apparently, you didn\'t copy the header files to linux/include/sound.
> > Also, the alsa-kernel tree is kept for the very recent linux-kernel
> > version (2.6.9-rc2) only.  So, this way won\'t work for you anyway.
> 
> As usual you are correct Mr. Iwai. I downloaded and patched 2.6.8.1
> to 2.6.9-rc2 and copied the alsa-kernel contents to sound and
> alsa-kernel/include to include/sound but now it doesnt detect the
> cardbus on boot and running hdsploader freezes my machine. 
> 
> You had mentioned that you merged your iomem code with the kernel; 

No, I mentioned it's merged to ALSA CVS tree.  It's not the mainline
kernel tree :)

You can compile alsa-driver externally from tarball even for 2.6
kernels.  Grab the cvs alsa-kernel and alsa-driver codes (see
instruction in the download page of ALSA web), run "./configure",
"make" and "make install-modules".


HTH.

Takashi


-------------------------------------------------------
This SF.Net email is sponsored by: YOU BE THE JUDGE. Be one of 170
Project Admins to receive an Apple iPod Mini FREE for your judgement on
who ports your project to Linux PPC the best. Sponsored by IBM.
Deadline: Sept. 24. Go here: http://sf.net/ppc_contest.php

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Change of iomem types
  2004-09-21 10:03 ` Takashi Iwai
@ 2004-09-21 10:24   ` Takashi Iwai
  0 siblings, 0 replies; 10+ messages in thread
From: Takashi Iwai @ 2004-09-21 10:24 UTC (permalink / raw)
  To: thewade; +Cc: alsa-devel

[-- Attachment #1: Type: text/plain, Size: 1368 bytes --]

At Tue, 21 Sep 2004 12:03:59 +0200,
I wrote:
> 
> At Mon, 20 Sep 2004 15:20:28 -0600,
> thewade wrote:
> > 
> > > > I answered my own question (I thought).
> > > > I checked out the CVS version of alsa and copied the alsa-kernel contents to 
> > > > linux/sound
> > > > but when I compiled I get this, any ideas why? Thanks!
> > > 
> > > Apparently, you didn\'t copy the header files to linux/include/sound.
> > > Also, the alsa-kernel tree is kept for the very recent linux-kernel
> > > version (2.6.9-rc2) only.  So, this way won\'t work for you anyway.
> > 
> > As usual you are correct Mr. Iwai. I downloaded and patched 2.6.8.1
> > to 2.6.9-rc2 and copied the alsa-kernel contents to sound and
> > alsa-kernel/include to include/sound but now it doesnt detect the
> > cardbus on boot and running hdsploader freezes my machine. 
> > 
> > You had mentioned that you merged your iomem code with the kernel; 
> 
> No, I mentioned it's merged to ALSA CVS tree.  It's not the mainline
> kernel tree :)
> 
> You can compile alsa-driver externally from tarball even for 2.6
> kernels.  Grab the cvs alsa-kernel and alsa-driver codes (see
> instruction in the download page of ALSA web), run "./configure",
> "make" and "make install-modules".

Now I took a look at hdsp code and found an obvious bug which likely
has hit you.  Could you try the attached patch?


Takashi

[-- Attachment #2: Type: text/plain, Size: 1754 bytes --]

Index: alsa-kernel/include/hdsp.h
===================================================================
RCS file: /suse/tiwai/cvs/alsa/alsa-kernel/include/hdsp.h,v
retrieving revision 1.8
diff -u -r1.8 hdsp.h
--- alsa-kernel/include/hdsp.h	23 Jun 2004 13:34:03 -0000	1.8
+++ alsa-kernel/include/hdsp.h	21 Sep 2004 10:16:24 -0000
@@ -76,7 +76,7 @@
 typedef struct _snd_hdsp_firmware hdsp_firmware_t;
 
 struct _snd_hdsp_firmware {
-	unsigned long __user *firmware_data;	/* 24413 long words */
+	void __user *firmware_data;	/* 24413 x 4 bytes */
 };
 
 #define SNDRV_HDSP_IOCTL_UPLOAD_FIRMWARE _IOW('H', 0x42, hdsp_firmware_t)
Index: alsa-kernel/pci/rme9652/hdsp.c
===================================================================
RCS file: /suse/tiwai/cvs/alsa/alsa-kernel/pci/rme9652/hdsp.c,v
retrieving revision 1.69
diff -u -r1.69 hdsp.c
--- alsa-kernel/pci/rme9652/hdsp.c	16 Sep 2004 18:36:59 -0000	1.69
+++ alsa-kernel/pci/rme9652/hdsp.c	21 Sep 2004 10:20:25 -0000
@@ -4445,7 +4445,7 @@
 		int i;
 		
 		if (hdsp->io_type == H9652) {
-			unsigned long rms_low, rms_high;
+			u32 rms_low, rms_high;
 			int doublespeed = 0;
 			if (hdsp_read (hdsp, HDSP_statusRegister) & HDSP_DoubleSpeedStatus)
 				doublespeed = 1;
@@ -4620,7 +4620,7 @@
 	}
 	case SNDRV_HDSP_IOCTL_UPLOAD_FIRMWARE: {
 		hdsp_firmware_t __user *firmware;
-		unsigned long __user *firmware_data;
+		u32 __user *firmware_data;
 		int err;
 		
 		if (hdsp->io_type == H9652 || hdsp->io_type == H9632) return -EINVAL;
@@ -4638,7 +4638,7 @@
 			return -EIO;
 		}
 
-		if (copy_from_user(hdsp->firmware_cache, firmware_data, sizeof(unsigned long)*24413) != 0) {
+		if (copy_from_user(hdsp->firmware_cache, firmware_data, sizeof(hdsp->firmware_cache)) != 0) {
 			return -EFAULT;
 		}
 		

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Change of iomem types
@ 2004-09-21 17:05 thewade
  0 siblings, 0 replies; 10+ messages in thread
From: thewade @ 2004-09-21 17:05 UTC (permalink / raw)
  To: alsa-devel

> Now I took a look at hdsp code and found an obvious bug which likely
> has hit you.  Could you try the attached patch?

Hurray!

My RME Hammerfall works on a 64 bit machine!

On boot the kernel doesnt see the cardbus, but running hdsploader
uploads the firmware, my little angry red light (host error warning
light) goes away and my card works!

Also, hdspmixer wont display, which is weird, but amixer can do
everything hdspmixer can do I guess. I get a segfault if i run as
non-root and apparent opperation, but no display, as root.

Thank you SO MUCH! Now I have to get PD and GEM set up. Thank you Grand
Master Takashi Iwai!

-thewade


-------------------------------------------------------
This SF.Net email is sponsored by: YOU BE THE JUDGE. Be one of 170
Project Admins to receive an Apple iPod Mini FREE for your judgement on
who ports your project to Linux PPC the best. Sponsored by IBM.
Deadline: Sept. 24. Go here: http://sf.net/ppc_contest.php

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2004-09-21 17:05 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-09-16 18:54 Change of iomem types Takashi Iwai
  -- strict thread matches above, loose matches on Subject: below --
2004-09-16 19:27 thewade
2004-09-17 10:37 ` Takashi Iwai
2004-09-18  1:35 thewade
2004-09-18  3:43 thewade
2004-09-20  9:42 ` Takashi Iwai
2004-09-20 21:20 thewade
2004-09-21 10:03 ` Takashi Iwai
2004-09-21 10:24   ` Takashi Iwai
2004-09-21 17:05 thewade

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.