[ARM] Add more syscalls

2006-12-21 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=5a059f1ac0ed0c937257027aed5da50241f5ec2b
Commit: 5a059f1ac0ed0c937257027aed5da50241f5ec2b
Parent: 99f5e9718185f07458ae70c2282c2153a2256c91
Author: Russell King [EMAIL PROTECTED]
AuthorDate: Sun Dec 17 18:23:10 2006 +
Committer:  Russell King [EMAIL PROTECTED]
CommitDate: Sun Dec 17 18:23:31 2006 +

[ARM] Add more syscalls

Add:
  sys_unshare
  sys_set_robust_list
  sys_get_robust_list
  sys_splice
  sys_arm_sync_file_range
  sys_tee
  sys_vmsplice
  sys_move_pages
  sys_getcpu

Special note about sys_arm_sync_file_range(), which is implemented as:

asmlinkage long sys_arm_sync_file_range(int fd, unsigned int flags,
loff_t offset, loff_t nbytes)
{
return sys_sync_file_range(fd, offset, nbytes, flags);
}

We can't export sys_sync_file_range() directly on ARM because the
argument list someone picked does not fit in the available registers.
Would be nice if... there was an arch maintainer review mechanism for
new syscalls before they hit the kernel.

Signed-off-by: Russell King [EMAIL PROTECTED]
---
 arch/arm/kernel/calls.S   |   24 ++--
 arch/arm/kernel/sys_arm.c |   13 +
 include/asm-arm/unistd.h  |   12 
 3 files changed, 43 insertions(+), 6 deletions(-)

diff --git a/arch/arm/kernel/calls.S b/arch/arm/kernel/calls.S
index e8f7436..f7598cb 100644
--- a/arch/arm/kernel/calls.S
+++ b/arch/arm/kernel/calls.S
@@ -110,7 +110,7 @@
CALL(sys_ni_syscall)/* was sys_profil */
CALL(sys_statfs)
 /* 100 */  CALL(sys_fstatfs)
-   CALL(sys_ni_syscall)
+   CALL(sys_ni_syscall)/* sys_ioperm */
CALL(OBSOLETE(ABI(sys_socketcall, sys_oabi_socketcall)))
CALL(sys_syslog)
CALL(sys_setitimer)
@@ -132,7 +132,7 @@
 /* 120 */  CALL(sys_clone_wrapper)
CALL(sys_setdomainname)
CALL(sys_newuname)
-   CALL(sys_ni_syscall)
+   CALL(sys_ni_syscall)/* modify_ldt */
CALL(sys_adjtimex)
 /* 125 */  CALL(sys_mprotect)
CALL(sys_sigprocmask)
@@ -146,7 +146,7 @@
CALL(sys_bdflush)
 /* 135 */  CALL(sys_sysfs)
CALL(sys_personality)
-   CALL(sys_ni_syscall)/* CALL(_sys_afs_syscall) */
+   CALL(sys_ni_syscall)/* reserved for afs_syscall */
CALL(sys_setfsuid16)
CALL(sys_setfsgid16)
 /* 140 */  CALL(sys_llseek)
@@ -175,7 +175,7 @@
CALL(sys_arm_mremap)
CALL(sys_setresuid16)
 /* 165 */  CALL(sys_getresuid16)
-   CALL(sys_ni_syscall)
+   CALL(sys_ni_syscall)/* vm86 */
CALL(sys_ni_syscall)/* was sys_query_module */
CALL(sys_poll)
CALL(sys_nfsservctl)
@@ -197,8 +197,8 @@
 /* 185 */  CALL(sys_capset)
CALL(sys_sigaltstack_wrapper)
CALL(sys_sendfile)
-   CALL(sys_ni_syscall)
-   CALL(sys_ni_syscall)
+   CALL(sys_ni_syscall)/* getpmsg */
+   CALL(sys_ni_syscall)/* putpmsg */
 /* 190 */  CALL(sys_vfork_wrapper)
CALL(sys_getrlimit)
CALL(sys_mmap2)
@@ -344,6 +344,18 @@
CALL(sys_readlinkat)
CALL(sys_fchmodat)
CALL(sys_faccessat)
+/* 335 */  CALL(sys_ni_syscall)/* eventually pselect6 */
+   CALL(sys_ni_syscall)/* eventually ppoll */
+   CALL(sys_unshare)
+   CALL(sys_set_robust_list)
+   CALL(sys_get_robust_list)
+/* 340 */  CALL(sys_splice)
+   CALL(sys_arm_sync_file_range)
+   CALL(sys_tee)
+   CALL(sys_vmsplice)
+   CALL(sys_move_pages)
+/* 345 */  CALL(sys_getcpu)
+   CALL(sys_ni_syscall)/* eventually epoll_pwait */
 #ifndef syscalls_counted
 .equ syscalls_padding, ((NR_syscalls + 3)  ~3) - NR_syscalls
 #define syscalls_counted
diff --git a/arch/arm/kernel/sys_arm.c b/arch/arm/kernel/sys_arm.c
index 00c18d3..3d4fcbc 100644
--- a/arch/arm/kernel/sys_arm.c
+++ b/arch/arm/kernel/sys_arm.c
@@ -328,3 +328,16 @@ asmlinkage long sys_arm_fadvise64_64(int fd, int advice,
 {
return sys_fadvise64_64(fd, offset, len, advice);
 }
+
+/*
+ * Yet more syscall fsckage - we can't fit sys_sync_file_range's
+ * arguments into the available registers with EABI.  So, let's
+ * create an ARM specific syscall for this which has _sane_
+ * arguments.  (This incidentally also has an ABI-independent
+ * argument layout.)
+ */
+asmlinkage long 

[ARM] Fix BUG()s in ioremap() code

2006-12-21 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=c924aff853bdc1c9841dd22440f931fba5ab3a59
Commit: c924aff853bdc1c9841dd22440f931fba5ab3a59
Parent: 5a059f1ac0ed0c937257027aed5da50241f5ec2b
Author: Russell King [EMAIL PROTECTED]
AuthorDate: Sun Dec 17 23:29:57 2006 +
Committer:  Russell King [EMAIL PROTECTED]
CommitDate: Sun Dec 17 23:29:57 2006 +

[ARM] Fix BUG()s in ioremap() code

We need to ensure that the area size is page aligned so that
remap_area_pte() doesn't increment the address past the end of
the desired area.

Signed-off-by: Russell King [EMAIL PROTECTED]
---
 arch/arm/mm/ioremap.c |2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/arch/arm/mm/ioremap.c b/arch/arm/mm/ioremap.c
index 3bb3951..251685f 100644
--- a/arch/arm/mm/ioremap.c
+++ b/arch/arm/mm/ioremap.c
@@ -292,6 +292,8 @@ __ioremap_pfn(unsigned long pfn, unsigned long offset, 
size_t size,
if (pfn = 0x10  (__pfn_to_phys(pfn)  ~SUPERSECTION_MASK))
return NULL;
 
+   size = PAGE_ALIGN(size);
+
area = get_vm_area(size, VM_IOREMAP);
if (!area)
return NULL;
-
To unsubscribe from this list: send the line unsubscribe git-commits-head in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[ARM] 4034/1: pxafb: Fix compile errors

2006-12-21 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=46a34d68901c12621ef09f11a5d410b92f0643e4
Commit: 46a34d68901c12621ef09f11a5d410b92f0643e4
Parent: c924aff853bdc1c9841dd22440f931fba5ab3a59
Author: Richard Purdie [EMAIL PROTECTED]
AuthorDate: Sun Dec 17 01:01:11 2006 +0100
Committer:  Russell King [EMAIL PROTECTED]
CommitDate: Sun Dec 17 23:37:45 2006 +

[ARM] 4034/1: pxafb: Fix compile errors

Fix pxafb compile failures when CONFIG_FB_PXA_PARAMETERS is enabled
after recent structure changes.

Signed-off-by: Richard Purdie [EMAIL PROTECTED]
Signed-off-by: Russell King [EMAIL PROTECTED]
---
 drivers/video/pxafb.c |   40 
 1 files changed, 20 insertions(+), 20 deletions(-)

diff --git a/drivers/video/pxafb.c b/drivers/video/pxafb.c
index 38eb0b6..b4947c8 100644
--- a/drivers/video/pxafb.c
+++ b/drivers/video/pxafb.c
@@ -1216,7 +1216,7 @@ static int __init pxafb_parse_options(struct device *dev, 
char *options)
done:
if (res_specified) {
dev_info(dev, overriding resolution: %dx%d\n, 
xres, yres);
-   inf-xres = xres; inf-yres = yres;
+   inf-modes[0].xres = xres; inf-modes[0].yres = 
yres;
}
if (bpp_specified)
switch (bpp) {
@@ -1225,48 +1225,48 @@ static int __init pxafb_parse_options(struct device 
*dev, char *options)
case 4:
case 8:
case 16:
-   inf-bpp = bpp;
+   inf-modes[0].bpp = bpp;
dev_info(dev, overriding bit depth: 
%d\n, bpp);
break;
default:
dev_err(dev, Depth %d is not valid\n, 
bpp);
}
 } else if (!strncmp(this_opt, pixclock:, 9)) {
-inf-pixclock = simple_strtoul(this_opt+9, NULL, 0);
-   dev_info(dev, override pixclock: %ld\n, 
inf-pixclock);
+inf-modes[0].pixclock = simple_strtoul(this_opt+9, 
NULL, 0);
+   dev_info(dev, override pixclock: %ld\n, 
inf-modes[0].pixclock);
 } else if (!strncmp(this_opt, left:, 5)) {
-inf-left_margin = simple_strtoul(this_opt+5, NULL, 0);
-   dev_info(dev, override left: %u\n, inf-left_margin);
+inf-modes[0].left_margin = simple_strtoul(this_opt+5, 
NULL, 0);
+   dev_info(dev, override left: %u\n, 
inf-modes[0].left_margin);
 } else if (!strncmp(this_opt, right:, 6)) {
-inf-right_margin = simple_strtoul(this_opt+6, NULL, 
0);
-   dev_info(dev, override right: %u\n, 
inf-right_margin);
+inf-modes[0].right_margin = 
simple_strtoul(this_opt+6, NULL, 0);
+   dev_info(dev, override right: %u\n, 
inf-modes[0].right_margin);
 } else if (!strncmp(this_opt, upper:, 6)) {
-inf-upper_margin = simple_strtoul(this_opt+6, NULL, 
0);
-   dev_info(dev, override upper: %u\n, 
inf-upper_margin);
+inf-modes[0].upper_margin = 
simple_strtoul(this_opt+6, NULL, 0);
+   dev_info(dev, override upper: %u\n, 
inf-modes[0].upper_margin);
 } else if (!strncmp(this_opt, lower:, 6)) {
-inf-lower_margin = simple_strtoul(this_opt+6, NULL, 
0);
-   dev_info(dev, override lower: %u\n, 
inf-lower_margin);
+inf-modes[0].lower_margin = 
simple_strtoul(this_opt+6, NULL, 0);
+   dev_info(dev, override lower: %u\n, 
inf-modes[0].lower_margin);
 } else if (!strncmp(this_opt, hsynclen:, 9)) {
-inf-hsync_len = simple_strtoul(this_opt+9, NULL, 0);
-   dev_info(dev, override hsynclen: %u\n, 
inf-hsync_len);
+inf-modes[0].hsync_len = simple_strtoul(this_opt+9, 
NULL, 0);
+   dev_info(dev, override hsynclen: %u\n, 
inf-modes[0].hsync_len);
 } else if (!strncmp(this_opt, vsynclen:, 9)) {
-inf-vsync_len = simple_strtoul(this_opt+9, NULL, 0);
-   dev_info(dev, override vsynclen: %u\n, 
inf-vsync_len);
+inf-modes[0].vsync_len = simple_strtoul(this_opt+9, 
NULL, 0);
+   dev_info(dev, override vsynclen: %u\n, 
inf-modes[0].vsync_len);
 } else if (!strncmp(this_opt, hsync:, 6)) {
 if 

[ARM] 4035/1: fix collie compilation

2006-12-21 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=2343217fb770ef2b172a12186c0cd0526bfb7d0c
Commit: 2343217fb770ef2b172a12186c0cd0526bfb7d0c
Parent: 46a34d68901c12621ef09f11a5d410b92f0643e4
Author: Pavel Machek [EMAIL PROTECTED]
AuthorDate: Sun Dec 17 13:21:05 2006 +0100
Committer:  Russell King [EMAIL PROTECTED]
CommitDate: Sun Dec 17 23:37:47 2006 +

[ARM] 4035/1: fix collie compilation

Thanks to Al Viro, here's fix to 2.6.20-rc1-git, so that collie
compiles, again. It was broken by INIT_WORK changes.

Signed-off-by: Pavel Machek [EMAIL PROTECTED]
Signed-off-by: Russell King [EMAIL PROTECTED]
---
 drivers/video/sa1100fb.c |6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/video/sa1100fb.c b/drivers/video/sa1100fb.c
index cd10b18..5d2a4a4 100644
--- a/drivers/video/sa1100fb.c
+++ b/drivers/video/sa1100fb.c
@@ -1200,9 +1200,9 @@ static void set_ctrlr_state(struct sa1100fb_info *fbi, 
u_int state)
  * Our LCD controller task (which is called when we blank or unblank)
  * via keventd.
  */
-static void sa1100fb_task(void *dummy)
+static void sa1100fb_task(struct work_struct *w)
 {
-   struct sa1100fb_info *fbi = dummy;
+   struct sa1100fb_info *fbi = container_of(w, struct sa1100fb_info, task);
u_int state = xchg(fbi-task_state, -1);
 
set_ctrlr_state(fbi, state);
@@ -1444,7 +1444,7 @@ static struct sa1100fb_info * __init 
sa1100fb_init_fbinfo(struct device *dev)
  fbi-max_bpp / 8;
 
init_waitqueue_head(fbi-ctrlr_wait);
-   INIT_WORK(fbi-task, sa1100fb_task, fbi);
+   INIT_WORK(fbi-task, sa1100fb_task);
init_MUTEX(fbi-ctrlr_sem);
 
return fbi;
-
To unsubscribe from this list: send the line unsubscribe git-commits-head in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[ARM] 4038/1: S3C24XX: Fix copyrights in include/asm-arm/arch-s3c2410 (core)

2006-12-21 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=f056076ea727f7c291daf17da4ae25af474f0c67
Commit: f056076ea727f7c291daf17da4ae25af474f0c67
Parent: 2343217fb770ef2b172a12186c0cd0526bfb7d0c
Author: Ben Dooks [EMAIL PROTECTED]
AuthorDate: Sun Dec 17 19:59:20 2006 +0100
Committer:  Russell King [EMAIL PROTECTED]
CommitDate: Sun Dec 17 23:37:48 2006 +

[ARM] 4038/1: S3C24XX: Fix copyrights in include/asm-arm/arch-s3c2410 (core)

Fix copyright notices in include/asm-arm/arch-s3c2410
to actually have `Copyright` in the line. This patch
deals with all the core files.

Signed-off-by: Ben Dooks [EMAIL PROTECTED]
Signed-off-by: Russell King [EMAIL PROTECTED]
---
 include/asm-arm/arch-s3c2410/audio.h   |2 +-
 include/asm-arm/arch-s3c2410/hardware.h|4 ++--
 include/asm-arm/arch-s3c2410/iic.h |2 +-
 include/asm-arm/arch-s3c2410/leds-gpio.h   |2 +-
 include/asm-arm/arch-s3c2410/map.h |4 ++--
 include/asm-arm/arch-s3c2410/nand.h|4 ++--
 include/asm-arm/arch-s3c2410/system.h  |4 ++--
 include/asm-arm/arch-s3c2410/timex.h   |4 ++--
 include/asm-arm/arch-s3c2410/uncompress.h  |4 ++--
 include/asm-arm/arch-s3c2410/usb-control.h |4 ++--
 10 files changed, 17 insertions(+), 17 deletions(-)

diff --git a/include/asm-arm/arch-s3c2410/audio.h 
b/include/asm-arm/arch-s3c2410/audio.h
index 7e0..65e0acf 100644
--- a/include/asm-arm/arch-s3c2410/audio.h
+++ b/include/asm-arm/arch-s3c2410/audio.h
@@ -1,6 +1,6 @@
 /* linux/include/asm-arm/arch-s3c2410/audio.h
  *
- * (c) 2004-2005 Simtec Electronics
+ * Copyright (c) 2004-2005 Simtec Electronics
  * http://www.simtec.co.uk/products/SWLINUX/
  * Ben Dooks [EMAIL PROTECTED]
  *
diff --git a/include/asm-arm/arch-s3c2410/hardware.h 
b/include/asm-arm/arch-s3c2410/hardware.h
index 871f8af..729565e 100644
--- a/include/asm-arm/arch-s3c2410/hardware.h
+++ b/include/asm-arm/arch-s3c2410/hardware.h
@@ -1,7 +1,7 @@
 /* linux/include/asm-arm/arch-s3c2410/hardware.h
  *
- * (c) 2003 Simtec Electronics
- *  Ben Dooks [EMAIL PROTECTED]
+ * Copyright (c) 2003 Simtec Electronics
+ * Ben Dooks [EMAIL PROTECTED]
  *
  * S3C2410 - hardware
  *
diff --git a/include/asm-arm/arch-s3c2410/iic.h 
b/include/asm-arm/arch-s3c2410/iic.h
index ed3d6c7..71211c8 100644
--- a/include/asm-arm/arch-s3c2410/iic.h
+++ b/include/asm-arm/arch-s3c2410/iic.h
@@ -1,6 +1,6 @@
 /* linux/include/asm-arm/arch-s3c2410/iic.h
  *
- * (c) 2004 Simtec Electronics
+ * Copyright (c) 2004 Simtec Electronics
  * Ben Dooks [EMAIL PROTECTED]
  *
  * S3C2410 - I2C Controller platfrom_device info
diff --git a/include/asm-arm/arch-s3c2410/leds-gpio.h 
b/include/asm-arm/arch-s3c2410/leds-gpio.h
index f07ed04..800846e 100644
--- a/include/asm-arm/arch-s3c2410/leds-gpio.h
+++ b/include/asm-arm/arch-s3c2410/leds-gpio.h
@@ -1,6 +1,6 @@
 /* linux/include/asm-arm/arch-s3c2410/leds-gpio.h
  *
- * (c) 2006 Simtec Electronics
+ * Copyright (c) 2006 Simtec Electronics
  * http://armlinux.simtec.co.uk/
  * Ben Dooks [EMAIL PROTECTED]
  *
diff --git a/include/asm-arm/arch-s3c2410/map.h 
b/include/asm-arm/arch-s3c2410/map.h
index 7895042..4ef4eeb 100644
--- a/include/asm-arm/arch-s3c2410/map.h
+++ b/include/asm-arm/arch-s3c2410/map.h
@@ -1,7 +1,7 @@
 /* linux/include/asm-arm/arch-s3c2410/map.h
  *
- * (c) 2003 Simtec Electronics
- *  Ben Dooks [EMAIL PROTECTED]
+ * Copyright (c) 2003 Simtec Electronics
+ * Ben Dooks [EMAIL PROTECTED]
  *
  * S3C2410 - Memory map definitions
  *
diff --git a/include/asm-arm/arch-s3c2410/nand.h 
b/include/asm-arm/arch-s3c2410/nand.h
index e350ae2..8816f7f 100644
--- a/include/asm-arm/arch-s3c2410/nand.h
+++ b/include/asm-arm/arch-s3c2410/nand.h
@@ -1,7 +1,7 @@
 /* linux/include/asm-arm/arch-s3c2410/nand.h
  *
- * (c) 2004 Simtec Electronics
- *  Ben Dooks [EMAIL PROTECTED]
+ * Copyright (c) 2004 Simtec Electronics
+ * Ben Dooks [EMAIL PROTECTED]
  *
  * S3C2410 - NAND device controller platfrom_device info
  *
diff --git a/include/asm-arm/arch-s3c2410/system.h 
b/include/asm-arm/arch-s3c2410/system.h
index 4f72a85..ecf250d 100644
--- a/include/asm-arm/arch-s3c2410/system.h
+++ b/include/asm-arm/arch-s3c2410/system.h
@@ -1,7 +1,7 @@
 /* linux/include/asm-arm/arch-s3c2410/system.h
  *
- * (c) 2003 Simtec Electronics
- *  Ben Dooks [EMAIL PROTECTED]
+ * Copyright (c) 2003 Simtec Electronics
+ * Ben Dooks [EMAIL PROTECTED]
  *
  * S3C2410 - System function defines and includes
  *
diff --git a/include/asm-arm/arch-s3c2410/timex.h 
b/include/asm-arm/arch-s3c2410/timex.h
index 703c337..c16a99c 100644
--- a/include/asm-arm/arch-s3c2410/timex.h
+++ b/include/asm-arm/arch-s3c2410/timex.h
@@ -1,7 +1,7 @@
 /* linux/include/asm-arm/arch-s3c2410/timex.h
  *
- * (c) 2003-2005 Simtec Electronics
- *  Ben Dooks [EMAIL PROTECTED]
+ * Copyright (c) 2003-2005 Simtec Electronics
+ * Ben Dooks [EMAIL PROTECTED]
  *
  * S3C2410 - time 

[ARM] 4039/1: S3C24XX: Fix copyrights in include/asm-arm/arch-s3c2410 (mach)

2006-12-21 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=9d6be125ba8b7cd3af4832094bf3643e09d6e39b
Commit: 9d6be125ba8b7cd3af4832094bf3643e09d6e39b
Parent: f056076ea727f7c291daf17da4ae25af474f0c67
Author: Ben Dooks [EMAIL PROTECTED]
AuthorDate: Sun Dec 17 20:02:01 2006 +0100
Committer:  Russell King [EMAIL PROTECTED]
CommitDate: Sun Dec 17 23:37:49 2006 +

[ARM] 4039/1: S3C24XX: Fix copyrights in include/asm-arm/arch-s3c2410 (mach)

Fix copyright notices in include/asm-arm/arch-s3c2410
to actually have `Copyright` in the line. This patch
deals with all the core files.

Signed-off-by: Ben Dooks [EMAIL PROTECTED]
Signed-off-by: Russell King [EMAIL PROTECTED]
---
 include/asm-arm/arch-s3c2410/anubis-cpld.h |2 +-
 include/asm-arm/arch-s3c2410/anubis-irq.h  |2 +-
 include/asm-arm/arch-s3c2410/anubis-map.h  |2 +-
 include/asm-arm/arch-s3c2410/bast-cpld.h   |4 ++--
 include/asm-arm/arch-s3c2410/bast-irq.h|4 ++--
 include/asm-arm/arch-s3c2410/bast-map.h|4 ++--
 include/asm-arm/arch-s3c2410/bast-pmu.h|2 +-
 include/asm-arm/arch-s3c2410/h1940-latch.h |2 +-
 include/asm-arm/arch-s3c2410/osiris-cpld.h |2 +-
 include/asm-arm/arch-s3c2410/vr1000-cpld.h |4 ++--
 include/asm-arm/arch-s3c2410/vr1000-irq.h  |4 ++--
 include/asm-arm/arch-s3c2410/vr1000-map.h  |4 ++--
 12 files changed, 18 insertions(+), 18 deletions(-)

diff --git a/include/asm-arm/arch-s3c2410/anubis-cpld.h 
b/include/asm-arm/arch-s3c2410/anubis-cpld.h
index 40e8e27..dcebf6d 100644
--- a/include/asm-arm/arch-s3c2410/anubis-cpld.h
+++ b/include/asm-arm/arch-s3c2410/anubis-cpld.h
@@ -1,6 +1,6 @@
 /* linux/include/asm-arm/arch-s3c2410/anubis-cpld.h
  *
- * (c) 2005 Simtec Electronics
+ * Copyright (c) 2005 Simtec Electronics
  * http://www.simtec.co.uk/products/
  * Ben Dooks [EMAIL PROTECTED]
  *
diff --git a/include/asm-arm/arch-s3c2410/anubis-irq.h 
b/include/asm-arm/arch-s3c2410/anubis-irq.h
index 4b5f423..cd77a70 100644
--- a/include/asm-arm/arch-s3c2410/anubis-irq.h
+++ b/include/asm-arm/arch-s3c2410/anubis-irq.h
@@ -1,6 +1,6 @@
 /* linux/include/asm-arm/arch-s3c2410/anubis-irq.h
  *
- * (c) 2005 Simtec Electronics
+ * Copyright (c) 2005 Simtec Electronics
  * http://www.simtec.co.uk/products/
  * Ben Dooks [EMAIL PROTECTED]
  *
diff --git a/include/asm-arm/arch-s3c2410/anubis-map.h 
b/include/asm-arm/arch-s3c2410/anubis-map.h
index 058a210..ab076de 100644
--- a/include/asm-arm/arch-s3c2410/anubis-map.h
+++ b/include/asm-arm/arch-s3c2410/anubis-map.h
@@ -1,6 +1,6 @@
 /* linux/include/asm-arm/arch-s3c2410/anubis-map.h
  *
- * (c) 2005 Simtec Electronics
+ * Copyright (c) 2005 Simtec Electronics
  * http://www.simtec.co.uk/products/
  * Ben Dooks [EMAIL PROTECTED]
  *
diff --git a/include/asm-arm/arch-s3c2410/bast-cpld.h 
b/include/asm-arm/arch-s3c2410/bast-cpld.h
index 8969cff..034d2c5 100644
--- a/include/asm-arm/arch-s3c2410/bast-cpld.h
+++ b/include/asm-arm/arch-s3c2410/bast-cpld.h
@@ -1,7 +1,7 @@
 /* linux/include/asm-arm/arch-s3c2410/bast-cpld.h
  *
- * (c) 2003,2004 Simtec Electronics
- *  Ben Dooks [EMAIL PROTECTED]
+ * Copyright (c) 2003,2004 Simtec Electronics
+ * Ben Dooks [EMAIL PROTECTED]
  *
  * BAST - CPLD control constants
  *
diff --git a/include/asm-arm/arch-s3c2410/bast-irq.h 
b/include/asm-arm/arch-s3c2410/bast-irq.h
index 15ffa66..726c046 100644
--- a/include/asm-arm/arch-s3c2410/bast-irq.h
+++ b/include/asm-arm/arch-s3c2410/bast-irq.h
@@ -1,7 +1,7 @@
 /* linux/include/asm-arm/arch-s3c2410/bast-irq.h
  *
- * (c) 2003,2004 Simtec Electronics
- *  Ben Dooks [EMAIL PROTECTED]
+ * Copyright (c) 2003,2004 Simtec Electronics
+ * Ben Dooks [EMAIL PROTECTED]
  *
  * Machine BAST - IRQ Number definitions
  *
diff --git a/include/asm-arm/arch-s3c2410/bast-map.h 
b/include/asm-arm/arch-s3c2410/bast-map.h
index 727cef8..86ac1c1 100644
--- a/include/asm-arm/arch-s3c2410/bast-map.h
+++ b/include/asm-arm/arch-s3c2410/bast-map.h
@@ -1,7 +1,7 @@
 /* linux/include/asm-arm/arch-s3c2410/bast-map.h
  *
- * (c) 2003,2004 Simtec Electronics
- *  Ben Dooks [EMAIL PROTECTED]
+ * Copyright (c) 2003,2004 Simtec Electronics
+ * Ben Dooks [EMAIL PROTECTED]
  *
  * Machine BAST - Memory map definitions
  *
diff --git a/include/asm-arm/arch-s3c2410/bast-pmu.h 
b/include/asm-arm/arch-s3c2410/bast-pmu.h
index 8283602..37a11fe 100644
--- a/include/asm-arm/arch-s3c2410/bast-pmu.h
+++ b/include/asm-arm/arch-s3c2410/bast-pmu.h
@@ -1,6 +1,6 @@
 /* linux/include/asm-arm/arch-s3c2410/bast-pmu.h
  *
- * (c) 2003,2004 Simtec Electronics
+ * Copyright (c) 2003,2004 Simtec Electronics
  * Ben Dooks [EMAIL PROTECTED]
  * Vincent Sanders [EMAIL PROTECTED]
  *
diff --git a/include/asm-arm/arch-s3c2410/h1940-latch.h 
b/include/asm-arm/arch-s3c2410/h1940-latch.h
index c580241..22a7efd 100644
--- a/include/asm-arm/arch-s3c2410/h1940-latch.h
+++ b/include/asm-arm/arch-s3c2410/h1940-latch.h
@@ -1,6 

[ARM] 4040/1: S3C24XX: Fix copyrights in arch/arm/mach-s3c2410

2006-12-21 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=c16f7bd8d48f64ba2d87ab821288815c9e35b14d
Commit: c16f7bd8d48f64ba2d87ab821288815c9e35b14d
Parent: 9d6be125ba8b7cd3af4832094bf3643e09d6e39b
Author: Ben Dooks [EMAIL PROTECTED]
AuthorDate: Sun Dec 17 20:05:21 2006 +0100
Committer:  Russell King [EMAIL PROTECTED]
CommitDate: Sun Dec 17 23:37:51 2006 +

[ARM] 4040/1: S3C24XX: Fix copyrights in arch/arm/mach-s3c2410

Fix the copyright messages in arch/arm/mach-s3c2410
to actually have `Copyright` in the line.

Signed-off-by: Ben Dooks [EMAIL PROTECTED]
Signed-off-by: Russell King [EMAIL PROTECTED]
---
 arch/arm/mach-s3c2410/dma.c |2 +-
 arch/arm/mach-s3c2410/s3c2410-dma.c |2 +-
 arch/arm/mach-s3c2410/s3c2412-dma.c |2 +-
 arch/arm/mach-s3c2410/s3c2440-dma.c |2 +-
 4 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/arch/arm/mach-s3c2410/dma.c b/arch/arm/mach-s3c2410/dma.c
index 01abb0a..717322a 100644
--- a/arch/arm/mach-s3c2410/dma.c
+++ b/arch/arm/mach-s3c2410/dma.c
@@ -1,6 +1,6 @@
 /* linux/arch/arm/mach-s3c2410/dma.c
  *
- * (c) 2003-2005,2006 Simtec Electronics
+ * Copyright (c) 2003-2005,2006 Simtec Electronics
  * Ben Dooks [EMAIL PROTECTED]
  *
  * S3C2410 DMA core
diff --git a/arch/arm/mach-s3c2410/s3c2410-dma.c 
b/arch/arm/mach-s3c2410/s3c2410-dma.c
index 51e5098..93cc31f 100644
--- a/arch/arm/mach-s3c2410/s3c2410-dma.c
+++ b/arch/arm/mach-s3c2410/s3c2410-dma.c
@@ -1,6 +1,6 @@
 /* linux/arch/arm/mach-s3c2410/s3c2410-dma.c
  *
- * (c) 2006 Simtec Electronics
+ * Copyright (c) 2006 Simtec Electronics
  * Ben Dooks [EMAIL PROTECTED]
  *
  * S3C2410 DMA selection
diff --git a/arch/arm/mach-s3c2410/s3c2412-dma.c 
b/arch/arm/mach-s3c2410/s3c2412-dma.c
index 171f370..dcf582a 100644
--- a/arch/arm/mach-s3c2410/s3c2412-dma.c
+++ b/arch/arm/mach-s3c2410/s3c2412-dma.c
@@ -1,6 +1,6 @@
 /* linux/arch/arm/mach-s3c2410/s3c2412-dma.c
  *
- * (c) 2006 Simtec Electronics
+ * Copyright (c) 2006 Simtec Electronics
  * Ben Dooks [EMAIL PROTECTED]
  *
  * S3C2412 DMA selection
diff --git a/arch/arm/mach-s3c2410/s3c2440-dma.c 
b/arch/arm/mach-s3c2410/s3c2440-dma.c
index 11e109c..e07ac72 100644
--- a/arch/arm/mach-s3c2410/s3c2440-dma.c
+++ b/arch/arm/mach-s3c2410/s3c2440-dma.c
@@ -1,6 +1,6 @@
 /* linux/arch/arm/mach-s3c2410/s3c2440-dma.c
  *
- * (c) 2006 Simtec Electronics
+ * Copyright (c) 2006 Simtec Electronics
  * Ben Dooks [EMAIL PROTECTED]
  *
  * S3C2440 DMA selection
-
To unsubscribe from this list: send the line unsubscribe git-commits-head in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[ARM] 4041/1: S3C24XX: Fix sparse errors from VA addresses

2006-12-21 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=cdcb38352b6cf97241d4c3969f93f792026d18cc
Commit: cdcb38352b6cf97241d4c3969f93f792026d18cc
Parent: c16f7bd8d48f64ba2d87ab821288815c9e35b14d
Author: Ben Dooks [EMAIL PROTECTED]
AuthorDate: Sun Dec 17 20:15:13 2006 +0100
Committer:  Russell King [EMAIL PROTECTED]
CommitDate: Sun Dec 17 23:37:52 2006 +

[ARM] 4041/1: S3C24XX: Fix sparse errors from VA addresses

Fix address-space conversion errors from passing addresses
generated from include/asm-arm/arch-s3c2410/map.h by adding
an __force argument to the `void __iomem *` for all the
virtual addresses.

Signed-off-by: Ben Dooks [EMAIL PROTECTED]
Signed-off-by: Russell King [EMAIL PROTECTED]
---
 include/asm-arm/arch-s3c2410/map.h |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/include/asm-arm/arch-s3c2410/map.h 
b/include/asm-arm/arch-s3c2410/map.h
index 4ef4eeb..6746114 100644
--- a/include/asm-arm/arch-s3c2410/map.h
+++ b/include/asm-arm/arch-s3c2410/map.h
@@ -25,7 +25,7 @@
  */
 
 #ifndef __ASSEMBLY__
-#define S3C2410_ADDR(x)  ((void __iomem *)0xF000 + (x))
+#define S3C2410_ADDR(x)  ((void __iomem __force *)0xF000 + (x))
 #else
 #define S3C2410_ADDR(x)  (0xF000 + (x))
 #endif
-
To unsubscribe from this list: send the line unsubscribe git-commits-head in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[ARM] 4042/1: H1940: Fix sparse errors from VA addresses

2006-12-21 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=2d8c1cef84dcba462e1806c1223aecd97df33f99
Commit: 2d8c1cef84dcba462e1806c1223aecd97df33f99
Parent: cdcb38352b6cf97241d4c3969f93f792026d18cc
Author: Ben Dooks [EMAIL PROTECTED]
AuthorDate: Sun Dec 17 20:18:40 2006 +0100
Committer:  Russell King [EMAIL PROTECTED]
CommitDate: Sun Dec 17 23:37:53 2006 +

[ARM] 4042/1: H1940: Fix sparse errors from VA addresses

Fix address-space conversion errors from passing addresses
generated from include/asm-arm/arch-s3c2410/map.h by adding
an __force argument to the `void __iomem *` for all the
virtual addresses.

Signed-off-by: Ben Dooks [EMAIL PROTECTED]
Signed-off-by: Russell King [EMAIL PROTECTED]
---
 include/asm-arm/arch-s3c2410/h1940-latch.h |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/include/asm-arm/arch-s3c2410/h1940-latch.h 
b/include/asm-arm/arch-s3c2410/h1940-latch.h
index 22a7efd..c3de5ab 100644
--- a/include/asm-arm/arch-s3c2410/h1940-latch.h
+++ b/include/asm-arm/arch-s3c2410/h1940-latch.h
@@ -16,7 +16,7 @@
 
 
 #ifndef __ASSEMBLY__
-#define H1940_LATCH((void __iomem *)0xF800)
+#define H1940_LATCH((void __force __iomem *)0xF800)
 #else
 #define H1940_LATCH0xF800
 #endif
-
To unsubscribe from this list: send the line unsubscribe git-commits-head in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[ARM] 4043/1: S3C24XX: fix sparse warnings in arch/arm/mach-s3c2410/s3c2440-clock.c

2006-12-21 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=e546e8af469ee97ffea8903b21c39e5131fd33bd
Commit: e546e8af469ee97ffea8903b21c39e5131fd33bd
Parent: 2d8c1cef84dcba462e1806c1223aecd97df33f99
Author: Ben Dooks [EMAIL PROTECTED]
AuthorDate: Sun Dec 17 20:38:14 2006 +0100
Committer:  Russell King [EMAIL PROTECTED]
CommitDate: Sun Dec 17 23:37:54 2006 +

[ARM] 4043/1: S3C24XX: fix sparse warnings in 
arch/arm/mach-s3c2410/s3c2440-clock.c

Fix the sparse errors in arch/arm/mach-s3c2410/s3c2440-clock.c

warning: symbol 'clk_h' shadows an earlier one
warning: symbol 'clk_p' shadows an earlier one
warning: symbol 'clk_upll' shadows an earlier one

Signed-off-by: Ben Dooks [EMAIL PROTECTED]
Signed-off-by: Russell King [EMAIL PROTECTED]
---
 arch/arm/mach-s3c2410/s3c2440-clock.c |   24 
 1 files changed, 12 insertions(+), 12 deletions(-)

diff --git a/arch/arm/mach-s3c2410/s3c2440-clock.c 
b/arch/arm/mach-s3c2410/s3c2440-clock.c
index 1579686..ba13c1d 100644
--- a/arch/arm/mach-s3c2410/s3c2440-clock.c
+++ b/arch/arm/mach-s3c2410/s3c2440-clock.c
@@ -113,18 +113,18 @@ static int s3c2440_clk_add(struct sys_device *sysdev)
 {
unsigned long camdivn = __raw_readl(S3C2440_CAMDIVN);
unsigned long clkdivn;
-   struct clk *clk_h;
-   struct clk *clk_p;
-   struct clk *clk_upll;
+   struct clk *clock_h;
+   struct clk *clock_p;
+   struct clk *clock_upll;
 
printk(S3C2440: Clock Support, DVS %s\n,
   (camdivn  S3C2440_CAMDIVN_DVSEN) ? on : off);
 
-   clk_p = clk_get(NULL, pclk);
-   clk_h = clk_get(NULL, hclk);
-   clk_upll = clk_get(NULL, upll);
+   clock_p = clk_get(NULL, pclk);
+   clock_h = clk_get(NULL, hclk);
+   clock_upll = clk_get(NULL, upll);
 
-   if (IS_ERR(clk_p) || IS_ERR(clk_h) || IS_ERR(clk_upll)) {
+   if (IS_ERR(clock_p) || IS_ERR(clock_h) || IS_ERR(clock_upll)) {
printk(KERN_ERR S3C2440: Failed to get parent clocks\n);
return -EINVAL;
}
@@ -132,8 +132,8 @@ static int s3c2440_clk_add(struct sys_device *sysdev)
/* check rate of UPLL, and if it is near 96MHz, then change
 * to using half the UPLL rate for the system */
 
-   if (clk_get_rate(clk_upll)  (94 * MHZ)) {
-   clk_usb_bus.rate = clk_get_rate(clk_upll) / 2;
+   if (clk_get_rate(clock_upll)  (94 * MHZ)) {
+   clk_usb_bus.rate = clk_get_rate(clock_upll) / 2;
 
mutex_lock(clocks_mutex);
 
@@ -144,9 +144,9 @@ static int s3c2440_clk_add(struct sys_device *sysdev)
mutex_unlock(clocks_mutex);
}
 
-   s3c2440_clk_cam.parent = clk_h;
-   s3c2440_clk_ac97.parent = clk_p;
-   s3c2440_clk_cam_upll.parent = clk_upll;
+   s3c2440_clk_cam.parent = clock_h;
+   s3c2440_clk_ac97.parent = clock_p;
+   s3c2440_clk_cam_upll.parent = clock_upll;
 
s3c24xx_register_clock(s3c2440_clk_ac97);
s3c24xx_register_clock(s3c2440_clk_cam);
-
To unsubscribe from this list: send the line unsubscribe git-commits-head in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[ARM] 4044/1: S3C24XX: fix sparse warnings in arch/arm/mach-s3c2410/s3c2442-clock.c

2006-12-21 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=3e940b6a90c346a224c97570a97a150a16f1c036
Commit: 3e940b6a90c346a224c97570a97a150a16f1c036
Parent: e546e8af469ee97ffea8903b21c39e5131fd33bd
Author: Ben Dooks [EMAIL PROTECTED]
AuthorDate: Sun Dec 17 20:41:45 2006 +0100
Committer:  Russell King [EMAIL PROTECTED]
CommitDate: Sun Dec 17 23:37:56 2006 +

[ARM] 4044/1: S3C24XX: fix sparse warnings in 
arch/arm/mach-s3c2410/s3c2442-clock.c

Fix sparse errors in arch/arm/mach-s3c2410/s3c2442-clock.c

warning: symbol 'clk_h' shadows an earlier one
warning: symbol 'clk_p' shadows an earlier one
warning: symbol 'clk_upll' shadows an earlier one

Signed-off-by: Ben Dooks [EMAIL PROTECTED]
Signed-off-by: Russell King [EMAIL PROTECTED]
---
 arch/arm/mach-s3c2410/s3c2442-clock.c |   22 +++---
 1 files changed, 11 insertions(+), 11 deletions(-)

diff --git a/arch/arm/mach-s3c2410/s3c2442-clock.c 
b/arch/arm/mach-s3c2410/s3c2442-clock.c
index d9f54b5..4e292ca 100644
--- a/arch/arm/mach-s3c2410/s3c2442-clock.c
+++ b/arch/arm/mach-s3c2410/s3c2442-clock.c
@@ -117,18 +117,18 @@ static int s3c2442_clk_add(struct sys_device *sysdev)
 {
unsigned long camdivn = __raw_readl(S3C2440_CAMDIVN);
unsigned long clkdivn;
-   struct clk *clk_h;
-   struct clk *clk_p;
-   struct clk *clk_upll;
+   struct clk *clock_h;
+   struct clk *clock_p;
+   struct clk *clock_upll;
 
printk(S3C2442: Clock Support, DVS %s\n,
   (camdivn  S3C2440_CAMDIVN_DVSEN) ? on : off);
 
-   clk_p = clk_get(NULL, pclk);
-   clk_h = clk_get(NULL, hclk);
-   clk_upll = clk_get(NULL, upll);
+   clock_p = clk_get(NULL, pclk);
+   clock_h = clk_get(NULL, hclk);
+   clock_upll = clk_get(NULL, upll);
 
-   if (IS_ERR(clk_p) || IS_ERR(clk_h) || IS_ERR(clk_upll)) {
+   if (IS_ERR(clock_p) || IS_ERR(clock_h) || IS_ERR(clock_upll)) {
printk(KERN_ERR S3C2442: Failed to get parent clocks\n);
return -EINVAL;
}
@@ -136,8 +136,8 @@ static int s3c2442_clk_add(struct sys_device *sysdev)
/* check rate of UPLL, and if it is near 96MHz, then change
 * to using half the UPLL rate for the system */
 
-   if (clk_get_rate(clk_upll)  (94 * MHZ)) {
-   clk_usb_bus.rate = clk_get_rate(clk_upll) / 2;
+   if (clk_get_rate(clock_upll)  (94 * MHZ)) {
+   clk_usb_bus.rate = clk_get_rate(clock_upll) / 2;
 
mutex_lock(clocks_mutex);
 
@@ -148,8 +148,8 @@ static int s3c2442_clk_add(struct sys_device *sysdev)
mutex_unlock(clocks_mutex);
}
 
-   s3c2442_clk_cam.parent = clk_h;
-   s3c2442_clk_cam_upll.parent = clk_upll;
+   s3c2442_clk_cam.parent = clock_h;
+   s3c2442_clk_cam_upll.parent = clock_upll;
 
s3c24xx_register_clock(s3c2442_clk_cam);
s3c24xx_register_clock(s3c2442_clk_cam_upll);
-
To unsubscribe from this list: send the line unsubscribe git-commits-head in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[ARM] 4045/1: S3C24XX: remove old VA for non-shared areas

2006-12-21 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=58d19d6ea608077e83c30e58ae1494246b1f6b82
Commit: 58d19d6ea608077e83c30e58ae1494246b1f6b82
Parent: 3e940b6a90c346a224c97570a97a150a16f1c036
Author: Ben Dooks [EMAIL PROTECTED]
AuthorDate: Sun Dec 17 20:50:55 2006 +0100
Committer:  Russell King [EMAIL PROTECTED]
CommitDate: Sun Dec 17 23:37:57 2006 +

[ARM] 4045/1: S3C24XX: remove old VA for non-shared areas

Remove old (and non-shared) VA addresses from the mappings
in arch/arm/mach-s3c2410/map.h and anywhere they are being
mapped in arch/arm/mach-s3c2410

Signed-off-by: Ben Dooks [EMAIL PROTECTED]
Signed-off-by: Russell King [EMAIL PROTECTED]
---
 arch/arm/mach-s3c2410/s3c2410.c|2 --
 arch/arm/mach-s3c2410/s3c2412.c|1 -
 arch/arm/mach-s3c2410/s3c244x.c|2 --
 include/asm-arm/arch-s3c2410/map.h |   24 ++--
 4 files changed, 6 insertions(+), 23 deletions(-)

diff --git a/arch/arm/mach-s3c2410/s3c2410.c b/arch/arm/mach-s3c2410/s3c2410.c
index 183e403..1e5c504 100644
--- a/arch/arm/mach-s3c2410/s3c2410.c
+++ b/arch/arm/mach-s3c2410/s3c2410.c
@@ -38,11 +38,9 @@
 /* Initial IO mappings */
 
 static struct map_desc s3c2410_iodesc[] __initdata = {
-   IODESC_ENT(USBHOST),
IODESC_ENT(CLKPWR),
IODESC_ENT(LCD),
IODESC_ENT(TIMER),
-   IODESC_ENT(ADC),
IODESC_ENT(WATCHDOG),
 };
 
diff --git a/arch/arm/mach-s3c2410/s3c2412.c b/arch/arm/mach-s3c2410/s3c2412.c
index e76431c..a8cc8f8 100644
--- a/arch/arm/mach-s3c2410/s3c2412.c
+++ b/arch/arm/mach-s3c2410/s3c2412.c
@@ -60,7 +60,6 @@ static struct map_desc s3c2412_iodesc[] __initdata = {
IODESC_ENT(CLKPWR),
IODESC_ENT(LCD),
IODESC_ENT(TIMER),
-   IODESC_ENT(ADC),
IODESC_ENT(WATCHDOG),
 };
 
diff --git a/arch/arm/mach-s3c2410/s3c244x.c b/arch/arm/mach-s3c2410/s3c244x.c
index 9a22582..ffc0b21 100644
--- a/arch/arm/mach-s3c2410/s3c244x.c
+++ b/arch/arm/mach-s3c2410/s3c244x.c
@@ -47,8 +47,6 @@ static struct map_desc s3c244x_iodesc[] __initdata = {
IODESC_ENT(TIMER),
IODESC_ENT(WATCHDOG),
IODESC_ENT(LCD),
-   IODESC_ENT(ADC),
-   IODESC_ENT(USBHOST),
 };
 
 /* uart initialisation */
diff --git a/include/asm-arm/arch-s3c2410/map.h 
b/include/asm-arm/arch-s3c2410/map.h
index 6746114..4505aef 100644
--- a/include/asm-arm/arch-s3c2410/map.h
+++ b/include/asm-arm/arch-s3c2410/map.h
@@ -47,73 +47,65 @@
 #define S3C24XX_SZ_MEMCTRL SZ_1M
 
 /* USB host controller */
-#define S3C24XX_VA_USBHOST S3C2410_ADDR(0x0020)
 #define S3C2400_PA_USBHOST (0x1420)
 #define S3C2410_PA_USBHOST (0x4900)
 #define S3C24XX_SZ_USBHOST SZ_1M
 
 /* DMA controller */
-#define S3C24XX_VA_DMAS3C2410_ADDR(0x0030)
 #define S3C2400_PA_DMA(0x1460)
 #define S3C2410_PA_DMA(0x4B00)
 #define S3C24XX_SZ_DMASZ_1M
 
 /* Clock and Power management */
-#define S3C24XX_VA_CLKPWR  S3C2410_ADDR(0x0040)
+#define S3C24XX_VA_CLKPWR  S3C2410_ADDR(0x0020)
 #define S3C2400_PA_CLKPWR  (0x1480)
 #define S3C2410_PA_CLKPWR  (0x4C00)
 #define S3C24XX_SZ_CLKPWR  SZ_1M
 
 /* LCD controller */
-#define S3C24XX_VA_LCDS3C2410_ADDR(0x0060)
+#define S3C24XX_VA_LCDS3C2410_ADDR(0x0030)
 #define S3C2400_PA_LCD(0x14A0)
 #define S3C2410_PA_LCD(0x4D00)
 #define S3C24XX_SZ_LCDSZ_1M
 
 /* NAND flash controller */
-#define S3C24XX_VA_NAND   S3C2410_ADDR(0x0070)
 #define S3C2410_PA_NAND   (0x4E00)
 #define S3C24XX_SZ_NAND   SZ_1M
 
 /* MMC controller - available on the S3C2400 */
-#define S3C2400_VA_MMCS3C2400_ADDR(0x0070)
 #define S3C2400_PA_MMC(0x15A0)
 #define S3C2400_SZ_MMCSZ_1M
 
 /* UARTs */
-#define S3C24XX_VA_UART   S3C2410_ADDR(0x0080)
+#define S3C24XX_VA_UART   S3C2410_ADDR(0x0040)
 #define S3C2400_PA_UART   (0x1500)
 #define S3C2410_PA_UART   (0x5000)
 #define S3C24XX_SZ_UART   SZ_1M
 
 /* Timers */
-#define S3C24XX_VA_TIMER   S3C2410_ADDR(0x0090)
+#define S3C24XX_VA_TIMER   S3C2410_ADDR(0x0050)
 #define S3C2400_PA_TIMER   (0x1510)
 #define S3C2410_PA_TIMER   (0x5100)
 #define S3C24XX_SZ_TIMER   SZ_1M
 
 /* USB Device port */
-#define S3C24XX_VA_USBDEV  S3C2410_ADDR(0x00A0)
+#define S3C24XX_VA_USBDEV  S3C2410_ADDR(0x0060)
 #define S3C2400_PA_USBDEV  (0x15200140)
 #define S3C2410_PA_USBDEV  (0x5200)
 #define S3C24XX_SZ_USBDEV  SZ_1M
 
 /* Watchdog */
-#define S3C24XX_VA_WATCHDOG S3C2410_ADDR(0x00B0)
+#define S3C24XX_VA_WATCHDOG S3C2410_ADDR(0x0070)
 #define S3C2400_PA_WATCHDOG (0x1530)
 #define S3C2410_PA_WATCHDOG (0x5300)
 #define S3C24XX_SZ_WATCHDOG SZ_1M
 
 /* IIC hardware controller */
-#define S3C24XX_VA_IICS3C2410_ADDR(0x00C0)
 #define S3C2400_PA_IIC(0x1540)
 #define S3C2410_PA_IIC(0x5400)
 #define S3C24XX_SZ_IIC

[ARM] 4046/1: S3C24XX: fix sparse errors arch/arm/mach-s3c2410

2006-12-21 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=7ae9e420de165c2a992d116002d05655138d8f24
Commit: 7ae9e420de165c2a992d116002d05655138d8f24
Parent: 58d19d6ea608077e83c30e58ae1494246b1f6b82
Author: Ben Dooks [EMAIL PROTECTED]
AuthorDate: Sun Dec 17 20:59:37 2006 +0100
Committer:  Russell King [EMAIL PROTECTED]
CommitDate: Sun Dec 17 23:37:58 2006 +

[ARM] 4046/1: S3C24XX: fix sparse errors arch/arm/mach-s3c2410

Fix the following sparse errors in arch/arm/mach-s3c2410
by fixing the include paths and making un-exported items
static.

s3c2410-clock.c:206:12: warning: symbol 's3c2410_baseclk_add' was not 
declared. Should it be static?
s3c2412-clock.c:559:17: warning: symbol 'clks_src' was not declared. Should 
it be static?
s3c2412-clock.c:622:12: warning: symbol 'clks' was not declared. Should it 
be static?
s3c2412-clock.c:630:12: warning: symbol 's3c2412_baseclk_add' was not 
declared. Should it be static?

Signed-off-by: Ben Dooks [EMAIL PROTECTED]
Signed-off-by: Russell King [EMAIL PROTECTED]
---
 arch/arm/mach-s3c2410/s3c2410-clock.c |4 
 arch/arm/mach-s3c2410/s3c2412-clock.c |   10 +++---
 2 files changed, 11 insertions(+), 3 deletions(-)

diff --git a/arch/arm/mach-s3c2410/s3c2410-clock.c 
b/arch/arm/mach-s3c2410/s3c2410-clock.c
index 00abe19..5815aa0 100644
--- a/arch/arm/mach-s3c2410/s3c2410-clock.c
+++ b/arch/arm/mach-s3c2410/s3c2410-clock.c
@@ -31,12 +31,16 @@
 #include linux/mutex.h
 #include linux/delay.h
 
+#include asm/mach/map.h
+
 #include asm/hardware.h
 #include asm/io.h
 
+#include asm/arch/regs-serial.h
 #include asm/arch/regs-clock.h
 #include asm/arch/regs-gpio.h
 
+#include s3c2410.h
 #include clock.h
 #include cpu.h
 
diff --git a/arch/arm/mach-s3c2410/s3c2412-clock.c 
b/arch/arm/mach-s3c2410/s3c2412-clock.c
index c95ed3e..63f980c 100644
--- a/arch/arm/mach-s3c2410/s3c2412-clock.c
+++ b/arch/arm/mach-s3c2410/s3c2412-clock.c
@@ -31,12 +31,16 @@
 #include linux/mutex.h
 #include linux/delay.h
 
+#include asm/mach/map.h
+
 #include asm/hardware.h
 #include asm/io.h
 
+#include asm/arch/regs-serial.h
 #include asm/arch/regs-clock.h
 #include asm/arch/regs-gpio.h
 
+#include s3c2412.h
 #include clock.h
 #include cpu.h
 
@@ -49,7 +53,7 @@
  * set the correct muxing at initialisation
 */
 
-int s3c2412_clkcon_enable(struct clk *clk, int enable)
+static int s3c2412_clkcon_enable(struct clk *clk, int enable)
 {
unsigned int clocks = clk-ctrlbit;
unsigned long clkcon;
@@ -556,7 +560,7 @@ struct clk_init {
struct clk  *src_1;
 };
 
-struct clk_init clks_src[] __initdata = {
+static struct clk_init clks_src[] __initdata = {
{
.clk= clk_usysclk,
.bit= S3C2412_CLKSRC_USBCLK_HCLK,
@@ -619,7 +623,7 @@ static void __init s3c2412_clk_initparents(void)
 
 /* clocks to add straight away */
 
-struct clk *clks[] __initdata = {
+static struct clk *clks[] __initdata = {
clk_ext,
clk_usb_bus,
clk_erefclk,
-
To unsubscribe from this list: send the line unsubscribe git-commits-head in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[ARM] 4048/1: S3C24XX: make s3c2410_pm_resume() static

2006-12-21 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=9162b7dbf5652a4ae99980235cd8992223258408
Commit: 9162b7dbf5652a4ae99980235cd8992223258408
Parent: 7ae9e420de165c2a992d116002d05655138d8f24
Author: Ben Dooks [EMAIL PROTECTED]
AuthorDate: Sun Dec 17 22:44:56 2006 +0100
Committer:  Russell King [EMAIL PROTECTED]
CommitDate: Sun Dec 17 23:37:59 2006 +

[ARM] 4048/1: S3C24XX: make s3c2410_pm_resume() static

Remove warning from s3c2410_pm_resume() not being
declared by making it static.

Signed-off-by: Ben Dooks [EMAIL PROTECTED]
Signed-off-by: Russell King [EMAIL PROTECTED]
---
 arch/arm/mach-s3c2410/s3c2410-pm.c |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/arch/arm/mach-s3c2410/s3c2410-pm.c 
b/arch/arm/mach-s3c2410/s3c2410-pm.c
index 77c6814..e546fe1 100644
--- a/arch/arm/mach-s3c2410/s3c2410-pm.c
+++ b/arch/arm/mach-s3c2410/s3c2410-pm.c
@@ -87,7 +87,7 @@ static void s3c2410_pm_prepare(void)
 
 }
 
-int s3c2410_pm_resume(struct sys_device *dev)
+static int s3c2410_pm_resume(struct sys_device *dev)
 {
unsigned long tmp;
 
-
To unsubscribe from this list: send the line unsubscribe git-commits-head in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[ARM] 4049/1: S3C24XX: fix sparse warning due to upf_t in regs-serial.h

2006-12-21 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=b6d1f542e3f44f8988b601e3ca6277c143282179
Commit: b6d1f542e3f44f8988b601e3ca6277c143282179
Parent: 9162b7dbf5652a4ae99980235cd8992223258408
Author: Ben Dooks [EMAIL PROTECTED]
AuthorDate: Sun Dec 17 23:22:26 2006 +0100
Committer:  Russell King [EMAIL PROTECTED]
CommitDate: Sun Dec 17 23:38:01 2006 +

[ARM] 4049/1: S3C24XX: fix sparse warning due to upf_t in regs-serial.h

Change the include/asm-arm/arch-s3c2410/regs-serial.h
platform data to use the prorper type (upf_t) for the
uart_flags.

Fix all the other parts of arch/arm/mach-s3c2410 to
include linux/serial_core.h and all other uses of
the include file.

mach-rx3715.c:101:18: warning: incorrect type in initializer (different 
base types)
mach-rx3715.c:101:18:expected unsigned long [unsigned] uart_flags
mach-rx3715.c:101:18:got restricted unsigned int [usertype] [force] 
noident

Signed-off-by: Ben Dooks [EMAIL PROTECTED]
Signed-off-by: Russell King [EMAIL PROTECTED]
---
 arch/arm/mach-s3c2410/cpu.c|1 +
 arch/arm/mach-s3c2410/devs.c   |1 +
 arch/arm/mach-s3c2410/mach-anubis.c|1 +
 arch/arm/mach-s3c2410/mach-bast.c  |1 +
 arch/arm/mach-s3c2410/mach-h1940.c |3 +--
 arch/arm/mach-s3c2410/mach-n30.c   |3 +--
 arch/arm/mach-s3c2410/mach-nexcoder.c  |1 +
 arch/arm/mach-s3c2410/mach-osiris.c|1 +
 arch/arm/mach-s3c2410/mach-otom.c  |1 +
 arch/arm/mach-s3c2410/mach-smdk2410.c  |1 +
 arch/arm/mach-s3c2410/mach-smdk2413.c  |1 +
 arch/arm/mach-s3c2410/mach-smdk2440.c  |1 +
 arch/arm/mach-s3c2410/mach-vstms.c |1 +
 arch/arm/mach-s3c2410/pm-simtec.c  |1 -
 arch/arm/mach-s3c2410/pm.c |1 +
 arch/arm/mach-s3c2410/s3c2410-clock.c  |1 +
 arch/arm/mach-s3c2410/s3c2410-dma.c|1 +
 arch/arm/mach-s3c2410/s3c2410.c|1 +
 arch/arm/mach-s3c2410/s3c2412-clock.c  |1 +
 arch/arm/mach-s3c2410/s3c2412-dma.c|1 +
 arch/arm/mach-s3c2410/s3c2412.c|1 +
 arch/arm/mach-s3c2410/s3c2440-dma.c|1 +
 arch/arm/mach-s3c2410/s3c2440.c|1 +
 arch/arm/mach-s3c2410/s3c2442.c|1 +
 arch/arm/mach-s3c2410/s3c244x.c|1 +
 include/asm-arm/arch-s3c2410/regs-serial.h |2 +-
 include/asm-arm/arch-s3c2410/uncompress.h  |1 +
 27 files changed, 26 insertions(+), 6 deletions(-)

diff --git a/arch/arm/mach-s3c2410/cpu.c b/arch/arm/mach-s3c2410/cpu.c
index 9d4899e..ae1f5bb 100644
--- a/arch/arm/mach-s3c2410/cpu.c
+++ b/arch/arm/mach-s3c2410/cpu.c
@@ -26,6 +26,7 @@
 #include linux/module.h
 #include linux/interrupt.h
 #include linux/ioport.h
+#include linux/serial_core.h
 #include linux/platform_device.h
 
 #include asm/hardware.h
diff --git a/arch/arm/mach-s3c2410/devs.c b/arch/arm/mach-s3c2410/devs.c
index cae35ff..faccde2 100644
--- a/arch/arm/mach-s3c2410/devs.c
+++ b/arch/arm/mach-s3c2410/devs.c
@@ -17,6 +17,7 @@
 #include linux/list.h
 #include linux/timer.h
 #include linux/init.h
+#include linux/serial_core.h
 #include linux/platform_device.h
 
 #include asm/mach/arch.h
diff --git a/arch/arm/mach-s3c2410/mach-anubis.c 
b/arch/arm/mach-s3c2410/mach-anubis.c
index e94cdcd..0fad0c2 100644
--- a/arch/arm/mach-s3c2410/mach-anubis.c
+++ b/arch/arm/mach-s3c2410/mach-anubis.c
@@ -15,6 +15,7 @@
 #include linux/list.h
 #include linux/timer.h
 #include linux/init.h
+#include linux/serial_core.h
 #include linux/platform_device.h
 
 #include asm/mach/arch.h
diff --git a/arch/arm/mach-s3c2410/mach-bast.c 
b/arch/arm/mach-s3c2410/mach-bast.c
index 2968fb2..b8b7675 100644
--- a/arch/arm/mach-s3c2410/mach-bast.c
+++ b/arch/arm/mach-s3c2410/mach-bast.c
@@ -16,6 +16,7 @@
 #include linux/list.h
 #include linux/timer.h
 #include linux/init.h
+#include linux/serial_core.h
 #include linux/platform_device.h
 #include linux/dm9000.h
 
diff --git a/arch/arm/mach-s3c2410/mach-h1940.c 
b/arch/arm/mach-s3c2410/mach-h1940.c
index f5b9809..15b625e 100644
--- a/arch/arm/mach-s3c2410/mach-h1940.c
+++ b/arch/arm/mach-s3c2410/mach-h1940.c
@@ -17,6 +17,7 @@
 #include linux/list.h
 #include linux/timer.h
 #include linux/init.h
+#include linux/serial_core.h
 #include linux/platform_device.h
 
 #include asm/mach/arch.h
@@ -37,8 +38,6 @@
 #include asm/arch/h1940-latch.h
 #include asm/arch/fb.h
 
-#include linux/serial_core.h
-
 #include clock.h
 #include devs.h
 #include cpu.h
diff --git a/arch/arm/mach-s3c2410/mach-n30.c b/arch/arm/mach-s3c2410/mach-n30.c
index 116ac31..0411e9a 100644
--- a/arch/arm/mach-s3c2410/mach-n30.c
+++ b/arch/arm/mach-s3c2410/mach-n30.c
@@ -20,6 +20,7 @@
 #include linux/timer.h
 #include linux/init.h
 #include linux/delay.h
+#include linux/serial_core.h
 #include linux/platform_device.h
 #include linux/kthread.h
 
@@ -37,8 +38,6 @@
 

[ARM] 4051/1: S3C24XX: clean includes in S3C2440 and S3C2442 support

2006-12-21 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=994adcc36d8c2133fce01f4d3fe4e41007555913
Commit: 994adcc36d8c2133fce01f4d3fe4e41007555913
Parent: 92211ac71e189942968af57e5d0aed30083760ef
Author: Ben Dooks [EMAIL PROTECTED]
AuthorDate: Sun Dec 17 23:32:21 2006 +0100
Committer:  Russell King [EMAIL PROTECTED]
CommitDate: Sun Dec 17 23:38:03 2006 +

[ARM] 4051/1: S3C24XX: clean includes in S3C2440 and S3C2442 support

Clean the includes in arch/arm/mach-s3c2410/s3c2440.c
and arch/arm/mach-s3c2410/s3c2442.c which should have
been pruned when these where split and updated.

Signed-off-by: Ben Dooks [EMAIL PROTECTED]
Signed-off-by: Russell King [EMAIL PROTECTED]
---
 arch/arm/mach-s3c2410/s3c2440.c |8 
 arch/arm/mach-s3c2410/s3c2440.h |   11 ---
 arch/arm/mach-s3c2410/s3c2442.c |   19 ---
 3 files changed, 0 insertions(+), 38 deletions(-)

diff --git a/arch/arm/mach-s3c2410/s3c2440.c b/arch/arm/mach-s3c2410/s3c2440.c
index b91b114..344eb27 100644
--- a/arch/arm/mach-s3c2410/s3c2440.c
+++ b/arch/arm/mach-s3c2410/s3c2440.c
@@ -29,17 +29,9 @@
 #include asm/io.h
 #include asm/irq.h
 
-#include asm/arch/regs-clock.h
-#include asm/arch/regs-serial.h
-#include asm/arch/regs-gpio.h
-#include asm/arch/regs-gpioj.h
-#include asm/arch/regs-dsc.h
-
 #include s3c2440.h
-#include clock.h
 #include devs.h
 #include cpu.h
-#include pm.h
 
 static struct sys_device s3c2440_sysdev = {
.cls= s3c2440_sysclass,
diff --git a/arch/arm/mach-s3c2410/s3c2440.h b/arch/arm/mach-s3c2410/s3c2440.h
index a75616f..dcd3160 100644
--- a/arch/arm/mach-s3c2410/s3c2440.h
+++ b/arch/arm/mach-s3c2410/s3c2440.h
@@ -11,18 +11,7 @@
 */
 
 #ifdef CONFIG_CPU_S3C2440
-
 extern  int s3c2440_init(void);
-
-extern void s3c2440_map_io(struct map_desc *mach_desc, int size);
-
-extern void s3c2440_init_uarts(struct s3c2410_uartcfg *cfg, int no);
-
-extern void s3c2440_init_clocks(int xtal);
-
 #else
-#define s3c2440_init_clocks NULL
-#define s3c2440_init_uarts NULL
-#define s3c2440_map_io NULL
 #define s3c2440_init NULL
 #endif
diff --git a/arch/arm/mach-s3c2410/s3c2442.c b/arch/arm/mach-s3c2410/s3c2442.c
index e593cb0..428732e 100644
--- a/arch/arm/mach-s3c2410/s3c2442.c
+++ b/arch/arm/mach-s3c2410/s3c2442.c
@@ -16,30 +16,11 @@
 #include linux/list.h
 #include linux/timer.h
 #include linux/init.h
-#include linux/platform_device.h
 #include linux/serial_core.h
 #include linux/sysdev.h
-#include linux/clk.h
-
-#include asm/mach/arch.h
-#include asm/mach/map.h
-#include asm/mach/irq.h
-
-#include asm/hardware.h
-#include asm/io.h
-#include asm/irq.h
-
-#include asm/arch/regs-clock.h
-#include asm/arch/regs-serial.h
-#include asm/arch/regs-gpio.h
-#include asm/arch/regs-gpioj.h
-#include asm/arch/regs-dsc.h
 
 #include s3c2442.h
-#include clock.h
-#include devs.h
 #include cpu.h
-#include pm.h
 
 static struct sys_device s3c2442_sysdev = {
.cls= s3c2442_sysclass,
-
To unsubscribe from this list: send the line unsubscribe git-commits-head in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[ARM] Fix warnings from asm/system.h

2006-12-21 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=255d1f8639f5877381545d0da6821079ebad1c21
Commit: 255d1f8639f5877381545d0da6821079ebad1c21
Parent: 994adcc36d8c2133fce01f4d3fe4e41007555913
Author: Russell King [EMAIL PROTECTED]
AuthorDate: Mon Dec 18 00:12:47 2006 +
Committer:  Russell King [EMAIL PROTECTED]
CommitDate: Mon Dec 18 00:12:47 2006 +

[ARM] Fix warnings from asm/system.h

Move adjust_cr() into arch/arm/mm/mmu.c, and move irqflags.h to
a more appropriate place in the header file.

Signed-off-by: Russell King [EMAIL PROTECTED]
---
 arch/arm/mm/mmu.c|   20 
 include/asm-arm/system.h |   33 -
 2 files changed, 28 insertions(+), 25 deletions(-)

diff --git a/arch/arm/mm/mmu.c b/arch/arm/mm/mmu.c
index f028aef..655c837 100644
--- a/arch/arm/mm/mmu.c
+++ b/arch/arm/mm/mmu.c
@@ -154,6 +154,26 @@ static int __init noalign_setup(char *__unused)
 }
 __setup(noalign, noalign_setup);
 
+#ifndef CONFIG_SMP
+void adjust_cr(unsigned long mask, unsigned long set)
+{
+   unsigned long flags;
+
+   mask = ~CR_A;
+
+   set = mask;
+
+   local_irq_save(flags);
+
+   cr_no_alignment = (cr_no_alignment  ~mask) | set;
+   cr_alignment = (cr_alignment  ~mask) | set;
+
+   set_cr((get_cr()  ~mask) | set);
+
+   local_irq_restore(flags);
+}
+#endif
+
 struct mem_types {
unsigned intprot_pte;
unsigned intprot_l1;
diff --git a/include/asm-arm/system.h b/include/asm-arm/system.h
index e160aeb..aa223fc 100644
--- a/include/asm-arm/system.h
+++ b/include/asm-arm/system.h
@@ -73,6 +73,7 @@
 #ifndef __ASSEMBLY__
 
 #include linux/linkage.h
+#include linux/irqflags.h
 
 struct thread_info;
 struct task_struct;
@@ -139,6 +140,9 @@ static inline int cpu_is_xsc3(void)
 #definecpu_is_xscale() 1
 #endif
 
+extern unsigned long cr_no_alignment;  /* defined in entry-armv.S */
+extern unsigned long cr_alignment; /* defined in entry-armv.S */
+
 static inline unsigned int get_cr(void)
 {
unsigned int val;
@@ -152,6 +156,10 @@ static inline void set_cr(unsigned int val)
  : : r (val) : cc);
 }
 
+#ifndef CONFIG_SMP
+extern void adjust_cr(unsigned long mask, unsigned long set);
+#endif
+
 #define CPACC_FULL(n)  (3  (n * 2))
 #define CPACC_SVC(n)   (1  (n * 2))
 #define CPACC_DISABLE(n)   (0  (n * 2))
@@ -170,29 +178,6 @@ static inline void set_copro_access(unsigned int val)
  : : r (val) : cc);
 }
 
-extern unsigned long cr_no_alignment;  /* defined in entry-armv.S */
-extern unsigned long cr_alignment; /* defined in entry-armv.S */
-
-#ifndef CONFIG_SMP
-static inline void adjust_cr(unsigned long mask, unsigned long set)
-{
-   unsigned long flags, cr;
-
-   mask = ~CR_A;
-
-   set = mask;
-
-   local_irq_save(flags);
-
-   cr_no_alignment = (cr_no_alignment  ~mask) | set;
-   cr_alignment = (cr_alignment  ~mask) | set;
-
-   set_cr((get_cr()  ~mask) | set);
-
-   local_irq_restore(flags);
-}
-#endif
-
 #define UDBG_UNDEFINED (1  0)
 #define UDBG_SYSCALL   (1  1)
 #define UDBG_BADABORT  (1  2)
@@ -248,8 +233,6 @@ static inline void sched_cacheflush(void)
 {
 }
 
-#include linux/irqflags.h
-
 #ifdef CONFIG_SMP
 
 #define smp_mb()   mb()
-
To unsubscribe from this list: send the line unsubscribe git-commits-head in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[ARM] 4055/1: iop13xx: fix phys_io/io_pg_offst for iq81340mc/sc

2006-12-21 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=6d2e857d02a59332b7cd89aeac8b5962a357ac7a
Commit: 6d2e857d02a59332b7cd89aeac8b5962a357ac7a
Parent: 99e4a6dda9dc4b863773c0a5857b762474b817cf
Author: Lennert Buytenhek [EMAIL PROTECTED]
AuthorDate: Mon Dec 18 01:01:08 2006 +0100
Committer:  Russell King [EMAIL PROTECTED]
CommitDate: Mon Dec 18 00:14:56 2006 +

[ARM] 4055/1: iop13xx: fix phys_io/io_pg_offst for iq81340mc/sc

The phys_io/io_pg_offst machine record variables were being set
to bogus values, causing problems when enabling DEBUG_LL.

Signed-off-by: Lennert Buytenhek [EMAIL PROTECTED]
Signed-off-by: Russell King [EMAIL PROTECTED]
---
 arch/arm/mach-iop13xx/iq81340mc.c  |6 +++---
 arch/arm/mach-iop13xx/iq81340sc.c  |6 +++---
 include/asm-arm/arch-iop13xx/iq81340.h |5 +
 3 files changed, 7 insertions(+), 10 deletions(-)

diff --git a/arch/arm/mach-iop13xx/iq81340mc.c 
b/arch/arm/mach-iop13xx/iq81340mc.c
index ee59578..2a1bbfe 100644
--- a/arch/arm/mach-iop13xx/iq81340mc.c
+++ b/arch/arm/mach-iop13xx/iq81340mc.c
@@ -88,11 +88,11 @@ static struct sys_timer iq81340mc_timer = {
 
 MACHINE_START(IQ81340MC, Intel IQ81340MC)
/* Maintainer: Dan Williams [EMAIL PROTECTED] */
-   .phys_io= PHYS_IO,
-   .io_pg_offst= IO_PG_OFFSET,
+   .phys_io= IOP13XX_PMMR_PHYS_MEM_BASE,
+   .io_pg_offst= (IOP13XX_PMMR_VIRT_MEM_BASE  18)  0xfffc,
+   .boot_params= 0x0100,
.map_io = iop13xx_map_io,
.init_irq   = iop13xx_init_irq,
.timer  = iq81340mc_timer,
-   .boot_params= BOOT_PARAM_OFFSET,
.init_machine   = iq81340mc_init,
 MACHINE_END
diff --git a/arch/arm/mach-iop13xx/iq81340sc.c 
b/arch/arm/mach-iop13xx/iq81340sc.c
index 6677e14..5ad2b62 100644
--- a/arch/arm/mach-iop13xx/iq81340sc.c
+++ b/arch/arm/mach-iop13xx/iq81340sc.c
@@ -90,11 +90,11 @@ static struct sys_timer iq81340sc_timer = {
 
 MACHINE_START(IQ81340SC, Intel IQ81340SC)
/* Maintainer: Dan Williams [EMAIL PROTECTED] */
-   .phys_io= PHYS_IO,
-   .io_pg_offst= IO_PG_OFFSET,
+   .phys_io= IOP13XX_PMMR_PHYS_MEM_BASE,
+   .io_pg_offst= (IOP13XX_PMMR_VIRT_MEM_BASE  18)  0xfffc,
+   .boot_params= 0x0100,
.map_io = iop13xx_map_io,
.init_irq   = iop13xx_init_irq,
.timer  = iq81340sc_timer,
-   .boot_params= BOOT_PARAM_OFFSET,
.init_machine   = iq81340sc_init,
 MACHINE_END
diff --git a/include/asm-arm/arch-iop13xx/iq81340.h 
b/include/asm-arm/arch-iop13xx/iq81340.h
index b98f8f1..ba2cf93 100644
--- a/include/asm-arm/arch-iop13xx/iq81340.h
+++ b/include/asm-arm/arch-iop13xx/iq81340.h
@@ -24,8 +24,5 @@
 #define PBI_CF_IDE_BASE (IQ81340_CMP_FLSH)
 #define PBI_CF_BAR_ADDR (IOP13XX_PBI_BAR1)
 
-/* These are the values used in the Machine description */
-#define PHYS_IO 0xfe00
-#define IO_PG_OFFSET0xff00
-#define BOOT_PARAM_OFFSET  0x0100
+
 #endif /* _IQ81340_H_ */
-
To unsubscribe from this list: send the line unsubscribe git-commits-head in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[ARM] 4056/1: iop13xx: fix resource.end off-by-one in flash setup

2006-12-21 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=ab9d90db956dec1a83f4c4ef443df6bdbfc3f25d
Commit: ab9d90db956dec1a83f4c4ef443df6bdbfc3f25d
Parent: 6d2e857d02a59332b7cd89aeac8b5962a357ac7a
Author: Lennert Buytenhek [EMAIL PROTECTED]
AuthorDate: Mon Dec 18 01:02:24 2006 +0100
Committer:  Russell King [EMAIL PROTECTED]
CommitDate: Mon Dec 18 00:14:58 2006 +

[ARM] 4056/1: iop13xx: fix resource.end off-by-one in flash setup

The struct resource 'end' field is inclusive, the iop13xx flash
setup code got this wrong.

Signed-off-by: Lennert Buytenhek [EMAIL PROTECTED]
Signed-off-by: Russell King [EMAIL PROTECTED]
---
 arch/arm/mach-iop13xx/setup.c |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/arch/arm/mach-iop13xx/setup.c b/arch/arm/mach-iop13xx/setup.c
index 3756d2c..5fbeb28 100644
--- a/arch/arm/mach-iop13xx/setup.c
+++ b/arch/arm/mach-iop13xx/setup.c
@@ -337,7 +337,7 @@ void __init iop13xx_platform_init(void)
 
 #ifdef CONFIG_MTD_PHYSMAP
iq8134x_flash_resource.end = iq8134x_flash_resource.start +
-   iq8134x_probe_flash_size();
+   iq8134x_probe_flash_size() - 1;
if (iq8134x_flash_resource.end  iq8134x_flash_resource.start)
iop13xx_devices[plat_idx++] = iq8134x_flash;
else
-
To unsubscribe from this list: send the line unsubscribe git-commits-head in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[ARM] 4015/1: s3c2410 cpu ifdefs

2006-12-21 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=0f7d667ba341337b77b31ce81be04b16b3964cf6
Commit: 0f7d667ba341337b77b31ce81be04b16b3964cf6
Parent: c041ffb36407897bbc3b7bf87d1fa856ce085cdf
Author: Krzysztof Helt [EMAIL PROTECTED]
AuthorDate: Tue Dec 12 15:02:32 2006 +0100
Committer:  Russell King [EMAIL PROTECTED]
CommitDate: Mon Dec 18 00:15:42 2006 +

[ARM] 4015/1: s3c2410 cpu ifdefs

The patch adds ifdefs around per cpu definitions. Otherwise, if
not all cpu types are selected, the kernel does not link.

Signed-off-by: Krzysztof Helt [EMAIL PROTECTED]
Signed-off-by: Ben Dooks [EMAIL PROTECTED]
Signed-off-by: Russell King [EMAIL PROTECTED]
---
 arch/arm/mach-s3c2410/s3c2410-dma.c |6 --
 arch/arm/mach-s3c2410/s3c2410-pm.c  |6 ++
 2 files changed, 10 insertions(+), 2 deletions(-)

diff --git a/arch/arm/mach-s3c2410/s3c2410-dma.c 
b/arch/arm/mach-s3c2410/s3c2410-dma.c
index 824a8f7..e67ba39 100644
--- a/arch/arm/mach-s3c2410/s3c2410-dma.c
+++ b/arch/arm/mach-s3c2410/s3c2410-dma.c
@@ -132,6 +132,7 @@ static int s3c2410_dma_add(struct sys_device *sysdev)
return s3c24xx_dma_init_map(s3c2410_dma_sel);
 }
 
+#if defined(CONFIG_CPU_S3C2410)
 static struct sysdev_driver s3c2410_dma_driver = {
.add= s3c2410_dma_add,
 };
@@ -142,9 +143,10 @@ static int __init s3c2410_dma_init(void)
 }
 
 arch_initcall(s3c2410_dma_init);
+#endif
 
+#if defined(CONFIG_CPU_S3C2442)
 /* S3C2442 DMA contains the same selection table as the S3C2410 */
-
 static struct sysdev_driver s3c2442_dma_driver = {
.add= s3c2410_dma_add,
 };
@@ -155,5 +157,5 @@ static int __init s3c2442_dma_init(void)
 }
 
 arch_initcall(s3c2442_dma_init);
-
+#endif
 
diff --git a/arch/arm/mach-s3c2410/s3c2410-pm.c 
b/arch/arm/mach-s3c2410/s3c2410-pm.c
index e546fe1..8bb6e5e 100644
--- a/arch/arm/mach-s3c2410/s3c2410-pm.c
+++ b/arch/arm/mach-s3c2410/s3c2410-pm.c
@@ -111,6 +111,7 @@ static int s3c2410_pm_add(struct sys_device *dev)
return 0;
 }
 
+#if defined(CONFIG_CPU_S3C2410)
 static struct sysdev_driver s3c2410_pm_driver = {
.add= s3c2410_pm_add,
.resume = s3c2410_pm_resume,
@@ -124,7 +125,9 @@ static int __init s3c2410_pm_drvinit(void)
 }
 
 arch_initcall(s3c2410_pm_drvinit);
+#endif
 
+#if defined(CONFIG_CPU_S3C2440)
 static struct sysdev_driver s3c2440_pm_driver = {
.add= s3c2410_pm_add,
.resume = s3c2410_pm_resume,
@@ -136,7 +139,9 @@ static int __init s3c2440_pm_drvinit(void)
 }
 
 arch_initcall(s3c2440_pm_drvinit);
+#endif
 
+#if defined(CONFIG_CPU_S3C2442)
 static struct sysdev_driver s3c2442_pm_driver = {
.add= s3c2410_pm_add,
.resume = s3c2410_pm_resume,
@@ -148,3 +153,4 @@ static int __init s3c2442_pm_drvinit(void)
 }
 
 arch_initcall(s3c2442_pm_drvinit);
+#endif
-
To unsubscribe from this list: send the line unsubscribe git-commits-head in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[ALSA] use the roundup macro

2006-12-21 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=201efe3793b0faab3538a463ad6d63cf0ef4403c
Commit: 201efe3793b0faab3538a463ad6d63cf0ef4403c
Parent: 7ab399262ee636d19db5163a35ac406d5b892a0a
Author: Clemens Ladisch [EMAIL PROTECTED]
AuthorDate: Mon Oct 9 08:14:15 2006 +0200
Committer:  Jaroslav Kysela [EMAIL PROTECTED]
CommitDate: Wed Dec 20 08:55:37 2006 +0100

[ALSA] use the roundup macro

Use the roundup macro instead of manual calculations.

Signed-off-by: Clemens Ladisch [EMAIL PROTECTED]
Signed-off-by: Jaroslav Kysela [EMAIL PROTECTED]
---
 sound/core/seq/seq_memory.c |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/sound/core/seq/seq_memory.c b/sound/core/seq/seq_memory.c
index 4bffe50..a3dc5e0 100644
--- a/sound/core/seq/seq_memory.c
+++ b/sound/core/seq/seq_memory.c
@@ -151,7 +151,7 @@ int snd_seq_expand_var_event(const struct snd_seq_event 
*event, int count, char
return len;
newlen = len;
if (size_aligned  0)
-   newlen = ((len + size_aligned - 1) / size_aligned) * 
size_aligned;
+   newlen = roundup(len, size_aligned);
if (count  newlen)
return -EAGAIN;
 
-
To unsubscribe from this list: send the line unsubscribe git-commits-head in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[ALSA] use the ALIGN macro

2006-12-21 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=7ab399262ee636d19db5163a35ac406d5b892a0a
Commit: 7ab399262ee636d19db5163a35ac406d5b892a0a
Parent: e7d24f0bbd0eb0d9a6d337ef67d5e2ad78900488
Author: Clemens Ladisch [EMAIL PROTECTED]
AuthorDate: Mon Oct 9 08:13:32 2006 +0200
Committer:  Jaroslav Kysela [EMAIL PROTECTED]
CommitDate: Wed Dec 20 08:55:36 2006 +0100

[ALSA] use the ALIGN macro

Use the ALIGN macro instead of manual calculations.

Signed-off-by: Clemens Ladisch [EMAIL PROTECTED]
Signed-off-by: Jaroslav Kysela [EMAIL PROTECTED]
---
 sound/core/sgbuf.c|2 +-
 sound/isa/gus/gus_mem.c   |7 +++
 sound/isa/wavefront/wavefront_synth.c |2 +-
 sound/pci/bt87x.c |2 +-
 sound/pci/es1968.c|2 +-
 sound/pci/maestro3.c  |2 +-
 sound/pci/rme9652/hdsp.c  |4 ++--
 sound/pci/rme9652/rme9652.c   |4 ++--
 sound/pci/trident/trident_main.c  |4 ++--
 sound/pci/ymfpci/ymfpci_main.c|   24 
 10 files changed, 26 insertions(+), 27 deletions(-)

diff --git a/sound/core/sgbuf.c b/sound/core/sgbuf.c
index c30669f..cefd228 100644
--- a/sound/core/sgbuf.c
+++ b/sound/core/sgbuf.c
@@ -27,7 +27,7 @@
 
 /* table entries are align to 32 */
 #define SGBUF_TBL_ALIGN32
-#define sgbuf_align_table(tbl) tbl) + SGBUF_TBL_ALIGN - 1) / 
SGBUF_TBL_ALIGN) * SGBUF_TBL_ALIGN)
+#define sgbuf_align_table(tbl) ALIGN((tbl), SGBUF_TBL_ALIGN)
 
 int snd_free_sgbuf_pages(struct snd_dma_buffer *dmab)
 {
diff --git a/sound/isa/gus/gus_mem.c b/sound/isa/gus/gus_mem.c
index f50c276..7107753 100644
--- a/sound/isa/gus/gus_mem.c
+++ b/sound/isa/gus/gus_mem.c
@@ -143,9 +143,8 @@ static int snd_gf1_mem_find(struct snd_gf1_mem * alloc,
struct snd_gf1_mem_block *pblock;
unsigned int ptr1, ptr2;
 
-   align--;
-   if (w_16  align  1)
-   align = 1;
+   if (w_16  align  2)
+   align = 2;
block-flags = w_16 ? SNDRV_GF1_MEM_BLOCK_16BIT : 0;
block-owner = SNDRV_GF1_MEM_OWNER_DRIVER;
block-share = 0;
@@ -165,7 +164,7 @@ static int snd_gf1_mem_find(struct snd_gf1_mem * alloc,
if (pblock-next-ptr  boundary)
ptr2 = pblock-next-ptr;
}
-   ptr1 = (pblock-ptr + pblock-size + align)  ~align;
+   ptr1 = ALIGN(pblock-ptr + pblock-size, align);
if (ptr1 = ptr2)
continue;
size1 = ptr2 - ptr1;
diff --git a/sound/isa/wavefront/wavefront_synth.c 
b/sound/isa/wavefront/wavefront_synth.c
index bed329e..78020d8 100644
--- a/sound/isa/wavefront/wavefront_synth.c
+++ b/sound/isa/wavefront/wavefront_synth.c
@@ -1068,7 +1068,7 @@ wavefront_send_sample (snd_wavefront_t *dev,
blocksize = max_blksize;
} else {
/* round to nearest 16-byte value */
-   blocksize = ((length-written+7)~0x7);
+   blocksize = ALIGN(length - written, 8);
}
 
if (snd_wavefront_cmd (dev, WFC_DOWNLOAD_BLOCK, NULL, NULL)) {
diff --git a/sound/pci/bt87x.c b/sound/pci/bt87x.c
index d33a370..05e0091 100644
--- a/sound/pci/bt87x.c
+++ b/sound/pci/bt87x.c
@@ -699,7 +699,7 @@ static int __devinit snd_bt87x_pcm(struct snd_bt87x *chip, 
int device, char *nam
 SNDRV_DMA_TYPE_DEV_SG,
 
snd_dma_pci_data(chip-pci),
128 * 1024,
-   (255 * 4092 + 1023)  
~1023);
+   ALIGN(255 * 4092, 
1024));
 }
 
 static int __devinit snd_bt87x_create(struct snd_card *card,
diff --git a/sound/pci/es1968.c b/sound/pci/es1968.c
index 092da53..01c521d 100644
--- a/sound/pci/es1968.c
+++ b/sound/pci/es1968.c
@@ -1337,7 +1337,7 @@ static struct esm_memory *snd_es1968_new_memory(struct 
es1968 *chip, int size)
struct esm_memory *buf;
struct list_head *p;

-   size = ((size + ESM_MEM_ALIGN - 1) / ESM_MEM_ALIGN) * ESM_MEM_ALIGN;
+   size = ALIGN(size, ESM_MEM_ALIGN);
mutex_lock(chip-memory_mutex);
list_for_each(p, chip-buf_list) {
buf = list_entry(p, struct esm_memory, list);
diff --git a/sound/pci/maestro3.c b/sound/pci/maestro3.c
index 8cab342..563c9ec 100644
--- a/sound/pci/maestro3.c
+++ b/sound/pci/maestro3.c
@@ -2377,7 +2377,7 @@ static int __devinit snd_m3_assp_client_init(struct 
snd_m3 *chip, struct m3_dma
 * shifted list address is aligned.
 * list address = (mem address  1)  7;
 */
-   data_bytes = (data_bytes + 255)  ~255;
+   data_bytes = ALIGN(data_bytes, 

[ALSA] ymfpci: fix swap_rear for S/PDIF passthrough

2006-12-21 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=d9301263cce69ee4ef989de5bbe57515ef71a780
Commit: d9301263cce69ee4ef989de5bbe57515ef71a780
Parent: 201efe3793b0faab3538a463ad6d63cf0ef4403c
Author: Glen Masgai [EMAIL PROTECTED]
AuthorDate: Tue Oct 10 09:27:19 2006 +0200
Committer:  Jaroslav Kysela [EMAIL PROTECTED]
CommitDate: Wed Dec 20 08:55:38 2006 +0100

[ALSA] ymfpci: fix swap_rear for S/PDIF passthrough

This patch fixes incorrect assignment of swap_rear,
which was broken since patch 'ymfpci - make rear channel swap optional'
It removes module_param rear_swap.

Signed-off-by: Glen Masgai [EMAIL PROTECTED]
Signed-off-by: Clemens Ladisch [EMAIL PROTECTED]
Signed-off-by: Jaroslav Kysela [EMAIL PROTECTED]
---
 include/sound/ymfpci.h |3 +--
 sound/pci/ymfpci/ymfpci.c  |5 +
 sound/pci/ymfpci/ymfpci_main.c |8 
 3 files changed, 6 insertions(+), 10 deletions(-)

diff --git a/include/sound/ymfpci.h b/include/sound/ymfpci.h
index d41cda9..a3c5de5 100644
--- a/include/sound/ymfpci.h
+++ b/include/sound/ymfpci.h
@@ -345,7 +345,6 @@ struct snd_ymfpci {
struct snd_kcontrol *spdif_pcm_ctl;
int mode_dup4ch;
int rear_opened;
-   int rear_swap;
int spdif_opened;
struct {
u16 left;
@@ -378,7 +377,7 @@ int snd_ymfpci_pcm(struct snd_ymfpci *chip, int device, 
struct snd_pcm **rpcm);
 int snd_ymfpci_pcm2(struct snd_ymfpci *chip, int device, struct snd_pcm 
**rpcm);
 int snd_ymfpci_pcm_spdif(struct snd_ymfpci *chip, int device, struct snd_pcm 
**rpcm);
 int snd_ymfpci_pcm_4ch(struct snd_ymfpci *chip, int device, struct snd_pcm 
**rpcm);
-int snd_ymfpci_mixer(struct snd_ymfpci *chip, int rear_switch, int rear_swap);
+int snd_ymfpci_mixer(struct snd_ymfpci *chip, int rear_switch);
 int snd_ymfpci_timer(struct snd_ymfpci *chip, int device);
 
 #endif /* __SOUND_YMFPCI_H */
diff --git a/sound/pci/ymfpci/ymfpci.c b/sound/pci/ymfpci/ymfpci.c
index 186453f..fd9b7b8 100644
--- a/sound/pci/ymfpci/ymfpci.c
+++ b/sound/pci/ymfpci/ymfpci.c
@@ -49,7 +49,6 @@ static long mpu_port[SNDRV_CARDS];
 static long joystick_port[SNDRV_CARDS];
 #endif
 static int rear_switch[SNDRV_CARDS];
-static int rear_swap[SNDRV_CARDS] = { [0 ... (SNDRV_CARDS-1)] = 1 };
 
 module_param_array(index, int, NULL, 0444);
 MODULE_PARM_DESC(index, Index value for the Yamaha DS-1 PCI soundcard.);
@@ -67,8 +66,6 @@ MODULE_PARM_DESC(joystick_port, Joystick port address);
 #endif
 module_param_array(rear_switch, bool, NULL, 0444);
 MODULE_PARM_DESC(rear_switch, Enable shared rear/line-in switch);
-module_param_array(rear_swap, bool, NULL, 0444);
-MODULE_PARM_DESC(rear_swap, Swap rear channels (must be enabled for correct 
IEC958 (S/PDIF)) output);
 
 static struct pci_device_id snd_ymfpci_ids[] = {
 { 0x1073, 0x0004, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0, },   /* YMF724 */
@@ -298,7 +295,7 @@ static int __devinit snd_card_ymfpci_probe(struct pci_dev 
*pci,
snd_card_free(card);
return err;
}
-   if ((err = snd_ymfpci_mixer(chip, rear_switch[dev], rear_swap[dev]))  
0) {
+   if ((err = snd_ymfpci_mixer(chip, rear_switch[dev]))  0) {
snd_card_free(card);
return err;
}
diff --git a/sound/pci/ymfpci/ymfpci_main.c b/sound/pci/ymfpci/ymfpci_main.c
index 79c58f3..16be1f3 100644
--- a/sound/pci/ymfpci/ymfpci_main.c
+++ b/sound/pci/ymfpci/ymfpci_main.c
@@ -910,7 +910,7 @@ static int snd_ymfpci_playback_open(struct 
snd_pcm_substream *substream)
ypcm = runtime-private_data;
ypcm-output_front = 1;
ypcm-output_rear = chip-mode_dup4ch ? 1 : 0;
-   ypcm-swap_rear = chip-rear_swap;
+   ypcm-swap_rear = 0;
spin_lock_irq(chip-reg_lock);
if (ypcm-output_rear) {
ymfpci_open_extension(chip);
@@ -936,6 +936,7 @@ static int snd_ymfpci_playback_spdif_open(struct 
snd_pcm_substream *substream)
ypcm = runtime-private_data;
ypcm-output_front = 0;
ypcm-output_rear = 1;
+   ypcm-swap_rear = 1;
spin_lock_irq(chip-reg_lock);
snd_ymfpci_writew(chip, YDSXGR_SPDIFOUTCTRL,
  snd_ymfpci_readw(chip, YDSXGR_SPDIFOUTCTRL) | 2);
@@ -963,6 +964,7 @@ static int snd_ymfpci_playback_4ch_open(struct 
snd_pcm_substream *substream)
ypcm = runtime-private_data;
ypcm-output_front = 0;
ypcm-output_rear = 1;
+   ypcm-swap_rear = 0;
spin_lock_irq(chip-reg_lock);
ymfpci_open_extension(chip);
chip-rear_opened++;
@@ -1755,7 +1757,7 @@ static void snd_ymfpci_mixer_free_ac97(struct snd_ac97 
*ac97)
chip-ac97 = NULL;
 }
 
-int __devinit snd_ymfpci_mixer(struct snd_ymfpci *chip, int rear_switch, int 
rear_swap)
+int __devinit snd_ymfpci_mixer(struct snd_ymfpci *chip, int rear_switch)
 {
struct snd_ac97_template ac97;
struct snd_kcontrol *kctl;
@@ 

[ALSA] hda-codec - Don't return error at initialization of modem codec

2006-12-21 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=83af036d9878dc5b7ba72efa52f066a25639740e
Commit: 83af036d9878dc5b7ba72efa52f066a25639740e
Parent: bd2033f27f346610b11b40a74ff7d1d023abcfd9
Author: Takashi Iwai [EMAIL PROTECTED]
AuthorDate: Tue Oct 10 20:01:01 2006 +0200
Committer:  Jaroslav Kysela [EMAIL PROTECTED]
CommitDate: Wed Dec 20 08:55:41 2006 +0100

[ALSA] hda-codec - Don't return error at initialization of modem codec

Some modem codec seem to fail in the initialization, and this
stopped loading of the whole module although the audio is OK.
Since it's usually a non-fatal issue, the driver tries to proceed
to initialize now.

Signed-off-by: Takashi Iwai [EMAIL PROTECTED]
Signed-off-by: Jaroslav Kysela [EMAIL PROTECTED]
---
 sound/pci/hda/patch_si3054.c |3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/sound/pci/hda/patch_si3054.c b/sound/pci/hda/patch_si3054.c
index cc87dff..ed5e45e 100644
--- a/sound/pci/hda/patch_si3054.c
+++ b/sound/pci/hda/patch_si3054.c
@@ -243,7 +243,8 @@ static int si3054_init(struct hda_codec *codec)
 
if((valSI3054_MEI_READY) != SI3054_MEI_READY) {
snd_printk(KERN_ERR si3054: cannot initialize. EXT MID = 
%04x\n, val);
-   return -EACCES;
+   /* let's pray that this is no fatal error */
+   /* return -EACCES; */
}
 
SET_REG(codec, SI3054_GPIO_POLARITY, 0x);
-
To unsubscribe from this list: send the line unsubscribe git-commits-head in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[ALSA] hda-codec - Fix a typo

2006-12-21 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=3bc89529594767b0f894589f6c05b2d9821b6791
Commit: 3bc89529594767b0f894589f6c05b2d9821b6791
Parent: 176546ab562fa696e56d67d4f1ea85851275ebf8
Author: Takashi Iwai [EMAIL PROTECTED]
AuthorDate: Tue Oct 17 20:41:38 2006 +0200
Committer:  Jaroslav Kysela [EMAIL PROTECTED]
CommitDate: Wed Dec 20 08:55:43 2006 +0100

[ALSA] hda-codec - Fix a typo

Fixed a typo in proc file.

Signed-off-by: Takashi Iwai [EMAIL PROTECTED]
Signed-off-by: Jaroslav Kysela [EMAIL PROTECTED]
---
 sound/pci/hda/hda_proc.c |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/sound/pci/hda/hda_proc.c b/sound/pci/hda/hda_proc.c
index d737f17..e695655 100644
--- a/sound/pci/hda/hda_proc.c
+++ b/sound/pci/hda/hda_proc.c
@@ -45,7 +45,7 @@ static const char *get_wid_type_name(unsigned int wid_value)
if (names[wid_value])
return names[wid_value];
else
-   return UNKOWN Widget;
+   return UNKNOWN Widget;
 }
 
 static void print_amp_caps(struct snd_info_buffer *buffer,
-
To unsubscribe from this list: send the line unsubscribe git-commits-head in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[ALSA] pcm core: fix silence_start calculations

2006-12-21 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=9a826ddba6e087b1be24dd78cd0eac42f7eb7e97
Commit: 9a826ddba6e087b1be24dd78cd0eac42f7eb7e97
Parent: 3bc89529594767b0f894589f6c05b2d9821b6791
Author: Clemens Ladisch [EMAIL PROTECTED]
AuthorDate: Mon Oct 23 16:26:57 2006 +0200
Committer:  Jaroslav Kysela [EMAIL PROTECTED]
CommitDate: Wed Dec 20 08:55:43 2006 +0100

[ALSA] pcm core: fix silence_start calculations

The case where silence_size  boundary was broken because different
parts of the snd_pcm_playback_silence() function disagreed about whether
silence_start should point to the start or to the end of the buffer part
to be silenced.
This patch changes the code to always use to the start, which also
simplifies several calculations.

Signed-off-by: Clemens Ladisch [EMAIL PROTECTED]
Signed-off-by: Jaroslav Kysela [EMAIL PROTECTED]
---
 sound/core/pcm_lib.c |8 +++-
 1 files changed, 3 insertions(+), 5 deletions(-)

diff --git a/sound/core/pcm_lib.c b/sound/core/pcm_lib.c
index 0bb142a..b336797 100644
--- a/sound/core/pcm_lib.c
+++ b/sound/core/pcm_lib.c
@@ -79,19 +79,17 @@ void snd_pcm_playback_silence(struct snd_pcm_substream 
*substream, snd_pcm_ufram
runtime-silence_filled -= frames;
if ((snd_pcm_sframes_t)runtime-silence_filled  0) {
runtime-silence_filled = 0;
-   runtime-silence_start = (ofs + frames) - 
runtime-buffer_size;
+   runtime-silence_start = new_hw_ptr;
} else {
-   runtime-silence_start = ofs - 
runtime-silence_filled;
+   runtime-silence_start = ofs;
}
-   if ((snd_pcm_sframes_t)runtime-silence_start  0)
-   runtime-silence_start += runtime-boundary;
}
frames = runtime-buffer_size - runtime-silence_filled;
}
snd_assert(frames = runtime-buffer_size, return);
if (frames == 0)
return;
-   ofs = (runtime-silence_start + runtime-silence_filled) % 
runtime-buffer_size;
+   ofs = runtime-silence_start % runtime-buffer_size;
while (frames  0) {
transfer = ofs + frames  runtime-buffer_size ? 
runtime-buffer_size - ofs : frames;
if (runtime-access == SNDRV_PCM_ACCESS_RW_INTERLEAVED ||
-
To unsubscribe from this list: send the line unsubscribe git-commits-head in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[ALSA] hda-codec - Fix detection of supported sample rates

2006-12-21 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=ee3527b0362e3b1b2e212d6161869aff9a8a98a0
Commit: ee3527b0362e3b1b2e212d6161869aff9a8a98a0
Parent: 4a95cd86604740cf8cd27166e22a24944ed1e2f6
Author: Takashi Iwai [EMAIL PROTECTED]
AuthorDate: Tue Nov 7 16:09:00 2006 +0100
Committer:  Jaroslav Kysela [EMAIL PROTECTED]
CommitDate: Wed Dec 20 08:55:48 2006 +0100

[ALSA] hda-codec - Fix detection of supported sample rates

Don't include 9.6kHz in the list of supported sample rates.
Since this rate isn't indicated in AC_PAR_PCM parameter,
the driver might guess wrongly as if it's available.

Signed-off-by: Takashi Iwai [EMAIL PROTECTED]
Signed-off-by: Jaroslav Kysela [EMAIL PROTECTED]
---
 sound/pci/hda/hda_codec.c |3 ---
 1 files changed, 0 insertions(+), 3 deletions(-)

diff --git a/sound/pci/hda/hda_codec.c b/sound/pci/hda/hda_codec.c
index 71482c1..18bbc87 100644
--- a/sound/pci/hda/hda_codec.c
+++ b/sound/pci/hda/hda_codec.c
@@ -1367,9 +1367,6 @@ static struct hda_rate_tbl rate_bits[] = {
{ 176400, SNDRV_PCM_RATE_176400, 0x5800 },/* 4 x 44 */
{ 192000, SNDRV_PCM_RATE_192000, 0x1800 }, /* 4 x 48 */
 
-   /* not autodetected value */
-   { 9600, SNDRV_PCM_RATE_KNOT, 0x0400 }, /* 1/5 x 48 */
-
{ 0 } /* terminator */
 };
 
-
To unsubscribe from this list: send the line unsubscribe git-commits-head in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[ALSA] hda-codec - Verbose proc output for PCM parameters

2006-12-21 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=b90d7760ea784f916cb1fc0d8123410f1f0c9194
Commit: b90d7760ea784f916cb1fc0d8123410f1f0c9194
Parent: ee3527b0362e3b1b2e212d6161869aff9a8a98a0
Author: Takashi Iwai [EMAIL PROTECTED]
AuthorDate: Tue Nov 7 16:10:06 2006 +0100
Committer:  Jaroslav Kysela [EMAIL PROTECTED]
CommitDate: Wed Dec 20 08:55:49 2006 +0100

[ALSA] hda-codec - Verbose proc output for PCM parameters

Make the output for PCM parameters more verbose, showing
each rate, bits and format.

Signed-off-by: Takashi Iwai [EMAIL PROTECTED]
Signed-off-by: Jaroslav Kysela [EMAIL PROTECTED]
---
 sound/pci/hda/hda_proc.c |   51 ++---
 1 files changed, 47 insertions(+), 4 deletions(-)

diff --git a/sound/pci/hda/hda_proc.c b/sound/pci/hda/hda_proc.c
index e695655..17df4d0 100644
--- a/sound/pci/hda/hda_proc.c
+++ b/sound/pci/hda/hda_proc.c
@@ -88,6 +88,48 @@ static void print_amp_vals(struct snd_info_buffer *buffer,
snd_iprintf(buffer, \n);
 }
 
+static void print_pcm_rates(struct snd_info_buffer *buffer, unsigned int pcm)
+{
+   static unsigned int rates[] = {
+   8000, 11025, 16000, 22050, 32000, 44100, 48000, 88200,
+   96000, 176400, 192000, 384000
+   };
+   int i;
+
+   pcm = AC_SUPPCM_RATES;
+   snd_iprintf(buffer, rates [0x%x]:, pcm);
+   for (i = 0; i  ARRAY_SIZE(rates); i++) 
+   if (pcm  (1  i))
+   snd_iprintf(buffer,  %d, rates[i]);
+   snd_iprintf(buffer, \n);
+}
+
+static void print_pcm_bits(struct snd_info_buffer *buffer, unsigned int pcm)
+{
+   static unsigned int bits[] = { 8, 16, 20, 24, 32 };
+   int i;
+
+   pcm = (pcm  16)  0xff;
+   snd_iprintf(buffer, bits [0x%x]:, pcm);
+   for (i = 0; i  ARRAY_SIZE(bits); i++)
+   if (pcm  (1  i))
+   snd_iprintf(buffer,  %d, bits[i]);
+   snd_iprintf(buffer, \n);
+}
+
+static void print_pcm_formats(struct snd_info_buffer *buffer,
+ unsigned int streams)
+{
+   snd_iprintf(buffer, formats [0x%x]:, streams  0xf);
+   if (streams  AC_SUPFMT_PCM)
+   snd_iprintf(buffer,  PCM);
+   if (streams  AC_SUPFMT_FLOAT32)
+   snd_iprintf(buffer,  FLOAT);
+   if (streams  AC_SUPFMT_AC3)
+   snd_iprintf(buffer,  AC3);
+   snd_iprintf(buffer, \n);
+}
+
 static void print_pcm_caps(struct snd_info_buffer *buffer,
   struct hda_codec *codec, hda_nid_t nid)
 {
@@ -97,8 +139,9 @@ static void print_pcm_caps(struct snd_info_buffer *buffer,
snd_iprintf(buffer, N/A\n);
return;
}
-   snd_iprintf(buffer, rates 0x%03x, bits 0x%02x, types 0x%x\n,
-   pcm  AC_SUPPCM_RATES, (pcm  16)  0xff, stream  0xf);
+   print_pcm_rates(buffer, pcm);
+   print_pcm_bits(buffer, pcm);
+   print_pcm_formats(buffer, stream);
 }
 
 static const char *get_jack_location(u32 cfg)
@@ -210,7 +253,7 @@ static void print_codec_info(struct snd_info_entry *entry, 
struct snd_info_buffe
snd_iprintf(buffer, Revision Id: 0x%x\n, codec-revision_id);
if (! codec-afg)
return;
-   snd_iprintf(buffer, Default PCM: );
+   snd_iprintf(buffer, Default PCM:\n);
print_pcm_caps(buffer, codec, codec-afg);
snd_iprintf(buffer, Default Amp-In caps: );
print_amp_caps(buffer, codec, codec-afg, HDA_INPUT);
@@ -278,7 +321,7 @@ static void print_codec_info(struct snd_info_entry *entry, 
struct snd_info_buffe
 
if ((wid_type == AC_WID_AUD_OUT || wid_type == AC_WID_AUD_IN) 
(wid_caps  AC_WCAP_FORMAT_OVRD)) {
-   snd_iprintf(buffer,   PCM: );
+   snd_iprintf(buffer,   PCM:\n);
print_pcm_caps(buffer, codec, nid);
}
 
-
To unsubscribe from this list: send the line unsubscribe git-commits-head in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[ALSA] ac97 - Fix potential negative array index

2006-12-21 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=c19bcdc64a13c6d7eedfdb46d705531e24e69cad
Commit: c19bcdc64a13c6d7eedfdb46d705531e24e69cad
Parent: b90d7760ea784f916cb1fc0d8123410f1f0c9194
Author: Takashi Iwai [EMAIL PROTECTED]
AuthorDate: Wed Nov 8 15:48:43 2006 +0100
Committer:  Jaroslav Kysela [EMAIL PROTECTED]
CommitDate: Wed Dec 20 08:55:50 2006 +0100

[ALSA] ac97 - Fix potential negative array index

Fix the case cidx2 = 0 and cidx2  0 which may result in negative
array index.

Signed-off-by: Takashi Iwai [EMAIL PROTECTED]
Signed-off-by: Jaroslav Kysela [EMAIL PROTECTED]
---
 sound/pci/ac97/ac97_patch.c |4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/sound/pci/ac97/ac97_patch.c b/sound/pci/ac97/ac97_patch.c
index f63025e..e813968 100644
--- a/sound/pci/ac97/ac97_patch.c
+++ b/sound/pci/ac97/ac97_patch.c
@@ -1467,7 +1467,9 @@ static void patch_ad1881_chained(struct snd_ac97 * ac97, 
int unchained_idx, int
snd_ac97_write_cache(ac97, AC97_AD_CODEC_CFG, 0x0002);  // ID1C
ac97-spec.ad18xx.codec_cfg[unchained_idx] = 0x0002;
if (cidx1 = 0) {
-   if (patch_ad1881_chained1(ac97, cidx1, 0x0006)) // SDIE 
| ID1C
+   if (cidx2  0)
+   patch_ad1881_chained1(ac97, cidx1, 0);
+   else if (patch_ad1881_chained1(ac97, cidx1, 0x0006))// SDIE 
| ID1C
patch_ad1881_chained1(ac97, cidx2, 0);
else if (patch_ad1881_chained1(ac97, cidx2, 0x0006))// SDIE 
| ID1C
patch_ad1881_chained1(ac97, cidx1, 0);
-
To unsubscribe from this list: send the line unsubscribe git-commits-head in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[ALSA] Fix races in PCM OSS emulation

2006-12-21 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=e3a5d59a17e9a42e3f3e0e37342b2679bab2ff43
Commit: e3a5d59a17e9a42e3f3e0e37342b2679bab2ff43
Parent: ba8bdf8584c6f8af6d009dfd716ea5ee37fc15cd
Author: Takashi Iwai [EMAIL PROTECTED]
AuthorDate: Tue Nov 14 13:03:19 2006 +0100
Committer:  Jaroslav Kysela [EMAIL PROTECTED]
CommitDate: Wed Dec 20 08:55:54 2006 +0100

[ALSA] Fix races in PCM OSS emulation

Fixed the race among multiple threads accessing the OSS PCM
instance concurrently by simply introducing a mutex for protecting
a setup of the PCM.

Signed-off-by: Takashi Iwai [EMAIL PROTECTED]
Signed-off-by: Jaroslav Kysela [EMAIL PROTECTED]
---
 include/sound/pcm_oss.h  |1 +
 sound/core/oss/pcm_oss.c |   52 +++--
 2 files changed, 41 insertions(+), 12 deletions(-)

diff --git a/include/sound/pcm_oss.h b/include/sound/pcm_oss.h
index c854647..1cd4f64 100644
--- a/include/sound/pcm_oss.h
+++ b/include/sound/pcm_oss.h
@@ -56,6 +56,7 @@ struct snd_pcm_oss_runtime {
size_t mmap_bytes;
char *buffer;   /* vmallocated period */
size_t buffer_used; /* used length from period 
buffer */
+   struct mutex params_lock;
 #ifdef CONFIG_SND_PCM_OSS_PLUGINS
struct snd_pcm_plugin *plugin_first;
struct snd_pcm_plugin *plugin_last;
diff --git a/sound/core/oss/pcm_oss.c b/sound/core/oss/pcm_oss.c
index e0821eb..786a82e 100644
--- a/sound/core/oss/pcm_oss.c
+++ b/sound/core/oss/pcm_oss.c
@@ -810,6 +810,8 @@ static int snd_pcm_oss_change_params(struct 
snd_pcm_substream *substream)
struct snd_mask sformat_mask;
struct snd_mask mask;
 
+   if (mutex_lock_interruptible(runtime-oss.params_lock))
+   return -EINTR;
sw_params = kmalloc(sizeof(*sw_params), GFP_KERNEL);
params = kmalloc(sizeof(*params), GFP_KERNEL);
sparams = kmalloc(sizeof(*sparams), GFP_KERNEL);
@@ -1020,6 +1022,7 @@ failure:
kfree(sw_params);
kfree(params);
kfree(sparams);
+   mutex_unlock(runtime-oss.params_lock);
return err;
 }
 
@@ -1307,14 +1310,17 @@ static ssize_t snd_pcm_oss_write1(struct 
snd_pcm_substream *substream, const cha
 
if ((tmp = snd_pcm_oss_make_ready(substream))  0)
return tmp;
+   mutex_lock(runtime-oss.params_lock);
while (bytes  0) {
if (bytes  runtime-oss.period_bytes || 
runtime-oss.buffer_used  0) {
tmp = bytes;
if (tmp + runtime-oss.buffer_used  
runtime-oss.period_bytes)
tmp = runtime-oss.period_bytes - 
runtime-oss.buffer_used;
if (tmp  0) {
-   if (copy_from_user(runtime-oss.buffer + 
runtime-oss.buffer_used, buf, tmp))
-   return xfer  0 ? 
(snd_pcm_sframes_t)xfer : -EFAULT;
+   if (copy_from_user(runtime-oss.buffer + 
runtime-oss.buffer_used, buf, tmp)) {
+   tmp = -EFAULT;
+   goto err;
+   }
}
runtime-oss.buffer_used += tmp;
buf += tmp;
@@ -1325,22 +1331,24 @@ static ssize_t snd_pcm_oss_write1(struct 
snd_pcm_substream *substream, const cha
tmp = snd_pcm_oss_write2(substream, 
runtime-oss.buffer + runtime-oss.period_ptr, 
 
runtime-oss.buffer_used - runtime-oss.period_ptr, 1);
if (tmp = 0)
-   return xfer  0 ? 
(snd_pcm_sframes_t)xfer : tmp;
+   goto err;
runtime-oss.bytes += tmp;
runtime-oss.period_ptr += tmp;
runtime-oss.period_ptr %= 
runtime-oss.period_bytes;
if (runtime-oss.period_ptr == 0 ||
runtime-oss.period_ptr == 
runtime-oss.buffer_used)
runtime-oss.buffer_used = 0;
-   else if ((substream-f_flags  O_NONBLOCK) != 0)
-   return xfer  0 ? xfer : -EAGAIN;
+   else if ((substream-f_flags  O_NONBLOCK) != 
0) {
+   tmp = -EAGAIN;
+   goto err;
+   }
}
} else {
tmp = snd_pcm_oss_write2(substream,
 (const char __force *)buf,
 runtime-oss.period_bytes, 0);
if 

[ALSA] Fix invalid assignment of PCI revision

2006-12-21 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=01f681da496831eb3aff5a908cefdafe74dd263b
Commit: 01f681da496831eb3aff5a908cefdafe74dd263b
Parent: e3a5d59a17e9a42e3f3e0e37342b2679bab2ff43
Author: Takashi Iwai [EMAIL PROTECTED]
AuthorDate: Thu Nov 16 15:39:07 2006 +0100
Committer:  Jaroslav Kysela [EMAIL PROTECTED]
CommitDate: Wed Dec 20 08:55:55 2006 +0100

[ALSA] Fix invalid assignment of PCI revision

Fix the type of PCI revision to char from int and avoid invalid
assignment with pointer cast.

Signed-off-by: Takashi Iwai [EMAIL PROTECTED]
Signed-off-by: Jaroslav Kysela [EMAIL PROTECTED]
---
 include/sound/ymfpci.h |2 +-
 sound/pci/ca0106/ca0106.h  |2 +-
 sound/pci/ca0106/ca0106_main.c |2 +-
 sound/pci/emu10k1/emu10k1x.c   |4 ++--
 sound/pci/ymfpci/ymfpci_main.c |2 +-
 5 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/include/sound/ymfpci.h b/include/sound/ymfpci.h
index a3c5de5..f3514ee 100644
--- a/include/sound/ymfpci.h
+++ b/include/sound/ymfpci.h
@@ -286,7 +286,7 @@ struct snd_ymfpci {
int irq;
 
unsigned int device_id; /* PCI device ID */
-   unsigned int rev;   /* PCI revision */
+   unsigned char rev;  /* PCI revision */
unsigned long reg_area_phys;
void __iomem *reg_area_virt;
struct resource *res_reg_area;
diff --git a/sound/pci/ca0106/ca0106.h b/sound/pci/ca0106/ca0106.h
index 9cb66c5..aaac6e5 100644
--- a/sound/pci/ca0106/ca0106.h
+++ b/sound/pci/ca0106/ca0106.h
@@ -590,7 +590,7 @@ struct snd_ca0106 {
struct resource *res_port;
int irq;
 
-   unsigned int revision;  /* chip revision */
+   unsigned char revision; /* chip revision */
unsigned int serial;/* serial number */
unsigned short model;   /* subsystem id */
 
diff --git a/sound/pci/ca0106/ca0106_main.c b/sound/pci/ca0106/ca0106_main.c
index 6fa4a30..2adbd00 100644
--- a/sound/pci/ca0106/ca0106_main.c
+++ b/sound/pci/ca0106/ca0106_main.c
@@ -1283,7 +1283,7 @@ static int __devinit snd_ca0106_create(struct snd_card 
*card,
 
pci_set_master(pci);
/* read revision  serial */
-   pci_read_config_byte(pci, PCI_REVISION_ID, (char *)chip-revision);
+   pci_read_config_byte(pci, PCI_REVISION_ID, chip-revision);
pci_read_config_dword(pci, PCI_SUBSYSTEM_VENDOR_ID, chip-serial);
pci_read_config_word(pci, PCI_SUBSYSTEM_ID, chip-model);
 #if 1
diff --git a/sound/pci/emu10k1/emu10k1x.c b/sound/pci/emu10k1/emu10k1x.c
index c46905a..e072439 100644
--- a/sound/pci/emu10k1/emu10k1x.c
+++ b/sound/pci/emu10k1/emu10k1x.c
@@ -235,7 +235,7 @@ struct emu10k1x {
struct resource *res_port;
int irq;
 
-   unsigned int revision;  /* chip revision */
+   unsigned char revision; /* chip revision */
unsigned int serial;/* serial number */
unsigned short model;   /* subsystem id */
 
@@ -943,7 +943,7 @@ static int __devinit snd_emu10k1x_create(struct snd_card 
*card,
 
pci_set_master(pci);
/* read revision  serial */
-   pci_read_config_byte(pci, PCI_REVISION_ID, (char *)chip-revision);
+   pci_read_config_byte(pci, PCI_REVISION_ID, chip-revision);
pci_read_config_dword(pci, PCI_SUBSYSTEM_VENDOR_ID, chip-serial);
pci_read_config_word(pci, PCI_SUBSYSTEM_ID, chip-model);
snd_printk(KERN_INFO Model %04x Rev %08x Serial %08x\n, chip-model,
diff --git a/sound/pci/ymfpci/ymfpci_main.c b/sound/pci/ymfpci/ymfpci_main.c
index 16be1f3..843dcca 100644
--- a/sound/pci/ymfpci/ymfpci_main.c
+++ b/sound/pci/ymfpci/ymfpci_main.c
@@ -2291,7 +2291,7 @@ int __devinit snd_ymfpci_create(struct snd_card *card,
chip-pci = pci;
chip-irq = -1;
chip-device_id = pci-device;
-   pci_read_config_byte(pci, PCI_REVISION_ID, (u8 *)chip-rev);
+   pci_read_config_byte(pci, PCI_REVISION_ID, chip-rev);
chip-reg_area_phys = pci_resource_start(pci, 0);
chip-reg_area_virt = ioremap_nocache(chip-reg_area_phys, 0x8000);
pci_set_master(pci);
-
To unsubscribe from this list: send the line unsubscribe git-commits-head in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[ALSA] Remove IRQF_DISABLED for shared PCI irqs

2006-12-21 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=437a5a4606c12ab904793a7cad5b2062fc76c04e
Commit: 437a5a4606c12ab904793a7cad5b2062fc76c04e
Parent: 01f681da496831eb3aff5a908cefdafe74dd263b
Author: Takashi Iwai [EMAIL PROTECTED]
AuthorDate: Tue Nov 21 12:14:23 2006 +0100
Committer:  Jaroslav Kysela [EMAIL PROTECTED]
CommitDate: Wed Dec 20 08:55:57 2006 +0100

[ALSA] Remove IRQF_DISABLED for shared PCI irqs

Fix IRQ flags for PCI devices.
The shared IRQs for PCI devices shouldn't be allocated with
IRQF_DISABLED.  Also, when MSI is enabled, IRQF_SHARED shouldn't
be used.
The patch removes unnecessary cast in request_irq and free_irq,
too.

Signed-off-by: Takashi Iwai [EMAIL PROTECTED]
Signed-off-by: Jaroslav Kysela [EMAIL PROTECTED]
---
 .../sound/alsa/DocBook/writing-an-alsa-driver.tmpl |8 
 sound/isa/sb/sb_common.c   |2 +-
 sound/pci/ad1889.c |4 ++--
 sound/pci/ali5451/ali5451.c|5 +++--
 sound/pci/als300.c |6 +++---
 sound/pci/atiixp.c |2 +-
 sound/pci/atiixp_modem.c   |2 +-
 sound/pci/au88x0/au88x0.c  |2 +-
 sound/pci/azt3328.c|5 +++--
 sound/pci/bt87x.c  |2 +-
 sound/pci/ca0106/ca0106_main.c |5 ++---
 sound/pci/cmipci.c |2 +-
 sound/pci/cs4281.c |2 +-
 sound/pci/cs46xx/cs46xx_lib.c  |2 +-
 sound/pci/cs5535audio/cs5535audio.c|2 +-
 sound/pci/echoaudio/echoaudio.c|6 +++---
 sound/pci/emu10k1/emu10k1_main.c   |5 +++--
 sound/pci/emu10k1/emu10k1x.c   |5 ++---
 sound/pci/ens1370.c|2 +-
 sound/pci/es1938.c |4 ++--
 sound/pci/es1968.c |6 +++---
 sound/pci/fm801.c  |2 +-
 sound/pci/hda/hda_intel.c  |3 ++-
 sound/pci/ice1712/ice1712.c|2 +-
 sound/pci/ice1712/ice1724.c|2 +-
 sound/pci/intel8x0.c   |4 ++--
 sound/pci/intel8x0m.c  |4 ++--
 sound/pci/korg1212/korg1212.c  |2 +-
 sound/pci/maestro3.c   |2 +-
 sound/pci/mixart/mixart.c  |5 +++--
 sound/pci/nm256/nm256.c|2 +-
 sound/pci/pcxhr/pcxhr.c|2 +-
 sound/pci/riptide/riptide.c|5 ++---
 sound/pci/rme32.c  |3 ++-
 sound/pci/rme96.c  |3 ++-
 sound/pci/rme9652/hdsp.c   |3 ++-
 sound/pci/rme9652/hdspm.c  |3 +--
 sound/pci/rme9652/rme9652.c|3 ++-
 sound/pci/sonicvibes.c |5 +++--
 sound/pci/trident/trident_main.c   |2 +-
 sound/pci/via82xx.c|2 +-
 sound/pci/via82xx_modem.c  |2 +-
 sound/pci/vx222/vx222.c|4 ++--
 sound/pci/ymfpci/ymfpci_main.c |5 +++--
 44 files changed, 78 insertions(+), 71 deletions(-)

diff --git a/Documentation/sound/alsa/DocBook/writing-an-alsa-driver.tmpl 
b/Documentation/sound/alsa/DocBook/writing-an-alsa-driver.tmpl
index 077fbe2..ccd0a95 100644
--- a/Documentation/sound/alsa/DocBook/writing-an-alsa-driver.tmpl
+++ b/Documentation/sound/alsa/DocBook/writing-an-alsa-driver.tmpl
@@ -927,7 +927,7 @@
   informalexample
 programlisting
 ![CDATA[
-  struct mychip *chip = (struct mychip *)card-private_data;
+  struct mychip *chip = card-private_data;
 ]]
 /programlisting
   /informalexample
@@ -1095,7 +1095,7 @@
 
   /* release the irq */
   if (chip-irq = 0)
-  free_irq(chip-irq, (void *)chip);
+  free_irq(chip-irq, chip);
   /* release the i/o ports  memory */
   pci_release_regions(chip-pci);
   /* disable the PCI entry */
@@ -1148,7 +1148,7 @@
   }
   chip-port = pci_resource_start(pci, 0);
   if (request_irq(pci-irq, snd_mychip_interrupt,
-  IRQF_DISABLED|IRQF_SHARED, My Chip, chip)) {
+  IRQF_SHARED, My Chip, chip)) {
   printk(KERN_ERR cannot grab irq %d\n, pci-irq);
   snd_mychip_free(chip);
   return -EBUSY;
@@ -1387,7 +1387,7 @@
 

[ALSA] snd_hda_intel 3stack mode for ASUS P5P-L2

2006-12-21 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=a48bb28c167b5cad1bd4978dbb83c89252caab78
Commit: a48bb28c167b5cad1bd4978dbb83c89252caab78
Parent: 437a5a4606c12ab904793a7cad5b2062fc76c04e
Author: Nickolay V. Shmyrev [EMAIL PROTECTED]
AuthorDate: Tue Nov 21 18:56:37 2006 +0100
Committer:  Jaroslav Kysela [EMAIL PROTECTED]
CommitDate: Wed Dec 20 08:55:58 2006 +0100

[ALSA] snd_hda_intel 3stack mode for ASUS P5P-L2

I have ASUS P5PL2 motherboard and it's embedded sound card requires
the following patch which sets '3stack' model to operate properly:
00:1b.0 0403: 8086:27d8 (rev 01)
Subsystem: 1043:817f
Flags: bus master, fast devsel, latency 0, IRQ 177
Memory at dfdf8000 (64-bit, non-prefetchable) [size=16K]
Capabilities: [50] Power Management version 2
Capabilities: [60] Message Signalled Interrupts: 64bit+
Queue=0/0 Enable-
Capabilities: [70] Express Unknown type IRQ 0

Signed-off-by: Nickolay V. Shmyrev [EMAIL PROTECTED]
Signed-off-by: Takashi Iwai [EMAIL PROTECTED]
Signed-off-by: Jaroslav Kysela [EMAIL PROTECTED]
---
 sound/pci/hda/patch_analog.c |2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/sound/pci/hda/patch_analog.c b/sound/pci/hda/patch_analog.c
index 25b5787..076365b 100644
--- a/sound/pci/hda/patch_analog.c
+++ b/sound/pci/hda/patch_analog.c
@@ -794,6 +794,8 @@ static struct hda_board_config ad1986a_cfg_tbl[] = {
{ .modelname = 3stack,.config = AD1986A_3STACK },
{ .pci_subvendor = 0x10de, .pci_subdevice = 0xcb84,
  .config = AD1986A_3STACK }, /* ASUS A8N-VM CSM */
+   { .pci_subvendor = 0x1043, .pci_subdevice = 0x817f,
+ .config = AD1986A_3STACK }, /* ASUS P5P-L2 */
{ .pci_subvendor = 0x1043, .pci_subdevice = 0x81b3,
  .config = AD1986A_3STACK }, /* ASUS P5RD2-VM / P5GPL-X SE */
{ .pci_subvendor = 0x1043, .pci_subdevice = 0x81cb,
-
To unsubscribe from this list: send the line unsubscribe git-commits-head in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[ALSA] sound: initialize rawmidi substream list

2006-12-21 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=c13893d7be4f159b359a1b7ee46b3646ecb2fe20
Commit: c13893d7be4f159b359a1b7ee46b3646ecb2fe20
Parent: a48bb28c167b5cad1bd4978dbb83c89252caab78
Author: Akinobu Mita [EMAIL PROTECTED]
AuthorDate: Thu Nov 23 12:02:33 2006 +0100
Committer:  Jaroslav Kysela [EMAIL PROTECTED]
CommitDate: Wed Dec 20 08:55:59 2006 +0100

[ALSA] sound: initialize rawmidi substream list

If snd_rawmidi_new() failed to allocate substreams for input
(snd_rawmidi_alloc_substreams() failed to populate a
rmidi-streams[SNDRV_RAWMIDI_STREAM_INPUT]), it will try to
free rawmidi instance by snd_rawmidi_free().
But it will cause oops because snd_rawmidi_free() tries to free
both of substreams list but list for output
(rmidi-streams[SNDRV_RAWMIDI_STREAM_OUTPUT]) is not initialized yet.

Signed-off-by: Akinobu Mita [EMAIL PROTECTED]
Signed-off-by: Takashi Iwai [EMAIL PROTECTED]
Signed-off-by: Jaroslav Kysela [EMAIL PROTECTED]
---
 sound/core/rawmidi.c |4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/sound/core/rawmidi.c b/sound/core/rawmidi.c
index 269c467..0f055bf 100644
--- a/sound/core/rawmidi.c
+++ b/sound/core/rawmidi.c
@@ -1385,7 +1385,6 @@ static int snd_rawmidi_alloc_substreams(struct 
snd_rawmidi *rmidi,
struct snd_rawmidi_substream *substream;
int idx;
 
-   INIT_LIST_HEAD(stream-substreams);
for (idx = 0; idx  count; idx++) {
substream = kzalloc(sizeof(*substream), GFP_KERNEL);
if (substream == NULL) {
@@ -1440,6 +1439,9 @@ int snd_rawmidi_new(struct snd_card *card, char *id, int 
device,
rmidi-device = device;
mutex_init(rmidi-open_mutex);
init_waitqueue_head(rmidi-open_wait);
+   INIT_LIST_HEAD(rmidi-streams[SNDRV_RAWMIDI_STREAM_INPUT].substreams);
+   INIT_LIST_HEAD(rmidi-streams[SNDRV_RAWMIDI_STREAM_OUTPUT].substreams);
+
if (id != NULL)
strlcpy(rmidi-id, id, sizeof(rmidi-id));
if ((err = snd_rawmidi_alloc_substreams(rmidi,
-
To unsubscribe from this list: send the line unsubscribe git-commits-head in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[ALSA] sound: fix PCM substream list

2006-12-21 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=4d361285925613516560f81f8c7fc96b89c8b1a8
Commit: 4d361285925613516560f81f8c7fc96b89c8b1a8
Parent: c13893d7be4f159b359a1b7ee46b3646ecb2fe20
Author: Akinobu Mita [EMAIL PROTECTED]
AuthorDate: Thu Nov 23 12:03:24 2006 +0100
Committer:  Jaroslav Kysela [EMAIL PROTECTED]
CommitDate: Wed Dec 20 08:56:00 2006 +0100

[ALSA] sound: fix PCM substream list

If snd_pcm_new_stream() fails to initalize a substream (if
snd_pcm_substream_proc_init() returns error), snd_pcm_new_stream()
immediately return without unlinking that kfree()d substram.
It causes oops when snd_pcm_free() iterates the list of substream to
free them by invalid reference.

Signed-off-by: Akinobu Mita [EMAIL PROTECTED]
Signed-off-by: Takashi Iwai [EMAIL PROTECTED]
Signed-off-by: Jaroslav Kysela [EMAIL PROTECTED]
---
 sound/core/pcm.c |4 
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/sound/core/pcm.c b/sound/core/pcm.c
index 5ac6e19..8e01898 100644
--- a/sound/core/pcm.c
+++ b/sound/core/pcm.c
@@ -640,6 +640,10 @@ int snd_pcm_new_stream(struct snd_pcm *pcm, int stream, 
int substream_count)
err = snd_pcm_substream_proc_init(substream);
if (err  0) {
snd_printk(KERN_ERR Error in 
snd_pcm_stream_proc_init\n);
+   if (prev == NULL)
+   pstr-substream = NULL;
+   else
+   prev-next = NULL;
kfree(substream);
return err;
}
-
To unsubscribe from this list: send the line unsubscribe git-commits-head in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[ALSA] snd-ca0106: Add new card variant.

2006-12-21 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=e4f55d8010eacb2669c2a68f195993e4563b94c8
Commit: e4f55d8010eacb2669c2a68f195993e4563b94c8
Parent: 4d361285925613516560f81f8c7fc96b89c8b1a8
Author: James Courtier-Dutton [EMAIL PROTECTED]
AuthorDate: Sat Nov 25 19:42:29 2006 +
Committer:  Jaroslav Kysela [EMAIL PROTECTED]
CommitDate: Wed Dec 20 08:56:08 2006 +0100

[ALSA] snd-ca0106: Add new card variant.

Fixed ALSA bug#2326

Signed-off-by: James Courtier-Dutton [EMAIL PROTECTED]
Signed-off-by: Jaroslav Kysela [EMAIL PROTECTED]
---
 sound/pci/ca0106/ca0106_main.c |   30 ++
 1 files changed, 26 insertions(+), 4 deletions(-)

diff --git a/sound/pci/ca0106/ca0106_main.c b/sound/pci/ca0106/ca0106_main.c
index 35ac187..881c4ca 100644
--- a/sound/pci/ca0106/ca0106_main.c
+++ b/sound/pci/ca0106/ca0106_main.c
@@ -154,6 +154,7 @@ MODULE_SUPPORTED_DEVICE({{Creative,SB CA0106 chip}});
 static int index[SNDRV_CARDS] = SNDRV_DEFAULT_IDX;
 static char *id[SNDRV_CARDS] = SNDRV_DEFAULT_STR;
 static int enable[SNDRV_CARDS] = SNDRV_DEFAULT_ENABLE_PNP;
+static uint subsystem[SNDRV_CARDS]; /* Force card subsystem model */
 
 module_param_array(index, int, NULL, 0444);
 MODULE_PARM_DESC(index, Index value for the CA0106 soundcard.);
@@ -161,6 +162,8 @@ module_param_array(id, charp, NULL, 0444);
 MODULE_PARM_DESC(id, ID string for the CA0106 soundcard.);
 module_param_array(enable, bool, NULL, 0444);
 MODULE_PARM_DESC(enable, Enable the CA0106 soundcard.);
+module_param_array(subsystem, uint, NULL, 0444);
+MODULE_PARM_DESC(subsystem, Force card subsystem model.);
 
 #include ca0106.h
 
@@ -194,6 +197,17 @@ static struct snd_ca0106_details ca0106_chip_details[] = {
   .gpio_type = 1,
   .i2c_adc = 1,
   .spi_dac = 1 } ,
+/* New Audigy LS. Has a different DAC. */
+/* SB0570:
+ * CTRL:CA0106-DAT
+ * ADC: WM8775EDS
+ * DAC: WM8768GEDS
+ */
+{ .serial = 0x1002,
+  .name   = Audigy LS [SB0570a],
+  .gpio_type = 1,
+  .i2c_adc = 1,
+  .spi_dac = 1 } ,
 /* MSI K8N Diamond Motherboard with onboard SB Live 24bit without AC97 
*/
 /* SB0438
  * CTRL:CA0106-DAT
@@ -1223,7 +1237,7 @@ static unsigned int i2c_adc_init[][2] = {
{ 0x15, ADC_MUX_LINEIN },  /* ADC Mixer control */
 };
 
-static int __devinit snd_ca0106_create(struct snd_card *card,
+static int __devinit snd_ca0106_create(int dev, struct snd_card *card,
 struct pci_dev *pci,
 struct snd_ca0106 **rchip)
 {
@@ -1286,17 +1300,25 @@ static int __devinit snd_ca0106_create(struct snd_card 
*card,
pci_read_config_dword(pci, PCI_SUBSYSTEM_VENDOR_ID, chip-serial);
pci_read_config_word(pci, PCI_SUBSYSTEM_ID, chip-model);
 #if 1
-   printk(KERN_INFO Model %04x Rev %08x Serial %08x\n, chip-model,
+   printk(KERN_INFO snd-ca0106: Model %04x Rev %08x Serial %08x\n, 
chip-model,
   chip-revision, chip-serial);
 #endif
strcpy(card-driver, CA0106);
strcpy(card-shortname, CA0106);
 
for (c = ca0106_chip_details; c-serial; c++) {
-   if (c-serial == chip-serial)
+   if (subsystem[dev]) {
+   if (c-serial == subsystem[dev])
+   break;
+   } else if (c-serial == chip-serial)
break;
}
chip-details = c;
+   if (subsystem[dev]) {
+   printk(KERN_INFO snd-ca0106: Sound card name=%s, 
subsystem=0x%x. Forced to subsytem=0x%x\n,
+c-name, chip-serial, subsystem[dev]);
+   }
+
sprintf(card-longname, %s at 0x%lx irq %i,
c-name, chip-port, chip-irq);
 
@@ -1539,7 +1561,7 @@ static int __devinit snd_ca0106_probe(struct pci_dev *pci,
if (card == NULL)
return -ENOMEM;
 
-   if ((err = snd_ca0106_create(card, pci, chip))  0) {
+   if ((err = snd_ca0106_create(dev, card, pci, chip))  0) {
snd_card_free(card);
return err;
}
-
To unsubscribe from this list: send the line unsubscribe git-commits-head in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[ALSA] snd-ca0106: Fix typos.

2006-12-21 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=d5f6a38d9896614e2e78a82c6cb818721601c52f
Commit: d5f6a38d9896614e2e78a82c6cb818721601c52f
Parent: e4f55d8010eacb2669c2a68f195993e4563b94c8
Author: James Courtier-Dutton [EMAIL PROTECTED]
AuthorDate: Sat Nov 25 19:50:11 2006 +
Committer:  Jaroslav Kysela [EMAIL PROTECTED]
CommitDate: Wed Dec 20 08:56:09 2006 +0100

[ALSA] snd-ca0106: Fix typos.


Signed-off-by: James Courtier-Dutton [EMAIL PROTECTED]
Signed-off-by: Jaroslav Kysela [EMAIL PROTECTED]
---
 sound/pci/ca0106/ca0106_main.c |4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/sound/pci/ca0106/ca0106_main.c b/sound/pci/ca0106/ca0106_main.c
index 881c4ca..f61f052 100644
--- a/sound/pci/ca0106/ca0106_main.c
+++ b/sound/pci/ca0106/ca0106_main.c
@@ -204,7 +204,7 @@ static struct snd_ca0106_details ca0106_chip_details[] = {
  * DAC: WM8768GEDS
  */
 { .serial = 0x1002,
-  .name   = Audigy LS [SB0570a],
+  .name   = Audigy SE OEM [SB0570a],
   .gpio_type = 1,
   .i2c_adc = 1,
   .spi_dac = 1 } ,
@@ -1315,7 +1315,7 @@ static int __devinit snd_ca0106_create(int dev, struct 
snd_card *card,
}
chip-details = c;
if (subsystem[dev]) {
-   printk(KERN_INFO snd-ca0106: Sound card name=%s, 
subsystem=0x%x. Forced to subsytem=0x%x\n,
+   printk(KERN_INFO snd-ca0106: Sound card name=%s, 
subsystem=0x%x. Forced to subsystem=0x%x\n,
 c-name, chip-serial, subsystem[dev]);
}
 
-
To unsubscribe from this list: send the line unsubscribe git-commits-head in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[ALSA] ac97_codec - trivial fix for bit update functions

2006-12-21 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=e8bb036a46ec4a9d748672f54a6b2d62c82b6fbd
Commit: e8bb036a46ec4a9d748672f54a6b2d62c82b6fbd
Parent: d5f6a38d9896614e2e78a82c6cb818721601c52f
Author: James C Georgas [EMAIL PROTECTED]
AuthorDate: Thu Dec 7 08:10:57 2006 +0100
Committer:  Jaroslav Kysela [EMAIL PROTECTED]
CommitDate: Wed Dec 20 08:56:10 2006 +0100

[ALSA] ac97_codec - trivial fix for bit update functions

This patch fixes a couple of bit update functions in
alsa-kernel/pci/ac97/ac97_codec.c, which could possibly corrupt bits not
in the given mask.
Specifically, it'll clobber unset bits in the target that are not in the
mask, when the corresponding bit in the given new value is set.

Signed-off-by: James C Georgas [EMAIL PROTECTED]
Signed-off-by: Jaroslav Kysela [EMAIL PROTECTED]
---
 sound/pci/ac97/ac97_codec.c |4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/sound/pci/ac97/ac97_codec.c b/sound/pci/ac97/ac97_codec.c
index 7abcb10..91d8ceb 100644
--- a/sound/pci/ac97/ac97_codec.c
+++ b/sound/pci/ac97/ac97_codec.c
@@ -382,7 +382,7 @@ int snd_ac97_update_bits_nolock(struct snd_ac97 *ac97, 
unsigned short reg,
unsigned short old, new;
 
old = snd_ac97_read_cache(ac97, reg);
-   new = (old  ~mask) | value;
+   new = (old  ~mask) | (value  mask);
change = old != new;
if (change) {
ac97-regs[reg] = new;
@@ -399,7 +399,7 @@ static int snd_ac97_ad18xx_update_pcm_bits(struct snd_ac97 
*ac97, int codec, uns
 
mutex_lock(ac97-page_mutex);
old = ac97-spec.ad18xx.pcmreg[codec];
-   new = (old  ~mask) | value;
+   new = (old  ~mask) | (value  mask);
change = old != new;
if (change) {
mutex_lock(ac97-reg_mutex);
-
To unsubscribe from this list: send the line unsubscribe git-commits-head in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[ALSA] version 1.0.14rc1

2006-12-21 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=7c21699e30a5c0ca4972d1b6ad22350fe63128d3
Commit: 7c21699e30a5c0ca4972d1b6ad22350fe63128d3
Parent: f8cb2c450e7ff61abe75fabc94a4f62667a79c2b
Author: Jaroslav Kysela [EMAIL PROTECTED]
AuthorDate: Wed Dec 20 09:11:55 2006 +0100
Committer:  Jaroslav Kysela [EMAIL PROTECTED]
CommitDate: Wed Dec 20 09:11:55 2006 +0100

[ALSA] version 1.0.14rc1

Signed-off-by: Jaroslav Kysela [EMAIL PROTECTED]
---
 include/sound/version.h |4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/include/sound/version.h b/include/sound/version.h
index 17137f3..2949b9b 100644
--- a/include/sound/version.h
+++ b/include/sound/version.h
@@ -1,3 +1,3 @@
 /* include/version.h.  Generated by alsa/ksync script.  */
-#define CONFIG_SND_VERSION 1.0.13
-#define CONFIG_SND_DATE  (Tue Nov 28 14:07:24 2006 UTC)
+#define CONFIG_SND_VERSION 1.0.14rc1
+#define CONFIG_SND_DATE  (Wed Dec 20 08:11:48 2006 UTC)
-
To unsubscribe from this list: send the line unsubscribe git-commits-head in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


drm: fix return value check

2006-12-21 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=94f060bd0f78814f4daf8c7942bd710af52c7d6f
Commit: 94f060bd0f78814f4daf8c7942bd710af52c7d6f
Parent: 9202f32558601c2c99ddc438eb3218131d00d413
Author: Akinobu Mita [EMAIL PROTECTED]
AuthorDate: Sat Dec 9 10:49:47 2006 +1100
Committer:  Dave Airlie [EMAIL PROTECTED]
CommitDate: Mon Dec 11 18:28:45 2006 +1100

drm: fix return value check

class_create() and class_device_create() return error code as a pointer on
failure.  These return values need to be checked by IS_ERR().

Signed-off-by: Akinobu Mita [EMAIL PROTECTED]
Signed-off-by: Andrew Morton [EMAIL PROTECTED]
Signed-off-by: Dave Airlie [EMAIL PROTECTED]
---
 drivers/char/drm/drm_sysfs.c |8 
 1 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/char/drm/drm_sysfs.c b/drivers/char/drm/drm_sysfs.c
index ba4b8de..cc8e2eb 100644
--- a/drivers/char/drm/drm_sysfs.c
+++ b/drivers/char/drm/drm_sysfs.c
@@ -45,8 +45,8 @@ struct class *drm_sysfs_create(struct module *owner, char 
*name)
int err;
 
class = class_create(owner, name);
-   if (!class) {
-   err = -ENOMEM;
+   if (IS_ERR(class)) {
+   err = PTR_ERR(class);
goto err_out;
}
 
@@ -113,8 +113,8 @@ struct class_device *drm_sysfs_device_add(struct class *cs, 
drm_head_t *head)
MKDEV(DRM_MAJOR, head-minor),
(head-dev-pdev)-dev,
card%d, head-minor);
-   if (!class_dev) {
-   err = -ENOMEM;
+   if (IS_ERR(class_dev)) {
+   err = PTR_ERR(class_dev);
goto err_out;
}
 
-
To unsubscribe from this list: send the line unsubscribe git-commits-head in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


DRM: handle pci_enable_device failure

2006-12-21 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=2c3f0eddfbd7f5c7a5450de287bad805722888c3
Commit: 2c3f0eddfbd7f5c7a5450de287bad805722888c3
Parent: 94f060bd0f78814f4daf8c7942bd710af52c7d6f
Author: Jeff Garzik [EMAIL PROTECTED]
AuthorDate: Sat Dec 9 10:50:22 2006 +1100
Committer:  Dave Airlie [EMAIL PROTECTED]
CommitDate: Mon Dec 11 18:28:52 2006 +1100

DRM: handle pci_enable_device failure

Signed-off-by: Jeff Garzik [EMAIL PROTECTED]
Signed-off-by: Andrew Morton [EMAIL PROTECTED]
Signed-off-by: Dave Airlie [EMAIL PROTECTED]
---
 drivers/char/drm/drm_stub.c |   12 
 1 files changed, 8 insertions(+), 4 deletions(-)

diff --git a/drivers/char/drm/drm_stub.c b/drivers/char/drm/drm_stub.c
index 5fd6dc0..120d102 100644
--- a/drivers/char/drm/drm_stub.c
+++ b/drivers/char/drm/drm_stub.c
@@ -211,14 +211,16 @@ int drm_get_dev(struct pci_dev *pdev, const struct 
pci_device_id *ent,
if (!dev)
return -ENOMEM;
 
-   pci_enable_device(pdev);
+   ret = pci_enable_device(pdev);
+   if (ret)
+   goto err_g1;
 
if ((ret = drm_fill_in_dev(dev, pdev, ent, driver))) {
printk(KERN_ERR DRM: Fill_in_dev failed.\n);
-   goto err_g1;
+   goto err_g2;
}
if ((ret = drm_get_head(dev, dev-primary)))
-   goto err_g1;
+   goto err_g2;

DRM_INFO(Initialized %s %d.%d.%d %s on minor %d\n,
 driver-name, driver-major, driver-minor, driver-patchlevel,
@@ -226,7 +228,9 @@ int drm_get_dev(struct pci_dev *pdev, const struct 
pci_device_id *ent,
 
return 0;
 
-  err_g1:
+err_g2:
+   pci_disable_device(pdev);
+err_g1:
drm_free(dev, sizeof(*dev), DRM_MEM_STUB);
return ret;
 }
-
To unsubscribe from this list: send the line unsubscribe git-commits-head in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


i915_vblank_tasklet: Try harder to avoid tearing.

2006-12-21 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=3188a24c256bae0ed93d81d82db1f1bb6060d727
Commit: 3188a24c256bae0ed93d81d82db1f1bb6060d727
Parent: 2c3f0eddfbd7f5c7a5450de287bad805722888c3
Author: =?utf-8?q?Michel_D=C3=A4nzer?= [EMAIL PROTECTED]
AuthorDate: Mon Dec 11 18:32:27 2006 +1100
Committer:  Dave Airlie [EMAIL PROTECTED]
CommitDate: Mon Dec 11 18:32:27 2006 +1100

i915_vblank_tasklet: Try harder to avoid tearing.

Previously, if there were several buffer swaps scheduled for the same 
vertical
blank, all but the first blit emitted stood a chance of exhibiting tearing. 
In
order to avoid this, split the blits along slices of each output top to 
bottom.

Signed-off-by: Dave Airlie [EMAIL PROTECTED]
---
 drivers/char/drm/i915_irq.c |  199 ++-
 1 files changed, 139 insertions(+), 60 deletions(-)

diff --git a/drivers/char/drm/i915_irq.c b/drivers/char/drm/i915_irq.c
index e5463b1..e2c4b3a 100644
--- a/drivers/char/drm/i915_irq.c
+++ b/drivers/char/drm/i915_irq.c
@@ -46,88 +46,167 @@ static void i915_vblank_tasklet(drm_device_t *dev)
 {
drm_i915_private_t *dev_priv = (drm_i915_private_t *) dev-dev_private;
unsigned long irqflags;
-   struct list_head *list, *tmp;
+   struct list_head *list, *tmp, hits, *hit;
+   int nhits, nrects, slice[2], upper[2], lower[2], i;
+   unsigned counter[2] = { atomic_read(dev-vbl_received),
+   atomic_read(dev-vbl_received2) };
+   drm_drawable_info_t *drw;
+   drm_i915_sarea_t *sarea_priv = dev_priv-sarea_priv;
+   u32 cpp = dev_priv-cpp;
+   u32 cmd = (cpp == 4) ? (XY_SRC_COPY_BLT_CMD |
+   XY_SRC_COPY_BLT_WRITE_ALPHA |
+   XY_SRC_COPY_BLT_WRITE_RGB)
+: XY_SRC_COPY_BLT_CMD;
+   u32 pitchropcpp = (sarea_priv-pitch * cpp) | (0xcc  16) |
+ (cpp  23) | (1  24);
+   RING_LOCALS;
 
DRM_DEBUG(\n);
 
+   INIT_LIST_HEAD(hits);
+
+   nhits = nrects = 0;
+
spin_lock_irqsave(dev_priv-swaps_lock, irqflags);
 
+   /* Find buffer swaps scheduled for this vertical blank */
list_for_each_safe(list, tmp, dev_priv-vbl_swaps.head) {
drm_i915_vbl_swap_t *vbl_swap =
list_entry(list, drm_i915_vbl_swap_t, head);
-   atomic_t *counter = vbl_swap-pipe ? dev-vbl_received2 :
-   dev-vbl_received;
-
-   if ((atomic_read(counter) - vbl_swap-sequence) = (123)) {
-   drm_drawable_info_t *drw;
-
-   spin_unlock(dev_priv-swaps_lock);
-
-   spin_lock(dev-drw_lock);
-
-   drw = drm_get_drawable_info(dev, vbl_swap-drw_id);
-   
-   if (drw) {
-   int i, num_rects = drw-num_rects;
-   drm_clip_rect_t *rect = drw-rects;
-   drm_i915_sarea_t *sarea_priv =
-   dev_priv-sarea_priv;
-   u32 cpp = dev_priv-cpp;
-   u32 cmd = (cpp == 4) ? (XY_SRC_COPY_BLT_CMD |
-   
XY_SRC_COPY_BLT_WRITE_ALPHA |
-   
XY_SRC_COPY_BLT_WRITE_RGB)
-: XY_SRC_COPY_BLT_CMD;
-   u32 pitchropcpp = (sarea_priv-pitch * cpp) |
- (0xcc  16) | (cpp  23) |
- (1  24);
-   RING_LOCALS;
-
-   i915_kernel_lost_context(dev);
-
-   BEGIN_LP_RING(6);
-
-   OUT_RING(GFX_OP_DRAWRECT_INFO);
-   OUT_RING(0);
-   OUT_RING(0);
-   OUT_RING(sarea_priv-width |
-sarea_priv-height  16);
-   OUT_RING(sarea_priv-width |
-sarea_priv-height  16);
-   OUT_RING(0);
 
-   ADVANCE_LP_RING();
+   if ((counter[vbl_swap-pipe] - vbl_swap-sequence)  (123))
+   continue;
+
+   list_del(list);
+   dev_priv-swaps_pending--;
 
-   sarea_priv-ctxOwner = DRM_KERNEL_CONTEXT;
+   spin_unlock(dev_priv-swaps_lock);
+   spin_lock(dev-drw_lock);
 
-   for (i = 0; i  num_rects; i++, rect++) {
-   BEGIN_LP_RING(8);
+   drw = drm_get_drawable_info(dev, 

drm: Unify radeon offset checking.

2006-12-21 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=1d6bb8e51dba3db1c15575901022fe72d363e5a4
Commit: 1d6bb8e51dba3db1c15575901022fe72d363e5a4
Parent: 3188a24c256bae0ed93d81d82db1f1bb6060d727
Author: =?utf-8?q?Michel_D=C3=A4nzer?= [EMAIL PROTECTED]
AuthorDate: Fri Dec 15 18:54:35 2006 +1100
Committer:  Dave Airlie [EMAIL PROTECTED]
CommitDate: Fri Dec 15 18:54:35 2006 +1100

drm: Unify radeon offset checking.

Replace r300_check_offset() with generic radeon_check_offset(), which 
doesn't
reject valid offsets when the framebuffer area is at the very end of the 
card's
32 bit address space. Make radeon_check_and_fixup_offset() use
radeon_check_offset() as well.

This fixes https://bugs.freedesktop.org/show_bug.cgi?id=7697 .
---
 drivers/char/drm/r300_cmdbuf.c  |   32 ++--
 drivers/char/drm/radeon_drv.h   |   15 +++
 drivers/char/drm/radeon_state.c |   13 -
 3 files changed, 25 insertions(+), 35 deletions(-)

diff --git a/drivers/char/drm/r300_cmdbuf.c b/drivers/char/drm/r300_cmdbuf.c
index d14477b..032a022 100644
--- a/drivers/char/drm/r300_cmdbuf.c
+++ b/drivers/char/drm/r300_cmdbuf.c
@@ -242,26 +242,6 @@ static __inline__ int r300_check_range(unsigned reg, int 
count)
return 0;
 }
 
-/*
- * we expect offsets passed to the framebuffer to be either within video 
- * memory or within AGP space 
- */
-static __inline__ int r300_check_offset(drm_radeon_private_t *dev_priv,
-   u32 offset)
-{
-   /* we realy want to check against end of video aperture
-  but this value is not being kept.
-  This code is correct for now (does the same thing as the
-  code that sets MC_FB_LOCATION) in radeon_cp.c */
-   if (offset = dev_priv-fb_location 
-   offset  (dev_priv-fb_location + dev_priv-fb_size))
-   return 0;
-   if (offset = dev_priv-gart_vm_start 
-   offset  (dev_priv-gart_vm_start + dev_priv-gart_size))
-   return 0;
-   return 1;
-}
-
 static __inline__ int r300_emit_carefully_checked_packet0(drm_radeon_private_t 
*
  dev_priv,
  
drm_radeon_kcmd_buffer_t
@@ -290,7 +270,7 @@ static __inline__ int 
r300_emit_carefully_checked_packet0(drm_radeon_private_t *
case MARK_SAFE:
break;
case MARK_CHECK_OFFSET:
-   if (r300_check_offset(dev_priv, (u32) values[i])) {
+   if (!radeon_check_offset(dev_priv, (u32) values[i])) {
DRM_ERROR
(Offset failed range check (reg=%04x 
sz=%d)\n,
 reg, sz);
@@ -452,7 +432,7 @@ static __inline__ int 
r300_emit_3d_load_vbpntr(drm_radeon_private_t *dev_priv,
i = 1;
while ((k  narrays)  (i  (count + 1))) {
i++;/* skip attribute field */
-   if (r300_check_offset(dev_priv, payload[i])) {
+   if (!radeon_check_offset(dev_priv, payload[i])) {
DRM_ERROR
(Offset failed range check (k=%d i=%d) while 
processing 3D_LOAD_VBPNTR packet.\n,
 k, i);
@@ -463,7 +443,7 @@ static __inline__ int 
r300_emit_3d_load_vbpntr(drm_radeon_private_t *dev_priv,
if (k == narrays)
break;
/* have one more to process, they come in pairs */
-   if (r300_check_offset(dev_priv, payload[i])) {
+   if (!radeon_check_offset(dev_priv, payload[i])) {
DRM_ERROR
(Offset failed range check (k=%d i=%d) while 
processing 3D_LOAD_VBPNTR packet.\n,
 k, i);
@@ -508,7 +488,7 @@ static __inline__ int 
r300_emit_bitblt_multi(drm_radeon_private_t *dev_priv,
if (cmd[1]  (RADEON_GMC_SRC_PITCH_OFFSET_CNTL 
  | RADEON_GMC_DST_PITCH_OFFSET_CNTL)) {
offset = cmd[2]  10;
-   ret = r300_check_offset(dev_priv, offset);
+   ret = !radeon_check_offset(dev_priv, offset);
if (ret) {
DRM_ERROR(Invalid bitblt first offset is 
%08X\n, offset);
return DRM_ERR(EINVAL);
@@ -518,7 +498,7 @@ static __inline__ int 
r300_emit_bitblt_multi(drm_radeon_private_t *dev_priv,
if ((cmd[1]  RADEON_GMC_SRC_PITCH_OFFSET_CNTL) 
(cmd[1]  RADEON_GMC_DST_PITCH_OFFSET_CNTL)) {
offset = cmd[3]  10;
-   ret = r300_check_offset(dev_priv, offset);
+   ret = !radeon_check_offset(dev_priv, offset);
if 

drm: savage: compat fix from drm git.

2006-12-21 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=183b4aeefa1ff8e0a792b95d5d56f0994d022449
Commit: 183b4aeefa1ff8e0a792b95d5d56f0994d022449
Parent: 1d6bb8e51dba3db1c15575901022fe72d363e5a4
Author: Eric Anholt [EMAIL PROTECTED]
AuthorDate: Tue Dec 19 17:20:02 2006 +1100
Committer:  Dave Airlie [EMAIL PROTECTED]
CommitDate: Tue Dec 19 17:20:02 2006 +1100

drm: savage: compat fix from drm git.

Signed-off-by: Dave Airlie [EMAIL PROTECTED]
---
 drivers/char/drm/savage_bci.c |4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/char/drm/savage_bci.c b/drivers/char/drm/savage_bci.c
index a9a84f8..b94fab5 100644
--- a/drivers/char/drm/savage_bci.c
+++ b/drivers/char/drm/savage_bci.c
@@ -963,8 +963,8 @@ static int savage_bci_event_emit(DRM_IOCTL_ARGS)
 
event.count = savage_bci_emit_event(dev_priv, event.flags);
event.count |= dev_priv-event_wrap  16;
-   DRM_COPY_TO_USER_IOCTL(((drm_savage_event_emit_t __user *) data)-
-  count, event.count, sizeof(event.count));
+   DRM_COPY_TO_USER_IOCTL((drm_savage_event_emit_t __user *) data,
+  event, sizeof(event));
return 0;
 }
 
-
To unsubscribe from this list: send the line unsubscribe git-commits-head in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


drm: fixup comment header style

2006-12-21 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=94bb598e6b7d68690426f4c7c4385823951861eb
Commit: 94bb598e6b7d68690426f4c7c4385823951861eb
Parent: 183b4aeefa1ff8e0a792b95d5d56f0994d022449
Author: Dave Airlie [EMAIL PROTECTED]
AuthorDate: Tue Dec 19 17:49:08 2006 +1100
Committer:  Dave Airlie [EMAIL PROTECTED]
CommitDate: Tue Dec 19 17:49:08 2006 +1100

drm: fixup comment header style

Signed-off-by: Dave Airlie [EMAIL PROTECTED]
---
 drivers/char/drm/radeon_irq.c |4 ++--
 drivers/char/drm/radeon_mem.c |4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/char/drm/radeon_irq.c b/drivers/char/drm/radeon_irq.c
index d60519d..3ff0baa 100644
--- a/drivers/char/drm/radeon_irq.c
+++ b/drivers/char/drm/radeon_irq.c
@@ -1,5 +1,5 @@
-/* radeon_irq.c -- IRQ handling for radeon -*- linux-c -*-
- *
+/* radeon_irq.c -- IRQ handling for radeon -*- linux-c -*- */
+/*
  * Copyright (C) The Weather Channel, Inc.  2002.  All Rights Reserved.
  *
  * The Weather Channel (TM) funded Tungsten Graphics to develop the
diff --git a/drivers/char/drm/radeon_mem.c b/drivers/char/drm/radeon_mem.c
index 030a6fa..517cad8 100644
--- a/drivers/char/drm/radeon_mem.c
+++ b/drivers/char/drm/radeon_mem.c
@@ -1,5 +1,5 @@
-/* radeon_mem.c -- Simple GART/fb memory manager for radeon -*- linux-c -*-
- *
+/* radeon_mem.c -- Simple GART/fb memory manager for radeon -*- linux-c -*- */
+/*
  * Copyright (C) The Weather Channel, Inc.  2002.  All Rights Reserved.
  *
  * The Weather Channel (TM) funded Tungsten Graphics to develop the
-
To unsubscribe from this list: send the line unsubscribe git-commits-head in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


drm: r128: comment aligment with drm git

2006-12-21 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=83a9e29b0fd753c28e3979d638a8ebfd3f6ebc96
Commit: 83a9e29b0fd753c28e3979d638a8ebfd3f6ebc96
Parent: 0c4dd906a220fac7997048178ee4f5d8c378b38b
Author: Dave Airlie [EMAIL PROTECTED]
AuthorDate: Tue Dec 19 17:56:14 2006 +1100
Committer:  Dave Airlie [EMAIL PROTECTED]
CommitDate: Tue Dec 19 17:56:14 2006 +1100

drm: r128: comment aligment with drm git

Align some r128 license comments

Signed-off-by: Dave Airlie [EMAIL PROTECTED]
---
 drivers/char/drm/r128_drm.h   |3 ++-
 drivers/char/drm/r128_drv.h   |3 ++-
 drivers/char/drm/r128_state.c |3 ++-
 3 files changed, 6 insertions(+), 3 deletions(-)

diff --git a/drivers/char/drm/r128_drm.h b/drivers/char/drm/r128_drm.h
index 5d835b0..6e8af31 100644
--- a/drivers/char/drm/r128_drm.h
+++ b/drivers/char/drm/r128_drm.h
@@ -1,7 +1,8 @@
 /* r128_drm.h -- Public header for the r128 driver -*- linux-c -*-
  * Created: Wed Apr  5 19:24:19 2000 by [EMAIL PROTECTED]
  */
-/* Copyright 2000 Precision Insight, Inc., Cedar Park, Texas.
+/*
+ * Copyright 2000 Precision Insight, Inc., Cedar Park, Texas.
  * Copyright 2000 VA Linux Systems, Inc., Sunnyvale, California.
  * All rights reserved.
  *
diff --git a/drivers/char/drm/r128_drv.h b/drivers/char/drm/r128_drv.h
index 94abffb..f1efb49 100644
--- a/drivers/char/drm/r128_drv.h
+++ b/drivers/char/drm/r128_drv.h
@@ -1,7 +1,8 @@
 /* r128_drv.h -- Private header for r128 driver -*- linux-c -*-
  * Created: Mon Dec 13 09:51:11 1999 by [EMAIL PROTECTED]
  */
-/* Copyright 1999 Precision Insight, Inc., Cedar Park, Texas.
+/*
+ * Copyright 1999 Precision Insight, Inc., Cedar Park, Texas.
  * Copyright 2000 VA Linux Systems, Inc., Sunnyvale, California.
  * All rights reserved.
  *
diff --git a/drivers/char/drm/r128_state.c b/drivers/char/drm/r128_state.c
index a080cdd..17b11e7 100644
--- a/drivers/char/drm/r128_state.c
+++ b/drivers/char/drm/r128_state.c
@@ -1,7 +1,8 @@
 /* r128_state.c -- State support for r128 -*- linux-c -*-
  * Created: Thu Jan 27 02:53:43 2000 by [EMAIL PROTECTED]
  */
-/* Copyright 2000 VA Linux Systems, Inc., Sunnyvale, California.
+/*
+ * Copyright 2000 VA Linux Systems, Inc., Sunnyvale, California.
  * All Rights Reserved.
  *
  * Permission is hereby granted, free of charge, to any person obtaining a
-
To unsubscribe from this list: send the line unsubscribe git-commits-head in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


drm: Stop defining pci_pretty_name

2006-12-21 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=f9841a8d6018f8bcba77e75c9e368d94f1f22933
Commit: f9841a8d6018f8bcba77e75c9e368d94f1f22933
Parent: 83a9e29b0fd753c28e3979d638a8ebfd3f6ebc96
Author: Jean Delvare [EMAIL PROTECTED]
AuthorDate: Tue Dec 19 18:04:33 2006 +1100
Committer:  Dave Airlie [EMAIL PROTECTED]
CommitDate: Tue Dec 19 18:04:33 2006 +1100

drm: Stop defining pci_pretty_name

drm drivers no longer use pci_pretty_name so we can stop defining it.

Signed-off-by: Jean Delvare [EMAIL PROTECTED]
Signed-off-by: Dave Airlie [EMAIL PROTECTED]
---
 drivers/char/drm/drmP.h |4 
 1 files changed, 0 insertions(+), 4 deletions(-)

diff --git a/drivers/char/drm/drmP.h b/drivers/char/drm/drmP.h
index e31af67..6dcdceb 100644
--- a/drivers/char/drm/drmP.h
+++ b/drivers/char/drm/drmP.h
@@ -1142,9 +1142,5 @@ extern void *drm_calloc(size_t nmemb, size_t size, int 
area);
 extern unsigned long drm_core_get_map_ofs(drm_map_t * map);
 extern unsigned long drm_core_get_reg_ofs(struct drm_device *dev);
 
-#ifndef pci_pretty_name
-#define pci_pretty_name(dev) 
-#endif
-
 #endif /* __KERNEL__ */
 #endif
-
To unsubscribe from this list: send the line unsubscribe git-commits-head in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[POWERPC] cell: update cell_defconfig

2006-12-21 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=ed8ed9ac06604513edd6be6b1c81b6270296b7fc
Commit: ed8ed9ac06604513edd6be6b1c81b6270296b7fc
Parent: cc016448b0bf0764928275d034e367753bde8162
Author: Arnd Bergmann [EMAIL PROTECTED]
AuthorDate: Tue Dec 19 15:32:41 2006 +0100
Committer:  Arnd Bergmann [EMAIL PROTECTED]
CommitDate: Tue Dec 19 15:35:35 2006 +0100

[POWERPC] cell: update cell_defconfig

New options appeared in the kernel, and new hardware became
available for us to use.

Signed-off-by: Arnd Bergmann [EMAIL PROTECTED]
---
 arch/powerpc/configs/cell_defconfig |  358 ++-
 1 files changed, 314 insertions(+), 44 deletions(-)

diff --git a/arch/powerpc/configs/cell_defconfig 
b/arch/powerpc/configs/cell_defconfig
index a98c982..d1d2515 100644
--- a/arch/powerpc/configs/cell_defconfig
+++ b/arch/powerpc/configs/cell_defconfig
@@ -1,7 +1,7 @@
 #
 # Automatically generated make config: don't edit
-# Linux kernel version: 2.6.19-rc6
-# Wed Nov 22 15:33:04 2006
+# Linux kernel version: 2.6.20-rc1
+# Tue Dec 19 14:59:53 2006
 #
 CONFIG_PPC64=y
 CONFIG_64BIT=y
@@ -10,6 +10,8 @@ CONFIG_MMU=y
 CONFIG_GENERIC_HARDIRQS=y
 CONFIG_IRQ_PER_CPU=y
 CONFIG_RWSEM_XCHGADD_ALGORITHM=y
+CONFIG_ARCH_HAS_ILOG2_U32=y
+CONFIG_ARCH_HAS_ILOG2_U64=y
 CONFIG_GENERIC_HWEIGHT=y
 CONFIG_GENERIC_CALIBRATE_DELAY=y
 CONFIG_GENERIC_FIND_NEXT_BIT=y
@@ -23,6 +25,7 @@ CONFIG_PPC_OF=y
 CONFIG_PPC_UDBG_16550=y
 # CONFIG_GENERIC_TBSYNC is not set
 CONFIG_AUDIT_ARCH=y
+CONFIG_GENERIC_BUG=y
 # CONFIG_DEFAULT_UIMAGE is not set
 
 #
@@ -66,6 +69,7 @@ CONFIG_SYSVIPC=y
 CONFIG_IKCONFIG=y
 CONFIG_IKCONFIG_PROC=y
 CONFIG_CPUSETS=y
+CONFIG_SYSFS_DEPRECATED=y
 # CONFIG_RELAY is not set
 CONFIG_INITRAMFS_SOURCE=
 CONFIG_CC_OPTIMIZE_FOR_SIZE=y
@@ -128,14 +132,16 @@ CONFIG_PPC_MULTIPLATFORM=y
 # CONFIG_APUS is not set
 # CONFIG_PPC_PSERIES is not set
 # CONFIG_PPC_ISERIES is not set
+# CONFIG_PPC_MPC52xx is not set
 # CONFIG_PPC_PMAC is not set
 # CONFIG_PPC_MAPLE is not set
 # CONFIG_PPC_PASEMI is not set
 CONFIG_PPC_CELL=y
 CONFIG_PPC_CELL_NATIVE=y
 CONFIG_PPC_IBM_CELL_BLADE=y
-CONFIG_UDBG_RTAS_CONSOLE=y
 CONFIG_PPC_PS3=y
+CONFIG_PPC_NATIVE=y
+CONFIG_UDBG_RTAS_CONSOLE=y
 # CONFIG_U3_DART is not set
 CONFIG_PPC_RTAS=y
 # CONFIG_RTAS_ERROR_LOGGING is not set
@@ -177,12 +183,14 @@ CONFIG_CBE_CPUFREQ=m
 CONFIG_PS3_HTAB_SIZE=20
 # CONFIG_PS3_DYNAMIC_DMA is not set
 CONFIG_PS3_USE_LPAR_ADDR=y
+CONFIG_PS3_VUART=y
 
 #
 # Kernel options
 #
 # CONFIG_HZ_100 is not set
 CONFIG_HZ_250=y
+# CONFIG_HZ_300 is not set
 # CONFIG_HZ_1000 is not set
 CONFIG_HZ=250
 CONFIG_PREEMPT_NONE=y
@@ -237,6 +245,7 @@ CONFIG_GENERIC_ISA_DMA=y
 CONFIG_PCI=y
 CONFIG_PCI_DOMAINS=y
 CONFIG_PCIEPORTBUS=y
+# CONFIG_PCI_MULTITHREAD_PROBE is not set
 # CONFIG_PCI_DEBUG is not set
 
 #
@@ -270,7 +279,10 @@ CONFIG_INET=y
 CONFIG_IP_MULTICAST=y
 # CONFIG_IP_ADVANCED_ROUTER is not set
 CONFIG_IP_FIB_HASH=y
-# CONFIG_IP_PNP is not set
+CONFIG_IP_PNP=y
+CONFIG_IP_PNP_DHCP=y
+CONFIG_IP_PNP_BOOTP=y
+CONFIG_IP_PNP_RARP=y
 CONFIG_NET_IPIP=y
 # CONFIG_NET_IPGRE is not set
 # CONFIG_IP_MROUTE is not set
@@ -289,6 +301,7 @@ CONFIG_INET_TCP_DIAG=y
 # CONFIG_TCP_CONG_ADVANCED is not set
 CONFIG_TCP_CONG_CUBIC=y
 CONFIG_DEFAULT_TCP_CONG=cubic
+# CONFIG_TCP_MD5SIG is not set
 
 #
 # IP: Virtual Server Configuration
@@ -317,31 +330,67 @@ CONFIG_NETFILTER=y
 #
 # Core Netfilter Configuration
 #
-# CONFIG_NETFILTER_NETLINK is not set
-# CONFIG_NETFILTER_XTABLES is not set
+CONFIG_NETFILTER_NETLINK=m
+CONFIG_NETFILTER_NETLINK_QUEUE=m
+CONFIG_NETFILTER_NETLINK_LOG=m
+# CONFIG_NF_CONNTRACK_ENABLED is not set
+CONFIG_NETFILTER_XTABLES=m
+CONFIG_NETFILTER_XT_TARGET_CLASSIFY=m
+CONFIG_NETFILTER_XT_TARGET_DSCP=m
+CONFIG_NETFILTER_XT_TARGET_MARK=m
+CONFIG_NETFILTER_XT_TARGET_NFQUEUE=m
+CONFIG_NETFILTER_XT_TARGET_NFLOG=m
+CONFIG_NETFILTER_XT_MATCH_COMMENT=m
+CONFIG_NETFILTER_XT_MATCH_DCCP=m
+CONFIG_NETFILTER_XT_MATCH_DSCP=m
+CONFIG_NETFILTER_XT_MATCH_ESP=m
+CONFIG_NETFILTER_XT_MATCH_LENGTH=m
+CONFIG_NETFILTER_XT_MATCH_LIMIT=m
+CONFIG_NETFILTER_XT_MATCH_MAC=m
+CONFIG_NETFILTER_XT_MATCH_MARK=m
+CONFIG_NETFILTER_XT_MATCH_POLICY=m
+CONFIG_NETFILTER_XT_MATCH_MULTIPORT=m
+CONFIG_NETFILTER_XT_MATCH_PKTTYPE=m
+CONFIG_NETFILTER_XT_MATCH_QUOTA=m
+CONFIG_NETFILTER_XT_MATCH_REALM=m
+CONFIG_NETFILTER_XT_MATCH_SCTP=m
+CONFIG_NETFILTER_XT_MATCH_STATISTIC=m
+CONFIG_NETFILTER_XT_MATCH_STRING=m
+CONFIG_NETFILTER_XT_MATCH_TCPMSS=m
+CONFIG_NETFILTER_XT_MATCH_HASHLIMIT=m
 
 #
 # IP: Netfilter Configuration
 #
-CONFIG_IP_NF_CONNTRACK=y
-# CONFIG_IP_NF_CT_ACCT is not set
-# CONFIG_IP_NF_CONNTRACK_MARK is not set
-# CONFIG_IP_NF_CONNTRACK_EVENTS is not set
-CONFIG_IP_NF_CT_PROTO_SCTP=y
-CONFIG_IP_NF_FTP=m
-CONFIG_IP_NF_IRC=m
-# CONFIG_IP_NF_NETBIOS_NS is not set
-CONFIG_IP_NF_TFTP=m
-CONFIG_IP_NF_AMANDA=m
-# CONFIG_IP_NF_PPTP is not set
-# CONFIG_IP_NF_H323 is not set
-# CONFIG_IP_NF_SIP is not set
 CONFIG_IP_NF_QUEUE=m

[POWERPC] cell: Enable spider workarounds on all PCI buses

2006-12-21 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=a24e57be9baed6ccb552fbdb8e7e29e9c2da0375
Commit: a24e57be9baed6ccb552fbdb8e7e29e9c2da0375
Parent: f1fa16e8816a2285ed77070ce60a6858fb7913cc
Author: Jens Osterkamp [EMAIL PROTECTED]
AuthorDate: Tue Dec 19 15:32:43 2006 +0100
Committer:  Arnd Bergmann [EMAIL PROTECTED]
CommitDate: Tue Dec 19 15:35:37 2006 +0100

[POWERPC] cell: Enable spider workarounds on all PCI buses

Don't limit spider I/O workarounds to the first two buses.
The IBM Cell blade has three of them (one PCI, two PCIe)
and we want to handle them all.

Signed-off-by: Jens Osterkamp [EMAIL PROTECTED]
Signed-off-by: Arnd Bergmann [EMAIL PROTECTED]
---
 arch/powerpc/platforms/cell/io-workarounds.c |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/arch/powerpc/platforms/cell/io-workarounds.c 
b/arch/powerpc/platforms/cell/io-workarounds.c
index 580d425..7c73128 100644
--- a/arch/powerpc/platforms/cell/io-workarounds.c
+++ b/arch/powerpc/platforms/cell/io-workarounds.c
@@ -37,7 +37,7 @@
  */
 #define SPIDER_DISABLE_PREFETCH
 
-#define MAX_SPIDERS2
+#define MAX_SPIDERS3
 
 static struct spider_pci_bus {
void __iomem*regs;
-
To unsubscribe from this list: send the line unsubscribe git-commits-head in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[POWERPC] spufs: fix assignment of node numbers

2006-12-21 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=ccb4911598172a131b6a2d99d7eecfcee1ecc8f7
Commit: ccb4911598172a131b6a2d99d7eecfcee1ecc8f7
Parent: 6e22ba63f01b9bdcd1f29251a95047d310526207
Author: Arnd Bergmann [EMAIL PROTECTED]
AuthorDate: Tue Dec 19 15:32:45 2006 +0100
Committer:  Arnd Bergmann [EMAIL PROTECTED]
CommitDate: Tue Dec 19 15:35:39 2006 +0100

[POWERPC] spufs: fix assignment of node numbers

The difference between 'nid' and 'node' fields in an
spu structure was used incorrectly. The common 'node'
number now reflects the NUMA node, and it is used
in other places in the code as well.

The 'nid' value is meaningful only in one place, namely
the computation of the interrupt numbers based on the
physical location of an spu.  Consequently, we look it
up directly in the place where it is used now.

Signed-off-by: Arnd Bergmann [EMAIL PROTECTED]
---
 arch/powerpc/platforms/cell/spu_priv1_mmio.c |   30 ++---
 1 files changed, 12 insertions(+), 18 deletions(-)

diff --git a/arch/powerpc/platforms/cell/spu_priv1_mmio.c 
b/arch/powerpc/platforms/cell/spu_priv1_mmio.c
index c805e63..910a926 100644
--- a/arch/powerpc/platforms/cell/spu_priv1_mmio.c
+++ b/arch/powerpc/platforms/cell/spu_priv1_mmio.c
@@ -40,7 +40,6 @@
 static DEFINE_MUTEX(add_spumem_mutex);
 
 struct spu_pdata {
-   int nid;
struct device_node *devnode;
struct spu_priv1 __iomem *priv1;
 };
@@ -58,15 +57,6 @@ struct device_node *spu_devnode(struct spu *spu)
 
 EXPORT_SYMBOL_GPL(spu_devnode);
 
-static int __init find_spu_node_id(struct device_node *spe)
-{
-   const unsigned int *id;
-   struct device_node *cpu;
-   cpu = spe-parent-parent;
-   id = get_property(cpu, node-id, NULL);
-   return id ? *id : 0;
-}
-
 static int __init cell_spuprop_present(struct spu *spu, struct device_node 
*spe,
const char *prop)
 {
@@ -87,7 +77,7 @@ static int __init cell_spuprop_present(struct spu *spu, 
struct device_node *spe,
start_pfn = p-address  PAGE_SHIFT;
nr_pages = ((unsigned long)p-len + PAGE_SIZE - 1)  PAGE_SHIFT;
 
-   pgdata = NODE_DATA(spu_get_pdata(spu)-nid);
+   pgdata = NODE_DATA(spu-node);
zone = pgdata-node_zones;
 
/* XXX rethink locking here */
@@ -140,6 +130,7 @@ static int __init spu_map_interrupts_old(struct spu *spu,
 {
unsigned int isrc;
const u32 *tmp;
+   int nid;
 
/* Get the interrupt source unit from the device-tree */
tmp = get_property(np, isrc, NULL);
@@ -147,8 +138,15 @@ static int __init spu_map_interrupts_old(struct spu *spu,
return -ENODEV;
isrc = tmp[0];
 
+   tmp = get_property(np-parent-parent, node-id, NULL);
+   if (!tmp) {
+   printk(KERN_WARNING %s: can't find node-id\n, __FUNCTION__);
+   nid = spu-node;
+   } else
+   nid = tmp[0];
+
/* Add the node number */
-   isrc |= spu-node  IIC_IRQ_NODE_SHIFT;
+   isrc |= nid  IIC_IRQ_NODE_SHIFT;
 
/* Now map interrupts of all 3 classes */
spu-irqs[0] = irq_create_mapping(NULL, IIC_IRQ_CLASS_0 | isrc);
@@ -262,7 +260,7 @@ static int spu_map_resource(struct spu *spu, int nr,
start_pfn = resource.start  PAGE_SHIFT;
nr_pages = (len + PAGE_SIZE - 1)  PAGE_SHIFT;
 
-   pgdata = NODE_DATA(spu_get_pdata(spu)-nid);
+   pgdata = NODE_DATA(spu-node);
zone = pgdata-node_zones;
 
/* XXX rethink locking here */
@@ -360,7 +358,7 @@ static int __init of_create_spu(struct spu *spu, void *data)
}
spu_get_pdata(spu)-devnode = of_node_get(spe);
 
-   spu-node = find_spu_node_id(spe);
+   spu-node = of_node_to_nid(spe);
if (spu-node = MAX_NUMNODES) {
printk(KERN_WARNING SPE %s on node %d ignored,
node number too big\n, spe-full_name, spu-node);
@@ -369,10 +367,6 @@ static int __init of_create_spu(struct spu *spu, void 
*data)
goto out_free;
}
 
-   spu_get_pdata(spu)-nid = of_node_to_nid(spe);
-   if (spu_get_pdata(spu)-nid == -1)
-   spu_get_pdata(spu)-nid = 0;
-
ret = spu_map_device(spu);
/* try old method */
if (ret)
-
To unsubscribe from this list: send the line unsubscribe git-commits-head in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[POWERPC] powerpc: add scanning of ebc bus to of_platform

2006-12-21 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=4bc196266e61be1ea9391a6a52c0399c5b394e5b
Commit: 4bc196266e61be1ea9391a6a52c0399c5b394e5b
Parent: ccb4911598172a131b6a2d99d7eecfcee1ecc8f7
Author: Arnd Bergmann [EMAIL PROTECTED]
AuthorDate: Tue Dec 19 15:32:46 2006 +0100
Committer:  Arnd Bergmann [EMAIL PROTECTED]
CommitDate: Tue Dec 19 15:35:40 2006 +0100

[POWERPC] powerpc: add scanning of ebc bus to of_platform

This patch add scanning of ebc bus to of_platform, which is needed
to recognize devices located on that bus.

Signed-off-by: Christian Krafft [EMAIL PROTECTED]
Signed-off-by: Arnd Bergmann [EMAIL PROTECTED]
---
 arch/powerpc/kernel/of_platform.c |1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/arch/powerpc/kernel/of_platform.c 
b/arch/powerpc/kernel/of_platform.c
index 3002ea3..b734517 100644
--- a/arch/powerpc/kernel/of_platform.c
+++ b/arch/powerpc/kernel/of_platform.c
@@ -50,6 +50,7 @@ static struct of_device_id of_default_bus_ids[] = {
{ .type = plb5, },
{ .type = plb4, },
{ .type = opb, },
+   { .type = ebc, },
{},
 };
 
-
To unsubscribe from this list: send the line unsubscribe git-commits-head in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[POWERPC] iSeries: fix viodasd init

2006-12-21 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=fb8b50078458ba74c3d3f7bf05f5ddc27b88f051
Commit: fb8b50078458ba74c3d3f7bf05f5ddc27b88f051
Parent: 6f67f9d26fe5ced50f716e9620b42c0721d8b8d9
Author: Stephen Rothwell [EMAIL PROTECTED]
AuthorDate: Fri Dec 15 15:40:08 2006 +1100
Committer:  Paul Mackerras [EMAIL PROTECTED]
CommitDate: Wed Dec 20 16:37:47 2006 +1100

[POWERPC] iSeries: fix viodasd init

Don't initialise viodasd except on legacy iSeries.

Signed-off-by: Stephen Rothwell [EMAIL PROTECTED]
Signed-off-by: Paul Mackerras [EMAIL PROTECTED]
---
 drivers/block/viodasd.c |6 ++
 1 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/drivers/block/viodasd.c b/drivers/block/viodasd.c
index e19ba4e..68592c3 100644
--- a/drivers/block/viodasd.c
+++ b/drivers/block/viodasd.c
@@ -49,6 +49,7 @@
 #include asm/iseries/hv_lp_event.h
 #include asm/iseries/hv_lp_config.h
 #include asm/iseries/vio.h
+#include asm/firmware.h
 
 MODULE_DESCRIPTION(iSeries Virtual DASD);
 MODULE_AUTHOR(Dave Boutcher);
@@ -769,6 +770,11 @@ static int __init viodasd_init(void)
 {
int rc;
 
+   if (!firmware_has_feature(FW_FEATURE_ISERIES)) {
+   rc = -ENODEV;
+   goto early_fail;
+   }
+
/* Try to open to our host lp */
if (viopath_hostLp == HvLpIndexInvalid)
vio_set_hostlp();
-
To unsubscribe from this list: send the line unsubscribe git-commits-head in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[POWERPC] iSeries: fix iseries_veth init

2006-12-21 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=687d18abed09315a531470a0edcae977ef6a7f9e
Commit: 687d18abed09315a531470a0edcae977ef6a7f9e
Parent: fd38451f1512fd5230e3c5dcc66d1ca867af879b
Author: Stephen Rothwell [EMAIL PROTECTED]
AuthorDate: Fri Dec 15 15:42:50 2006 +1100
Committer:  Paul Mackerras [EMAIL PROTECTED]
CommitDate: Wed Dec 20 16:37:48 2006 +1100

[POWERPC] iSeries: fix iseries_veth init

Only initialise iseries_veth on legacy iSeries.
Make the init and exit routines static.

Signed-off-by: Stephen Rothwell [EMAIL PROTECTED]
Signed-off-by: Paul Mackerras [EMAIL PROTECTED]
---
 drivers/net/iseries_veth.c |9 ++---
 1 files changed, 6 insertions(+), 3 deletions(-)

diff --git a/drivers/net/iseries_veth.c b/drivers/net/iseries_veth.c
index d6f4f18..2194b56 100644
--- a/drivers/net/iseries_veth.c
+++ b/drivers/net/iseries_veth.c
@@ -73,7 +73,7 @@
 #include asm/abs_addr.h
 #include asm/iseries/mf.h
 #include asm/uaccess.h
-
+#include asm/firmware.h
 #include asm/iseries/hv_lp_config.h
 #include asm/iseries/hv_types.h
 #include asm/iseries/hv_lp_event.h
@@ -1668,7 +1668,7 @@ static struct vio_driver veth_driver = {
  * Module initialization/cleanup
  */
 
-void __exit veth_module_cleanup(void)
+static void __exit veth_module_cleanup(void)
 {
int i;
struct veth_lpar_connection *cnx;
@@ -1697,11 +1697,14 @@ void __exit veth_module_cleanup(void)
 }
 module_exit(veth_module_cleanup);
 
-int __init veth_module_init(void)
+static int __init veth_module_init(void)
 {
int i;
int rc;
 
+   if (!firmware_has_feature(FW_FEATURE_ISERIES))
+   return -ENODEV;
+
this_lp = HvLpConfig_getLpIndex_outline();
 
for (i = 0; i  HVMAXARCHITECTEDLPS; ++i) {
-
To unsubscribe from this list: send the line unsubscribe git-commits-head in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[POWERPC] iSeries: fix viocd init

2006-12-21 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=31c72ad0d10b561e7e5f843747e7d0c1abf4d6f7
Commit: 31c72ad0d10b561e7e5f843747e7d0c1abf4d6f7
Parent: 687d18abed09315a531470a0edcae977ef6a7f9e
Author: Stephen Rothwell [EMAIL PROTECTED]
AuthorDate: Fri Dec 15 15:44:04 2006 +1100
Committer:  Paul Mackerras [EMAIL PROTECTED]
CommitDate: Wed Dec 20 16:37:48 2006 +1100

[POWERPC] iSeries: fix viocd init

Only initialise viocd on legacy iSeries.

Signed-off-by: Stephen Rothwell [EMAIL PROTECTED]
Signed-off-by: Paul Mackerras [EMAIL PROTECTED]
---
 drivers/cdrom/viocd.c |4 
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/drivers/cdrom/viocd.c b/drivers/cdrom/viocd.c
index 54ca931..93fbf84 100644
--- a/drivers/cdrom/viocd.c
+++ b/drivers/cdrom/viocd.c
@@ -47,6 +47,7 @@
 #include asm/iseries/hv_types.h
 #include asm/iseries/hv_lp_event.h
 #include asm/iseries/vio.h
+#include asm/firmware.h
 
 #define VIOCD_DEVICE   iseries/vcd
 
@@ -748,6 +749,9 @@ static int __init viocd_init(void)
struct proc_dir_entry *e;
int ret = 0;
 
+   if (!firmware_has_feature(FW_FEATURE_ISERIES))
+   return -ENODEV;
+
if (viopath_hostLp == HvLpIndexInvalid) {
vio_set_hostlp();
/* If we don't have a host, bail out */
-
To unsubscribe from this list: send the line unsubscribe git-commits-head in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[POWERPC] iSeries: fix viocons init

2006-12-21 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=94c8f9f974f2ad29b90b2830b189d74a633fef49
Commit: 94c8f9f974f2ad29b90b2830b189d74a633fef49
Parent: 31c72ad0d10b561e7e5f843747e7d0c1abf4d6f7
Author: Stephen Rothwell [EMAIL PROTECTED]
AuthorDate: Fri Dec 15 15:45:13 2006 +1100
Committer:  Paul Mackerras [EMAIL PROTECTED]
CommitDate: Wed Dec 20 16:37:48 2006 +1100

[POWERPC] iSeries: fix viocons init

Only initialise viocons on legacy iSeries.

Signed-off-by: Stephen Rothwell [EMAIL PROTECTED]
Signed-off-by: Paul Mackerras [EMAIL PROTECTED]
---
 drivers/char/viocons.c |7 +++
 1 files changed, 7 insertions(+), 0 deletions(-)

diff --git a/drivers/char/viocons.c b/drivers/char/viocons.c
index 0e0da44..8de6b95 100644
--- a/drivers/char/viocons.c
+++ b/drivers/char/viocons.c
@@ -42,6 +42,7 @@
 #include linux/tty_flip.h
 #include linux/sysrq.h
 
+#include asm/firmware.h
 #include asm/iseries/vio.h
 #include asm/iseries/hv_lp_event.h
 #include asm/iseries/hv_call_event.h
@@ -1060,6 +1061,9 @@ static int __init viocons_init2(void)
atomic_t wait_flag;
int rc;
 
+   if (!firmware_has_feature(FW_FEATURE_ISERIES))
+   return -ENODEV;
+
/* +2 for fudge */
rc = viopath_open(HvLpConfig_getPrimaryLpIndex(),
viomajorsubtype_chario, VIOCHAR_WINDOW + 2);
@@ -1145,6 +1149,9 @@ static int __init viocons_init(void)
 {
int i;
 
+   if (!firmware_has_feature(FW_FEATURE_ISERIES))
+   return -ENODEV;
+
printk(VIOCONS_KERN_INFO registering console\n);
for (i = 0; i  VTTY_PORTS; i++) {
port_info[i].lp = HvLpIndexInvalid;
-
To unsubscribe from this list: send the line unsubscribe git-commits-head in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[POWERPC] iSeries: fix CONFIG_VIOPATH dependency

2006-12-21 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=ba3ba887c3549656c17675e73e12aaa97c3548f1
Commit: ba3ba887c3549656c17675e73e12aaa97c3548f1
Parent: 94c8f9f974f2ad29b90b2830b189d74a633fef49
Author: Stephen Rothwell [EMAIL PROTECTED]
AuthorDate: Fri Dec 15 15:46:39 2006 +1100
Committer:  Paul Mackerras [EMAIL PROTECTED]
CommitDate: Wed Dec 20 16:37:48 2006 +1100

[POWERPC] iSeries: fix CONFIG_VIOPATH dependency

This is a long standing typo.

Signed-off-by: Stephen Rothwell [EMAIL PROTECTED]
Signed-off-by: Paul Mackerras [EMAIL PROTECTED]
---
 arch/powerpc/platforms/iseries/Kconfig |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/arch/powerpc/platforms/iseries/Kconfig 
b/arch/powerpc/platforms/iseries/Kconfig
index 887b688..54e6b3b 100644
--- a/arch/powerpc/platforms/iseries/Kconfig
+++ b/arch/powerpc/platforms/iseries/Kconfig
@@ -31,5 +31,5 @@ endmenu
 
 config VIOPATH
bool
-   depends on VIOCONS || VIODASD || VIOCD || VIOTAPE || VETH
+   depends on VIOCONS || VIODASD || VIOCD || VIOTAPE || ISERIES_VETH
default y
-
To unsubscribe from this list: send the line unsubscribe git-commits-head in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[POWERPC] iSeries: fix viotape init

2006-12-21 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=fd38451f1512fd5230e3c5dcc66d1ca867af879b
Commit: fd38451f1512fd5230e3c5dcc66d1ca867af879b
Parent: fb8b50078458ba74c3d3f7bf05f5ddc27b88f051
Author: Stephen Rothwell [EMAIL PROTECTED]
AuthorDate: Fri Dec 15 15:41:43 2006 +1100
Committer:  Paul Mackerras [EMAIL PROTECTED]
CommitDate: Wed Dec 20 16:37:47 2006 +1100

[POWERPC] iSeries: fix viotape init

Only initialise viotape on legacy iSeries.

Signed-off-by: Stephen Rothwell [EMAIL PROTECTED]
Signed-off-by: Paul Mackerras [EMAIL PROTECTED]
---
 drivers/char/viotape.c |5 -
 1 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/drivers/char/viotape.c b/drivers/char/viotape.c
index 94d79cb..9438512 100644
--- a/drivers/char/viotape.c
+++ b/drivers/char/viotape.c
@@ -49,7 +49,7 @@
 
 #include asm/uaccess.h
 #include asm/ioctls.h
-
+#include asm/firmware.h
 #include asm/vio.h
 #include asm/iseries/vio.h
 #include asm/iseries/hv_lp_event.h
@@ -997,6 +997,9 @@ int __init viotap_init(void)
int ret;
struct proc_dir_entry *e;
 
+   if (!firmware_has_feature(FW_FEATURE_ISERIES))
+   return -ENODEV;
+
op_struct_list = NULL;
if ((ret = add_op_structs(VIOTAPE_MAXREQ))  0) {
printk(VIOTAPE_KERN_WARN couldn't allocate op structs\n);
-
To unsubscribe from this list: send the line unsubscribe git-commits-head in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[POWERPC] Fix build of cell zImage.initrd

2006-12-21 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=d28d027ab386ab64c905bfaa0f1e73a06bb4d9b4
Commit: d28d027ab386ab64c905bfaa0f1e73a06bb4d9b4
Parent: ba3ba887c3549656c17675e73e12aaa97c3548f1
Author: Benjamin Herrenschmidt [EMAIL PROTECTED]
AuthorDate: Tue Dec 19 16:42:58 2006 +1100
Committer:  Paul Mackerras [EMAIL PROTECTED]
CommitDate: Wed Dec 20 16:37:48 2006 +1100

[POWERPC] Fix build of cell zImage.initrd

The patch adding support for zImage.ps3 didn't add a zImage.initrd.ps3
target causing builds of zImage.initrd to fail when ps3 is included in
the .config. The current method of generating ps3 images doesn't support
initrd's yet, so we create a dummy target that only displays a warning
message instead.

Signed-off-by: Benjamin Herrenschmidt [EMAIL PROTECTED]
Signed-off-by: Paul Mackerras [EMAIL PROTECTED]
---
 arch/powerpc/boot/Makefile |3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/arch/powerpc/boot/Makefile b/arch/powerpc/boot/Makefile
index 343dbcf..98392fb 100644
--- a/arch/powerpc/boot/Makefile
+++ b/arch/powerpc/boot/Makefile
@@ -152,6 +152,9 @@ $(obj)/zImage.initrd.miboot: vmlinux $(wrapperbits)
 $(obj)/zImage.ps3: vmlinux
$(STRIP) -s -R .comment $ -o $@
 
+$(obj)/zImage.initrd.ps3: vmlinux
+   @echo   WARNING zImage.initrd.ps3 not supported (yet)
+
 $(obj)/uImage: vmlinux $(wrapperbits)
$(call cmd,wrap,uboot)
 
-
To unsubscribe from this list: send the line unsubscribe git-commits-head in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[POWERPC] Probe Efika platform before CHRP.

2006-12-21 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=3f245e2a1eaf603cf9cf4820eb5dd8c5637bc71a
Commit: 3f245e2a1eaf603cf9cf4820eb5dd8c5637bc71a
Parent: d28d027ab386ab64c905bfaa0f1e73a06bb4d9b4
Author: David Woodhouse [EMAIL PROTECTED]
AuthorDate: Tue Dec 19 09:54:56 2006 +
Committer:  Paul Mackerras [EMAIL PROTECTED]
CommitDate: Wed Dec 20 16:37:48 2006 +1100

[POWERPC] Probe Efika platform before CHRP.

The Efika matches chrp_probe() too, so put its own probe first to make
sure we get it right in a multiplatform build.

Signed-off-by: David Woodhouse [EMAIL PROTECTED]
Signed-off-by: Paul Mackerras [EMAIL PROTECTED]
---
 arch/powerpc/platforms/Makefile |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/arch/powerpc/platforms/Makefile b/arch/powerpc/platforms/Makefile
index 44d95ea..507d1b9 100644
--- a/arch/powerpc/platforms/Makefile
+++ b/arch/powerpc/platforms/Makefile
@@ -5,9 +5,9 @@ ifeq ($(CONFIG_PPC64),y)
 obj-$(CONFIG_PPC_PMAC) += powermac/
 endif
 endif
+obj-$(CONFIG_PPC_MPC52xx)  += 52xx/
 obj-$(CONFIG_PPC_CHRP) += chrp/
 obj-$(CONFIG_4xx)  += 4xx/
-obj-$(CONFIG_PPC_MPC52xx)  += 52xx/
 obj-$(CONFIG_PPC_83xx) += 83xx/
 obj-$(CONFIG_PPC_85xx) += 85xx/
 obj-$(CONFIG_PPC_86xx) += 86xx/
-
To unsubscribe from this list: send the line unsubscribe git-commits-head in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[POWERPC] Fix PCI device channel state initialization

2006-12-21 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=bb63ab13515951f4d09b16c9e8bd6e50b0f20d1e
Commit: bb63ab13515951f4d09b16c9e8bd6e50b0f20d1e
Parent: 173935f3619ae99fef0cea1dbe4de9c83d6c8e72
Author: Linas Vepstas [EMAIL PROTECTED]
AuthorDate: Tue Dec 19 14:00:34 2006 -0600
Committer:  Paul Mackerras [EMAIL PROTECTED]
CommitDate: Wed Dec 20 16:37:49 2006 +1100

[POWERPC] Fix PCI device channel state initialization

Initialize the pci device pci channel state. This is critical
for having the pci_channel_offline() routine (in pci.h) to
function correctly.

Signed-off-by: Linas Vepstas [EMAIL PROTECTED]
Signed-off-by: Paul Mackerras [EMAIL PROTECTED]
---
 arch/powerpc/kernel/pci_64.c |1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/arch/powerpc/kernel/pci_64.c b/arch/powerpc/kernel/pci_64.c
index a6b7692..73c59ec 100644
--- a/arch/powerpc/kernel/pci_64.c
+++ b/arch/powerpc/kernel/pci_64.c
@@ -360,6 +360,7 @@ struct pci_dev *of_create_pci_dev(struct device_node *node,
DBG(class: 0x%x\n, dev-class);
 
dev-current_state = 4; /* unknown power state */
+   dev-error_state = pci_channel_io_normal;
 
if (!strcmp(type, pci) || !strcmp(type, pciex)) {
/* a PCI-PCI bridge */
-
To unsubscribe from this list: send the line unsubscribe git-commits-head in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[POWERPC] Fix register save area alignment for swapcontext syscall

2006-12-21 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=1c9bb1a01ac1bc92a0d98cf3e40a7922ee684dc0
Commit: 1c9bb1a01ac1bc92a0d98cf3e40a7922ee684dc0
Parent: bb63ab13515951f4d09b16c9e8bd6e50b0f20d1e
Author: Paul Mackerras [EMAIL PROTECTED]
AuthorDate: Wed Dec 20 13:57:06 2006 +1100
Committer:  Paul Mackerras [EMAIL PROTECTED]
CommitDate: Wed Dec 20 16:37:49 2006 +1100

[POWERPC] Fix register save area alignment for swapcontext syscall

For 32-bit processes, the getcontext side of the swapcontext system
call (i.e. the saving of the context when the first argument is
non-NULL) has to set the ctx-uc_mcontext.uc_regs pointer to the place
where it saves the registers.  Which it does, but it doesn't ensure
that the pointer is 16-byte aligned.  16-byte alignment is needed
because the Altivec/VMX registers are saved in there, and they need to
be on a 16-byte boundary.

This fixes it by ensuring the appropriate alignment of the pointer.
This issue was pointed out by Jakub Jelinek.

Signed-off-by: Paul Mackerras [EMAIL PROTECTED]
---
 arch/powerpc/kernel/signal_32.c |   16 +---
 1 files changed, 13 insertions(+), 3 deletions(-)

diff --git a/arch/powerpc/kernel/signal_32.c b/arch/powerpc/kernel/signal_32.c
index e4ebe1a..6b405a3 100644
--- a/arch/powerpc/kernel/signal_32.c
+++ b/arch/powerpc/kernel/signal_32.c
@@ -835,11 +835,21 @@ long sys_swapcontext(struct ucontext __user *old_ctx,
return -EINVAL;
 
if (old_ctx != NULL) {
+   struct mcontext __user *mctx;
+
+   /*
+* old_ctx might not be 16-byte aligned, in which
+* case old_ctx-uc_mcontext won't be either.
+* Because we have the old_ctx-uc_pad2 field
+* before old_ctx-uc_mcontext, we need to round down
+* from old_ctx-uc_mcontext to a 16-byte boundary.
+*/
+   mctx = (struct mcontext __user *)
+   ((unsigned long) old_ctx-uc_mcontext  ~0xfUL);
if (!access_ok(VERIFY_WRITE, old_ctx, sizeof(*old_ctx))
-   || save_user_regs(regs, old_ctx-uc_mcontext, 0)
+   || save_user_regs(regs, mctx, 0)
|| put_sigset_t(old_ctx-uc_sigmask, current-blocked)
-   || __put_user(to_user_ptr(old_ctx-uc_mcontext),
-   old_ctx-uc_regs))
+   || __put_user(to_user_ptr(mctx), old_ctx-uc_regs))
return -EFAULT;
}
if (new_ctx == NULL)
-
To unsubscribe from this list: send the line unsubscribe git-commits-head in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


USB: Fix oops in PhidgetServo

2006-12-21 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=6a7255e1df3cf8f89c2c0c6eeea866c6bb17cfb9
Commit: 6a7255e1df3cf8f89c2c0c6eeea866c6bb17cfb9
Parent: f238085415c56618e042252894f2fcc971add645
Author: Sean Young [EMAIL PROTECTED]
AuthorDate: Wed Dec 6 20:27:32 2006 +
Committer:  Greg Kroah-Hartman [EMAIL PROTECTED]
CommitDate: Wed Dec 20 10:13:22 2006 -0800

USB: Fix oops in PhidgetServo

The PhidgetServo causes an Oops when any of its sysfs attributes are read
or written too, making the driver useless.

Signed-off-by: Sean Young [EMAIL PROTECTED]
Signed-off-by: Greg Kroah-Hartman [EMAIL PROTECTED]
---
 drivers/usb/misc/phidgetservo.c |1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/drivers/usb/misc/phidgetservo.c b/drivers/usb/misc/phidgetservo.c
index 7163f05..0d9de2f 100644
--- a/drivers/usb/misc/phidgetservo.c
+++ b/drivers/usb/misc/phidgetservo.c
@@ -282,6 +282,7 @@ servo_probe(struct usb_interface *interface, const struct 
usb_device_id *id)
dev-dev = NULL;
goto out;
}
+   dev_set_drvdata(dev-dev, dev);
 
servo_count = dev-type  SERVO_COUNT_QUAD ? 4 : 1;
 
-
To unsubscribe from this list: send the line unsubscribe git-commits-head in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


USB: fix transvibrator disconnect race

2006-12-21 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=96ca014d53d2c2f9d3b32fe6f2f003e660c3bc63
Commit: 96ca014d53d2c2f9d3b32fe6f2f003e660c3bc63
Parent: 6a7255e1df3cf8f89c2c0c6eeea866c6bb17cfb9
Author: Oliver Neukum [EMAIL PROTECTED]
AuthorDate: Fri Nov 24 12:55:59 2006 +0100
Committer:  Greg Kroah-Hartman [EMAIL PROTECTED]
CommitDate: Wed Dec 20 10:13:23 2006 -0800

USB: fix transvibrator disconnect race

in disconnect you set the interface's private data to NULL. In your IO
methods you unconditionally follow the pointer into never never land.

Signed-off-by: Oliver Neukum [EMAIL PROTECTED]
Signed-off-by: Greg Kroah-Hartman [EMAIL PROTECTED]
---
 drivers/usb/misc/trancevibrator.c |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/usb/misc/trancevibrator.c 
b/drivers/usb/misc/trancevibrator.c
index 33cd91d..67e2fc2 100644
--- a/drivers/usb/misc/trancevibrator.c
+++ b/drivers/usb/misc/trancevibrator.c
@@ -120,8 +120,8 @@ static void tv_disconnect(struct usb_interface *interface)
struct trancevibrator *dev;
 
dev = usb_get_intfdata (interface);
-   usb_set_intfdata(interface, NULL);
device_remove_file(interface-dev, dev_attr_speed);
+   usb_set_intfdata(interface, NULL);
usb_put_dev(dev-udev);
kfree(dev);
 }
-
To unsubscribe from this list: send the line unsubscribe git-commits-head in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


USB: airprime: add device id for dell wireless 5500 hsdpa card

2006-12-21 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=87f28bde949125901494f50e4b4a5b609a20a120
Commit: 87f28bde949125901494f50e4b4a5b609a20a120
Parent: 96ca014d53d2c2f9d3b32fe6f2f003e660c3bc63
Author: Eagle Jones [EMAIL PROTECTED]
AuthorDate: Fri Nov 24 16:40:04 2006 -0800
Committer:  Greg Kroah-Hartman [EMAIL PROTECTED]
CommitDate: Wed Dec 20 10:13:23 2006 -0800

USB: airprime: add device id for dell wireless 5500 hsdpa card

Added the device id (0x413c, 0x8115) for the Dell wireless HSDPA 5500,
which is a rebranded Novatel EU730.

Signed-off-by: Eagle Jones [EMAIL PROTECTED]
Signed-off-by: Greg Kroah-Hartman [EMAIL PROTECTED]
---
 drivers/usb/serial/airprime.c |1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/drivers/usb/serial/airprime.c b/drivers/usb/serial/airprime.c
index 96c7372..62a0df2 100644
--- a/drivers/usb/serial/airprime.c
+++ b/drivers/usb/serial/airprime.c
@@ -21,6 +21,7 @@ static struct usb_device_id id_table [] = {
{ USB_DEVICE(0x1410, 0x1110) }, /* Novatel Wireless Merlin CDMA */
{ USB_DEVICE(0x1410, 0x1430) }, /* Novatel Merlin XU870 HSDPA/3G */
{ USB_DEVICE(0x1410, 0x1100) }, /* ExpressCard34 Qualcomm 3G CDMA */
+   { USB_DEVICE(0x413c, 0x8115) }, /* Dell Wireless HSDPA 5500 */
{ },
 };
 MODULE_DEVICE_TABLE(usb, id_table);
-
To unsubscribe from this list: send the line unsubscribe git-commits-head in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


USB: ftdi_sio - MachX product ID added

2006-12-21 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=ec434e9b43c7d41bd6962b79f5374be5ca2ebe2d
Commit: ec434e9b43c7d41bd6962b79f5374be5ca2ebe2d
Parent: 87f28bde949125901494f50e4b4a5b609a20a120
Author: Jan Capek [EMAIL PROTECTED]
AuthorDate: Tue Nov 28 22:35:12 2006 +0100
Committer:  Greg Kroah-Hartman [EMAIL PROTECTED]
CommitDate: Wed Dec 20 10:13:23 2006 -0800

USB: ftdi_sio - MachX product ID added

below is a patch for the ftdi_sio driver to include a new device ID for
CCS MachX PIC programmer.


From: Jan Capek [EMAIL PROTECTED]
Signed-off-by: Greg Kroah-Hartman [EMAIL PROTECTED]
---
 drivers/usb/serial/ftdi_sio.c |1 +
 drivers/usb/serial/ftdi_sio.h |5 +++--
 2 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/drivers/usb/serial/ftdi_sio.c b/drivers/usb/serial/ftdi_sio.c
index 41b0ad2..6986e75 100644
--- a/drivers/usb/serial/ftdi_sio.c
+++ b/drivers/usb/serial/ftdi_sio.c
@@ -452,6 +452,7 @@ static struct usb_device_id id_table_combined [] = {
{ USB_DEVICE(FTDI_VID, LINX_FUTURE_2_PID) },
{ USB_DEVICE(FTDI_VID, FTDI_CCSICDU20_0_PID) },
{ USB_DEVICE(FTDI_VID, FTDI_CCSICDU40_1_PID) },
+   { USB_DEVICE(FTDI_VID, FTDI_CCSMACHX_2_PID) },
{ USB_DEVICE(FTDI_VID, INSIDE_ACCESSO) },
{ USB_DEVICE(INTREPID_VID, INTREPID_VALUECAN_PID) },
{ USB_DEVICE(INTREPID_VID, INTREPID_NEOVI_PID) },
diff --git a/drivers/usb/serial/ftdi_sio.h b/drivers/usb/serial/ftdi_sio.h
index bae117d..40dd394 100644
--- a/drivers/usb/serial/ftdi_sio.h
+++ b/drivers/usb/serial/ftdi_sio.h
@@ -312,8 +312,9 @@
 
 /* CCS Inc. ICDU/ICDU40 product ID - the FT232BM is used in an 
in-circuit-debugger */
 /* unit for PIC16's/PIC18's */
-#define FTDI_CCSICDU20_0_PID0xF9D0 
-#define FTDI_CCSICDU40_1_PID0xF9D1 
+#define FTDI_CCSICDU20_0_PID0xF9D0
+#define FTDI_CCSICDU40_1_PID0xF9D1
+#define FTDI_CCSMACHX_2_PID 0xF9D2
 
 /* Inside Accesso contactless reader (http://www.insidefr.com) */
 #define INSIDE_ACCESSO 0xFAD0
-
To unsubscribe from this list: send the line unsubscribe git-commits-head in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


USB: removing ifdefed code from gl620a

2006-12-21 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=337445313ffb7a7e97f408500c7448044d54f921
Commit: 337445313ffb7a7e97f408500c7448044d54f921
Parent: ec434e9b43c7d41bd6962b79f5374be5ca2ebe2d
Author: Oliver Neukum [EMAIL PROTECTED]
AuthorDate: Mon Nov 27 18:41:30 2006 +0100
Committer:  Greg Kroah-Hartman [EMAIL PROTECTED]
CommitDate: Wed Dec 20 10:13:23 2006 -0800

USB: removing ifdefed code from gl620a

as David has objected to the patch against the gl620a driver,
here's a patch implementing David' suggestion of removing the incomplete
ifdefed code from the gl620a driver.


Signed-off-by: Oliver Neukum [EMAIL PROTECTED]
Signed-off-by: David Brownell [EMAIL PROTECTED]
---
 drivers/usb/net/gl620a.c |  154 --
 1 files changed, 0 insertions(+), 154 deletions(-)

diff --git a/drivers/usb/net/gl620a.c b/drivers/usb/net/gl620a.c
index a3242be..a6f0f4d 100644
--- a/drivers/usb/net/gl620a.c
+++ b/drivers/usb/net/gl620a.c
@@ -79,160 +79,6 @@ struct gl_header {
struct gl_packetpackets;
 };
 
-#ifdef GENELINK_ACK
-
-// FIXME:  this code is incomplete, not debugged; it doesn't
-// handle interrupts correctly; it should use the generic
-// status IRQ code (which didn't exist back in 2001).
-
-struct gl_priv {
-   struct urb  *irq_urb;
-   charirq_buf [INTERRUPT_BUFSIZE];
-};
-
-static inline int gl_control_write(struct usbnet *dev, u8 request, u16 value)
-{
-   int retval;
-
-   retval = usb_control_msg(dev-udev,
- usb_sndctrlpipe(dev-udev, 0),
- request,
- USB_DIR_OUT | USB_TYPE_CLASS | USB_RECIP_INTERFACE,
- value,
- 0,// index
- 0,// data buffer
- 0,// size
- USB_CTRL_SET_TIMEOUT);
-   return retval;
-}
-
-static void gl_interrupt_complete(struct urb *urb)
-{
-   int status = urb-status;
-
-   switch (status) {
-   case 0:
-   /* success */
-   break;
-   case -ECONNRESET:
-   case -ENOENT:
-   case -ESHUTDOWN:
-   /* this urb is terminated, clean up */
-   dbg(%s - urb shutting down with status: %d,
-   __FUNCTION__, status);
-   return;
-   default:
-   dbg(%s - nonzero urb status received: %d,
-   __FUNCTION__, urb-status);
-   }
-
-   status = usb_submit_urb(urb, GFP_ATOMIC);
-   if (status)
-   err(%s - usb_submit_urb failed with result %d,
-__FUNCTION__, status);
-}
-
-static int gl_interrupt_read(struct usbnet *dev)
-{
-   struct gl_priv  *priv = dev-priv_data;
-   int retval;
-
-   // issue usb interrupt read
-   if (priv  priv-irq_urb) {
-   // submit urb
-   if ((retval = usb_submit_urb(priv-irq_urb, GFP_KERNEL)) != 0)
-   dbg(gl_interrupt_read: submit fail - %X..., retval);
-   else
-   dbg(gl_interrupt_read: submit success...);
-   }
-
-   return 0;
-}
-
-// check whether another side is connected
-static int genelink_check_connect(struct usbnet *dev)
-{
-   int retval;
-
-   dbg(genelink_check_connect...);
-
-   // detect whether another side is connected
-   if ((retval = gl_control_write(dev, GENELINK_CONNECT_WRITE, 0)) != 0) {
-   dbg(%s: genelink_check_connect write fail - %X,
-   dev-net-name, retval);
-   return retval;
-   }
-
-   // usb interrupt read to ack another side
-   if ((retval = gl_interrupt_read(dev)) != 0) {
-   dbg(%s: genelink_check_connect read fail - %X,
-   dev-net-name, retval);
-   return retval;
-   }
-
-   dbg(%s: genelink_check_connect read success, dev-net-name);
-   return 0;
-}
-
-// allocate and initialize the private data for genelink
-static int genelink_init(struct usbnet *dev)
-{
-   struct gl_priv *priv;
-
-   // allocate the private data structure
-   if ((priv = kmalloc(sizeof *priv, GFP_KERNEL)) == 0) {
-   dbg(%s: cannot allocate private data per device,
-   dev-net-name);
-   return -ENOMEM;
-   }
-
-   // allocate irq urb
-   if ((priv-irq_urb = usb_alloc_urb(0, GFP_KERNEL)) == 0) {
-   dbg(%s: cannot allocate private irq urb per device,
-   dev-net-name);
-   kfree(priv);
-   return -ENOMEM;
-   }
-
-   // fill irq urb
-   usb_fill_int_urb(priv-irq_urb, dev-udev,
-   usb_rcvintpipe(dev-udev, GENELINK_INTERRUPT_PIPE),
-   priv-irq_buf, 

[POWERPC] Update MTD OF documentation

2006-12-21 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=173935f3619ae99fef0cea1dbe4de9c83d6c8e72
Commit: 173935f3619ae99fef0cea1dbe4de9c83d6c8e72
Parent: 3f245e2a1eaf603cf9cf4820eb5dd8c5637bc71a
Author: Vitaly Wool [EMAIL PROTECTED]
AuthorDate: Tue Dec 19 18:44:25 2006 +0300
Committer:  Paul Mackerras [EMAIL PROTECTED]
CommitDate: Wed Dec 20 16:37:48 2006 +1100

[POWERPC] Update MTD OF documentation

This updates the Documentation/powerpc part of the MTD OF
implementation with the new field probe-type. Its support has already
been implemented in MTD part (drivers/mtd/maps/physmap_of.c).

Signed-off-by: Vitaly Wool [EMAIL PROTECTED]
Acked-by: Sergei Shtylyov [EMAIL PROTECTED]
Signed-off-by: Paul Mackerras [EMAIL PROTECTED]
---
 Documentation/powerpc/booting-without-of.txt |   19 +++
 1 files changed, 11 insertions(+), 8 deletions(-)

diff --git a/Documentation/powerpc/booting-without-of.txt 
b/Documentation/powerpc/booting-without-of.txt
index b3bd366..3399427 100644
--- a/Documentation/powerpc/booting-without-of.txt
+++ b/Documentation/powerpc/booting-without-of.txt
@@ -1703,29 +1703,32 @@ platforms are moved over to use the 
flattened-device-tree model.
 Required properties:
 
  - device_type : has to be rom
- - compatible : Should specify what this ROM device is compatible with
-   (i.e. onenand). Currently, this is most likely to be direct-mapped
-   (which corresponds to the MTD physmap mapping driver).
- - regs : Offset and length of the register set (or memory mapping) for
+ - compatible : Should specify what this flash device is compatible with.
+   Currently, this is most likely to be direct-mapped (which
+   corresponds to the MTD physmap mapping driver).
+ - reg : Offset and length of the register set (or memory mapping) for
the device.
+ - bank-width : Width of the flash data bus in bytes. Required
+   for the NOR flashes (compatible == direct-mapped and others) ONLY.
 
 Recommended properties :
 
- - bank-width : Width of the flash data bus in bytes. Required
-   for the NOR flashes (compatible == direct-mapped and others) ONLY.
  - partitions : Several pairs of 32-bit values where the first value is
partition's offset from the start of the device and the second one is
partition size in bytes with LSB used to signify a read only
-   partititon (so, the parition size should always be an even number).
+   partition (so, the parition size should always be an even number).
  - partition-names : The list of concatenated zero terminated strings
representing the partition names.
+ - probe-type : The type of probe which should be done for the chip
+   (JEDEC vs CFI actually). Valid ONLY for NOR flashes.
 
Example:
 
[EMAIL PROTECTED] {
device_type = rom;
compatible = direct-mapped;
-   regs = ff00 0100;
+   probe-type = CFI;
+   reg = ff00 0100;
bank-width = 4;
partitions =  00f8
  00f8 00080001;
-
To unsubscribe from this list: send the line unsubscribe git-commits-head in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


USB: mutexification of usblp

2006-12-21 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=8e42266965b9db03a86d2cf55400cd3afb67a114
Commit: 8e42266965b9db03a86d2cf55400cd3afb67a114
Parent: b1cff285ae8d21012ad3717e412b0f50066dc061
Author: Oliver Neukum [EMAIL PROTECTED]
AuthorDate: Sun Dec 3 09:46:35 2006 +0100
Committer:  Greg Kroah-Hartman [EMAIL PROTECTED]
CommitDate: Wed Dec 20 10:13:23 2006 -0800

USB: mutexification of usblp

this patch:
- converts usblp fully to mutex
- makes sleeping interruptible where EINTR can be returned anyway

Signed-off-by: Oliver Neukum [EMAIL PROTECTED]
Signed-off-by: Greg Kroah-Hartman [EMAIL PROTECTED]
---
 drivers/usb/class/usblp.c |   54 
 1 files changed, 29 insertions(+), 25 deletions(-)

diff --git a/drivers/usb/class/usblp.c b/drivers/usb/class/usblp.c
index 6303970..24ee8be 100644
--- a/drivers/usb/class/usblp.c
+++ b/drivers/usb/class/usblp.c
@@ -130,7 +130,7 @@ MFG:HEWLETT-PACKARD;MDL:DESKJET 
970C;CMD:MLC,PCL,PML;CLASS:PRINTER;DESCRIPTION:H
 
 struct usblp {
struct usb_device   *dev;   /* USB device */
-   struct semaphoresem;/* locks this struct, 
especially dev */
+   struct mutexmut;/* locks this struct, 
especially dev */
char*writebuf;  /* write 
transfer_buffer */
char*readbuf;   /* read transfer_buffer 
*/
char*statusbuf; /* status 
transfer_buffer */
@@ -465,7 +465,7 @@ static long usblp_ioctl(struct file *file, unsigned int 
cmd, unsigned long arg)
int twoints[2];
int retval = 0;
 
-   down (usblp-sem);
+   mutex_lock (usblp-mut);
if (!usblp-present) {
retval = -ENODEV;
goto done;
@@ -644,14 +644,14 @@ static long usblp_ioctl(struct file *file, unsigned int 
cmd, unsigned long arg)
}
 
 done:
-   up (usblp-sem);
+   mutex_unlock (usblp-mut);
return retval;
 }
 
 static ssize_t usblp_write(struct file *file, const char __user *buffer, 
size_t count, loff_t *ppos)
 {
struct usblp *usblp = file-private_data;
-   int timeout, rv, err = 0, transfer_length = 0;
+   int timeout, intr, rv, err = 0, transfer_length = 0;
size_t writecount = 0;
 
while (writecount  count) {
@@ -668,14 +668,16 @@ static ssize_t usblp_write(struct file *file, const char 
__user *buffer, size_t
if (rv  0)
return writecount ? writecount : -EINTR;
}
-   down (usblp-sem);
+   intr = mutex_lock_interruptible (usblp-mut);
+   if (intr)
+   return writecount ? writecount : -EINTR;
if (!usblp-present) {
-   up (usblp-sem);
+   mutex_unlock (usblp-mut);
return -ENODEV;
}
 
if (usblp-sleeping) {
-   up (usblp-sem);
+   mutex_unlock (usblp-mut);
return writecount ? writecount : -ENODEV;
}
 
@@ -687,10 +689,10 @@ static ssize_t usblp_write(struct file *file, const char 
__user *buffer, size_t
err = usblp-writeurb-status;
} else
err = usblp_check_status(usblp, err);
-   up (usblp-sem);
+   mutex_unlock (usblp-mut);
 
/* if the fault was due to disconnect, let khubd's
-* call to usblp_disconnect() grab usblp-sem ...
+* call to usblp_disconnect() grab usblp-mut ...
 */
schedule ();
continue;
@@ -702,7 +704,7 @@ static ssize_t usblp_write(struct file *file, const char 
__user *buffer, size_t
 */
writecount += transfer_length;
if (writecount == count) {
-   up(usblp-sem);
+   mutex_unlock(usblp-mut);
break;
}
 
@@ -714,7 +716,7 @@ static ssize_t usblp_write(struct file *file, const char 
__user *buffer, size_t
 
if (copy_from_user(usblp-writeurb-transfer_buffer, 
   buffer + writecount, transfer_length)) {
-   up(usblp-sem);
+   mutex_unlock(usblp-mut);
return writecount ? writecount : -EFAULT;
}
 
@@ -727,10 +729,10 @@ static ssize_t usblp_write(struct file *file, const char 
__user *buffer, size_t
count = -EIO;
else
count = writecount ? writecount : 

Add Baltech Reader ID to CP2101 driver

2006-12-21 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=e05998d50d0bf9de5409a178e2f9869c7d1ea83e
Commit: e05998d50d0bf9de5409a178e2f9869c7d1ea83e
Parent: 8e42266965b9db03a86d2cf55400cd3afb67a114
Author: Johannes Hoelzl [EMAIL PROTECTED]
AuthorDate: Sat Dec 2 16:54:27 2006 +0100
Committer:  Greg Kroah-Hartman [EMAIL PROTECTED]
CommitDate: Wed Dec 20 10:14:25 2006 -0800

Add Baltech Reader ID to CP2101 driver

this patch adds the Baltech Reader ID to the list of USB IDs in the
CP2101 driver.

From: Johannes Hoelzl [EMAIL PROTECTED]
Signed-off-by: Greg Kroah-Hartman [EMAIL PROTECTED]
---
 drivers/usb/serial/cp2101.c |1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/drivers/usb/serial/cp2101.c b/drivers/usb/serial/cp2101.c
index 2f9b7ac..7ebaffd 100644
--- a/drivers/usb/serial/cp2101.c
+++ b/drivers/usb/serial/cp2101.c
@@ -69,6 +69,7 @@ static struct usb_device_id id_table [] = {
{ USB_DEVICE(0x10C4, 0x8218) }, /* Lipowsky Industrie Elektronik GmbH, 
HARP-1 */
{ USB_DEVICE(0x10C4, 0xEA60) }, /* Silicon Labs factory default */
{ USB_DEVICE(0x10C4, 0xEA61) }, /* Silicon Labs factory default */
+   { USB_DEVICE(0x13AD, 0x) }, /* Baltech card reader */
{ USB_DEVICE(0x16D6, 0x0001) }, /* Jablotron serial interface */
{ } /* Terminating Entry */
 };
-
To unsubscribe from this list: send the line unsubscribe git-commits-head in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


USB: fix ohci.h over-use warnings

2006-12-21 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=abc9404bb0bcfa8677ab5978b2c8b60ab5ef7536
Commit: abc9404bb0bcfa8677ab5978b2c8b60ab5ef7536
Parent: c2585d962572744271a7e254d48c747727441936
Author: Jeff Garzik [EMAIL PROTECTED]
AuthorDate: Sun Dec 3 20:53:58 2006 -0500
Committer:  Greg Kroah-Hartman [EMAIL PROTECTED]
CommitDate: Wed Dec 20 10:14:25 2006 -0800

USB: fix ohci.h over-use warnings

When u132-hcd is built, it includes local header ohci.h, which appears
to have been intended only for use by ohci-hcd.

This throws warnings about functions which are defined and not used.
The warnings thrown are because three small functions are implemented in
the header, but not declared 'inline', a rather strange affair.

Since these functions are small, let's go ahead and define them as
'inline', just like the inline functions surrounding them.  This makes
things more consistent, and kills the warnings.

Signed-off-by: Jeff Garzik [EMAIL PROTECTED]
Signed-off-by: Greg Kroah-Hartman [EMAIL PROTECTED]
---
 drivers/usb/host/ohci.h |6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/usb/host/ohci.h b/drivers/usb/host/ohci.h
index a2f42a2..fd93e7e 100644
--- a/drivers/usb/host/ohci.h
+++ b/drivers/usb/host/ohci.h
@@ -602,7 +602,7 @@ static inline void disable (struct ohci_hcd *ohci)
 #defineFIT (1  31)
 #define LSTHRESH   0x628   /* lowspeed bit threshold */
 
-static void periodic_reinit (struct ohci_hcd *ohci)
+static inline void periodic_reinit (struct ohci_hcd *ohci)
 {
u32 fi = ohci-fminterval  0x03fff;
u32 fit = ohci_readl(ohci, ohci-regs-fminterval)  FIT;
@@ -626,11 +626,11 @@ static void periodic_reinit (struct ohci_hcd *ohci)
temp = ohci_readl (hc, hc-regs-roothub.register); \
temp; })
 
-static u32 roothub_a (struct ohci_hcd *hc)
+static inline u32 roothub_a (struct ohci_hcd *hc)
{ return read_roothub (hc, a, 0xfc0fe000); }
 static inline u32 roothub_b (struct ohci_hcd *hc)
{ return ohci_readl (hc, hc-regs-roothub.b); }
 static inline u32 roothub_status (struct ohci_hcd *hc)
{ return ohci_readl (hc, hc-regs-roothub.status); }
-static u32 roothub_portstatus (struct ohci_hcd *hc, int i)
+static inline u32 roothub_portstatus (struct ohci_hcd *hc, int i)
{ return read_roothub (hc, portstatus [i], 0xffe0fce0); }
-
To unsubscribe from this list: send the line unsubscribe git-commits-head in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


USB: rtl8150 new device id

2006-12-21 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=5859271ebd6c60d7d9466b485e164c6c614a
Commit: 5859271ebd6c60d7d9466b485e164c6c614a
Parent: abc9404bb0bcfa8677ab5978b2c8b60ab5ef7536
Author: Petko Manolov [EMAIL PROTECTED]
AuthorDate: Mon Dec 4 14:27:36 2006 +0200
Committer:  Greg Kroah-Hartman [EMAIL PROTECTED]
CommitDate: Wed Dec 20 10:14:25 2006 -0800

USB: rtl8150 new device id

This one adds another vendor ID to rtl8150 driver.  Please apply.


Signed-off-by: Petko Manolov [EMAIL PROTECTED]
Signed-off-by: Greg Kroah-Hartman [EMAIL PROTECTED]
---
 drivers/usb/net/rtl8150.c |6 --
 1 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/drivers/usb/net/rtl8150.c b/drivers/usb/net/rtl8150.c
index c54235f..e0eecda 100644
--- a/drivers/usb/net/rtl8150.c
+++ b/drivers/usb/net/rtl8150.c
@@ -124,10 +124,11 @@
 #defineRX_URB_FAIL 3
 
 /* Define these values to match your device */
-#define VENDOR_ID_REALTEK  0x0bda
+#defineVENDOR_ID_REALTEK   0x0bda
 #defineVENDOR_ID_MELCO 0x0411
-#define VENDOR_ID_MICRONET 0x3980
+#defineVENDOR_ID_MICRONET  0x3980
 #defineVENDOR_ID_LONGSHINE 0x07b8
+#defineVENDOR_ID_OQO   0x1557
 #defineVENDOR_ID_ZYXEL 0x0586
 
 #define PRODUCT_ID_RTL8150 0x8150
@@ -144,6 +145,7 @@ static struct usb_device_id rtl8150_table[] = {
{USB_DEVICE(VENDOR_ID_MELCO, PRODUCT_ID_LUAKTX)},
{USB_DEVICE(VENDOR_ID_MICRONET, PRODUCT_ID_SP128AR)},
{USB_DEVICE(VENDOR_ID_LONGSHINE, PRODUCT_ID_LCS8138TX)},
+   {USB_DEVICE(VENDOR_ID_OQO, PRODUCT_ID_RTL8150)},
{USB_DEVICE(VENDOR_ID_ZYXEL, PRODUCT_ID_PRESTIGE)},
{}
 };
-
To unsubscribe from this list: send the line unsubscribe git-commits-head in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


usb-storage: Ignore the virtual cd-drive of the Huawei E220 USB Modem

2006-12-21 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=16c76865df40357027479b6d85f59a07f8d01c8d
Commit: 16c76865df40357027479b6d85f59a07f8d01c8d
Parent: 5859271ebd6c60d7d9466b485e164c6c614a
Author: Johann Wilhelm [EMAIL PROTECTED]
AuthorDate: Sat Dec 2 07:16:32 2006 +0100
Committer:  Greg Kroah-Hartman [EMAIL PROTECTED]
CommitDate: Wed Dec 20 10:14:25 2006 -0800

usb-storage: Ignore the virtual cd-drive of the Huawei E220 USB Modem

This prevents the kernel from detecting the virtual cd-drive with the
Windows drivers.

Signed-off-by: Johann Wilhelm [EMAIL PROTECTED]
Signed-off-by: Greg Kroah-Hartman [EMAIL PROTECTED]
---
 drivers/usb/storage/unusual_devs.h |9 +
 1 files changed, 9 insertions(+), 0 deletions(-)

diff --git a/drivers/usb/storage/unusual_devs.h 
b/drivers/usb/storage/unusual_devs.h
index db8b260..7640bdd 100644
--- a/drivers/usb/storage/unusual_devs.h
+++ b/drivers/usb/storage/unusual_devs.h
@@ -1328,6 +1328,15 @@ UNUSUAL_DEV(  0x1210, 0x0003, 0x0100, 0x0100,
US_SC_DEVICE, US_PR_DEVICE, NULL,
US_FL_IGNORE_RESIDUE ),
 
+/* This prevents the kernel from detecting the virtual cd-drive with the
+ * Windows drivers.  [EMAIL PROTECTED]
+*/
+UNUSUAL_DEV( 0x12d1, 0x1003, 0x, 0x,
+   HUAWEI,
+   E220 USB-UMTS Install,
+   US_SC_DEVICE, US_PR_DEVICE, NULL,
+   US_FL_IGNORE_DEVICE),
+
 /* Reported by Vilius Bilinkevicius vilisas AT xxx DOT lt) */
 UNUSUAL_DEV(  0x132b, 0x000b, 0x0001, 0x0001,
Minolta,
-
To unsubscribe from this list: send the line unsubscribe git-commits-head in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


usb-gsm-driver: Added VendorId and ProductId for Huawei E220 USB Modem

2006-12-21 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=ab1958905514da3b6c06d61523ebed142a16cc72
Commit: ab1958905514da3b6c06d61523ebed142a16cc72
Parent: 16c76865df40357027479b6d85f59a07f8d01c8d
Author: Johann Wilhelm [EMAIL PROTECTED]
AuthorDate: Sat Dec 2 07:25:31 2006 +0100
Committer:  Greg Kroah-Hartman [EMAIL PROTECTED]
CommitDate: Wed Dec 20 10:14:25 2006 -0800

usb-gsm-driver: Added VendorId and ProductId for Huawei E220 USB Modem

Added VendorId and ProductId for Huawei E220 USB Modem

Signed-off-by: Johann Wilhelm [EMAIL PROTECTED]
Signed-off-by: Greg Kroah-Hartman [EMAIL PROTECTED]
---
 drivers/usb/serial/option.c |3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/drivers/usb/serial/option.c b/drivers/usb/serial/option.c
index 0ae4098..819266b 100644
--- a/drivers/usb/serial/option.c
+++ b/drivers/usb/serial/option.c
@@ -79,6 +79,7 @@ static int  option_send_setup(struct usb_serial_port *port);
 #define OPTION_PRODUCT_COBRA0x6500
 #define OPTION_PRODUCT_COBRA2   0x6600
 #define HUAWEI_PRODUCT_E600 0x1001
+#define HUAWEI_PRODUCT_E220 0x1003
 #define AUDIOVOX_PRODUCT_AIRCARD0x0112
 #define NOVATELWIRELESS_PRODUCT_U7400x1400
 #define ANYDATA_PRODUCT_ID  0x6501
@@ -90,6 +91,7 @@ static struct usb_device_id option_ids[] = {
{ USB_DEVICE(OPTION_VENDOR_ID, OPTION_PRODUCT_COBRA) },
{ USB_DEVICE(OPTION_VENDOR_ID, OPTION_PRODUCT_COBRA2) },
{ USB_DEVICE(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E600) },
+   { USB_DEVICE(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E220) },
{ USB_DEVICE(AUDIOVOX_VENDOR_ID, AUDIOVOX_PRODUCT_AIRCARD) },
{ USB_DEVICE(NOVATELWIRELESS_VENDOR_ID,NOVATELWIRELESS_PRODUCT_U740) },
{ USB_DEVICE(ANYDATA_VENDOR_ID, ANYDATA_PRODUCT_ID) },
@@ -103,6 +105,7 @@ static struct usb_device_id option_ids1[] = {
{ USB_DEVICE(OPTION_VENDOR_ID, OPTION_PRODUCT_COBRA) },
{ USB_DEVICE(OPTION_VENDOR_ID, OPTION_PRODUCT_COBRA2) },
{ USB_DEVICE(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E600) },
+   { USB_DEVICE(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E220) },
{ USB_DEVICE(AUDIOVOX_VENDOR_ID, AUDIOVOX_PRODUCT_AIRCARD) },
{ USB_DEVICE(NOVATELWIRELESS_VENDOR_ID,NOVATELWIRELESS_PRODUCT_U740) },
{ USB_DEVICE(ANYDATA_VENDOR_ID, ANYDATA_PRODUCT_ID) },
-
To unsubscribe from this list: send the line unsubscribe git-commits-head in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


USB: fix Wacom Intuos3 4x6 bugs

2006-12-21 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=071e0a2aee9c289f50b9329d0c26474ca94f7c7a
Commit: 071e0a2aee9c289f50b9329d0c26474ca94f7c7a
Parent: ab1958905514da3b6c06d61523ebed142a16cc72
Author: Ping Cheng [EMAIL PROTECTED]
AuthorDate: Tue Dec 5 17:09:51 2006 -0800
Committer:  Greg Kroah-Hartman [EMAIL PROTECTED]
CommitDate: Wed Dec 20 10:14:26 2006 -0800

USB: fix Wacom Intuos3 4x6 bugs

Fixes Intuos3 4x6 bugs

Signed-off-by: Ping Cheng [EMAIL PROTECTED]
Signed-off-by: Greg Kroah-Hartman [EMAIL PROTECTED]
---
 drivers/usb/input/wacom_sys.c |4 ++--
 drivers/usb/input/wacom_wac.c |   26 ++
 2 files changed, 16 insertions(+), 14 deletions(-)

diff --git a/drivers/usb/input/wacom_sys.c b/drivers/usb/input/wacom_sys.c
index e7cc20a..12b4274 100644
--- a/drivers/usb/input/wacom_sys.c
+++ b/drivers/usb/input/wacom_sys.c
@@ -159,13 +159,13 @@ void input_dev_i3s(struct input_dev *input_dev, struct 
wacom_wac *wacom_wac)
 {
input_dev-keybit[LONG(BTN_DIGI)] |= BIT(BTN_TOOL_FINGER);
input_dev-keybit[LONG(BTN_LEFT)] |= BIT(BTN_0) | BIT(BTN_1) | 
BIT(BTN_2) | BIT(BTN_3);
-   input_set_abs_params(input_dev, ABS_RX, 0, 4097, 0, 0);
+   input_set_abs_params(input_dev, ABS_RX, 0, 4096, 0, 0);
 }
 
 void input_dev_i3(struct input_dev *input_dev, struct wacom_wac *wacom_wac)
 {
input_dev-keybit[LONG(BTN_LEFT)] |= BIT(BTN_4) | BIT(BTN_5) | 
BIT(BTN_6) | BIT(BTN_7);
-   input_set_abs_params(input_dev, ABS_RY, 0, 4097, 0, 0);
+   input_set_abs_params(input_dev, ABS_RY, 0, 4096, 0, 0);
 }
 
 void input_dev_i(struct input_dev *input_dev, struct wacom_wac *wacom_wac)
diff --git a/drivers/usb/input/wacom_wac.c b/drivers/usb/input/wacom_wac.c
index 92726fe..4142e36 100644
--- a/drivers/usb/input/wacom_wac.c
+++ b/drivers/usb/input/wacom_wac.c
@@ -209,13 +209,15 @@ static int wacom_graphire_irq(struct wacom_wac *wacom, 
void *wcombo)
wacom_report_key(wcombo, BTN_STYLUS, data[1]  0x02);
wacom_report_key(wcombo, BTN_STYLUS2, data[1]  0x04);
}
-   }
-
-   if (data[1]  0x10)
wacom_report_abs(wcombo, ABS_MISC, id); /* report tool id */
+   }
else
wacom_report_abs(wcombo, ABS_MISC, 0); /* reset tool id */
-   wacom_report_key(wcombo, wacom-tool[0], data[1]  0x10);
+
+   if (data[1]  0x10)  /* only report prox-in when in area */
+   wacom_report_key(wcombo, wacom-tool[0], 1);
+   if (!(data[1]  0x90))  /* report prox-out when physically out */
+   wacom_report_key(wcombo, wacom-tool[0], 0);
wacom_input_sync(wcombo);
 
/* send pad data */
@@ -405,7 +407,7 @@ static int wacom_intuos_irq(struct wacom_wac *wacom, void 
*wcombo)
if ((wacom-features-type == CINTIQ)  !(data[1]  0x40))
  return 0;
 
-   if (wacom-features-type = INTUOS3) {
+   if (wacom-features-type = INTUOS3S) {
wacom_report_abs(wcombo, ABS_X, (data[2]  9) | (data[3]  1) 
| ((data[9]  1)  1));
wacom_report_abs(wcombo, ABS_Y, (data[4]  9) | (data[5]  1) 
| (data[9]  1));
wacom_report_abs(wcombo, ABS_DISTANCE, ((data[9]  2)  0x3f));
@@ -423,7 +425,7 @@ static int wacom_intuos_irq(struct wacom_wac *wacom, void 
*wcombo)
 
if (data[1]  0x02) {
/* Rotation packet */
-   if (wacom-features-type = INTUOS3) {
+   if (wacom-features-type = INTUOS3S) {
/* I3 marker pen rotation reported as wheel
 * due to valuator limitation
 */
@@ -547,11 +549,11 @@ static struct wacom_features wacom_features[] = {
{ Wacom Graphire3 6x8, 8,  16704, 12064,  511, 63, GRAPHIRE },
{ Wacom Graphire4 4x5, 8,  10208,  7424,  511, 63, WACOM_G4 },
{ Wacom Graphire4 6x8, 8,  16704, 12064,  511, 63, WACOM_G4 },
-   { Wacom Volito,8,   5104,  3712,  511,  0, GRAPHIRE },
-   { Wacom PenStation2,   8,   3250,  2320,  255,  0, GRAPHIRE },
-   { Wacom Volito2 4x5,   8,   5104,  3712,  511,  0, GRAPHIRE },
-   { Wacom Volito2 2x3,   8,   3248,  2320,  511,  0, GRAPHIRE },
-   { Wacom PenPartner2,   8,   3250,  2320,  255,  0, GRAPHIRE },
+   { Wacom Volito,8,   5104,  3712,  511, 63, GRAPHIRE },
+   { Wacom PenStation2,   8,   3250,  2320,  255, 63, GRAPHIRE },
+   { Wacom Volito2 4x5,   8,   5104,  3712,  511, 63, GRAPHIRE },
+   { Wacom Volito2 2x3,   8,   3248,  2320,  511, 63, GRAPHIRE },
+   { Wacom PenPartner2,   8,   3250,  2320,  255, 63, GRAPHIRE },
{ Wacom Intuos 4x5,   10,  12700, 10600, 1023, 63, INTUOS },
{ Wacom Intuos 6x8,   10,  20320, 16240, 1023, 63, INTUOS },
{ Wacom Intuos 9x12,  10,  30480, 24060, 1023, 63, INTUOS },
@@ -580,7 +582,7 @@ 

USB AUERSWALD: replace kmalloc+memset with kzalloc

2006-12-21 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=66eb2e93b99b79bd3d55ecea2098a8369c1ded0d
Commit: 66eb2e93b99b79bd3d55ecea2098a8369c1ded0d
Parent: 071e0a2aee9c289f50b9329d0c26474ca94f7c7a
Author: Burman Yan [EMAIL PROTECTED]
AuthorDate: Mon Dec 4 15:22:40 2006 -0800
Committer:  Greg Kroah-Hartman [EMAIL PROTECTED]
CommitDate: Wed Dec 20 10:14:26 2006 -0800

USB AUERSWALD: replace kmalloc+memset with kzalloc

Signed-off-by: Andrew Morton [EMAIL PROTECTED]
Signed-off-by: Greg Kroah-Hartman [EMAIL PROTECTED]
---
 drivers/usb/misc/auerswald.c |6 ++
 1 files changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/usb/misc/auerswald.c b/drivers/usb/misc/auerswald.c
index 6c7f3ef..b5332e6 100644
--- a/drivers/usb/misc/auerswald.c
+++ b/drivers/usb/misc/auerswald.c
@@ -1376,7 +1376,7 @@ static int auerchar_open (struct inode *inode, struct 
file *file)
}
 
/* we have access to the device. Now lets allocate memory */
-   ccp = (pauerchar_t) kmalloc(sizeof(auerchar_t), GFP_KERNEL);
+   ccp = kzalloc(sizeof(auerchar_t), GFP_KERNEL);
if (ccp == NULL) {
err (out of memory);
ret = -ENOMEM;
@@ -1384,7 +1384,6 @@ static int auerchar_open (struct inode *inode, struct 
file *file)
}
 
/* Initialize device descriptor */
-   memset( ccp, 0, sizeof(auerchar_t));
init_MUTEX( ccp-mutex);
init_MUTEX( ccp-readmutex);
 auerbuf_init (ccp-bufctl);
@@ -1912,14 +1911,13 @@ static int auerswald_probe (struct usb_interface *intf,
return -ENODEV;
 
/* allocate memory for our device and initialize it */
-   cp = kmalloc (sizeof(auerswald_t), GFP_KERNEL);
+   cp = kzalloc (sizeof(auerswald_t), GFP_KERNEL);
if (cp == NULL) {
err (out of memory);
goto pfail;
}
 
/* Initialize device descriptor */
-   memset (cp, 0, sizeof(auerswald_t));
init_MUTEX (cp-mutex);
cp-usbdev = usbdev;
auerchain_init (cp-controlchain);
-
To unsubscribe from this list: send the line unsubscribe git-commits-head in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


UHCI: module parameter to ignore overcurrent changes

2006-12-21 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=5f8364b7d63acdc2216ca0f7d0a8557c318479ea
Commit: 5f8364b7d63acdc2216ca0f7d0a8557c318479ea
Parent: fe1ec341df1b510e5e614ccdad4a89273d6f6fe8
Author: Alan Stern [EMAIL PROTECTED]
AuthorDate: Tue Dec 5 16:29:55 2006 -0500
Committer:  Greg Kroah-Hartman [EMAIL PROTECTED]
CommitDate: Wed Dec 20 10:14:26 2006 -0800

UHCI: module parameter to ignore overcurrent changes

Certain boards seem to like to issue false overcurrent notifications,
for example on ports that don't have anything connected to them.  This
looks like a hardware error, at the level of noise to those ports'
overcurrent input signals (or non-debounced VBUS comparators).  This
surfaces to users as truly massive amounts of syslog spam from khubd
(which is appropriate for real hardware problems, except for the
volume from multiple ports).

Using this new ignore_oc flag helps such systems work more sanely,
by preventing such indications from getting to khubd (and spamming
syslog).  The downside is of course that true overcurrent errors will
be masked; they'll appear as spontaneous disconnects, without the
diagnostics that will let users troubleshoot issues like
short-circuited cables.  In addition, controllers with no devices
attached will be forced to poll for new devices rather than relying on
interrupts, since each overcurrent event would generate a new
interrupt.

This patch (as826) is essentially a copy of David Brownell's ignore_oc
patch for ehci-hcd, ported to uhci-hcd.

Signed-off-by: Alan Stern [EMAIL PROTECTED]
Signed-off-by: Greg Kroah-Hartman [EMAIL PROTECTED]
---
 Documentation/kernel-parameters.txt |8 
 drivers/usb/host/uhci-hcd.c |   13 -
 drivers/usb/host/uhci-hub.c |   14 --
 3 files changed, 32 insertions(+), 3 deletions(-)

diff --git a/Documentation/kernel-parameters.txt 
b/Documentation/kernel-parameters.txt
index ef69c75..25d2985 100644
--- a/Documentation/kernel-parameters.txt
+++ b/Documentation/kernel-parameters.txt
@@ -1714,6 +1714,14 @@ and is between 256 and 4096 characters. It is defined in 
the file
uart6850=   [HW,OSS]
Format: io,irq
 
+   uhci-hcd.ignore_oc=
+   [USB] Ignore overcurrent events (default N).
+   Some badly-designed motherboards generate lots of
+   bogus events, for ports that aren't wired to
+   anything.  Set this parameter to avoid log spamming.
+   Note that genuine overcurrent events won't be
+   reported either.
+
usbhid.mousepoll=
[USBHID] The interval which mice are to be polled at.
 
diff --git a/drivers/usb/host/uhci-hcd.c b/drivers/usb/host/uhci-hcd.c
index e87692c..acd101c 100644
--- a/drivers/usb/host/uhci-hcd.c
+++ b/drivers/usb/host/uhci-hcd.c
@@ -60,6 +60,11 @@ Randy Dunlap, Georg Acher, Deti Fliegl, Thomas Sailer, Roman 
Weissgaerber, \
 Alan Stern
 #define DRIVER_DESC USB Universal Host Controller Interface driver
 
+/* for flakey hardware, ignore overcurrent indicators */
+static int ignore_oc;
+module_param(ignore_oc, bool, S_IRUGO);
+MODULE_PARM_DESC(ignore_oc, ignore hardware overcurrent indications);
+
 /*
  * debug = 0, no debugging messages
  * debug = 1, dump failed URBs except for stalls
@@ -169,6 +174,11 @@ static int resume_detect_interrupts_are_broken(struct 
uhci_hcd *uhci)
 {
int port;
 
+   /* If we have to ignore overcurrent events then almost by definition
+* we can't depend on resume-detect interrupts. */
+   if (ignore_oc)
+   return 1;
+
switch (to_pci_dev(uhci_dev(uhci))-vendor) {
default:
break;
@@ -921,7 +931,8 @@ static int __init uhci_hcd_init(void)
 {
int retval = -ENOMEM;
 
-   printk(KERN_INFO DRIVER_DESC   DRIVER_VERSION \n);
+   printk(KERN_INFO DRIVER_DESC   DRIVER_VERSION %s\n,
+   ignore_oc ? , overcurrent ignored : );
 
if (usb_disabled())
return -ENODEV;
diff --git a/drivers/usb/host/uhci-hub.c b/drivers/usb/host/uhci-hub.c
index f8347f1..bacc25c 100644
--- a/drivers/usb/host/uhci-hub.c
+++ b/drivers/usb/host/uhci-hub.c
@@ -52,10 +52,20 @@ static int any_ports_active(struct uhci_hcd *uhci)
 static inline int get_hub_status_data(struct uhci_hcd *uhci, char *buf)
 {
int port;
+   int mask = RWC_BITS;
+
+   /* Some boards (both VIA and Intel apparently) report bogus
+* overcurrent indications, causing massive log spam unless
+* we completely ignore them.  This doesn't seem to be a problem
+* with the chipset so much as with the way it is connected on
+* the motherboard; if the overcurrent input is left to float
+* then it may 

USB: gadget driver unbind() is optional; section fixes; misc

2006-12-21 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=6bea476cf628eb7bb18a036ac6a8fed1ad319951
Commit: 6bea476cf628eb7bb18a036ac6a8fed1ad319951
Parent: 5f8364b7d63acdc2216ca0f7d0a8557c318479ea
Author: David Brownell [EMAIL PROTECTED]
AuthorDate: Tue Dec 5 03:15:33 2006 -0800
Committer:  Greg Kroah-Hartman [EMAIL PROTECTED]
CommitDate: Wed Dec 20 10:14:26 2006 -0800

USB: gadget driver unbind() is optional; section fixes; misc

Allow gadget drivers to omit the unbind() method.  When they're
statically linked, that's an appropriate memory saving tweak.

Similarly, provide consistent/simpler handling for a should-not-happen
error case:  removing a peripheral controller driver when a gadget
driver is still loaded.  Such code dates back to early versions of the
first implementation of the gadget API, and has never been triggered.

Includes relevant section annotation fixs for gmidi.c, file_storage.c,
and serial.c; we don't yet have an init or exit annotation.  Also
some whitespace fixes in gmidi.c (space at EOL, before tabs, etc).

Signed-off-by: David Brownell [EMAIL PROTECTED]
Signed-off-by: Greg Kroah-Hartman [EMAIL PROTECTED]
---
 drivers/usb/gadget/at91_udc.c |9 -
 drivers/usb/gadget/dummy_hcd.c|7 ---
 drivers/usb/gadget/file_storage.c |2 +-
 drivers/usb/gadget/gmidi.c|   12 ++--
 drivers/usb/gadget/goku_udc.c |   12 +++-
 drivers/usb/gadget/lh7a40x_udc.c  |   13 -
 drivers/usb/gadget/net2280.c  |   11 ++-
 drivers/usb/gadget/omap_udc.c |   13 -
 drivers/usb/gadget/pxa2xx_udc.c   |7 ---
 drivers/usb/gadget/serial.c   |2 +-
 10 files changed, 41 insertions(+), 47 deletions(-)

diff --git a/drivers/usb/gadget/at91_udc.c b/drivers/usb/gadget/at91_udc.c
index 3e0abbb..8165633 100644
--- a/drivers/usb/gadget/at91_udc.c
+++ b/drivers/usb/gadget/at91_udc.c
@@ -1574,7 +1574,6 @@ int usb_gadget_register_driver (struct usb_gadget_driver 
*driver)
if (!driver
|| driver-speed != USB_SPEED_FULL
|| !driver-bind
-   || !driver-unbind
|| !driver-setup) {
DBG(bad parameter.\n);
return -EINVAL;
@@ -1611,7 +1610,7 @@ int usb_gadget_unregister_driver (struct 
usb_gadget_driver *driver)
 {
struct at91_udc *udc = controller;
 
-   if (!driver || driver != udc-driver)
+   if (!driver || driver != udc-driver || !driver-unbind)
return -EINVAL;
 
local_irq_disable();
@@ -1731,10 +1730,10 @@ static int __devexit at91udc_remove(struct 
platform_device *pdev)
 
DBG(remove\n);
 
-   pullup(udc, 0);
+   if (udc-driver)
+   return -EBUSY;
 
-   if (udc-driver != 0)
-   usb_gadget_unregister_driver(udc-driver);
+   pullup(udc, 0);
 
device_init_wakeup(pdev-dev, 0);
remove_debug_file(udc);
diff --git a/drivers/usb/gadget/dummy_hcd.c b/drivers/usb/gadget/dummy_hcd.c
index f1f32d7..3c2bc07 100644
--- a/drivers/usb/gadget/dummy_hcd.c
+++ b/drivers/usb/gadget/dummy_hcd.c
@@ -779,7 +779,7 @@ usb_gadget_register_driver (struct usb_gadget_driver 
*driver)
return -EINVAL;
if (dum-driver)
return -EBUSY;
-   if (!driver-bind || !driver-unbind || !driver-setup
+   if (!driver-bind || !driver-setup
|| driver-speed == USB_SPEED_UNKNOWN)
return -EINVAL;
 
@@ -837,7 +837,8 @@ usb_gadget_register_driver (struct usb_gadget_driver 
*driver)
 err_bind_driver:
driver_unregister (driver-driver);
 err_register:
-   driver-unbind (dum-gadget);
+   if (driver-unbind)
+   driver-unbind (dum-gadget);
spin_lock_irq (dum-lock);
dum-pullup = 0;
set_link_state (dum);
@@ -857,7 +858,7 @@ usb_gadget_unregister_driver (struct usb_gadget_driver 
*driver)
 
if (!dum)
return -ENODEV;
-   if (!driver || driver != dum-driver)
+   if (!driver || driver != dum-driver || !driver-unbind)
return -EINVAL;
 
dev_dbg (udc_dev(dum), unregister gadget driver '%s'\n,
diff --git a/drivers/usb/gadget/file_storage.c 
b/drivers/usb/gadget/file_storage.c
index a265e26..72f2ae9 100644
--- a/drivers/usb/gadget/file_storage.c
+++ b/drivers/usb/gadget/file_storage.c
@@ -4100,7 +4100,7 @@ static struct usb_gadget_driver   fsg_driver = {
 #endif
.function   = (char *) longname,
.bind   = fsg_bind,
-   .unbind = __exit_p(fsg_unbind),
+   .unbind = fsg_unbind,
.disconnect = fsg_disconnect,
.setup  = fsg_setup,
.suspend= fsg_suspend,
diff --git a/drivers/usb/gadget/gmidi.c b/drivers/usb/gadget/gmidi.c
index 3135182..f1a6796 100644
--- 

USB: ohci at91 warning fix

2006-12-21 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=ee269d98a9248fbb729c20ffda0f1b97e82c5c37
Commit: ee269d98a9248fbb729c20ffda0f1b97e82c5c37
Parent: dd9048af41d017f5f9ea18fb451a3b5dc89d6b83
Author: Andrew Victor [EMAIL PROTECTED]
AuthorDate: Tue Dec 5 03:20:31 2006 -0800
Committer:  Greg Kroah-Hartman [EMAIL PROTECTED]
CommitDate: Wed Dec 20 10:14:27 2006 -0800

USB: ohci at91 warning fix

Remove a warning about an unused variable in the OHCI bus glue for at91.

Signed-off-by: Andrew Victor [EMAIL PROTECTED]
Signed-off-by: David Brownell [EMAIL PROTECTED]
Signed-off-by: Greg Kroah-Hartman [EMAIL PROTECTED]
---
 drivers/usb/host/ohci-at91.c |1 -
 1 files changed, 0 insertions(+), 1 deletions(-)

diff --git a/drivers/usb/host/ohci-at91.c b/drivers/usb/host/ohci-at91.c
index f15c84e..cc40551 100644
--- a/drivers/usb/host/ohci-at91.c
+++ b/drivers/usb/host/ohci-at91.c
@@ -187,7 +187,6 @@ ohci_at91_start (struct usb_hcd *hcd)
 {
struct at91_usbh_data   *board = hcd-self.controller-platform_data;
struct ohci_hcd *ohci = hcd_to_ohci (hcd);
-   struct usb_device   *root = hcd-self.root_hub;
int ret;
 
if ((ret = ohci_init(ohci))  0)
-
To unsubscribe from this list: send the line unsubscribe git-commits-head in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


USB: ohci handles hardware faults during root port resets

2006-12-21 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=23d10a9e376d6a9cd4afd4e27e5e403864f6729b
Commit: 23d10a9e376d6a9cd4afd4e27e5e403864f6729b
Parent: ee269d98a9248fbb729c20ffda0f1b97e82c5c37
Author: Takamasa Ohtake [EMAIL PROTECTED]
AuthorDate: Wed Dec 6 17:04:15 2006 -0800
Committer:  Greg Kroah-Hartman [EMAIL PROTECTED]
CommitDate: Wed Dec 20 10:14:27 2006 -0800

USB: ohci handles hardware faults during root port resets

I have found a problem where the root_port_reset() goes into an infinite
loop and stalls the kernel.

This happens when a hardware fault inside the machine occurs during a small
timing window.  In case of USB device connection, if a USB device responds 
to
hcd_submit_urb(), and later the controller fails before root_port_reset(),
root_port_reset() will loop infinitely because ohci_readl() will always
return -1.  Such a failure can include ejecting a CardBus OHCI controller.

The probability of this problem is low, but it will increase if PnP type
usage is frequent.  The attached patch can solve this problem and I believe
that it is better to fix this problem.

Signed-off-by: Takamasa Ohtake [EMAIL PROTECTED]
Signed-off-by: David Brownell [EMAIL PROTECTED]
Signed-off-by: Greg Kroah-Hartman [EMAIL PROTECTED]
---
 drivers/usb/host/ohci-hub.c |9 +++--
 1 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/drivers/usb/host/ohci-hub.c b/drivers/usb/host/ohci-hub.c
index f9748b6..216c9c9 100644
--- a/drivers/usb/host/ohci-hub.c
+++ b/drivers/usb/host/ohci-hub.c
@@ -555,7 +555,7 @@ static void start_hnp(struct ohci_hcd *ohci);
 #define tick_before(t1,t2) ((s16)(((s16)(t1))-((s16)(t2)))  0)
 
 /* called from some task, normally khubd */
-static inline void root_port_reset (struct ohci_hcd *ohci, unsigned port)
+static inline int root_port_reset (struct ohci_hcd *ohci, unsigned port)
 {
__hc32 __iomem *portstat = ohci-regs-roothub.portstatus [port];
u32 temp;
@@ -570,6 +570,9 @@ static inline void root_port_reset (struct ohci_hcd *ohci, 
unsigned port)
/* spin until any current reset finishes */
for (;;) {
temp = ohci_readl (ohci, portstat);
+   /* handle e.g. CardBus eject */
+   if (temp == ~(u32)0)
+   return -ESHUTDOWN;
if (!(temp  RH_PS_PRS))
break;
udelay (500);
@@ -586,6 +589,8 @@ static inline void root_port_reset (struct ohci_hcd *ohci, 
unsigned port)
now = ohci_readl(ohci, ohci-regs-fmnumber);
} while (tick_before(now, reset_done));
/* caller synchronizes using PRSC */
+
+   return 0;
 }
 
 static int ohci_hub_control (
@@ -702,7 +707,7 @@ static int ohci_hub_control (
ohci-regs-roothub.portstatus [wIndex]);
break;
case USB_PORT_FEAT_RESET:
-   root_port_reset (ohci, wIndex);
+   retval = root_port_reset (ohci, wIndex);
break;
default:
goto error;
-
To unsubscribe from this list: send the line unsubscribe git-commits-head in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


USB: OHCI support for PNX8550

2006-12-21 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=5151d04068e37e710d2cc3962351ca0979fc5ad1
Commit: 5151d04068e37e710d2cc3962351ca0979fc5ad1
Parent: 23d10a9e376d6a9cd4afd4e27e5e403864f6729b
Author: Vitaly Wool [EMAIL PROTECTED]
AuthorDate: Mon Oct 9 01:32:00 2006 -0700
Committer:  Greg Kroah-Hartman [EMAIL PROTECTED]
CommitDate: Wed Dec 20 10:14:27 2006 -0800

USB: OHCI support for PNX8550

OHCI HCD (Host Controller Driver) for USB. Bus Glue for PNX8550.

Signed-off-by: Vitaly Wool [EMAIL PROTECTED]
Signed-off-by: David Brownell [EMAIL PROTECTED]
Signed-off-by: Greg Kroah-Hartman [EMAIL PROTECTED]
---
 drivers/usb/host/ohci-hcd.c |4 +
 drivers/usb/host/ohci-pnx8550.c |  258 +++
 2 files changed, 262 insertions(+), 0 deletions(-)

diff --git a/drivers/usb/host/ohci-hcd.c b/drivers/usb/host/ohci-hcd.c
index c31f00b..c1c1d87 100644
--- a/drivers/usb/host/ohci-hcd.c
+++ b/drivers/usb/host/ohci-hcd.c
@@ -885,6 +885,10 @@ MODULE_LICENSE (GPL);
 #include ohci-au1xxx.c
 #endif
 
+#ifdef CONFIG_PNX8550
+#include ohci-pnx8550.c
+#endif
+
 #ifdef CONFIG_USB_OHCI_HCD_PPC_SOC
 #include ohci-ppc-soc.c
 #endif
diff --git a/drivers/usb/host/ohci-pnx8550.c b/drivers/usb/host/ohci-pnx8550.c
new file mode 100644
index 000..6922b91
--- /dev/null
+++ b/drivers/usb/host/ohci-pnx8550.c
@@ -0,0 +1,258 @@
+/*
+ * OHCI HCD (Host Controller Driver) for USB.
+ *
+ * (C) Copyright 1999 Roman Weissgaerber [EMAIL PROTECTED]
+ * (C) Copyright 2000-2002 David Brownell [EMAIL PROTECTED]
+ * (C) Copyright 2002 Hewlett-Packard Company
+ * (C) Copyright 2005 Embedded Alley Solutions, Inc.
+ *
+ * Bus Glue for PNX8550
+ *
+ * Written by Christopher Hoover [EMAIL PROTECTED]
+ * Based on fragments of previous driver by Russell King et al.
+ *
+ * Modified for LH7A404 from ohci-sa.c
+ *  by Durgesh Pattamatta [EMAIL PROTECTED]
+ *
+ * Modified for PNX8550 from ohci-sa.c and sa-omap.c
+ *  by Vitaly Wool [EMAIL PROTECTED]
+ *
+ * This file is licenced under the GPL.
+ */
+
+#include linux/device.h
+#include linux/platform_device.h
+#include asm/mach-pnx8550/usb.h
+#include asm/mach-pnx8550/int.h
+#include asm/mach-pnx8550/pci.h
+
+#ifndef CONFIG_PNX8550
+#error This file is PNX8550 bus glue.  CONFIG_PNX8550 must be defined.
+#endif
+
+extern int usb_disabled(void);
+
+/*-*/
+
+static void pnx8550_start_hc(struct platform_device *dev)
+{
+   /*
+* Set register CLK48CTL to enable and 48MHz
+*/
+   outl(0x0003, PCI_BASE | 0x0004770c);
+
+   /*
+* Set register CLK12CTL to enable and 48MHz
+*/
+   outl(0x0003, PCI_BASE | 0x00047710);
+
+   udelay(100);
+}
+
+static void pnx8550_stop_hc(struct platform_device *dev)
+{
+   udelay(10);
+}
+
+
+/*-*/
+
+/* configure so an HC device and id are always provided */
+/* always called with process context; sleeping is OK */
+
+
+/**
+ * usb_hcd_pnx8550_probe - initialize pnx8550-based HCDs
+ * Context: !in_interrupt()
+ *
+ * Allocates basic resources for this USB host controller, and
+ * then invokes the start() method for the HCD associated with it
+ * through the hotplug entry's driver_data.
+ *
+ */
+int usb_hcd_pnx8550_probe (const struct hc_driver *driver,
+ struct platform_device *dev)
+{
+   int retval;
+   struct usb_hcd *hcd;
+
+   if (dev-resource[0].flags != IORESOURCE_MEM ||
+   dev-resource[1].flags != IORESOURCE_IRQ) {
+   dev_err (dev-dev,invalid resource type\n);
+   return -ENOMEM;
+   }
+
+   hcd = usb_create_hcd (driver, dev-dev, pnx8550);
+   if (!hcd)
+   return -ENOMEM;
+   hcd-rsrc_start = dev-resource[0].start;
+   hcd-rsrc_len = dev-resource[0].end - dev-resource[0].start + 1;
+
+   if (!request_mem_region(hcd-rsrc_start, hcd-rsrc_len, hcd_name)) {
+   dev_err(dev-dev, request_mem_region [0x%08llx, 0x%08llx] 
+   failed\n, hcd-rsrc_start, hcd-rsrc_len);
+   retval = -EBUSY;
+   goto err1;
+   }
+
+   hcd-regs = ioremap(hcd-rsrc_start, hcd-rsrc_len);
+   if (!hcd-regs) {
+   dev_err(dev-dev, ioremap [[0x%08llx, 0x%08llx] failed\n,
+   hcd-rsrc_start, hcd-rsrc_len);
+   retval = -ENOMEM;
+   goto err2;
+   }
+
+   pnx8550_start_hc(dev);
+
+   ohci_hcd_init(hcd_to_ohci(hcd));
+
+   retval = usb_add_hcd(hcd, dev-resource[1].start, SA_INTERRUPT);
+   if (retval == 0)
+   return retval;
+
+   pnx8550_stop_hc(dev);
+   iounmap(hcd-regs);
+ err2:
+   release_mem_region(hcd-rsrc_start, hcd-rsrc_len);
+ err1:
+   usb_put_hcd(hcd);
+   return retval;
+}
+

USB: at91 udc, support at91sam926x addresses

2006-12-21 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=ffd3326bf6282b9f606e92ae57e8f47f2e10e6b5
Commit: ffd3326bf6282b9f606e92ae57e8f47f2e10e6b5
Parent: 5151d04068e37e710d2cc3962351ca0979fc5ad1
Author: Andrew Victor [EMAIL PROTECTED]
AuthorDate: Thu Dec 7 22:44:33 2006 -0800
Committer:  Greg Kroah-Hartman [EMAIL PROTECTED]
CommitDate: Wed Dec 20 10:14:27 2006 -0800

USB: at91 udc, support at91sam926x addresses

This is an update to the AT91 USB Device (Gadget) driver.

The base I/O address provided in the platform_device resources is now
ioremap()'ed instead of using a statically mapped memory area.  This
helps portability to the newer AT91sam926x processors.

The major change is that we now have to pass a 'struct at91_udc'
parameter to at91_udp_read() and at91_udp_write().

Signed-off-by: Andrew Victor [EMAIL PROTECTED]
Signed-off-by: David Brownell [EMAIL PROTECTED]
Signed-off-by: Greg Kroah-Hartman [EMAIL PROTECTED]
---
 drivers/usb/gadget/at91_udc.c |  169 -
 drivers/usb/gadget/at91_udc.h |1 +
 2 files changed, 84 insertions(+), 86 deletions(-)

diff --git a/drivers/usb/gadget/at91_udc.c b/drivers/usb/gadget/at91_udc.c
index 8165633..b53b937 100644
--- a/drivers/usb/gadget/at91_udc.c
+++ b/drivers/usb/gadget/at91_udc.c
@@ -43,12 +43,12 @@
 #include linux/usb_gadget.h
 
 #include asm/byteorder.h
+#include asm/hardware.h
 #include asm/io.h
 #include asm/irq.h
 #include asm/system.h
 #include asm/mach-types.h
 
-#include asm/arch/hardware.h
 #include asm/arch/gpio.h
 #include asm/arch/board.h
 
@@ -78,27 +78,11 @@
 static const char driver_name [] = at91_udc;
 static const char ep0name[] = ep0;
 
-/*-*/
-
-/*
- * Read from a UDP register.
- */
-static inline unsigned long at91_udp_read(unsigned int reg)
-{
-   void __iomem *udp_base = (void __iomem *)AT91_VA_BASE_UDP;
-
-   return __raw_readl(udp_base + reg);
-}
-
-/*
- * Write to a UDP register.
- */
-static inline void at91_udp_write(unsigned int reg, unsigned long value)
-{
-   void __iomem *udp_base = (void __iomem *)AT91_VA_BASE_UDP;
 
-   __raw_writel(value, udp_base + reg);
-}
+#define at91_udp_read(dev, reg) \
+   __raw_readl((dev)-udp_baseaddr + (reg))
+#define at91_udp_write(dev, reg, val) \
+   __raw_writel((val), (dev)-udp_baseaddr + (reg))
 
 /*-*/
 
@@ -210,13 +194,13 @@ static int proc_udc_show(struct seq_file *s, void *unused)
return 0;
}
 
-   tmp = at91_udp_read(AT91_UDP_FRM_NUM);
+   tmp = at91_udp_read(udc, AT91_UDP_FRM_NUM);
seq_printf(s, frame %05x:%s%s frame=%d\n, tmp,
(tmp  AT91_UDP_FRM_OK) ?  ok : ,
(tmp  AT91_UDP_FRM_ERR) ?  err : ,
(tmp  AT91_UDP_NUM));
 
-   tmp = at91_udp_read(AT91_UDP_GLB_STAT);
+   tmp = at91_udp_read(udc, AT91_UDP_GLB_STAT);
seq_printf(s, glbstate %02x:%s FOURBITS \n, tmp,
(tmp  AT91_UDP_RMWUPE) ?  rmwupe : ,
(tmp  AT91_UDP_RSMINPR) ?  rsminpr : ,
@@ -224,13 +208,13 @@ static int proc_udc_show(struct seq_file *s, void *unused)
(tmp  AT91_UDP_CONFG) ?  confg : ,
(tmp  AT91_UDP_FADDEN) ?  fadden : );
 
-   tmp = at91_udp_read(AT91_UDP_FADDR);
+   tmp = at91_udp_read(udc, AT91_UDP_FADDR);
seq_printf(s, faddr   %03x:%s fadd=%d\n, tmp,
(tmp  AT91_UDP_FEN) ?  fen : ,
(tmp  AT91_UDP_FADD));
 
-   proc_irq_show(s, imr   , at91_udp_read(AT91_UDP_IMR));
-   proc_irq_show(s, isr   , at91_udp_read(AT91_UDP_ISR));
+   proc_irq_show(s, imr   , at91_udp_read(udc, AT91_UDP_IMR));
+   proc_irq_show(s, isr   , at91_udp_read(udc, AT91_UDP_ISR));
 
if (udc-enabled  udc-vbus) {
proc_ep_show(s, udc-ep[0]);
@@ -286,6 +270,7 @@ static inline void remove_debug_file(struct at91_udc *udc) 
{}
 static void done(struct at91_ep *ep, struct at91_request *req, int status)
 {
unsignedstopped = ep-stopped;
+   struct at91_udc *udc = ep-udc;
 
list_del_init(req-queue);
if (req-req.status == -EINPROGRESS)
@@ -301,7 +286,7 @@ static void done(struct at91_ep *ep, struct at91_request 
*req, int status)
 
/* ep0 is always ready; other endpoints need a non-empty queue */
if (list_empty(ep-queue)  ep-int_mask != (1  0))
-   at91_udp_write(AT91_UDP_IDR, ep-int_mask);
+   at91_udp_write(udc, AT91_UDP_IDR, ep-int_mask);
 }
 
 /*-*/
@@ -554,8 +539,8 @@ ok:
 * reset/init endpoint fifo.  NOTE:  leaves fifo_bank alone,
 * since endpoint resets don't reset hw pingpong state.
 */
-   at91_udp_write(AT91_UDP_RST_EP, 

USB: u132-hcd/ftdi-elan: add support for Option GT 3G Quad card

2006-12-21 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=4b87361d49c04894458f4d4e80f9669abc894ae1
Commit: 4b87361d49c04894458f4d4e80f9669abc894ae1
Parent: 29ba4b533b677f3cd7f2fc901d51054555a8f243
Author: Tony Olech [EMAIL PROTECTED]
AuthorDate: Wed Dec 6 13:16:22 2006 +
Committer:  Greg Kroah-Hartman [EMAIL PROTECTED]
CommitDate: Wed Dec 20 10:14:27 2006 -0800

USB: u132-hcd/ftdi-elan: add support for Option GT 3G Quad card

ELAN's U132 is a USB to CardBus OHCI controller adapter,
designed specifically for CardBus 3G data cards to
function in machines without a CardBus slot.
The ftdi-elan module is a USB client driver, that detects
a supported CardBus OHCI controller plugged into the
U132 adapter and thereafter provides the conduit for
for access by the u132-hcd module.
The u132-hcd module is a (cut-down OHCI) host controller
that supports a single OHCI function of the CardBus
card inserted into the U132 adapter.

The problem with the initial implementation is that when
the CardBus card inserted into the U132 adapter has multiple
functions (and a CardBus card can support up to 4 functions),
it was the first function that was arbitrarily choosen.

The first batch of 3G cards tested, like the Merlin Qualcomm
V620, have two functions each supporting a seperate USB OHCI
host controller, of which it was that first function that is
wired up to the 3G modem.

Then along comes the Vodafone Mobile Connect 3G/GPRS data card,
aka Option GT 3G Quad as printed on it's rear or Option N.V.
GlobeTrotter Fusion Quad Lite as read with lspci -v. And it
has the meaningful functionality in the second CardBus function.

That presents a problem because it was the ftdi-elan module
alone that knows how to communicate to the embedded CardBus slot
and the u132-hcd module alone that knows how to access the
pcmcia configuration and CardBus accessible memory space. And
of course, the information about attached (internally hardwired)
devices is contained within USB configuration embedded somewhere
within the CardBus card.

If only the u132-hcd module probe() interface could return a
result code that propagated back to the instigating function
platform_device_register() then the ftdi-elan module could
try an alternative CardBus function. However in spite of
the recent changes to the drivers/base/ routines that moved
device_attach() from bus_add_device() to bus_attach_device()
both of those routines lose the failed to attach 0 result
code and thus the calling routine, namely device_add() is
incapable of propaging the failed to attach condition back
to platform_device_add() and consequently back to the caller
of platform_device_register()

Experiments show that patching bus_attach_device() to return
ENODEV fails with the kernel locking up very early during
boot. But, however, if the patch is restricted to calls from
platform_device_add() then it does seem to work.

Unfortunately, until the kernel's drivers/base is properly
modified to propagate -ENODEV back to the caller of
platform_device_register(), it is necessary to fix the
ftdi-elan module by importing knowledge from the
u132-hcd module. This is the reason for the duplicated
functionality introduced in this patch.

Signed-off-by: Tony Olech [EMAIL PROTECTED]
Signed-off-by: Greg Kroah-Hartman [EMAIL PROTECTED]
---
 drivers/usb/host/u132-hcd.c  |   92 +++-
 drivers/usb/misc/ftdi-elan.c |  592 --
 2 files changed, 425 insertions(+), 259 deletions(-)

diff --git a/drivers/usb/host/u132-hcd.c b/drivers/usb/host/u132-hcd.c
index a9d7119..a7fa0d7 100644
--- a/drivers/usb/host/u132-hcd.c
+++ b/drivers/usb/host/u132-hcd.c
@@ -40,6 +40,7 @@
 #include linux/moduleparam.h
 #include linux/delay.h
 #include linux/ioport.h
+#include linux/pci_ids.h
 #include linux/sched.h
 #include linux/slab.h
 #include linux/smp_lock.h
@@ -210,15 +211,16 @@ struct u132 {
 * these cannot be inlines because we need the structure offset!!
 * Does anyone have a better way?
 */
+#define ftdi_read_pcimem(pdev, member, data) usb_ftdi_elan_read_pcimem(pdev, \
+offsetof(struct ohci_regs, member), 0, data);
+#define ftdi_write_pcimem(pdev, member, data) usb_ftdi_elan_write_pcimem(pdev, 
\
+offsetof(struct ohci_regs, member), 0, data);
 #define u132_read_pcimem(u132, member, data) \
 usb_ftdi_elan_read_pcimem(u132-platform_dev, offsetof(struct \
 ohci_regs, member), 0, data);
 #define u132_write_pcimem(u132, member, data) \
 usb_ftdi_elan_write_pcimem(u132-platform_dev, offsetof(struct \
 ohci_regs, member), 0, data);
-#define u132_write_pcimem_byte(u132, member, data) \
-

USB: at91_udc: allow drivers that support high speed

2006-12-21 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=bc92c32aa21cf2e8808f8cff0be0a2a653652e92
Commit: bc92c32aa21cf2e8808f8cff0be0a2a653652e92
Parent: 4b87361d49c04894458f4d4e80f9669abc894ae1
Author: Wojtek Kaniewski [EMAIL PROTECTED]
AuthorDate: Fri Dec 8 09:39:36 2006 -0800
Committer:  Greg Kroah-Hartman [EMAIL PROTECTED]
CommitDate: Wed Dec 20 10:14:27 2006 -0800

USB: at91_udc: allow drivers that support high speed

This patch allows gadget drivers that support high speed (e.g. gadgetfs)
to work properly with at91_udc.

Fix suggested by Milan Svoboda in
http://marc.theaimsgroup.com/?l=linux-usb-develm=115822184711817

Signed-off-by: Wojtek Kaniewski [EMAIL PROTECTED]
Acked-by: David Brownell [EMAIL PROTECTED]
Cc: Andrew Victor [EMAIL PROTECTED]
Signed-off-by: Greg Kroah-Hartman [EMAIL PROTECTED]
---
 drivers/usb/gadget/at91_udc.c |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/usb/gadget/at91_udc.c b/drivers/usb/gadget/at91_udc.c
index c8954a6..38a2e11 100644
--- a/drivers/usb/gadget/at91_udc.c
+++ b/drivers/usb/gadget/at91_udc.c
@@ -1579,7 +1579,7 @@ int usb_gadget_register_driver (struct usb_gadget_driver 
*driver)
int retval;
 
if (!driver
-   || driver-speed != USB_SPEED_FULL
+   || driver-speed  USB_SPEED_FULL
|| !driver-bind
|| !driver-setup) {
DBG(bad parameter.\n);
-
To unsubscribe from this list: send the line unsubscribe git-commits-head in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


USB: at91_udc: Cleanup variables after failure in usb_gadget_register_driver()

2006-12-21 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=943c441948581bd01ab196a4d32da88bfa0f13ce
Commit: 943c441948581bd01ab196a4d32da88bfa0f13ce
Parent: bc92c32aa21cf2e8808f8cff0be0a2a653652e92
Author: Wojtek Kaniewski [EMAIL PROTECTED]
AuthorDate: Fri Dec 8 03:23:00 2006 -0800
Committer:  Greg Kroah-Hartman [EMAIL PROTECTED]
CommitDate: Wed Dec 20 10:14:27 2006 -0800

USB: at91_udc: Cleanup variables after failure in 
usb_gadget_register_driver()

This patch zeroes some variables when usb_gadget_register_driver()
fails. gadgetfs does a dummy registration to get the name of the USB
driver and then waits for user-land driver. If someone plugs the cable
in the meantime, bad things happen, because at91_udc has been left in
inconsistent state.

Signed-off-by: Wojtek Kaniewski [EMAIL PROTECTED]
Acked-by: David Brownell [EMAIL PROTECTED]
Cc: Andrew Victor [EMAIL PROTECTED]
Signed-off-by: Greg Kroah-Hartman [EMAIL PROTECTED]
---
 drivers/usb/gadget/at91_udc.c |4 
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/drivers/usb/gadget/at91_udc.c b/drivers/usb/gadget/at91_udc.c
index 38a2e11..1926d39 100644
--- a/drivers/usb/gadget/at91_udc.c
+++ b/drivers/usb/gadget/at91_udc.c
@@ -1601,6 +1601,10 @@ int usb_gadget_register_driver (struct usb_gadget_driver 
*driver)
if (retval) {
DBG(driver-bind() returned %d\n, retval);
udc-driver = NULL;
+   udc-gadget.dev.driver = NULL;
+   udc-gadget.dev.driver_data = NULL;
+   udc-enabled = 0;
+   udc-selfpowered = 0;
return retval;
}
 
-
To unsubscribe from this list: send the line unsubscribe git-commits-head in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


USB: fix to usbfs_snoop logging of user defined control urbs

2006-12-21 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=df251b8bfcc5879b947223746779f90018424a6d
Commit: df251b8bfcc5879b947223746779f90018424a6d
Parent: bfb7fb79e913f60330037d1f302efee28d5f6770
Author: Chris Frey [EMAIL PROTECTED]
AuthorDate: Sat Dec 16 02:37:42 2006 -0500
Committer:  Greg Kroah-Hartman [EMAIL PROTECTED]
CommitDate: Wed Dec 20 10:14:28 2006 -0800

USB: fix to usbfs_snoop logging of user defined control urbs

When sending CONTROL URB's using the usual CONTROL ioctl, logging works
fine, but when sending them via SUBMITURB, like VMWare does, the
control fields are not logged.  This patch fixes that.

I didn't see any major changes to devio.c recently, so this patch should 
apply
cleanly to even the latest kernel.  I can resubmit if it doesn't.

From: Chris Frey [EMAIL PROTECTED]
Signed-off-by: Greg Kroah-Hartman [EMAIL PROTECTED]
---
 drivers/usb/core/devio.c |6 +-
 1 files changed, 5 insertions(+), 1 deletions(-)

diff --git a/drivers/usb/core/devio.c b/drivers/usb/core/devio.c
index 3ed4cb2..4b3a6ab 100644
--- a/drivers/usb/core/devio.c
+++ b/drivers/usb/core/devio.c
@@ -962,7 +962,11 @@ static int proc_do_submiturb(struct dev_state *ps, struct 
usbdevfs_urb *uurb,
kfree(dr);
return -EFAULT;
}
-   snoop(ps-dev-dev, control urb\n);
+   snoop(ps-dev-dev, control urb: bRequest=%02x 
+   bRrequestType=%02x wValue=%04x 
+   wIndex=%04x wLength=%04x\n,
+   dr-bRequest, dr-bRequestType, dr-wValue,
+   dr-wIndex, dr-wLength);
break;
 
case USBDEVFS_URB_TYPE_BULK:
-
To unsubscribe from this list: send the line unsubscribe git-commits-head in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH] USB: Nokia E70 is an unusual device

2006-12-21 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=a5176b78974451680bd93b8954230cf1a47dee1b
Commit: a5176b78974451680bd93b8954230cf1a47dee1b
Parent: df251b8bfcc5879b947223746779f90018424a6d
Author: Andrew Morton [EMAIL PROTECTED]
AuthorDate: Tue Dec 19 13:15:23 2006 -0800
Committer:  Greg Kroah-Hartman [EMAIL PROTECTED]
CommitDate: Wed Dec 20 11:29:04 2006 -0800

[PATCH] USB: Nokia E70 is an unusual device

Taken from http://bugzilla.kernel.org/show_bug.cgi?id=7508

When the Nokia E70 Phone is plugged in to the USB port, I get:

end_request: I/O error, dev sda, sector 1824527
sd 0:0:0:0: SCSI error: return code = 0x1007
end_request: I/O error, dev sda, sector 1824535
sd 0:0:0:0: SCSI error: return code = 0x1007

The fix is to add these lines to drivers/usb/storage/unusual_devs.h:

Cc: [EMAIL PROTECTED]
Signed-off-by: Andrew Morton [EMAIL PROTECTED]
Signed-off-by: Greg Kroah-Hartman [EMAIL PROTECTED]
---
 drivers/usb/storage/unusual_devs.h |7 +++
 1 files changed, 7 insertions(+), 0 deletions(-)

diff --git a/drivers/usb/storage/unusual_devs.h 
b/drivers/usb/storage/unusual_devs.h
index 5fe7ff4..f726b87 100644
--- a/drivers/usb/storage/unusual_devs.h
+++ b/drivers/usb/storage/unusual_devs.h
@@ -160,6 +160,13 @@ UNUSUAL_DEV(  0x0421, 0x0433, 0x0100, 0x0100,
US_SC_DEVICE, US_PR_DEVICE, NULL,
US_FL_IGNORE_RESIDUE | US_FL_FIX_CAPACITY ),
 
+/* Reported by [EMAIL PROTECTED] */
+UNUSUAL_DEV(  0x0421, 0x0433, 0x0100, 0x0100,
+   Nokia,
+   E70,
+   US_SC_DEVICE, US_PR_DEVICE, NULL,
+   US_FL_IGNORE_RESIDUE | US_FL_FIX_CAPACITY ),
+
 /* Reported by Jon Hart [EMAIL PROTECTED] */
 UNUSUAL_DEV(  0x0421, 0x0434, 0x0100, 0x0100,
Nokia,
-
To unsubscribe from this list: send the line unsubscribe git-commits-head in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH] usb serial: add support for Novatel S720/U720 CDMA/EV-DO modems

2006-12-21 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=11e82730ccdaf2a6c056d04b03368c5a9e7c1305
Commit: 11e82730ccdaf2a6c056d04b03368c5a9e7c1305
Parent: a5176b78974451680bd93b8954230cf1a47dee1b
Author: Eric Smith [EMAIL PROTECTED]
AuthorDate: Tue Dec 19 13:15:25 2006 -0800
Committer:  Greg Kroah-Hartman [EMAIL PROTECTED]
CommitDate: Wed Dec 20 11:29:18 2006 -0800

[PATCH] usb serial: add support for Novatel S720/U720 CDMA/EV-DO modems

Add USB vendor/device IDs for Novatel Wireless S720 and U720 CDMA/EV-DO
modems to airprime.c.

Signed-off-by: Eric Smith [EMAIL PROTECTED]
Signed-off-by: Andrew Morton [EMAIL PROTECTED]
Signed-off-by: Greg Kroah-Hartman [EMAIL PROTECTED]
---
 drivers/usb/serial/airprime.c |2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/drivers/usb/serial/airprime.c b/drivers/usb/serial/airprime.c
index 62a0df2..f2ca76a 100644
--- a/drivers/usb/serial/airprime.c
+++ b/drivers/usb/serial/airprime.c
@@ -19,6 +19,8 @@
 static struct usb_device_id id_table [] = {
{ USB_DEVICE(0x0c88, 0x17da) }, /* Kyocera Wireless KPC650/Passport */
{ USB_DEVICE(0x1410, 0x1110) }, /* Novatel Wireless Merlin CDMA */
+   { USB_DEVICE(0x1410, 0x1130) }, /* Novatel Wireless S720 CDMA/EV-DO */
+   { USB_DEVICE(0x1410, 0x2110) }, /* Novatel Wireless U720 CDMA/EV-DO */
{ USB_DEVICE(0x1410, 0x1430) }, /* Novatel Merlin XU870 HSDPA/3G */
{ USB_DEVICE(0x1410, 0x1100) }, /* ExpressCard34 Qualcomm 3G CDMA */
{ USB_DEVICE(0x413c, 0x8115) }, /* Dell Wireless HSDPA 5500 */
-
To unsubscribe from this list: send the line unsubscribe git-commits-head in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH] bluetooth: add support for another Kensington dongle

2006-12-21 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=71c83515f23b8f9c36abb4ceb37f2d911565942b
Commit: 71c83515f23b8f9c36abb4ceb37f2d911565942b
Parent: 11e82730ccdaf2a6c056d04b03368c5a9e7c1305
Author: Olivier Galibert [EMAIL PROTECTED]
AuthorDate: Tue Dec 19 13:15:25 2006 -0800
Committer:  Greg Kroah-Hartman [EMAIL PROTECTED]
CommitDate: Wed Dec 20 11:29:29 2006 -0800

[PATCH] bluetooth: add support for another Kensington dongle

Add the stupid sco fixup quirk to yet another Broadcom/Kensington device.

Cc: Marcel Holtmann [EMAIL PROTECTED]
Signed-off-by: Andrew Morton [EMAIL PROTECTED]
Signed-off-by: Greg Kroah-Hartman [EMAIL PROTECTED]
---
 drivers/bluetooth/hci_usb.c |1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/drivers/bluetooth/hci_usb.c b/drivers/bluetooth/hci_usb.c
index fdea58a..aeefec9 100644
--- a/drivers/bluetooth/hci_usb.c
+++ b/drivers/bluetooth/hci_usb.c
@@ -126,6 +126,7 @@ static struct usb_device_id blacklist_ids[] = {
 
/* Kensington Bluetooth USB adapter */
{ USB_DEVICE(0x047d, 0x105d), .driver_info = HCI_RESET },
+   { USB_DEVICE(0x047d, 0x105e), .driver_info = HCI_WRONG_SCO_MTU },
 
/* ISSC Bluetooth Adapter v3.1 */
{ USB_DEVICE(0x1131, 0x1001), .driver_info = HCI_RESET },
-
To unsubscribe from this list: send the line unsubscribe git-commits-head in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


pci: add class codes for Wireless RF controllers

2006-12-21 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=42a0ee3238a0adb4c5bea3bd5b201c297b476e66
Commit: 42a0ee3238a0adb4c5bea3bd5b201c297b476e66
Parent: 7461b60afa62b26943e97861d87b9f9a32d7fd9c
Author: Inaky Perez-Gonzalez [EMAIL PROTECTED]
AuthorDate: Thu Nov 30 15:58:58 2006 -0800
Committer:  Greg Kroah-Hartman [EMAIL PROTECTED]
CommitDate: Wed Dec 20 10:54:42 2006 -0800

pci: add class codes for Wireless RF controllers

pci: add class codes for Wireless RF controllers

Add PCI codes to include/linux/pci_ids.h for RF controllers; first
batch of these devices seem to be the Ultra-Wide-Band and Wireless USB
controllers (WHCI spec).

Signed-off-by: Inaky Perez-Gonzalez [EMAIL PROTECTED]
Signed-off-by: Greg Kroah-Hartman [EMAIL PROTECTED]
---
 include/linux/pci_ids.h |4 
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/include/linux/pci_ids.h b/include/linux/pci_ids.h
index 95c1e74..778e701 100644
--- a/include/linux/pci_ids.h
+++ b/include/linux/pci_ids.h
@@ -104,6 +104,10 @@
 #define PCI_CLASS_SERIAL_FIBER 0x0c04
 #define PCI_CLASS_SERIAL_SMBUS 0x0c05
 
+#define PCI_BASE_CLASS_WIRELESS0x0d
+#define PCI_CLASS_WIRELESS_RF_CONTROLLER   0x0d10
+#define PCI_CLASS_WIRELESS_WHCI0x0d1010
+
 #define PCI_BASE_CLASS_INTELLIGENT 0x0e
 #define PCI_CLASS_INTELLIGENT_I2O  0x0e00
 
-
To unsubscribe from this list: send the line unsubscribe git-commits-head in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


rpaphp: compiler warning cleanup

2006-12-21 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=f1e79092d9a59e2b1c8eae3b0f4ef3827dda08a0
Commit: f1e79092d9a59e2b1c8eae3b0f4ef3827dda08a0
Parent: 0c875c28649eac0adb8d2e2efac2186c3089e100
Author: Linas Vepstas [EMAIL PROTECTED]
AuthorDate: Fri Dec 1 16:31:27 2006 -0800
Committer:  Greg Kroah-Hartman [EMAIL PROTECTED]
CommitDate: Wed Dec 20 10:54:42 2006 -0800

rpaphp: compiler warning cleanup

This janitorial patch removes the following annoying
compile-time message:

drivers/pci/hotplug/rpaphp_slot.c:57: warning: ignoring return
value of sfs_create_file declared with attribute warn_unused_result

It also fixes a typo, removes some misc crud.

Signed-off-by: Linas Vepstas [EMAIL PROTECTED]
Cc: John Rose [EMAIL PROTECTED]
Signed-off-by: Kristen Carlson Accardi [EMAIL PROTECTED]
Signed-off-by: Greg Kroah-Hartman [EMAIL PROTECTED]
---
 drivers/pci/hotplug/rpaphp_slot.c |   47 ++---
 1 files changed, 23 insertions(+), 24 deletions(-)

diff --git a/drivers/pci/hotplug/rpaphp_slot.c 
b/drivers/pci/hotplug/rpaphp_slot.c
index b771196..3009193 100644
--- a/drivers/pci/hotplug/rpaphp_slot.c
+++ b/drivers/pci/hotplug/rpaphp_slot.c
@@ -47,21 +47,11 @@ static ssize_t location_read_file (struct hotplug_slot 
*php_slot, char *buf)
return retval;
 }
 
-static struct hotplug_slot_attribute hotplug_slot_attr_location = {
+static struct hotplug_slot_attribute php_attr_location = {
.attr = {.name = phy_location, .mode = S_IFREG | S_IRUGO},
.show = location_read_file,
 };
 
-static void rpaphp_sysfs_add_attr_location (struct hotplug_slot *slot)
-{
-   sysfs_create_file(slot-kobj, hotplug_slot_attr_location.attr);
-}
-
-static void rpaphp_sysfs_remove_attr_location (struct hotplug_slot *slot)
-{
-   sysfs_remove_file(slot-kobj, hotplug_slot_attr_location.attr);
-}
-
 /* free up the memory used by a slot */
 static void rpaphp_release_slot(struct hotplug_slot *hotplug_slot)
 {
@@ -145,7 +135,7 @@ int rpaphp_deregister_slot(struct slot *slot)
list_del(slot-rpaphp_slot_list);

/* remove phy_location file */
-   rpaphp_sysfs_remove_attr_location(php_slot);
+   sysfs_remove_file(php_slot-kobj, php_attr_location.attr);
 
retval = pci_hp_deregister(php_slot);
if (retval)
@@ -160,36 +150,45 @@ EXPORT_SYMBOL_GPL(rpaphp_deregister_slot);
 
 int rpaphp_register_slot(struct slot *slot)
 {
+   struct hotplug_slot *php_slot = slot-hotplug_slot;
int retval;
 
dbg(%s registering slot:path[%s] index[%x], name[%s] pdomain[%x] 
type[%d]\n, 
__FUNCTION__, slot-dn-full_name, slot-index, slot-name, 
slot-power_domain, slot-type);
+
/* should not try to register the same slot twice */
-   if (is_registered(slot)) { /* should't be here */
+   if (is_registered(slot)) {
err(rpaphp_register_slot: slot[%s] is already registered\n, 
slot-name);
-   rpaphp_release_slot(slot-hotplug_slot);
-   return -EAGAIN;
+   retval = -EAGAIN;
+   goto register_fail;
}   
-   retval = pci_hp_register(slot-hotplug_slot);
+
+   retval = pci_hp_register(php_slot);
if (retval) {
err(pci_hp_register failed with error %d\n, retval);
-   rpaphp_release_slot(slot-hotplug_slot);
-   return retval;
+   goto register_fail;
}
-   
-   /* create phy_locatoin file */
-   rpaphp_sysfs_add_attr_location(slot-hotplug_slot); 
 
-   /* add slot to our internal list */
-   dbg(%s adding slot[%s] to rpaphp_slot_list\n,
-   __FUNCTION__, slot-name);
+   /* create phy_location file */
+   retval = sysfs_create_file(php_slot-kobj, php_attr_location.attr);
+   if (retval) {
+   err(sysfs_create_file failed with error %d\n, retval);
+   goto sysfs_fail;
+   }
 
+   /* add slot to our internal list */
list_add(slot-rpaphp_slot_list, rpaphp_slot_head);
info(Slot [%s](PCI location=%s) registered\n, slot-name,
slot-location);
num_slots++;
return 0;
+
+sysfs_fail:
+   pci_hp_deregister(php_slot);
+register_fail:
+   rpaphp_release_slot(php_slot);
+   return retval;
 }
 
 int rpaphp_get_power_status(struct slot *slot, u8 * value)
-
To unsubscribe from this list: send the line unsubscribe git-commits-head in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


PCI: Create __pci_bus_find_cap_start() from __pci_bus_find_cap()

2006-12-21 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=d3bac118fb27a365d5e9f54f4a078eb9b42f968f
Commit: d3bac118fb27a365d5e9f54f4a078eb9b42f968f
Parent: d86f90f9913d27bb968132bf63499c56bca56db6
Author: Michael Ellerman [EMAIL PROTECTED]
AuthorDate: Wed Nov 22 18:26:16 2006 +1100
Committer:  Greg Kroah-Hartman [EMAIL PROTECTED]
CommitDate: Wed Dec 20 10:54:42 2006 -0800

PCI: Create __pci_bus_find_cap_start() from __pci_bus_find_cap()

The current implementation of __pci_bus_find_cap() does two things,
first it determines the start of the capability chain for the device,
and then it trys to find the requested capability.

Split these out, so that we can use the two parts independantly in
a subsequent patch. Externally visible behaviour should be unchanged.

Signed-off-by: Michael Ellerman [EMAIL PROTECTED]
Signed-off-by: Greg Kroah-Hartman [EMAIL PROTECTED]
---
 drivers/pci/pci.c |   28 +++-
 1 files changed, 19 insertions(+), 9 deletions(-)

diff --git a/drivers/pci/pci.c b/drivers/pci/pci.c
index 5a14b73..4627a51 100644
--- a/drivers/pci/pci.c
+++ b/drivers/pci/pci.c
@@ -96,10 +96,10 @@ int pci_find_next_capability(struct pci_dev *dev, u8 pos, 
int cap)
 }
 EXPORT_SYMBOL_GPL(pci_find_next_capability);
 
-static int __pci_bus_find_cap(struct pci_bus *bus, unsigned int devfn, u8 
hdr_type, int cap)
+static int __pci_bus_find_cap_start(struct pci_bus *bus,
+   unsigned int devfn, u8 hdr_type)
 {
u16 status;
-   u8 pos;
 
pci_bus_read_config_word(bus, devfn, PCI_STATUS, status);
if (!(status  PCI_STATUS_CAP_LIST))
@@ -108,15 +108,14 @@ static int __pci_bus_find_cap(struct pci_bus *bus, 
unsigned int devfn, u8 hdr_ty
switch (hdr_type) {
case PCI_HEADER_TYPE_NORMAL:
case PCI_HEADER_TYPE_BRIDGE:
-   pos = PCI_CAPABILITY_LIST;
-   break;
+   return PCI_CAPABILITY_LIST;
case PCI_HEADER_TYPE_CARDBUS:
-   pos = PCI_CB_CAPABILITY_LIST;
-   break;
+   return PCI_CB_CAPABILITY_LIST;
default:
return 0;
}
-   return __pci_find_next_cap(bus, devfn, pos, cap);
+
+   return 0;
 }
 
 /**
@@ -140,7 +139,13 @@ static int __pci_bus_find_cap(struct pci_bus *bus, 
unsigned int devfn, u8 hdr_ty
  */
 int pci_find_capability(struct pci_dev *dev, int cap)
 {
-   return __pci_bus_find_cap(dev-bus, dev-devfn, dev-hdr_type, cap);
+   int pos;
+
+   pos = __pci_bus_find_cap_start(dev-bus, dev-devfn, dev-hdr_type);
+   if (pos)
+   pos = __pci_find_next_cap(dev-bus, dev-devfn, pos, cap);
+
+   return pos;
 }
 
 /**
@@ -158,11 +163,16 @@ int pci_find_capability(struct pci_dev *dev, int cap)
  */
 int pci_bus_find_capability(struct pci_bus *bus, unsigned int devfn, int cap)
 {
+   int pos;
u8 hdr_type;
 
pci_bus_read_config_byte(bus, devfn, PCI_HEADER_TYPE, hdr_type);
 
-   return __pci_bus_find_cap(bus, devfn, hdr_type  0x7f, cap);
+   pos = __pci_bus_find_cap_start(bus, devfn, hdr_type  0x7f);
+   if (pos)
+   pos = __pci_find_next_cap(bus, devfn, pos, cap);
+
+   return pos;
 }
 
 /**
-
To unsubscribe from this list: send the line unsubscribe git-commits-head in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


pci: Introduce pci_find_present

2006-12-21 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=d86f90f9913d27bb968132bf63499c56bca56db6
Commit: d86f90f9913d27bb968132bf63499c56bca56db6
Parent: 83e42bcdd3be31a0df8b1a8d2d3fa1a65e43815c
Author: Alan Cox [EMAIL PROTECTED]
AuthorDate: Mon Dec 4 15:14:44 2006 -0800
Committer:  Greg Kroah-Hartman [EMAIL PROTECTED]
CommitDate: Wed Dec 20 10:54:42 2006 -0800

pci: Introduce pci_find_present

This works like pci_dev_present but instead of returning boolean returns
the matching pci_device_id entry.  This makes it much more useful.  Code
bloat is basically nil as the old boolean function is rewritten in terms of
the new one.

This will be used by the updated VIA PCI quirks for one

Signed-off-by: Alan Cox [EMAIL PROTECTED]
Signed-off-by: Andrew Morton [EMAIL PROTECTED]
Signed-off-by: Greg Kroah-Hartman [EMAIL PROTECTED]
---
 drivers/pci/search.c |   39 ++-
 include/linux/pci.h  |2 ++
 2 files changed, 24 insertions(+), 17 deletions(-)

diff --git a/drivers/pci/search.c b/drivers/pci/search.c
index 2f13eba..2bbafe0 100644
--- a/drivers/pci/search.c
+++ b/drivers/pci/search.c
@@ -413,6 +413,24 @@ exit:
return dev;
 }
 
+const struct pci_device_id *pci_find_present(const struct pci_device_id *ids)
+{
+   struct pci_dev *dev;
+   struct pci_device_id * found = NULL;
+
+   WARN_ON(in_interrupt());
+   down_read(pci_bus_sem);
+   while (ids-vendor || ids-subvendor || ids-class_mask) {
+   list_for_each_entry(dev, pci_devices, global_list) {
+   if ((found = pci_match_one_device(ids, dev)) != NULL)
+   break;
+   }
+   ids++;
+   }
+   up_read(pci_bus_sem);
+   return found;
+}
+
 /**
  * pci_dev_present - Returns 1 if device matching the device list is present, 
0 if not.
  * @ids: A pointer to a null terminated list of struct pci_device_id structures
@@ -424,27 +442,14 @@ exit:
  * find devices that are usually built into a system, or for a general hint as
  * to if another device happens to be present at this specific moment in time.
  */
+
 int pci_dev_present(const struct pci_device_id *ids)
 {
-   struct pci_dev *dev;
-   int found = 0;
-
-   WARN_ON(in_interrupt());
-   down_read(pci_bus_sem);
-   while (ids-vendor || ids-subvendor || ids-class_mask) {
-   list_for_each_entry(dev, pci_devices, global_list) {
-   if (pci_match_one_device(ids, dev)) {
-   found = 1;
-   goto exit;
-   }
-   }
-   ids++;
-   }
-exit:
-   up_read(pci_bus_sem);
-   return found;
+   return pci_find_present(ids) == NULL ? 0 : 1;
 }
+
 EXPORT_SYMBOL(pci_dev_present);
+EXPORT_SYMBOL(pci_find_present);
 
 EXPORT_SYMBOL(pci_find_device);
 EXPORT_SYMBOL(pci_find_device_reverse);
diff --git a/include/linux/pci.h b/include/linux/pci.h
index 01c7072..769e132 100644
--- a/include/linux/pci.h
+++ b/include/linux/pci.h
@@ -468,6 +468,7 @@ struct pci_dev *pci_get_slot (struct pci_bus *bus, unsigned 
int devfn);
 struct pci_dev *pci_get_bus_and_slot (unsigned int bus, unsigned int devfn);
 struct pci_dev *pci_get_class (unsigned int class, struct pci_dev *from);
 int pci_dev_present(const struct pci_device_id *ids);
+const struct pci_device_id *pci_find_present(const struct pci_device_id *ids);
 
 int pci_bus_read_config_byte (struct pci_bus *bus, unsigned int devfn, int 
where, u8 *val);
 int pci_bus_read_config_word (struct pci_bus *bus, unsigned int devfn, int 
where, u16 *val);
@@ -681,6 +682,7 @@ static inline struct pci_dev *pci_get_class(unsigned int 
class, struct pci_dev *
 { return NULL; }
 
 #define pci_dev_present(ids)   (0)
+#define pci_find_present(ids)  (NULL)
 #define pci_dev_put(dev)   do { } while (0)
 
 static inline void pci_set_master(struct pci_dev *dev) { }
-
To unsubscribe from this list: send the line unsubscribe git-commits-head in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


PCI: Add pci_find_ht_capability() for finding Hypertransport capabilities

2006-12-21 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=687d5fe3dc33794efb500f42164a0588e2647914
Commit: 687d5fe3dc33794efb500f42164a0588e2647914
Parent: d3bac118fb27a365d5e9f54f4a078eb9b42f968f
Author: Michael Ellerman [EMAIL PROTECTED]
AuthorDate: Wed Nov 22 18:26:18 2006 +1100
Committer:  Greg Kroah-Hartman [EMAIL PROTECTED]
CommitDate: Wed Dec 20 10:54:42 2006 -0800

PCI: Add pci_find_ht_capability() for finding Hypertransport capabilities

There are already several places in the kernel that want to search a PCI
device for a given Hypertransport capability. Although this is possible
using pci_find_capability() etc., it makes sense to encapsulate that
logic in a helper - pci_find_ht_capability().

To cater for searching exhaustively for a capability, we also provide
pci_find_next_ht_capability().

We also need to cater for the fact that the HT capability fields may be
either 3 or 5 bits wide. pci_find_ht_capability() deals with this for you,
but callers using the #defines directly must handle that themselves.

Signed-off-by: Michael Ellerman [EMAIL PROTECTED]
Signed-off-by: Greg Kroah-Hartman [EMAIL PROTECTED]
---
 drivers/pci/pci.c|   84 --
 include/linux/pci.h  |2 +
 include/linux/pci_regs.h |   12 ++-
 3 files changed, 94 insertions(+), 4 deletions(-)

diff --git a/drivers/pci/pci.c b/drivers/pci/pci.c
index 4627a51..6bfb942 100644
--- a/drivers/pci/pci.c
+++ b/drivers/pci/pci.c
@@ -68,12 +68,14 @@ pci_max_busnr(void)
 
 #endif  /*  0  */
 
-static int __pci_find_next_cap(struct pci_bus *bus, unsigned int devfn, u8 
pos, int cap)
+#define PCI_FIND_CAP_TTL   48
+
+static int __pci_find_next_cap_ttl(struct pci_bus *bus, unsigned int devfn,
+  u8 pos, int cap, int *ttl)
 {
u8 id;
-   int ttl = 48;
 
-   while (ttl--) {
+   while ((*ttl)--) {
pci_bus_read_config_byte(bus, devfn, pos, pos);
if (pos  0x40)
break;
@@ -89,6 +91,14 @@ static int __pci_find_next_cap(struct pci_bus *bus, unsigned 
int devfn, u8 pos,
return 0;
 }
 
+static int __pci_find_next_cap(struct pci_bus *bus, unsigned int devfn,
+  u8 pos, int cap)
+{
+   int ttl = PCI_FIND_CAP_TTL;
+
+   return __pci_find_next_cap_ttl(bus, devfn, pos, cap, ttl);
+}
+
 int pci_find_next_capability(struct pci_dev *dev, u8 pos, int cap)
 {
return __pci_find_next_cap(dev-bus, dev-devfn,
@@ -224,6 +234,74 @@ int pci_find_ext_capability(struct pci_dev *dev, int cap)
 }
 EXPORT_SYMBOL_GPL(pci_find_ext_capability);
 
+static int __pci_find_next_ht_cap(struct pci_dev *dev, int pos, int ht_cap)
+{
+   int rc, ttl = PCI_FIND_CAP_TTL;
+   u8 cap, mask;
+
+   if (ht_cap == HT_CAPTYPE_SLAVE || ht_cap == HT_CAPTYPE_HOST)
+   mask = HT_3BIT_CAP_MASK;
+   else
+   mask = HT_5BIT_CAP_MASK;
+
+   pos = __pci_find_next_cap_ttl(dev-bus, dev-devfn, pos,
+ PCI_CAP_ID_HT, ttl);
+   while (pos) {
+   rc = pci_read_config_byte(dev, pos + 3, cap);
+   if (rc != PCIBIOS_SUCCESSFUL)
+   return 0;
+
+   if ((cap  mask) == ht_cap)
+   return pos;
+
+   pos = __pci_find_next_cap_ttl(dev-bus, dev-devfn, pos,
+ PCI_CAP_ID_HT, ttl);
+   }
+
+   return 0;
+}
+/**
+ * pci_find_next_ht_capability - query a device's Hypertransport capabilities
+ * @dev: PCI device to query
+ * @pos: Position from which to continue searching
+ * @ht_cap: Hypertransport capability code
+ *
+ * To be used in conjunction with pci_find_ht_capability() to search for
+ * all capabilities matching @ht_cap. @pos should always be a value returned
+ * from pci_find_ht_capability().
+ *
+ * NB. To be 100% safe against broken PCI devices, the caller should take
+ * steps to avoid an infinite loop.
+ */
+int pci_find_next_ht_capability(struct pci_dev *dev, int pos, int ht_cap)
+{
+   return __pci_find_next_ht_cap(dev, pos + PCI_CAP_LIST_NEXT, ht_cap);
+}
+EXPORT_SYMBOL_GPL(pci_find_next_ht_capability);
+
+/**
+ * pci_find_ht_capability - query a device's Hypertransport capabilities
+ * @dev: PCI device to query
+ * @ht_cap: Hypertransport capability code
+ *
+ * Tell if a device supports a given Hypertransport capability.
+ * Returns an address within the device's PCI configuration space
+ * or 0 in case the device does not support the request capability.
+ * The address points to the PCI capability, of type PCI_CAP_ID_HT,
+ * which has a Hypertransport capability matching @ht_cap.
+ */
+int pci_find_ht_capability(struct pci_dev *dev, int ht_cap)
+{
+   int pos;
+
+   pos = __pci_bus_find_cap_start(dev-bus, dev-devfn, dev-hdr_type);
+   if (pos)
+ 

PCI: Add #defines for Hypertransport MSI fields

2006-12-21 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=d010b51c7ea9c28e30a476032615941aa77b1498
Commit: d010b51c7ea9c28e30a476032615941aa77b1498
Parent: 120a50df4536da69d2e85633a60bc40a85088dd1
Author: Michael Ellerman [EMAIL PROTECTED]
AuthorDate: Wed Nov 22 18:26:20 2006 +1100
Committer:  Greg Kroah-Hartman [EMAIL PROTECTED]
CommitDate: Wed Dec 20 10:54:43 2006 -0800

PCI: Add #defines for Hypertransport MSI fields

Add a few #defines for grabbing and working with the address fields
in a HT_CAPTYPE_MSI_MAPPING capability. All from the HT spec v3.00.

Signed-off-by: Michael Ellerman [EMAIL PROTECTED]
Signed-off-by: Greg Kroah-Hartman [EMAIL PROTECTED]
---
 include/linux/pci_regs.h |7 +++
 1 files changed, 7 insertions(+), 0 deletions(-)

diff --git a/include/linux/pci_regs.h b/include/linux/pci_regs.h
index a54b48f..7a6d34e 100644
--- a/include/linux/pci_regs.h
+++ b/include/linux/pci_regs.h
@@ -494,6 +494,13 @@
 #define HT_CAPTYPE_UNITID_CLUMP0x90/* Unit ID clumping */
 #define HT_CAPTYPE_EXTCONF 0x98/* Extended Configuration Space Access 
*/
 #define HT_CAPTYPE_MSI_MAPPING 0xA8/* MSI Mapping Capability */
+#define  HT_MSI_FLAGS  0x02/* Offset to flags */
+#define  HT_MSI_FLAGS_ENABLE   0x1 /* Mapping enable */
+#define  HT_MSI_FLAGS_FIXED0x2 /* Fixed mapping only */
+#define  HT_MSI_FIXED_ADDR 0xFEE0ULL   /* Fixed addr */
+#define  HT_MSI_ADDR_LO0x04/* Offset to low addr 
bits */
+#define  HT_MSI_ADDR_LO_MASK   0xFFF0  /* Low address bit mask */
+#define  HT_MSI_ADDR_HI0x08/* Offset to high addr 
bits */
 #define HT_CAPTYPE_DIRECT_ROUTE0xB0/* Direct routing configuration 
*/
 #define HT_CAPTYPE_VCSET   0xB8/* Virtual Channel configuration */
 #define HT_CAPTYPE_ERROR_RETRY 0xC0/* Retry on error configuration */
-
To unsubscribe from this list: send the line unsubscribe git-commits-head in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


PCI: Only check the HT capability bits in mpic.c

2006-12-21 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=beb7cc8238a8334d86c96bf32bf66182db3b619f
Commit: beb7cc8238a8334d86c96bf32bf66182db3b619f
Parent: 7a380507c48f7894bae7d367375313df9d51b2e5
Author: Michael Ellerman [EMAIL PROTECTED]
AuthorDate: Wed Nov 22 18:26:22 2006 +1100
Committer:  Greg Kroah-Hartman [EMAIL PROTECTED]
CommitDate: Wed Dec 20 10:54:43 2006 -0800

PCI: Only check the HT capability bits in mpic.c

Only compare the exact HT capability bits against HT_CAPTYPE_IRQ,
this is a little paranoid, but doesn't hurt.

Signed-off-by: Michael Ellerman [EMAIL PROTECTED]
Signed-off-by: Greg Kroah-Hartman [EMAIL PROTECTED]
---
 arch/powerpc/sysdev/mpic.c |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/arch/powerpc/sysdev/mpic.c b/arch/powerpc/sysdev/mpic.c
index 411480d..d01ced1 100644
--- a/arch/powerpc/sysdev/mpic.c
+++ b/arch/powerpc/sysdev/mpic.c
@@ -390,7 +390,7 @@ static void __init mpic_scan_ht_pic(struct mpic *mpic, u8 
__iomem *devbase,
u8 id = readb(devbase + pos + PCI_CAP_LIST_ID);
if (id == PCI_CAP_ID_HT) {
id = readb(devbase + pos + 3);
-   if (id == HT_CAPTYPE_IRQ)
+   if ((id  HT_5BIT_CAP_MASK) == HT_CAPTYPE_IRQ)
break;
}
}
-
To unsubscribe from this list: send the line unsubscribe git-commits-head in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


PCI: Use pci_find_ht_capability() in drivers/pci/quirks.c

2006-12-21 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=7a380507c48f7894bae7d367375313df9d51b2e5
Commit: 7a380507c48f7894bae7d367375313df9d51b2e5
Parent: d010b51c7ea9c28e30a476032615941aa77b1498
Author: Michael Ellerman [EMAIL PROTECTED]
AuthorDate: Wed Nov 22 18:26:21 2006 +1100
Committer:  Greg Kroah-Hartman [EMAIL PROTECTED]
CommitDate: Wed Dec 20 10:54:43 2006 -0800

PCI: Use pci_find_ht_capability() in drivers/pci/quirks.c

Use pci_find_ht_capability() in drivers/pci/quirks.c.

I'm pretty sure the logic is unchanged here, but someone please eye-ball it
for me. I've changed the message to be a little shorter, it's now:

PCI: Found (enabled|disabled) HT MSI mapping on :xx:xx.x

Signed-off-by: Michael Ellerman [EMAIL PROTECTED]
Signed-off-by: Greg Kroah-Hartman [EMAIL PROTECTED]
---
 drivers/pci/quirks.c |   28 
 1 files changed, 16 insertions(+), 12 deletions(-)

diff --git a/drivers/pci/quirks.c b/drivers/pci/quirks.c
index 7571863..cf3e7c0 100644
--- a/drivers/pci/quirks.c
+++ b/drivers/pci/quirks.c
@@ -1644,19 +1644,23 @@ DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_AMD, 
PCI_DEVICE_ID_AMD_8131_BRIDGE, quirk_
  * return 1 if a HT MSI capability is found and enabled */
 static int __devinit msi_ht_cap_enabled(struct pci_dev *dev)
 {
-   u8 pos;
-   int ttl;
-   for (pos = pci_find_capability(dev, PCI_CAP_ID_HT), ttl = 48;
-pos  ttl;
-pos = pci_find_next_capability(dev, pos, PCI_CAP_ID_HT), ttl--) {
-   u32 cap_hdr;
-   /* MSI mapping section according to Hypertransport spec */
-   if (pci_read_config_dword(dev, pos, cap_hdr) == 0
-(cap_hdr  0xf800) == 0xa800 /* MSI mapping */) {
-   printk(KERN_INFO PCI: Found HT MSI mapping on %s with 
capability %s\n,
-  pci_name(dev), cap_hdr  0x1 ? enabled : 
disabled);
-   return (cap_hdr  0x1) != 0; /* MSI mapping cap 
enabled */
+   int pos, ttl = 48;
+
+   pos = pci_find_ht_capability(dev, HT_CAPTYPE_MSI_MAPPING);
+   while (pos  ttl--) {
+   u8 flags;
+
+   if (pci_read_config_byte(dev, pos + HT_MSI_FLAGS,
+flags) == 0)
+   {
+   printk(KERN_INFO PCI: Found %s HT MSI Mapping on %s\n,
+   flags  HT_MSI_FLAGS_ENABLE ?
+   enabled : disabled, pci_name(dev));
+   return (flags  HT_MSI_FLAGS_ENABLE) != 0;
}
+
+   pos = pci_find_next_ht_capability(dev, pos,
+ HT_CAPTYPE_MSI_MAPPING);
}
return 0;
 }
-
To unsubscribe from this list: send the line unsubscribe git-commits-head in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


PCI: Use pci_find_ht_capability() in drivers/pci/htirq.c

2006-12-21 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=120a50df4536da69d2e85633a60bc40a85088dd1
Commit: 120a50df4536da69d2e85633a60bc40a85088dd1
Parent: 687d5fe3dc33794efb500f42164a0588e2647914
Author: Michael Ellerman [EMAIL PROTECTED]
AuthorDate: Wed Nov 22 18:26:19 2006 +1100
Committer:  Greg Kroah-Hartman [EMAIL PROTECTED]
CommitDate: Wed Dec 20 10:54:42 2006 -0800

PCI: Use pci_find_ht_capability() in drivers/pci/htirq.c

Use pci_find_ht_capability() in drivers/pci/htirq.c

Signed-off-by: Michael Ellerman [EMAIL PROTECTED]
Signed-off-by: Greg Kroah-Hartman [EMAIL PROTECTED]
---
 drivers/pci/htirq.c |9 +
 1 files changed, 1 insertions(+), 8 deletions(-)

diff --git a/drivers/pci/htirq.c b/drivers/pci/htirq.c
index 0a8d1cc..279c940 100644
--- a/drivers/pci/htirq.c
+++ b/drivers/pci/htirq.c
@@ -99,14 +99,7 @@ int __ht_create_irq(struct pci_dev *dev, int idx, 
ht_irq_update_t *update)
int pos;
int irq;
 
-   pos = pci_find_capability(dev, PCI_CAP_ID_HT);
-   while (pos) {
-   u8 subtype;
-   pci_read_config_byte(dev, pos + 3, subtype);
-   if (subtype == HT_CAPTYPE_IRQ)
-   break;
-   pos = pci_find_next_capability(dev, pos, PCI_CAP_ID_HT);
-   }
+   pos = pci_find_ht_capability(dev, HT_CAPTYPE_IRQ);
if (!pos)
return -EINVAL;
 
-
To unsubscribe from this list: send the line unsubscribe git-commits-head in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


PCI: Be a bit defensive in quirk_nvidia_ck804() so we don't risk dereferencing a NULL pdev.

2006-12-21 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=9ac0ce8596b17093739d42721cc8a616cedf734b
Commit: 9ac0ce8596b17093739d42721cc8a616cedf734b
Parent: 1597cacbe39802d86656d1f2e6329895bd2ef531
Author: Jesper Juhl [EMAIL PROTECTED]
AuthorDate: Mon Dec 4 15:14:48 2006 -0800
Committer:  Greg Kroah-Hartman [EMAIL PROTECTED]
CommitDate: Wed Dec 20 10:54:43 2006 -0800

PCI: Be a bit defensive in quirk_nvidia_ck804() so we don't risk 
dereferencing a NULL pdev.

pci_get_slot() may return NULL if nothing was found.  quirk_nvidia_ck804()
does not check the value returned from pci_get_slot(), so it may end up
causing a NULL pointer deref.

Signed-off-by: Jesper Juhl [EMAIL PROTECTED]
Acked-by: Alan Cox [EMAIL PROTECTED]
Signed-off-by: Andrew Morton [EMAIL PROTECTED]
Signed-off-by: Greg Kroah-Hartman [EMAIL PROTECTED]
---
 drivers/pci/quirks.c |2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/drivers/pci/quirks.c b/drivers/pci/quirks.c
index 30c41fc..8a2db01 100644
--- a/drivers/pci/quirks.c
+++ b/drivers/pci/quirks.c
@@ -1743,6 +1743,8 @@ static void __devinit 
quirk_nvidia_ck804_msi_ht_cap(struct pci_dev *dev)
 * a single one having MSI is enough to be sure that MSI are supported.
 */
pdev = pci_get_slot(dev-bus, 0);
+   if (!pdev)
+   return;
if (!msi_ht_cap_enabled(dev)  !msi_ht_cap_enabled(pdev)) {
printk(KERN_WARNING PCI: MSI quirk detected. 
   MSI disabled on chipset %s.\n,
-
To unsubscribe from this list: send the line unsubscribe git-commits-head in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


shpchp: remove unnecessary struct php_ctlr

2006-12-21 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=0abe68ce24973a23fcc6cbce80343f68656de7b6
Commit: 0abe68ce24973a23fcc6cbce80343f68656de7b6
Parent: ab17443a3df35abe4b7529e83511a591aa7384f3
Author: Kenji Kaneshige [EMAIL PROTECTED]
AuthorDate: Sat Dec 16 15:25:34 2006 -0800
Committer:  Greg Kroah-Hartman [EMAIL PROTECTED]
CommitDate: Wed Dec 20 10:54:44 2006 -0800

shpchp: remove unnecessary struct php_ctlr

The struct php_ctlr seems to be only for complicating codes. This
patch removes struct php_ctlr and related codes.

Signed-off-by: Kenji Kaneshige [EMAIL PROTECTED]
Signed-off-by: Kristen Carlson Accardi [EMAIL PROTECTED]
Signed-off-by: Greg Kroah-Hartman [EMAIL PROTECTED]
---
 drivers/pci/hotplug/shpchp.h  |   42 +--
 drivers/pci/hotplug/shpchp_core.c |   45 +---
 drivers/pci/hotplug/shpchp_ctrl.c |   12 +--
 drivers/pci/hotplug/shpchp_hpc.c  |  223 ++--
 4 files changed, 73 insertions(+), 249 deletions(-)

diff --git a/drivers/pci/hotplug/shpchp.h b/drivers/pci/hotplug/shpchp.h
index 5075769..f036485 100644
--- a/drivers/pci/hotplug/shpchp.h
+++ b/drivers/pci/hotplug/shpchp.h
@@ -83,7 +83,6 @@ struct event_info {
 struct controller {
struct mutex crit_sect; /* critical section mutex */
struct mutex cmd_lock;  /* command lock */
-   struct php_ctlr_state_s *hpc_ctlr_handle; /* HPC controller handle */
int num_slots;  /* Number of slots on ctlr */
int slot_num_inc;   /* 1 or -1 */
struct pci_dev *pci_dev;
@@ -102,6 +101,8 @@ struct controller {
u32 cap_offset;
unsigned long mmio_base;
unsigned long mmio_size;
+   void __iomem *creg;
+   struct timer_list poll_timer;
 };
 
 
@@ -176,10 +177,10 @@ extern int __must_check shpchp_create_ctrl_files(struct 
controller *ctrl);
 extern int shpchp_sysfs_enable_slot(struct slot *slot);
 extern int shpchp_sysfs_disable_slot(struct slot *slot);
 
-extern u8  shpchp_handle_attention_button(u8 hp_slot, void *inst_id);
-extern u8  shpchp_handle_switch_change(u8 hp_slot, void *inst_id);
-extern u8  shpchp_handle_presence_change(u8 hp_slot, void *inst_id);
-extern u8  shpchp_handle_power_fault(u8 hp_slot, void *inst_id);
+extern u8 shpchp_handle_attention_button(u8 hp_slot, struct controller *ctrl);
+extern u8 shpchp_handle_switch_change(u8 hp_slot, struct controller *ctrl);
+extern u8 shpchp_handle_presence_change(u8 hp_slot, struct controller *ctrl);
+extern u8 shpchp_handle_power_fault(u8 hp_slot, struct controller *ctrl);
 
 /* pci functions */
 extern int shpchp_save_config(struct controller *ctrl, int busnumber, int 
num_ctlr_slots, int first_device_num);
@@ -262,24 +263,6 @@ enum ctrl_offsets {
SLOT11 =offsetof(struct ctrl_reg, slot11),
SLOT12 =offsetof(struct ctrl_reg, slot12),
 };
-typedef u8(*php_intr_callback_t) (u8 hp_slot, void *instance_id);
-struct php_ctlr_state_s {
-   struct php_ctlr_state_s *pnext;
-   struct pci_dev *pci_dev;
-   unsigned int irq;
-   unsigned long flags;/* spinlock's */
-   u32 slot_device_offset;
-   u32 num_slots;
-   struct timer_list   int_poll_timer; /* Added for poll event */
-   php_intr_callback_t attention_button_callback;
-   php_intr_callback_t switch_change_callback;
-   php_intr_callback_t presence_change_callback;
-   php_intr_callback_t power_fault_callback;
-   void *callback_instance_id;
-   void __iomem *creg; /* Ptr to controller register 
space */
-};
-/* Inline functions */
-
 
 /* Inline functions to check the sanity of a pointer that is passed to us */
 static inline int slot_paranoia_check (struct slot *slot, const char *function)
@@ -400,21 +383,8 @@ static inline void amd_pogo_errata_restore_misc_reg(struct 
slot *p_slot)
pci_write_config_dword(p_slot-ctrl-pci_dev, PCIX_MISCII_OFFSET, 
pcix_misc2_temp);
 }
 
-enum php_ctlr_type {
-   PCI,
-   ISA,
-   ACPI
-};
-
 int shpc_init( struct controller *ctrl, struct pci_dev *pdev);
 
-int shpc_get_ctlr_slot_config( struct controller *ctrl,
-   int *num_ctlr_slots,
-   int *first_device_num,
-   int *physical_slot_num,
-   int *updown,
-   int *flags);
-
 struct hpc_ops {
int (*power_on_slot )   (struct slot *slot);
int (*slot_enable ) (struct slot *slot);
diff --git a/drivers/pci/hotplug/shpchp_core.c 
b/drivers/pci/hotplug/shpchp_core.c
index 4eac85b..68471dd 100644
--- a/drivers/pci/hotplug/shpchp_core.c
+++ b/drivers/pci/hotplug/shpchp_core.c
@@ -211,36 +211,6 @@ void cleanup_slots(struct controller *ctrl)
}
 }
 
-static int get_ctlr_slot_config(struct controller *ctrl)
-{
-   int num_ctlr_slots;
-   int first_device_num;
-   

PCI: ATI sb600 sata quirk

2006-12-21 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=ab17443a3df35abe4b7529e83511a591aa7384f3
Commit: ab17443a3df35abe4b7529e83511a591aa7384f3
Parent: fb0f2b40faff41f03acaa2ee6e6231fc96ca497c
Author: Conke Hu [EMAIL PROTECTED]
AuthorDate: Tue Dec 19 13:11:37 2006 -0800
Committer:  Greg Kroah-Hartman [EMAIL PROTECTED]
CommitDate: Wed Dec 20 10:54:44 2006 -0800

PCI: ATI sb600 sata quirk

Acked-by: Jeff Garzik [EMAIL PROTECTED]
Cc: Alan Cox [EMAIL PROTECTED]
Signed-off-by: Andrew Morton [EMAIL PROTECTED]
Signed-off-by: Greg Kroah-Hartman [EMAIL PROTECTED]
---
 drivers/ide/pci/atiixp.c |1 -
 drivers/pci/quirks.c |   17 +
 2 files changed, 17 insertions(+), 1 deletions(-)

diff --git a/drivers/ide/pci/atiixp.c b/drivers/ide/pci/atiixp.c
index d55b938..ffdffb6 100644
--- a/drivers/ide/pci/atiixp.c
+++ b/drivers/ide/pci/atiixp.c
@@ -368,7 +368,6 @@ static struct pci_device_id atiixp_pci_tbl[] = {
{ PCI_VENDOR_ID_ATI, PCI_DEVICE_ID_ATI_IXP300_IDE, PCI_ANY_ID, 
PCI_ANY_ID, 0, 0, 0},
{ PCI_VENDOR_ID_ATI, PCI_DEVICE_ID_ATI_IXP400_IDE, PCI_ANY_ID, 
PCI_ANY_ID, 0, 0, 0},
{ PCI_VENDOR_ID_ATI, PCI_DEVICE_ID_ATI_IXP600_IDE, PCI_ANY_ID, 
PCI_ANY_ID, 0, 0, 0},
-   { PCI_VENDOR_ID_ATI, PCI_DEVICE_ID_ATI_IXP600_SATA, PCI_ANY_ID, 
PCI_ANY_ID, (PCI_CLASS_STORAGE_IDE8)|0x8a, 0x05, 1},
{ 0, },
 };
 MODULE_DEVICE_TABLE(pci, atiixp_pci_tbl);
diff --git a/drivers/pci/quirks.c b/drivers/pci/quirks.c
index 8a2db01..8f0322d 100644
--- a/drivers/pci/quirks.c
+++ b/drivers/pci/quirks.c
@@ -850,6 +850,23 @@ DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_INTEL,   
PCI_DEVICE_ID_INTEL_82454NX,quirk_
 DECLARE_PCI_FIXUP_RESUME(PCI_VENDOR_ID_INTEL,  PCI_DEVICE_ID_INTEL_82454NX,
quirk_disable_pxb );
 
 
+static void __devinit quirk_sb600_sata(struct pci_dev *pdev)
+{
+   /* set sb600 sata to ahci mode */
+   if ((pdev-class  8) == PCI_CLASS_STORAGE_IDE) {
+   u8 tmp;
+
+   pci_read_config_byte(pdev, 0x40, tmp);
+   pci_write_config_byte(pdev, 0x40, tmp|1);
+   pci_write_config_byte(pdev, 0x9, 1);
+   pci_write_config_byte(pdev, 0xa, 6);
+   pci_write_config_byte(pdev, 0x40, tmp);
+
+   pdev-class = 0x010601;
+   }
+}
+DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_ATI, PCI_DEVICE_ID_ATI_IXP600_SATA, 
quirk_sb600_sata);
+
 /*
  * Serverworks CSB5 IDE does not fully support native mode
  */
-
To unsubscribe from this list: send the line unsubscribe git-commits-head in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


  1   2   >