[PATCH] nvidiafb backlight: Fix implicit declaration in nv_backlight

2007-03-06 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=b9860ecf2553fbc4c3bd66f5df7e82a6d5179775
Commit: b9860ecf2553fbc4c3bd66f5df7e82a6d5179775
Parent: 6261d720da40c51af96881ed210fe80f10138a7b
Author: Dave Jones [EMAIL PROTECTED]
AuthorDate: Tue Mar 6 01:42:00 2007 -0800
Committer:  Linus Torvalds [EMAIL PROTECTED]
CommitDate: Tue Mar 6 09:30:24 2007 -0800

[PATCH] nvidiafb backlight: Fix implicit declaration in nv_backlight

drivers/video/nvidia/nv_backlight.c: In function 'nvidia_bl_init':
drivers/video/nvidia/nv_backlight.c:103: error: implicit declaration of 
function 'pmac_has_backlight_type'

Signed-off-by: Dave Jones [EMAIL PROTECTED]
Signed-off-by: Antonino Daplas [EMAIL PROTECTED]
Cc: James Simmons [EMAIL PROTECTED]
Signed-off-by: Andrew Morton [EMAIL PROTECTED]
Signed-off-by: Linus Torvalds [EMAIL PROTECTED]
---
 drivers/video/nvidia/nv_backlight.c |5 +
 1 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/drivers/video/nvidia/nv_backlight.c 
b/drivers/video/nvidia/nv_backlight.c
index a50b303..43f62d8 100644
--- a/drivers/video/nvidia/nv_backlight.c
+++ b/drivers/video/nvidia/nv_backlight.c
@@ -12,6 +12,11 @@
 #include linux/backlight.h
 #include linux/fb.h
 #include linux/pci.h
+
+#ifdef CONFIG_PMAC_BACKLIGHT
+#include asm/backlight.h
+#endif
+
 #include nv_local.h
 #include nv_type.h
 #include nv_proto.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


[PATCH] fix build with CONFIG_NO_IDLE_HZ=n

2007-03-06 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=6261d720da40c51af96881ed210fe80f10138a7b
Commit: 6261d720da40c51af96881ed210fe80f10138a7b
Parent: 6321dd60c76b2e12383bc06046288b15397ed3a0
Author: Andrew Morton [EMAIL PROTECTED]
AuthorDate: Tue Mar 6 01:41:58 2007 -0800
Committer:  Linus Torvalds [EMAIL PROTECTED]
CommitDate: Tue Mar 6 09:30:24 2007 -0800

[PATCH] fix build with CONFIG_NO_IDLE_HZ=n

arch/i386/kernel/vmi.c: In function 'vmi_safe_halt':
arch/i386/kernel/vmi.c:262: warning: implicit declaration of function 
'vmi_stop_hz_timer'
arch/i386/kernel/vmi.c:266: warning: implicit declaration of function 
'vmi_account_time_restart_hz_timer'

Acked-by: Ingo Molnar [EMAIL PROTECTED]
Cc: Thomas Gleixner [EMAIL PROTECTED]
Cc: Zachary Amsden [EMAIL PROTECTED]
Cc: Andi Kleen [EMAIL PROTECTED]
Signed-off-by: Andrew Morton [EMAIL PROTECTED]
Signed-off-by: Linus Torvalds [EMAIL PROTECTED]
---
 include/asm-i386/vmi_time.h |8 
 1 files changed, 8 insertions(+), 0 deletions(-)

diff --git a/include/asm-i386/vmi_time.h b/include/asm-i386/vmi_time.h
index 1f971eb..94d0a12 100644
--- a/include/asm-i386/vmi_time.h
+++ b/include/asm-i386/vmi_time.h
@@ -61,6 +61,14 @@ extern void apic_vmi_timer_interrupt(void);
 #ifdef CONFIG_NO_IDLE_HZ
 extern int vmi_stop_hz_timer(void);
 extern void vmi_account_time_restart_hz_timer(void);
+#else
+static inline int vmi_stop_hz_timer(void)
+{
+   return 0;
+}
+static inline void vmi_account_time_restart_hz_timer(void)
+{
+}
 #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


[PATCH] Save/restore periodic tick information over suspend/resume

2007-03-06 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=6321dd60c76b2e12383bc06046288b15397ed3a0
Commit: 6321dd60c76b2e12383bc06046288b15397ed3a0
Parent: c3442e296517aee733d62fc3fe03211598902c7d
Author: Thomas Gleixner [EMAIL PROTECTED]
AuthorDate: Tue Mar 6 08:25:42 2007 +0100
Committer:  Linus Torvalds [EMAIL PROTECTED]
CommitDate: Tue Mar 6 09:30:24 2007 -0800

[PATCH] Save/restore periodic tick information over suspend/resume

The programming of periodic tick devices needs to be saved/restored
across suspend/resume - otherwise we might end up with a system coming
up that relies on getting a PIT (or HPET) interrupt, while those devices
default to 'no interrupts' after powerup. (To confuse things it worked
to a certain degree on some systems because the lapic gets initialized
as a side-effect of SMP bootup.)

This suspend / resume thing was dropped unintentionally during the
last-minute -mm code reshuffling.

Signed-off-by: Thomas Gleixner [EMAIL PROTECTED]
Signed-off-by: Ingo Molnar [EMAIL PROTECTED]
Signed-off-by: Linus Torvalds [EMAIL PROTECTED]
---
 kernel/time/tick-broadcast.c |   36 
 kernel/time/tick-common.c|   32 
 kernel/time/tick-internal.h  |4 
 kernel/timer.c   |6 ++
 4 files changed, 78 insertions(+), 0 deletions(-)

diff --git a/kernel/time/tick-broadcast.c b/kernel/time/tick-broadcast.c
index 12b3efe..5567745 100644
--- a/kernel/time/tick-broadcast.c
+++ b/kernel/time/tick-broadcast.c
@@ -284,6 +284,42 @@ void tick_shutdown_broadcast(unsigned int *cpup)
spin_unlock_irqrestore(tick_broadcast_lock, flags);
 }
 
+void tick_suspend_broadcast(void)
+{
+   struct clock_event_device *bc;
+   unsigned long flags;
+
+   spin_lock_irqsave(tick_broadcast_lock, flags);
+
+   bc = tick_broadcast_device.evtdev;
+   if (bc  tick_broadcast_device.mode == TICKDEV_MODE_PERIODIC)
+   clockevents_set_mode(bc, CLOCK_EVT_MODE_SHUTDOWN);
+
+   spin_unlock_irqrestore(tick_broadcast_lock, flags);
+}
+
+int tick_resume_broadcast(void)
+{
+   struct clock_event_device *bc;
+   unsigned long flags;
+   int broadcast = 0;
+
+   spin_lock_irqsave(tick_broadcast_lock, flags);
+
+   bc = tick_broadcast_device.evtdev;
+   if (bc) {
+   if (tick_broadcast_device.mode == TICKDEV_MODE_PERIODIC 
+   !cpus_empty(tick_broadcast_mask))
+   tick_broadcast_start_periodic(bc);
+
+   broadcast = cpu_isset(smp_processor_id(), tick_broadcast_mask);
+   }
+   spin_unlock_irqrestore(tick_broadcast_lock, flags);
+
+   return broadcast;
+}
+
+
 #ifdef CONFIG_TICK_ONESHOT
 
 static cpumask_t tick_broadcast_oneshot_mask;
diff --git a/kernel/time/tick-common.c b/kernel/time/tick-common.c
index 0986a2b..43ba1bd 100644
--- a/kernel/time/tick-common.c
+++ b/kernel/time/tick-common.c
@@ -298,6 +298,28 @@ static void tick_shutdown(unsigned int *cpup)
spin_unlock_irqrestore(tick_device_lock, flags);
 }
 
+static void tick_suspend_periodic(void)
+{
+   struct tick_device *td = __get_cpu_var(tick_cpu_device);
+   unsigned long flags;
+
+   spin_lock_irqsave(tick_device_lock, flags);
+   if (td-mode == TICKDEV_MODE_PERIODIC)
+   clockevents_set_mode(td-evtdev, CLOCK_EVT_MODE_SHUTDOWN);
+   spin_unlock_irqrestore(tick_device_lock, flags);
+}
+
+static void tick_resume_periodic(void)
+{
+   struct tick_device *td = __get_cpu_var(tick_cpu_device);
+   unsigned long flags;
+
+   spin_lock_irqsave(tick_device_lock, flags);
+   if (td-mode == TICKDEV_MODE_PERIODIC)
+   tick_setup_periodic(td-evtdev, 0);
+   spin_unlock_irqrestore(tick_device_lock, flags);
+}
+
 /*
  * Notification about clock event devices
  */
@@ -325,6 +347,16 @@ static int tick_notify(struct notifier_block *nb, unsigned 
long reason,
tick_shutdown(dev);
break;
 
+   case CLOCK_EVT_NOTIFY_SUSPEND:
+   tick_suspend_periodic();
+   tick_suspend_broadcast();
+   break;
+
+   case CLOCK_EVT_NOTIFY_RESUME:
+   if (!tick_resume_broadcast())
+   tick_resume_periodic();
+   break;
+
default:
break;
}
diff --git a/kernel/time/tick-internal.h b/kernel/time/tick-internal.h
index 54861a0..75890ef 100644
--- a/kernel/time/tick-internal.h
+++ b/kernel/time/tick-internal.h
@@ -67,6 +67,8 @@ extern int tick_check_broadcast_device(struct 
clock_event_device *dev);
 extern int tick_is_broadcast_device(struct clock_event_device *dev);
 extern void tick_broadcast_on_off(unsigned long reason, int *oncpu);
 extern void tick_shutdown_broadcast(unsigned int *cpup);
+extern void tick_suspend_broadcast(void);
+extern int tick_resume_broadcast(void);

[PATCH] atyfb: fix kconfig error part 2

2007-03-06 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=df470c30da7900a3fbc48e3d34187a3786c1acdb
Commit: df470c30da7900a3fbc48e3d34187a3786c1acdb
Parent: b9860ecf2553fbc4c3bd66f5df7e82a6d5179775
Author: Randy Dunlap [EMAIL PROTECTED]
AuthorDate: Tue Mar 6 01:42:01 2007 -0800
Committer:  Linus Torvalds [EMAIL PROTECTED]
CommitDate: Tue Mar 6 09:30:24 2007 -0800

[PATCH] atyfb: fix kconfig error part 2

Fix implicit declarations and missing code in atyfb.

drivers/video/aty/atyfb_base.c:2137: warning: implicit declaration of 
function 'a
ty_ld_lcd'
drivers/video/aty/atyfb_base.c:2154: warning: implicit declaration of 
function 'a
ty_st_lcd'
atyfb_base.c:(.text+0x33e5c): undefined reference to `aty_ld_lcd'
atyfb_base.c:(.text+0x33eb2): undefined reference to `aty_st_lcd'

Signed-off-by: Randy Dunlap [EMAIL PROTECTED]
Signed-off-by: Antonino Daplas [EMAIL PROTECTED]
Cc: James Simmons [EMAIL PROTECTED]
Signed-off-by: Andrew Morton [EMAIL PROTECTED]
Signed-off-by: Linus Torvalds [EMAIL PROTECTED]
---
 drivers/video/aty/atyfb.h |3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/drivers/video/aty/atyfb.h b/drivers/video/aty/atyfb.h
index f72faff..dc62f8e 100644
--- a/drivers/video/aty/atyfb.h
+++ b/drivers/video/aty/atyfb.h
@@ -284,7 +284,8 @@ static inline void aty_st_8(int regindex, u8 val, const 
struct atyfb_par *par)
 #endif
 }
 
-#if defined(CONFIG_PM) || defined(CONFIG_PMAC_BACKLIGHT) || defined 
(CONFIG_FB_ATY_GENERIC_LCD)
+#if defined(CONFIG_PM) || defined(CONFIG_PMAC_BACKLIGHT) || \
+defined (CONFIG_FB_ATY_GENERIC_LCD) || defined (CONFIG_FB_ATY_BACKLIGHT)
 extern void aty_st_lcd(int index, u32 val, const struct atyfb_par *par);
 extern u32 aty_ld_lcd(int index, const struct atyfb_par *par);
 #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


[PATCH] fbdev: fix kconfig error if FB_DDC=n

2007-03-06 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=166f60dde0f3793e67bd0d76952eaa46705bbaa9
Commit: 166f60dde0f3793e67bd0d76952eaa46705bbaa9
Parent: df470c30da7900a3fbc48e3d34187a3786c1acdb
Author: James Simmons [EMAIL PROTECTED]
AuthorDate: Tue Mar 6 01:42:02 2007 -0800
Committer:  Linus Torvalds [EMAIL PROTECTED]
CommitDate: Tue Mar 6 09:30:24 2007 -0800

[PATCH] fbdev: fix kconfig error if FB_DDC=n

Fix the following error if FB_DDC=n

Kernel: arch/x86_64/boot/bzImage is ready  (#1)
  Building modules, stage 2.
  MODPOST 229 modules
WARNING: fb_ddc_read [drivers/video/nvidia/nvidiafb.ko] undefined!
make[1]: *** [__modpost] Error 1

Signed-off-by: Antonino Daplas [EMAIL PROTECTED]
Cc: James Simmons [EMAIL PROTECTED]
Signed-off-by: Andrew Morton [EMAIL PROTECTED]
Signed-off-by: Linus Torvalds [EMAIL PROTECTED]
---
 drivers/video/Kconfig |   16 +++-
 1 files changed, 7 insertions(+), 9 deletions(-)

diff --git a/drivers/video/Kconfig b/drivers/video/Kconfig
index b8f0a11..7f5a598 100644
--- a/drivers/video/Kconfig
+++ b/drivers/video/Kconfig
@@ -677,8 +677,6 @@ config FB_S1D13XXX
 config FB_NVIDIA
tristate nVidia Framebuffer Support
depends on FB  PCI
-   select I2C_ALGOBIT if FB_NVIDIA_I2C
-   select I2C if FB_NVIDIA_I2C
select FB_BACKLIGHT if FB_NVIDIA_BACKLIGHT
select FB_MODE_HELPERS
select FB_CFB_FILLRECT
@@ -697,6 +695,7 @@ config FB_NVIDIA
 config FB_NVIDIA_I2C
bool Enable DDC Support
depends on FB_NVIDIA
+   select FB_DDC
help
  This enables I2C support for nVidia Chipsets.  This is used
  only for getting EDID information from the attached display
@@ -716,7 +715,6 @@ config FB_NVIDIA_BACKLIGHT
 config FB_RIVA
tristate nVidia Riva support
depends on FB  PCI
-   select FB_DDC if FB_RIVA_I2C
select FB_BACKLIGHT if FB_RIVA_BACKLIGHT
select FB_MODE_HELPERS
select FB_CFB_FILLRECT
@@ -734,6 +732,7 @@ config FB_RIVA
 config FB_RIVA_I2C
bool Enable DDC Support
depends on FB_RIVA
+   select FB_DDC
help
  This enables I2C support for nVidia Chipsets.  This is used
  only for getting EDID information from the attached display
@@ -812,8 +811,6 @@ config FB_INTEL
depends on FB  EXPERIMENTAL  PCI  X86
select AGP
select AGP_INTEL
-   select I2C_ALGOBIT if FB_INTEL_I2C
-   select I2C if FB_INTEL_I2C
select FB_MODE_HELPERS
select FB_CFB_FILLRECT
select FB_CFB_COPYAREA
@@ -846,6 +843,7 @@ config FB_INTEL_DEBUG
 config FB_INTEL_I2C
bool DDC/I2C for Intel framebuffer support
depends on FB_INTEL
+   select FB_DDC
default y
help
  Say Y here if you want DDC/I2C support for your on-board Intel 
graphics.
@@ -924,8 +922,8 @@ config FB_MATROX_G
 
 config FB_MATROX_I2C
tristate Matrox I2C support
-   depends on FB_MATROX  I2C
-   select I2C_ALGOBIT
+   depends on FB_MATROX
+   select FB_DDC
---help---
  This drivers creates I2C buses which are needed for accessing the
  DDC (I2C) bus present on all Matroxes, an I2C bus which
@@ -993,7 +991,6 @@ config FB_MATROX_MULTIHEAD
 config FB_RADEON
tristate ATI Radeon display support
depends on FB  PCI
-   select FB_DDC if FB_RADEON_I2C
select FB_BACKLIGHT if FB_RADEON_BACKLIGHT
select FB_MODE_HELPERS
select FB_CFB_FILLRECT
@@ -1018,6 +1015,7 @@ config FB_RADEON
 config FB_RADEON_I2C
bool DDC/I2C for ATI Radeon support
depends on FB_RADEON
+   select FB_DDC
default y
help
  Say Y here if you want DDC/I2C support for your Radeon board. 
@@ -1125,7 +1123,6 @@ config FB_S3
 config FB_SAVAGE
tristate S3 Savage support
depends on FB  PCI  EXPERIMENTAL
-   select FB_DDC if FB_SAVAGE_I2C
select FB_MODE_HELPERS
select FB_CFB_FILLRECT
select FB_CFB_COPYAREA
@@ -1142,6 +1139,7 @@ config FB_SAVAGE
 config FB_SAVAGE_I2C
bool Enable DDC2 Support
depends on FB_SAVAGE
+   select FB_DDC
help
  This enables I2C support for S3 Savage Chipsets.  This is used
  only for getting EDID information from the attached display
-
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] Scheduled removal of SA_xxx interrupt flags fixups 3

2007-03-06 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=e585047ef97b4002a7f416b0ca01ab894f7755de
Commit: e585047ef97b4002a7f416b0ca01ab894f7755de
Parent: 0de1517e23c2e28d58a6344b97a120596ea200bb
Author: Thomas Gleixner [EMAIL PROTECTED]
AuthorDate: Tue Mar 6 01:42:04 2007 -0800
Committer:  Linus Torvalds [EMAIL PROTECTED]
CommitDate: Tue Mar 6 09:30:24 2007 -0800

[PATCH] Scheduled removal of SA_xxx interrupt flags fixups 3

The obsolete SA_xxx interrupt flags have been used despite the scheduled
removal.  Fixup the remaining users.

Signed-off-by: Thomas Gleixner [EMAIL PROTECTED]
Acked-by: Ingo Molnar [EMAIL PROTECTED]
Cc: Zachary Amsden [EMAIL PROTECTED]
Signed-off-by: Andrew Morton [EMAIL PROTECTED]
Signed-off-by: Linus Torvalds [EMAIL PROTECTED]
---
 arch/i386/kernel/vmitime.c |   10 --
 1 files changed, 4 insertions(+), 6 deletions(-)

diff --git a/arch/i386/kernel/vmitime.c b/arch/i386/kernel/vmitime.c
index 8dc72d5..9dfb177 100644
--- a/arch/i386/kernel/vmitime.c
+++ b/arch/i386/kernel/vmitime.c
@@ -123,12 +123,10 @@ static struct clocksource clocksource_vmi = {
 static irqreturn_t vmi_timer_interrupt(int irq, void *dev_id);
 
 static struct irqaction vmi_timer_irq  = {
-   vmi_timer_interrupt,
-   SA_INTERRUPT,
-   CPU_MASK_NONE,
-   VMI-alarm,
-   NULL,
-   NULL
+   .handler = vmi_timer_interrupt,
+   .flags = IRQF_DISABLED,
+   .mask = CPU_MASK_NONE,
+   .name = VMI-alarm,
 };
 
 /* Alarm rate */
-
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] i386: make x86_64 tsc header require i386 rather than vice-versa

2007-03-06 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=2272b0e03ea5731aca058eaf79c9955b36f0c083
Commit: 2272b0e03ea5731aca058eaf79c9955b36f0c083
Parent: e585047ef97b4002a7f416b0ca01ab894f7755de
Author: Andres Salomon [EMAIL PROTECTED]
AuthorDate: Tue Mar 6 01:42:05 2007 -0800
Committer:  Linus Torvalds [EMAIL PROTECTED]
CommitDate: Tue Mar 6 09:30:24 2007 -0800

[PATCH] i386: make x86_64 tsc header require i386 rather than vice-versa

Prior to commit 95492e4646e5de8b43d9a7908d6177fb737b61f0 ([PATCH] x86:
rewrite SMP TSC sync code), the headers in asm-i386 did not really require
anything in include/asm-x86_64.  This means that distributions such as
fedora did not include asm-x86_64 in kernel-devel headers for i386.  Ingo's
commit changed that, and broke things.  This is easy enough to hack around
in package builds by just including asm-x86_64 on i386, but that's kind of
annoying.  If anything, x86_64 should depend upon i386, not the other way
around.

This patch changes it so that asm-x86_64/tsc.h includes asm-i386/tsc.h,
rather than vice-versa.

Signed-off-by: Andres Salomon [EMAIL PROTECTED]
Acked-by: Ingo Molnar [EMAIL PROTECTED]
Cc: Andi Kleen [EMAIL PROTECTED]
Signed-off-by: Andrew Morton [EMAIL PROTECTED]
Signed-off-by: Linus Torvalds [EMAIL PROTECTED]
---
 include/asm-i386/tsc.h   |   68 +-
 include/asm-x86_64/tsc.h |   68 +-
 2 files changed, 68 insertions(+), 68 deletions(-)

diff --git a/include/asm-i386/tsc.h b/include/asm-i386/tsc.h
index e997891..84016ff 100644
--- a/include/asm-i386/tsc.h
+++ b/include/asm-i386/tsc.h
@@ -1 +1,67 @@
-#include asm-x86_64/tsc.h
+/*
+ * linux/include/asm-i386/tsc.h
+ *
+ * i386 TSC related functions
+ */
+#ifndef _ASM_i386_TSC_H
+#define _ASM_i386_TSC_H
+
+#include asm/processor.h
+
+/*
+ * Standard way to access the cycle counter.
+ */
+typedef unsigned long long cycles_t;
+
+extern unsigned int cpu_khz;
+extern unsigned int tsc_khz;
+
+static inline cycles_t get_cycles(void)
+{
+   unsigned long long ret = 0;
+
+#ifndef CONFIG_X86_TSC
+   if (!cpu_has_tsc)
+   return 0;
+#endif
+
+#if defined(CONFIG_X86_GENERIC) || defined(CONFIG_X86_TSC)
+   rdtscll(ret);
+#endif
+   return ret;
+}
+
+/* Like get_cycles, but make sure the CPU is synchronized. */
+static __always_inline cycles_t get_cycles_sync(void)
+{
+   unsigned long long ret;
+#ifdef X86_FEATURE_SYNC_RDTSC
+   unsigned eax;
+
+   /*
+* Don't do an additional sync on CPUs where we know
+* RDTSC is already synchronous:
+*/
+   alternative_io(cpuid, ASM_NOP2, X86_FEATURE_SYNC_RDTSC,
+ =a (eax), 0 (1) : ebx,ecx,edx,memory);
+#else
+   sync_core();
+#endif
+   rdtscll(ret);
+
+   return ret;
+}
+
+extern void tsc_init(void);
+extern void mark_tsc_unstable(void);
+extern int unsynchronized_tsc(void);
+extern void init_tsc_clocksource(void);
+
+/*
+ * Boot-time check whether the TSCs are synchronized across
+ * all CPUs/cores:
+ */
+extern void check_tsc_sync_source(int cpu);
+extern void check_tsc_sync_target(void);
+
+#endif
diff --git a/include/asm-x86_64/tsc.h b/include/asm-x86_64/tsc.h
index 26c3e98..d66ba6e 100644
--- a/include/asm-x86_64/tsc.h
+++ b/include/asm-x86_64/tsc.h
@@ -1,67 +1 @@
-/*
- * linux/include/asm-x86_64/tsc.h
- *
- * x86_64 TSC related functions
- */
-#ifndef _ASM_x86_64_TSC_H
-#define _ASM_x86_64_TSC_H
-
-#include asm/processor.h
-
-/*
- * Standard way to access the cycle counter.
- */
-typedef unsigned long long cycles_t;
-
-extern unsigned int cpu_khz;
-extern unsigned int tsc_khz;
-
-static inline cycles_t get_cycles(void)
-{
-   unsigned long long ret = 0;
-
-#ifndef CONFIG_X86_TSC
-   if (!cpu_has_tsc)
-   return 0;
-#endif
-
-#if defined(CONFIG_X86_GENERIC) || defined(CONFIG_X86_TSC)
-   rdtscll(ret);
-#endif
-   return ret;
-}
-
-/* Like get_cycles, but make sure the CPU is synchronized. */
-static __always_inline cycles_t get_cycles_sync(void)
-{
-   unsigned long long ret;
-#ifdef X86_FEATURE_SYNC_RDTSC
-   unsigned eax;
-
-   /*
-* Don't do an additional sync on CPUs where we know
-* RDTSC is already synchronous:
-*/
-   alternative_io(cpuid, ASM_NOP2, X86_FEATURE_SYNC_RDTSC,
- =a (eax), 0 (1) : ebx,ecx,edx,memory);
-#else
-   sync_core();
-#endif
-   rdtscll(ret);
-
-   return ret;
-}
-
-extern void tsc_init(void);
-extern void mark_tsc_unstable(void);
-extern int unsynchronized_tsc(void);
-extern void init_tsc_clocksource(void);
-
-/*
- * Boot-time check whether the TSCs are synchronized across
- * all CPUs/cores:
- */
-extern void check_tsc_sync_source(int cpu);
-extern void check_tsc_sync_target(void);
-
-#endif
+#include asm-i386/tsc.h
-
To unsubscribe from 

[PATCH] hrtimers: fix HRTIMER_CB_IRQSAFE_NO_SOFTIRQ description

2007-03-06 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=8437fdc7428eac363579bf0cce2526c35573735c
Commit: 8437fdc7428eac363579bf0cce2526c35573735c
Parent: 2272b0e03ea5731aca058eaf79c9955b36f0c083
Author: Andres Salomon [EMAIL PROTECTED]
AuthorDate: Tue Mar 6 01:42:06 2007 -0800
Committer:  Linus Torvalds [EMAIL PROTECTED]
CommitDate: Tue Mar 6 09:30:24 2007 -0800

[PATCH] hrtimers: fix HRTIMER_CB_IRQSAFE_NO_SOFTIRQ description

The description for HRTIMER_CB_IRQSAFE_NO_SOFTIRQ is backwards; NO
SOFTIRQ sounds a whole lot like it means it must not be run in a softirq.

Signed-off-by: Andres Salomon [EMAIL PROTECTED]
Acked-by: Thomas Gleixner [EMAIL PROTECTED]
Acked-by: Ingo Molnar [EMAIL PROTECTED]
Signed-off-by: Andrew Morton [EMAIL PROTECTED]
Signed-off-by: Linus Torvalds [EMAIL PROTECTED]
---
 include/linux/hrtimer.h |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/include/linux/hrtimer.h b/include/linux/hrtimer.h
index 3bef961..b9f163d 100644
--- a/include/linux/hrtimer.h
+++ b/include/linux/hrtimer.h
@@ -47,7 +47,7 @@ enum hrtimer_restart {
  * HRTIMER_CB_IRQSAFE: Callback may run in hardirq context
  * HRTIMER_CB_IRQSAFE_NO_RESTART:  Callback may run in hardirq context and
  * does not restart the timer
- * HRTIMER_CB_IRQSAFE_NO_SOFTIRQ:  Callback must run in softirq context
+ * HRTIMER_CB_IRQSAFE_NO_SOFTIRQ:  Callback must run in hardirq context
  * Special mode for tick emultation
  */
 enum hrtimer_cb_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


[PATCH] remove arch/i386/kernel/tsc.c:custom_sched_clock

2007-03-06 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=4a6753ca08541437f4c243708d2011b4758e17e8
Commit: 4a6753ca08541437f4c243708d2011b4758e17e8
Parent: f8953856eb8dd62232aee6cacb46993dc2ac4869
Author: Adrian Bunk [EMAIL PROTECTED]
AuthorDate: Tue Mar 6 01:42:08 2007 -0800
Committer:  Linus Torvalds [EMAIL PROTECTED]
CommitDate: Tue Mar 6 09:30:25 2007 -0800

[PATCH] remove arch/i386/kernel/tsc.c:custom_sched_clock

Remove the no longer used custom_sched_clock.

Signed-off-by: Adrian Bunk [EMAIL PROTECTED]
Acked-by: Zachary Amsden [EMAIL PROTECTED]
Cc: Andi Kleen [EMAIL PROTECTED]
Signed-off-by: Andrew Morton [EMAIL PROTECTED]
Signed-off-by: Linus Torvalds [EMAIL PROTECTED]
---
 arch/i386/kernel/tsc.c |1 -
 1 files changed, 0 insertions(+), 1 deletions(-)

diff --git a/arch/i386/kernel/tsc.c b/arch/i386/kernel/tsc.c
index 875d8a6..602660d 100644
--- a/arch/i386/kernel/tsc.c
+++ b/arch/i386/kernel/tsc.c
@@ -24,7 +24,6 @@
  * an extra value to store the TSC freq
  */
 unsigned int tsc_khz;
-unsigned long long (*custom_sched_clock)(void);
 
 int tsc_disable;
 
-
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] mqueue: nested locking annotation

2007-03-06 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=7a434814c7a6500b08bf4419ba8712b152d08d08
Commit: 7a434814c7a6500b08bf4419ba8712b152d08d08
Parent: 4a6753ca08541437f4c243708d2011b4758e17e8
Author: Peter Zijlstra [EMAIL PROTECTED]
AuthorDate: Tue Mar 6 01:42:09 2007 -0800
Committer:  Linus Torvalds [EMAIL PROTECTED]
CommitDate: Tue Mar 6 09:30:25 2007 -0800

[PATCH] mqueue: nested locking annotation

Fix http://bugzilla.kernel.org/show_bug.cgi?id=8130

Signed-off-by: Peter Zijlstra [EMAIL PROTECTED]
Signed-off-by: Andrew Morton [EMAIL PROTECTED]
Signed-off-by: Linus Torvalds [EMAIL PROTECTED]
---
 ipc/mqueue.c |3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/ipc/mqueue.c b/ipc/mqueue.c
index 0b5ecbe..554ac36 100644
--- a/ipc/mqueue.c
+++ b/ipc/mqueue.c
@@ -731,7 +731,8 @@ asmlinkage long sys_mq_unlink(const char __user *u_name)
if (IS_ERR(name))
return PTR_ERR(name);
 
-   mutex_lock(mqueue_mnt-mnt_root-d_inode-i_mutex);
+   mutex_lock_nested(mqueue_mnt-mnt_root-d_inode-i_mutex,
+   I_MUTEX_PARENT);
dentry = lookup_one_len(name, mqueue_mnt-mnt_root, strlen(name));
if (IS_ERR(dentry)) {
err = PTR_ERR(dentry);
-
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] fs: nobh_truncate_page() fix

2007-03-06 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=57bf63d69cb6b7064e6fec5e83da4e1918168282
Commit: 57bf63d69cb6b7064e6fec5e83da4e1918168282
Parent: 90675a27fa3eb0e97f1d040b183cceb44316e669
Author: Dave Kleikamp [EMAIL PROTECTED]
AuthorDate: Tue Mar 6 01:42:12 2007 -0800
Committer:  Linus Torvalds [EMAIL PROTECTED]
CommitDate: Tue Mar 6 09:30:25 2007 -0800

[PATCH] fs: nobh_truncate_page() fix

This fixes a regression caused by 22c8ca78f20724676b6006232bf06cc3e9299539.

nobh_prepare_write() no longer marks the page uptodate, so
nobh_truncate_page() needs to do it.

Signed-off-by: Dave Kleikamp [EMAIL PROTECTED]
Cc: Nick Piggin [EMAIL PROTECTED]
Signed-off-by: Andrew Morton [EMAIL PROTECTED]
Signed-off-by: Linus Torvalds [EMAIL PROTECTED]
---
 fs/buffer.c |9 +
 1 files changed, 9 insertions(+), 0 deletions(-)

diff --git a/fs/buffer.c b/fs/buffer.c
index e8504b6..1d0852f 100644
--- a/fs/buffer.c
+++ b/fs/buffer.c
@@ -2365,6 +2365,10 @@ failed:
 }
 EXPORT_SYMBOL(nobh_prepare_write);
 
+/*
+ * Make sure any changes to nobh_commit_write() are reflected in
+ * nobh_truncate_page(), since it doesn't call commit_write().
+ */
 int nobh_commit_write(struct file *file, struct page *page,
unsigned from, unsigned to)
 {
@@ -2466,6 +2470,11 @@ int nobh_truncate_page(struct address_space *mapping, 
loff_t from)
memset(kaddr + offset, 0, PAGE_CACHE_SIZE - offset);
flush_dcache_page(page);
kunmap_atomic(kaddr, KM_USER0);
+   /*
+* It would be more correct to call aops-commit_write()
+* here, but this is more efficient.
+*/
+   SetPageUptodate(page);
set_page_dirty(page);
}
unlock_page(page);
-
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] geode-aes: use unsigned long for spin_lock_irqsave

2007-03-06 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=5efee174f8a101cafb1607d2b629bed353701457
Commit: 5efee174f8a101cafb1607d2b629bed353701457
Parent: 57bf63d69cb6b7064e6fec5e83da4e1918168282
Author: Alexey Dobriyan [EMAIL PROTECTED]
AuthorDate: Tue Mar 6 01:42:13 2007 -0800
Committer:  Linus Torvalds [EMAIL PROTECTED]
CommitDate: Tue Mar 6 09:30:25 2007 -0800

[PATCH] geode-aes: use unsigned long for spin_lock_irqsave

Signed-off-by: Alexey Dobriyan [EMAIL PROTECTED]
Signed-off-by: Andrew Morton [EMAIL PROTECTED]
Signed-off-by: Linus Torvalds [EMAIL PROTECTED]
---
 drivers/crypto/geode-aes.c |3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)

diff --git a/drivers/crypto/geode-aes.c b/drivers/crypto/geode-aes.c
index 0eb6284..6d3840e 100644
--- a/drivers/crypto/geode-aes.c
+++ b/drivers/crypto/geode-aes.c
@@ -99,9 +99,8 @@ do_crypt(void *src, void *dst, int len, u32 flags)
 static unsigned int
 geode_aes_crypt(struct geode_aes_op *op)
 {
-
u32 flags = 0;
-   int iflags;
+   unsigned long iflags;
 
if (op-len == 0 || op-src == op-dst)
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


[PATCH] Publish rcutorture module parameters via sysfs, read-only

2007-03-06 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=d6ad67112a78623025632865d716b2f7645874c5
Commit: d6ad67112a78623025632865d716b2f7645874c5
Parent: 5efee174f8a101cafb1607d2b629bed353701457
Author: Josh Triplett [EMAIL PROTECTED]
AuthorDate: Tue Mar 6 01:42:13 2007 -0800
Committer:  Linus Torvalds [EMAIL PROTECTED]
CommitDate: Tue Mar 6 09:30:25 2007 -0800

[PATCH] Publish rcutorture module parameters via sysfs, read-only

rcutorture's module parameters currently use permissions of 0, so they
don't show up in /sys/module/rcutorture/parameters.  Change the permissions
on all module parameters to world-readable (0444).

rcutorture does all of its initialization and thread startup when loaded
and relies on the parameters not changing during execution, so they should
not permit writing.  However, reading seems fine.

Signed-off-by: Josh Triplett [EMAIL PROTECTED]
Cc: Paul E. McKenney [EMAIL PROTECTED]
Signed-off-by: Andrew Morton [EMAIL PROTECTED]
Signed-off-by: Linus Torvalds [EMAIL PROTECTED]
---
 kernel/rcutorture.c |   14 +++---
 1 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/kernel/rcutorture.c b/kernel/rcutorture.c
index 482b11f..bcd14e8 100644
--- a/kernel/rcutorture.c
+++ b/kernel/rcutorture.c
@@ -60,19 +60,19 @@ static int test_no_idle_hz; /* Test RCU's support for 
tickless idle CPUs. */
 static int shuffle_interval = 5; /* Interval between shuffles (in sec)*/
 static char *torture_type = rcu; /* What RCU implementation to torture. */
 
-module_param(nreaders, int, 0);
+module_param(nreaders, int, 0444);
 MODULE_PARM_DESC(nreaders, Number of RCU reader threads);
-module_param(nfakewriters, int, 0);
+module_param(nfakewriters, int, 0444);
 MODULE_PARM_DESC(nfakewriters, Number of RCU fake writer threads);
-module_param(stat_interval, int, 0);
+module_param(stat_interval, int, 0444);
 MODULE_PARM_DESC(stat_interval, Number of seconds between stats printk()s);
-module_param(verbose, bool, 0);
+module_param(verbose, bool, 0444);
 MODULE_PARM_DESC(verbose, Enable verbose debugging printk()s);
-module_param(test_no_idle_hz, bool, 0);
+module_param(test_no_idle_hz, bool, 0444);
 MODULE_PARM_DESC(test_no_idle_hz, Test support for tickless idle CPUs);
-module_param(shuffle_interval, int, 0);
+module_param(shuffle_interval, int, 0444);
 MODULE_PARM_DESC(shuffle_interval, Number of seconds between shuffles);
-module_param(torture_type, charp, 0);
+module_param(torture_type, charp, 0444);
 MODULE_PARM_DESC(torture_type, Type of RCU to torture (rcu, rcu_bh, srcu));
 
 #define TORTURE_FLAG -torture:
-
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] cciss: fix for 2TB support

2007-03-06 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=97c06978515ed6e071bfd4a5e858837dd2b0edcf
Commit: 97c06978515ed6e071bfd4a5e858837dd2b0edcf
Parent: d6ad67112a78623025632865d716b2f7645874c5
Author: Mike Miller (OS Dev) [EMAIL PROTECTED]
AuthorDate: Tue Mar 6 01:42:14 2007 -0800
Committer:  Linus Torvalds [EMAIL PROTECTED]
CommitDate: Tue Mar 6 09:30:25 2007 -0800

[PATCH] cciss: fix for 2TB support

This patch changes the way we determine if a logical volume is larger than
2TB.

The original test looked for a total_size of 0.  Originally we added 1 to 
the
total_size.  That would make our read_capacity return size 0 for 2TB lv's.
We assumed that we could not have a lv size of 0 so it seemed OK until we 
were
in a clustered system.  The backup node would see a size of 0 due to the
reservation on the drive.  That caused the driver to switch to 16-byte CDB's
which are not supported on older controllers.  After that everything was
broken.

It may seem petty but I don't see the value in trying to determine if the 
LBA
is beyond the 2TB boundary.  That's why when we switch we use 16-byte CDB's
for all read/write operations.  Please consider this for inclusion.

Signed-off-by: Mike Miller [EMAIL PROTECTED]
Signed-off-by: Andrew Morton [EMAIL PROTECTED]
Signed-off-by: Linus Torvalds [EMAIL PROTECTED]
---
 drivers/block/cciss.c |   39 ---
 1 files changed, 24 insertions(+), 15 deletions(-)

diff --git a/drivers/block/cciss.c b/drivers/block/cciss.c
index 05dfe35..8791e43 100644
--- a/drivers/block/cciss.c
+++ b/drivers/block/cciss.c
@@ -1291,13 +1291,19 @@ static void cciss_update_drive_info(int ctlr, int 
drv_index)
if (inq_buff == NULL)
goto mem_msg;
 
+   /* testing to see if 16-byte CDBs are already being used */
+   if (h-cciss_read == CCISS_READ_16) {
+   cciss_read_capacity_16(h-ctlr, drv_index, 1,
+   total_size, block_size);
+   goto geo_inq;
+   }
+
cciss_read_capacity(ctlr, drv_index, 1,
total_size, block_size);
 
-   /* total size = last LBA + 1 */
-   /*  + 1 = 0, cannot have a logical volume of size 0 */
-   /* so we assume this volume this must be 2TB in size */
-   if (total_size == (__u32) 0) {
+   /* if read_capacity returns all F's this volume is 2TB in size */
+   /* so we switch to 16-byte CDB's for all read/write ops */
+   if (total_size == 0xULL) {
cciss_read_capacity_16(ctlr, drv_index, 1,
total_size, block_size);
h-cciss_read = CCISS_READ_16;
@@ -1306,6 +1312,7 @@ static void cciss_update_drive_info(int ctlr, int 
drv_index)
h-cciss_read = CCISS_READ_10;
h-cciss_write = CCISS_WRITE_10;
}
+geo_inq:
cciss_geometry_inquiry(ctlr, drv_index, 1, total_size, block_size,
   inq_buff, h-drv[drv_index]);
 
@@ -1917,13 +1924,14 @@ static void cciss_geometry_inquiry(int ctlr, int logvol,
drv-raid_level = inq_buff-data_byte[8];
}
drv-block_size = block_size;
-   drv-nr_blocks = total_size;
+   drv-nr_blocks = total_size + 1;
t = drv-heads * drv-sectors;
if (t  1) {
-   unsigned rem = sector_div(total_size, t);
+   sector_t real_size = total_size + 1;
+   unsigned long rem = sector_div(real_size, t);
if (rem)
-   total_size++;
-   drv-cylinders = total_size;
+   real_size++;
+   drv-cylinders = real_size;
}
} else {/* Get geometry failed */
printk(KERN_WARNING cciss: reading geometry failed\n);
@@ -1953,16 +1961,16 @@ cciss_read_capacity(int ctlr, int logvol, int withirq, 
sector_t *total_size,
ctlr, buf, sizeof(ReadCapdata_struct),
1, logvol, 0, NULL, TYPE_CMD);
if (return_code == IO_OK) {
-   *total_size = be32_to_cpu(*(__u32 *) buf-total_size)+1;
+   *total_size = be32_to_cpu(*(__u32 *) buf-total_size);
*block_size = be32_to_cpu(*(__u32 *) buf-block_size);
} else {/* read capacity command failed */
printk(KERN_WARNING cciss: read capacity failed\n);
*total_size = 0;
*block_size = BLOCK_SIZE;
}
-   if (*total_size != (__u32) 0)
+   if (*total_size != 0)
printk(KERN_INFO   blocks= %llu block_size= %d\n,
-   (unsigned long long)*total_size, *block_size);
+   (unsigned 

[PATCH] cciss: add struct pci_driver shutdown support (replaces reboot notifier)

2007-03-06 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=de69fee82c5962fb7bdaf6eb8a81302f418d1a1d
Commit: de69fee82c5962fb7bdaf6eb8a81302f418d1a1d
Parent: 97c06978515ed6e071bfd4a5e858837dd2b0edcf
Author: Mike Miller (OS Dev) [EMAIL PROTECTED]
AuthorDate: Tue Mar 6 01:42:16 2007 -0800
Committer:  Linus Torvalds [EMAIL PROTECTED]
CommitDate: Tue Mar 6 09:30:25 2007 -0800

[PATCH] cciss: add struct pci_driver shutdown support (replaces reboot 
notifier)

This patch adds support for the struct pci_driver shutdown method to cciss.
 We require notification of an impending reboot or shutdown so that we can
flush the battery backed write cache (BBWC) on the Smart Array controller.

Signed-off-by: Mike Miller [EMAIL PROTECTED]
Signed-off-by: Andrew Morton [EMAIL PROTECTED]
Signed-off-by: Linus Torvalds [EMAIL PROTECTED]
---
 drivers/block/cciss.c |   10 ++
 1 files changed, 6 insertions(+), 4 deletions(-)

diff --git a/drivers/block/cciss.c b/drivers/block/cciss.c
index 8791e43..0c716ee 100644
--- a/drivers/block/cciss.c
+++ b/drivers/block/cciss.c
@@ -3404,7 +3404,7 @@ static int __devinit cciss_init_one(struct pci_dev *pdev,
return -1;
 }
 
-static void __devexit cciss_remove_one(struct pci_dev *pdev)
+static void cciss_remove_one(struct pci_dev *pdev)
 {
ctlr_info_t *tmp_ptr;
int i, j;
@@ -3428,9 +3428,10 @@ static void __devexit cciss_remove_one(struct pci_dev 
*pdev)
memset(flush_buf, 0, 4);
return_code = sendcmd(CCISS_CACHE_FLUSH, i, flush_buf, 4, 0, 0, 0, NULL,
  TYPE_CMD);
-   if (return_code != IO_OK) {
-   printk(KERN_WARNING Error Flushing cache on controller %d\n,
-  i);
+   if (return_code == IO_OK) {
+   printk(KERN_INFO Completed flushing cache on controller %d\n, 
i);
+   } else {
+   printk(KERN_WARNING Error flushing cache on controller %d\n, 
i);
}
free_irq(hba[i]-intr[2], hba[i]);
 
@@ -3481,6 +3482,7 @@ static struct pci_driver cciss_pci_driver = {
.probe = cciss_init_one,
.remove = __devexit_p(cciss_remove_one),
.id_table = cciss_pci_device_id,/* id_table */
+   .shutdown = cciss_remove_one,
 };
 
 /*
-
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] initramfs should not depend on CONFIG_BLOCK

2007-03-06 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=f991633de626a5f16069d00e26b45142e037ce24
Commit: f991633de626a5f16069d00e26b45142e037ce24
Parent: de69fee82c5962fb7bdaf6eb8a81302f418d1a1d
Author: Dimitri Gorokhovik [EMAIL PROTECTED]
AuthorDate: Tue Mar 6 01:42:17 2007 -0800
Committer:  Linus Torvalds [EMAIL PROTECTED]
CommitDate: Tue Mar 6 09:30:25 2007 -0800

[PATCH] initramfs should not depend on CONFIG_BLOCK

initramfs ended up depending on BLOCK:

  INITRAMFS_SOURCE -- BLK_DEV_INITRD -- BLOCK

This inhibits use of customized-initramfs-over-ramfs without block layer
(ramfs would still be enabled), useful in embedded applications.

Move BLK_DEV_INITRD out of 'drivers/block/Kconfig' and into 'init/Kconfig',
make it unconditional.

Signed-off-by: Dimitri Gorokhovik [EMAIL PROTECTED]
Cc: David Howells [EMAIL PROTECTED]
Signed-off-by: Andrew Morton [EMAIL PROTECTED]
Signed-off-by: Linus Torvalds [EMAIL PROTECTED]
---
 drivers/block/Kconfig |   16 
 init/Kconfig  |   16 
 2 files changed, 16 insertions(+), 16 deletions(-)

diff --git a/drivers/block/Kconfig b/drivers/block/Kconfig
index cacb1c8..17ee97f 100644
--- a/drivers/block/Kconfig
+++ b/drivers/block/Kconfig
@@ -406,22 +406,6 @@ config BLK_DEV_RAM_BLOCKSIZE
  setups function - apparently needed by the rd_load_image routine
  that supposes the filesystem in the image uses a 1024 blocksize.
 
-config BLK_DEV_INITRD
-   bool Initial RAM filesystem and RAM disk (initramfs/initrd) support
-   depends on BROKEN || !FRV
-   help
- The initial RAM filesystem is a ramfs which is loaded by the
- boot loader (loadlin or lilo) and that is mounted as root
- before the normal boot procedure. It is typically used to
- load modules needed to mount the real root file system,
- etc. See file:Documentation/initrd.txt for details.
-
- If RAM disk support (BLK_DEV_RAM) is also included, this
- also enables initial RAM disk (initrd) support and adds
- 15 Kbytes (more on some other architectures) to the kernel size.
-
- If unsure say Y.
-
 config CDROM_PKTCDVD
tristate Packet writing on CD/DVD media
depends on !UML
diff --git a/init/Kconfig b/init/Kconfig
index f977086..b170aa1 100644
--- a/init/Kconfig
+++ b/init/Kconfig
@@ -304,6 +304,22 @@ config RELAY
 
  If unsure, say N.
 
+config BLK_DEV_INITRD
+   bool Initial RAM filesystem and RAM disk (initramfs/initrd) support
+   depends on BROKEN || !FRV
+   help
+ The initial RAM filesystem is a ramfs which is loaded by the
+ boot loader (loadlin or lilo) and that is mounted as root
+ before the normal boot procedure. It is typically used to
+ load modules needed to mount the real root file system,
+ etc. See file:Documentation/initrd.txt for details.
+
+ If RAM disk support (BLK_DEV_RAM) is also included, this
+ also enables initial RAM disk (initrd) support and adds
+ 15 Kbytes (more on some other architectures) to the kernel size.
+
+ If unsure say Y.
+
 if BLK_DEV_INITRD
 
 source usr/Kconfig
-
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] linux/audit.h needs linux/types.h

2007-03-06 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=3b46e650165f691a30ddede1a79d2df02f3459d7
Commit: 3b46e650165f691a30ddede1a79d2df02f3459d7
Parent: f991633de626a5f16069d00e26b45142e037ce24
Author: Jeff Dike [EMAIL PROTECTED]
AuthorDate: Tue Mar 6 01:42:17 2007 -0800
Committer:  Linus Torvalds [EMAIL PROTECTED]
CommitDate: Tue Mar 6 09:30:25 2007 -0800

[PATCH] linux/audit.h needs linux/types.h

Include linux/types.h here because we need a definition of __u32.  This file
appears not be exported verbatim by libc, so I think this doesn't have any
userspace consequences.

Signed-off-by: Jeff Dike [EMAIL PROTECTED]
Cc: Paolo 'Blaisorblade' Giarrusso [EMAIL PROTECTED]
Signed-off-by: Andrew Morton [EMAIL PROTECTED]
Signed-off-by: Linus Torvalds [EMAIL PROTECTED]
---
 include/linux/audit.h |1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/include/linux/audit.h b/include/linux/audit.h
index 229fa01..773e30d 100644
--- a/include/linux/audit.h
+++ b/include/linux/audit.h
@@ -24,6 +24,7 @@
 #ifndef _LINUX_AUDIT_H_
 #define _LINUX_AUDIT_H_
 
+#include linux/types.h
 #include linux/elf-em.h
 
 /* The netlink messages for the audit system is divided into blocks:
-
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] uml: fix formatting violations in signal delivery code

2007-03-06 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=7c7a89499a1089a36e40de2db54ff82f5988270d
Commit: 7c7a89499a1089a36e40de2db54ff82f5988270d
Parent: 3b46e650165f691a30ddede1a79d2df02f3459d7
Author: Jeff Dike [EMAIL PROTECTED]
AuthorDate: Tue Mar 6 01:42:18 2007 -0800
Committer:  Linus Torvalds [EMAIL PROTECTED]
CommitDate: Tue Mar 6 09:30:26 2007 -0800

[PATCH] uml: fix formatting violations in signal delivery code

Fix a few formatting bugs in the signal code.

Signed-off-by: Jeff Dike [EMAIL PROTECTED]
Cc: Paolo 'Blaisorblade' Giarrusso [EMAIL PROTECTED]
Signed-off-by: Andrew Morton [EMAIL PROTECTED]
Signed-off-by: Linus Torvalds [EMAIL PROTECTED]
---
 arch/um/kernel/signal.c |6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/arch/um/kernel/signal.c b/arch/um/kernel/signal.c
index 2a32e5e..3c798cd 100644
--- a/arch/um/kernel/signal.c
+++ b/arch/um/kernel/signal.c
@@ -158,12 +158,12 @@ static int kern_do_signal(struct pt_regs *regs)
clear_thread_flag(TIF_RESTORE_SIGMASK);
sigprocmask(SIG_SETMASK, current-saved_sigmask, NULL);
}
-   return(handled_sig);
+   return handled_sig;
 }
 
 int do_signal(void)
 {
-   return(kern_do_signal(current-thread.regs));
+   return kern_do_signal(current-thread.regs);
 }
 
 /*
@@ -186,5 +186,5 @@ long sys_sigsuspend(int history0, int history1, 
old_sigset_t mask)
 
 long sys_sigaltstack(const stack_t __user *uss, stack_t __user *uoss)
 {
-   return(do_sigaltstack(uss, uoss, PT_REGS_SP(current-thread.regs)));
+   return do_sigaltstack(uss, uoss, PT_REGS_SP(current-thread.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


[PATCH] uml: add a debugging message

2007-03-06 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=b4cf95c69a72baf90b8f275294a3ff3d282ffe09
Commit: b4cf95c69a72baf90b8f275294a3ff3d282ffe09
Parent: 7c7a89499a1089a36e40de2db54ff82f5988270d
Author: Jeff Dike [EMAIL PROTECTED]
AuthorDate: Tue Mar 6 01:42:19 2007 -0800
Committer:  Linus Torvalds [EMAIL PROTECTED]
CommitDate: Tue Mar 6 09:30:26 2007 -0800

[PATCH] uml: add a debugging message

Add a debugging message in the case that mapping a stub fails.

Signed-off-by: Jeff Dike [EMAIL PROTECTED]
Cc: Paolo 'Blaisorblade' Giarrusso [EMAIL PROTECTED]
Signed-off-by: Andrew Morton [EMAIL PROTECTED]
Signed-off-by: Linus Torvalds [EMAIL PROTECTED]
---
 arch/um/os-Linux/skas/process.c |5 -
 1 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/arch/um/os-Linux/skas/process.c b/arch/um/os-Linux/skas/process.c
index 9b34fe6..dda0678 100644
--- a/arch/um/os-Linux/skas/process.c
+++ b/arch/um/os-Linux/skas/process.c
@@ -419,9 +419,12 @@ void map_stub_pages(int fd, unsigned long code,
  .offset  = code_offset
} } });
n = os_write_file(fd, mmop, sizeof(mmop));
-   if(n != sizeof(mmop))
+   if(n != sizeof(mmop)){
+   printk(mmap args - addr = 0x%lx, fd = %d, offset = %llx\n,
+  code, code_fd, (unsigned long long) code_offset);
panic(map_stub_pages : /proc/mm map for code failed, 
  err = %d\n, -n);
+   }
 
if ( stack ) {
__u64 map_offset;
-
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] uml: comment the initialization of a global

2007-03-06 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=0e8cd28a084691587549630dce728661401d343b
Commit: 0e8cd28a084691587549630dce728661401d343b
Parent: b4cf95c69a72baf90b8f275294a3ff3d282ffe09
Author: Jeff Dike [EMAIL PROTECTED]
AuthorDate: Tue Mar 6 01:42:20 2007 -0800
Committer:  Linus Torvalds [EMAIL PROTECTED]
CommitDate: Tue Mar 6 09:30:26 2007 -0800

[PATCH] uml: comment the initialization of a global

Comment the fact that sig_info is initialized early in boot, and thus 
doesn't
need any locking.

Signed-off-by: Jeff Dike [EMAIL PROTECTED]
Cc: Paolo 'Blaisorblade' Giarrusso [EMAIL PROTECTED]
Signed-off-by: Andrew Morton [EMAIL PROTECTED]
Signed-off-by: Linus Torvalds [EMAIL PROTECTED]
---
 arch/um/os-Linux/trap.c |1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/arch/um/os-Linux/trap.c b/arch/um/os-Linux/trap.c
index 1df231a..d221214 100644
--- a/arch/um/os-Linux/trap.c
+++ b/arch/um/os-Linux/trap.c
@@ -16,6 +16,7 @@ void usr2_handler(int sig, union uml_pt_regs *regs)
CHOOSE_MODE(syscall_handler_tt(sig, regs), (void) 0);
 }
 
+/* Initialized from linux_main() */
 void (*sig_info[NSIG])(int, union uml_pt_regs *);
 
 void os_fill_handlinfo(struct kern_handlers 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


[PATCH] knfsd: remove CONFIG_IPV6 ifdefs from sunrpc server code

2007-03-06 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=5a05ed73e1abfd7e0e7d474817245861deaa18af
Commit: 5a05ed73e1abfd7e0e7d474817245861deaa18af
Parent: 7a37f5787e76bf1765c1add3a9a7163f841a28bb
Author: NeilBrown [EMAIL PROTECTED]
AuthorDate: Tue Mar 6 01:42:22 2007 -0800
Committer:  Linus Torvalds [EMAIL PROTECTED]
CommitDate: Tue Mar 6 09:30:26 2007 -0800

[PATCH] knfsd: remove CONFIG_IPV6 ifdefs from sunrpc server code

They don't really save that much, and aren't worth the hassle.

Signed-off-by: Neil Brown [EMAIL PROTECTED]
Signed-off-by: Andrew Morton [EMAIL PROTECTED]
Signed-off-by: Linus Torvalds [EMAIL PROTECTED]
---
 include/linux/sunrpc/svc.h |2 --
 net/sunrpc/svcsock.c   |   13 +++--
 2 files changed, 3 insertions(+), 12 deletions(-)

diff --git a/include/linux/sunrpc/svc.h b/include/linux/sunrpc/svc.h
index 83b3c7b..35fa4d5 100644
--- a/include/linux/sunrpc/svc.h
+++ b/include/linux/sunrpc/svc.h
@@ -194,9 +194,7 @@ static inline void svc_putu32(struct kvec *iov, __be32 val)
 
 union svc_addr_u {
 struct in_addr addr;
-#if defined(CONFIG_IPV6) || defined(CONFIG_IPV6_MODULE)
 struct in6_addraddr6;
-#endif
 };
 
 /*
diff --git a/net/sunrpc/svcsock.c b/net/sunrpc/svcsock.c
index 32b94cf..e957ce5 100644
--- a/net/sunrpc/svcsock.c
+++ b/net/sunrpc/svcsock.c
@@ -131,13 +131,13 @@ static char *__svc_print_addr(struct sockaddr *addr, char 
*buf, size_t len)
NIPQUAD(((struct sockaddr_in *) addr)-sin_addr),
htons(((struct sockaddr_in *) addr)-sin_port));
break;
-#if defined(CONFIG_IPV6) || defined(CONFIG_IPV6_MODULE)
+
case AF_INET6:
snprintf(buf, len, %x:%x:%x:%x:%x:%x:%x:%x, port=%u,
NIP6(((struct sockaddr_in6 *) addr)-sin6_addr),
htons(((struct sockaddr_in6 *) addr)-sin6_port));
break;
-#endif
+
default:
snprintf(buf, len, unknown address type: %d, addr-sa_family);
break;
@@ -449,9 +449,7 @@ svc_wake_up(struct svc_serv *serv)
 
 union svc_pktinfo_u {
struct in_pktinfo pkti;
-#if defined(CONFIG_IPV6) || defined(CONFIG_IPV6_MODULE)
struct in6_pktinfo pkti6;
-#endif
 };
 
 static void svc_set_cmsg_data(struct svc_rqst *rqstp, struct cmsghdr *cmh)
@@ -467,7 +465,7 @@ static void svc_set_cmsg_data(struct svc_rqst *rqstp, 
struct cmsghdr *cmh)
cmh-cmsg_len = CMSG_LEN(sizeof(*pki));
}
break;
-#if defined(CONFIG_IPV6) || defined(CONFIG_IPV6_MODULE)
+
case AF_INET6: {
struct in6_pktinfo *pki = CMSG_DATA(cmh);
 
@@ -479,7 +477,6 @@ static void svc_set_cmsg_data(struct svc_rqst *rqstp, 
struct cmsghdr *cmh)
cmh-cmsg_len = CMSG_LEN(sizeof(*pki));
}
break;
-#endif
}
return;
 }
@@ -730,13 +727,11 @@ static inline void svc_udp_get_dest_address(struct 
svc_rqst *rqstp,
rqstp-rq_daddr.addr.s_addr = pki-ipi_spec_dst.s_addr;
break;
}
-#if defined(CONFIG_IPV6) || defined(CONFIG_IPV6_MODULE)
case AF_INET6: {
struct in6_pktinfo *pki = CMSG_DATA(cmh);
ipv6_addr_copy(rqstp-rq_daddr.addr6, pki-ipi6_addr);
break;
}
-#endif
}
 }
 
@@ -985,11 +980,9 @@ static inline int svc_port_is_privileged(struct sockaddr 
*sin)
case AF_INET:
return ntohs(((struct sockaddr_in *)sin)-sin_port)
 PROT_SOCK;
-#if defined(CONFIG_IPV6) || defined(CONFIG_IPV6_MODULE)
case AF_INET6:
return ntohs(((struct sockaddr_in6 *)sin)-sin6_port)
 PROT_SOCK;
-#endif
default:
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


[PATCH] knfsd: fix recently introduced problem with shutting down a busy NFS server

2007-03-06 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=cda1fd4abd773216a888487af0170d0cc3d50454
Commit: cda1fd4abd773216a888487af0170d0cc3d50454
Parent: 5a05ed73e1abfd7e0e7d474817245861deaa18af
Author: NeilBrown [EMAIL PROTECTED]
AuthorDate: Tue Mar 6 01:42:22 2007 -0800
Committer:  Linus Torvalds [EMAIL PROTECTED]
CommitDate: Tue Mar 6 09:30:26 2007 -0800

[PATCH] knfsd: fix recently introduced problem with shutting down a busy 
NFS server

When the last thread of nfsd exits, it shuts down all related sockets.  It
currently uses svc_close_socket to do this, but that only is immediately
effective if the socket is not SK_BUSY.

If the socket is busy - i.e.  if a request has arrived that has not yet been
processes - svc_close_socket is not effective and the shutdown process 
spins.

So create a new svc_force_close_socket which removes the SK_BUSY flag is set
and then calls svc_close_socket.

Also change some open-codes loops in svc_destroy to use
list_for_each_entry_safe.

Signed-off-by: Neil Brown [EMAIL PROTECTED]
Signed-off-by: Andrew Morton [EMAIL PROTECTED]
Signed-off-by: Linus Torvalds [EMAIL PROTECTED]
---
 include/linux/sunrpc/svcsock.h |2 +-
 net/sunrpc/svc.c   |   21 +
 net/sunrpc/svcsock.c   |   16 +++-
 3 files changed, 25 insertions(+), 14 deletions(-)

diff --git a/include/linux/sunrpc/svcsock.h b/include/linux/sunrpc/svcsock.h
index cccea0a..7909687 100644
--- a/include/linux/sunrpc/svcsock.h
+++ b/include/linux/sunrpc/svcsock.h
@@ -66,7 +66,7 @@ struct svc_sock {
  * Function prototypes.
  */
 intsvc_makesock(struct svc_serv *, int, unsigned short, int flags);
-void   svc_close_socket(struct svc_sock *);
+void   svc_force_close_socket(struct svc_sock *);
 intsvc_recv(struct svc_rqst *, long);
 intsvc_send(struct svc_rqst *);
 void   svc_drop(struct svc_rqst *);
diff --git a/net/sunrpc/svc.c b/net/sunrpc/svc.c
index 8353829..f960b13 100644
--- a/net/sunrpc/svc.c
+++ b/net/sunrpc/svc.c
@@ -367,6 +367,7 @@ void
 svc_destroy(struct svc_serv *serv)
 {
struct svc_sock *svsk;
+   struct svc_sock *tmp;
 
dprintk(svc: svc_destroy(%s, %d)\n,
serv-sv_program-pg_name,
@@ -382,21 +383,17 @@ svc_destroy(struct svc_serv *serv)
 
del_timer_sync(serv-sv_temptimer);
 
-   while (!list_empty(serv-sv_tempsocks)) {
-   svsk = list_entry(serv-sv_tempsocks.next,
- struct svc_sock,
- sk_list);
-   svc_close_socket(svsk);
-   }
+   list_for_each_entry_safe(svsk, tmp, serv-sv_tempsocks, sk_list)
+   svc_force_close_socket(svsk);
+
if (serv-sv_shutdown)
serv-sv_shutdown(serv);
 
-   while (!list_empty(serv-sv_permsocks)) {
-   svsk = list_entry(serv-sv_permsocks.next,
- struct svc_sock,
- sk_list);
-   svc_close_socket(svsk);
-   }
+   list_for_each_entry_safe(svsk, tmp, serv-sv_permsocks, sk_list)
+   svc_force_close_socket(svsk);
+
+   BUG_ON(!list_empty(serv-sv_permsocks));
+   BUG_ON(!list_empty(serv-sv_tempsocks));
 
cache_clean_deferred(serv);
 
diff --git a/net/sunrpc/svcsock.c b/net/sunrpc/svcsock.c
index e957ce5..f6e1eb1 100644
--- a/net/sunrpc/svcsock.c
+++ b/net/sunrpc/svcsock.c
@@ -82,6 +82,7 @@ static void   svc_delete_socket(struct svc_sock 
*svsk);
 static voidsvc_udp_data_ready(struct sock *, int);
 static int svc_udp_recvfrom(struct svc_rqst *);
 static int svc_udp_sendto(struct svc_rqst *);
+static voidsvc_close_socket(struct svc_sock *svsk);
 
 static struct svc_deferred_req *svc_deferred_dequeue(struct svc_sock *svsk);
 static int svc_deferred_recv(struct svc_rqst *rqstp);
@@ -1787,7 +1788,7 @@ svc_delete_socket(struct svc_sock *svsk)
spin_unlock_bh(serv-sv_lock);
 }
 
-void svc_close_socket(struct svc_sock *svsk)
+static void svc_close_socket(struct svc_sock *svsk)
 {
set_bit(SK_CLOSE, svsk-sk_flags);
if (test_and_set_bit(SK_BUSY, svsk-sk_flags))
@@ -1800,6 +1801,19 @@ void svc_close_socket(struct svc_sock *svsk)
svc_sock_put(svsk);
 }
 
+void svc_force_close_socket(struct svc_sock *svsk)
+{
+   set_bit(SK_CLOSE, svsk-sk_flags);
+   if (test_bit(SK_BUSY, svsk-sk_flags)) {
+   /* Waiting to be processed, but no threads left,
+* So just remove it from the waiting list
+*/
+   list_del_init(svsk-sk_ready);
+   clear_bit(SK_BUSY, svsk-sk_flags);
+   }
+   svc_close_socket(svsk);
+}
+
 /**
  * svc_makesock - Make a socket for nfsd and lockd
  * @serv: RPC server structure
-
To 

[PATCH] knfsd: provide sunrpc pool_mode module option

2007-03-06 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=42a7fc4a6598221f1a547a76cdd45a8ab4d90e93
Commit: 42a7fc4a6598221f1a547a76cdd45a8ab4d90e93
Parent: cda1fd4abd773216a888487af0170d0cc3d50454
Author: Greg Banks [EMAIL PROTECTED]
AuthorDate: Tue Mar 6 01:42:23 2007 -0800
Committer:  Linus Torvalds [EMAIL PROTECTED]
CommitDate: Tue Mar 6 09:30:26 2007 -0800

[PATCH] knfsd: provide sunrpc pool_mode module option

Provide a module param pool_mode for sunrpc.ko which allows a sysadmin to
choose the mode for mapping NFS thread service pools to CPUs.  Values are:

autochoose a mapping mode heuristically
global  (default, same as the pre-2.6.19 code) a single global pool
percpu  one pool per CPU
pernode one pool per NUMA node

Note that since 2.6.19 the hardcoded behaviour has been auto, this patch
makes the default global.

The pool mode can be changed after boot/modprobe using /sys, if the NFS and
lockd services have been shut down.  A useful side effect of this change is 
to
fix a small memory leak when unloading the module.

Signed-off-by: Greg Banks [EMAIL PROTECTED]
Signed-off-by: Neil Brown [EMAIL PROTECTED]
Signed-off-by: Andrew Morton [EMAIL PROTECTED]
Signed-off-by: Linus Torvalds [EMAIL PROTECTED]
---
 Documentation/kernel-parameters.txt |   16 
 net/sunrpc/svc.c|  133 ++-
 2 files changed, 130 insertions(+), 19 deletions(-)

diff --git a/Documentation/kernel-parameters.txt 
b/Documentation/kernel-parameters.txt
index 03eb5ed..6e92ba6 100644
--- a/Documentation/kernel-parameters.txt
+++ b/Documentation/kernel-parameters.txt
@@ -1685,6 +1685,22 @@ and is between 256 and 4096 characters. It is defined in 
the file
stifb=  [HW]
Format: bpp:bpp1[:bpp2[:bpp3...]]
 
+   sunrpc.pool_mode=
+   [NFS]
+   Control how the NFS server code allocates CPUs to
+   service thread pools.  Depending on how many NICs
+   you have and where their interrupts are bound, this
+   option will affect which CPUs will do NFS serving.
+   Note: this parameter cannot be changed while the
+   NFS server is running.
+
+   autothe server chooses an appropriate mode
+   automatically using heuristics
+   global  a single global pool contains all CPUs
+   percpu  one pool for each CPU
+   pernode one pool for each NUMA node (equivalent
+   to global on non-NUMA machines)
+
swiotlb=[IA-64] Number of I/O TLB slabs
 
switches=   [HW,M68k]
diff --git a/net/sunrpc/svc.c b/net/sunrpc/svc.c
index f960b13..b4db53f 100644
--- a/net/sunrpc/svc.c
+++ b/net/sunrpc/svc.c
@@ -27,22 +27,26 @@
 
 #define RPCDBG_FACILITYRPCDBG_SVCDSP
 
+#define svc_serv_is_pooled(serv)((serv)-sv_function)
+
 /*
  * Mode for mapping cpus to pools.
  */
 enum {
-   SVC_POOL_NONE = -1, /* uninitialised, choose one of the others */
+   SVC_POOL_AUTO = -1, /* choose one of the others */
SVC_POOL_GLOBAL,/* no mapping, just a single global pool
 * (legacy  UP mode) */
SVC_POOL_PERCPU,/* one pool per cpu */
SVC_POOL_PERNODE/* one pool per numa node */
 };
+#define SVC_POOL_DEFAULT   SVC_POOL_GLOBAL
 
 /*
  * Structure for mapping cpus to pools and vice versa.
  * Setup once during sunrpc initialisation.
  */
 static struct svc_pool_map {
+   int count;  /* How many svc_servs use us */
int mode;   /* Note: int not enum to avoid
 * warnings about enumeration value
 * not handled in switch */
@@ -50,9 +54,63 @@ static struct svc_pool_map {
unsigned int *pool_to;  /* maps pool id to cpu or node */
unsigned int *to_pool;  /* maps cpu or node to pool id */
 } svc_pool_map = {
-   .mode = SVC_POOL_NONE
+   .count = 0,
+   .mode = SVC_POOL_DEFAULT
 };
+static DEFINE_MUTEX(svc_pool_map_mutex);/* protects svc_pool_map.count only */
+
+static int
+param_set_pool_mode(const char *val, struct kernel_param *kp)
+{
+   int *ip = (int *)kp-arg;
+   struct svc_pool_map *m = svc_pool_map;
+   int err;
+
+   mutex_lock(svc_pool_map_mutex);
+
+   err = -EBUSY;
+   if (m-count)
+   goto out;
+
+   err = 0;
+   if (!strncmp(val, auto, 4))
+   *ip = SVC_POOL_AUTO;
+   else if (!strncmp(val, global, 6))
+   *ip = SVC_POOL_GLOBAL;
+   else if 

[PATCH] kconfig: Update swsusp description

2007-03-06 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=c7276fde27bca89798f33c0be9543dc108468788
Commit: c7276fde27bca89798f33c0be9543dc108468788
Parent: 42a7fc4a6598221f1a547a76cdd45a8ab4d90e93
Author: Rafael J. Wysocki [EMAIL PROTECTED]
AuthorDate: Tue Mar 6 01:42:24 2007 -0800
Committer:  Linus Torvalds [EMAIL PROTECTED]
CommitDate: Tue Mar 6 09:30:26 2007 -0800

[PATCH] kconfig: Update swsusp description

Update the outdated and inaccurate description of the software suspend in
Kconfig.

Signed-off-by: Rafael J. Wysocki [EMAIL PROTECTED]
Signed-off-by: Andrew Morton [EMAIL PROTECTED]
Signed-off-by: Linus Torvalds [EMAIL PROTECTED]
---
 kernel/power/Kconfig |   37 +
 1 files changed, 21 insertions(+), 16 deletions(-)

diff --git a/kernel/power/Kconfig b/kernel/power/Kconfig
index 95f6657..51a4dd0 100644
--- a/kernel/power/Kconfig
+++ b/kernel/power/Kconfig
@@ -81,29 +81,34 @@ config SOFTWARE_SUSPEND
bool Software Suspend
depends on PM  SWAP  ((X86  (!SMP || SUSPEND_SMP)) || ((FRV || 
PPC32)  !SMP))
---help---
- Enable the possibility of suspending the machine.
- It doesn't need ACPI or APM.
- You may suspend your machine by 'swsusp' or 'shutdown -z time' 
- (patch for sysvinit needed). 
+ Enable the suspend to disk (STD) functionality.
 
- It creates an image which is saved in your active swap. Upon next
+ You can suspend your machine with 'echo disk  /sys/power/state'.
+ Alternatively, you can use the additional userland tools available
+ from http://suspend.sf.net.
+
+ In principle it does not require ACPI or APM, although for example
+ ACPI will be used if available.
+
+ It creates an image which is saved in your active swap. Upon the next
  boot, pass the 'resume=/dev/swappartition' argument to the kernel to
  have it detect the saved image, restore memory state from it, and
  continue to run as before. If you do not want the previous state to
- be reloaded, then use the 'noresume' kernel argument. However, note
- that your partitions will be fsck'd and you must re-mkswap your swap
- partitions. It does not work with swap files.
+ be reloaded, then use the 'noresume' kernel command line argument.
+ Note, however, that fsck will be run on your filesystems and you will
+ need to run mkswap against the swap partition used for the suspend.
 
- Right now you may boot without resuming and then later resume but
- in meantime you cannot use those swap partitions/files which were
- involved in suspending. Also in this case there is a risk that buffers
- on disk won't match with saved ones.
+ It also works with swap files to a limited extent (for details see
+ file:Documentation/power/swsusp-and-swap-files.txt).
 
- For more information take a look at 
file:Documentation/power/swsusp.txt.
+ Right now you may boot without resuming and resume later but in the
+ meantime you cannot use the swap partition(s)/file(s) involved in
+ suspending.  Also in this case you must not use the filesystems
+ that were mounted before the suspend.  In particular, you MUST NOT
+ MOUNT any journaled filesystems mounted before the suspend or they
+ will get corrupted in a nasty way.
 
- (For now, swsusp is incompatible with PAE aka HIGHMEM_64G on i386.
- we need identity mapping for resume to work, and that is trivial
- to get with 4MB pages, but less than trivial on PAE).
+ For more information take a look at 
file:Documentation/power/swsusp.txt.
 
 config PM_STD_PARTITION
string Default resume partition
-
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


bonding: fix double dev_add_pack

2007-03-06 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=c4f283b1f275e5528c13c119e5cfc80cdba55d00
Commit: c4f283b1f275e5528c13c119e5cfc80cdba55d00
Parent: c3442e296517aee733d62fc3fe03211598902c7d
Author: Jay Vosburgh [EMAIL PROTECTED]
AuthorDate: Wed Feb 28 17:03:20 2007 -0800
Committer:  Jeff Garzik [EMAIL PROTECTED]
CommitDate: Tue Mar 6 06:08:11 2007 -0500

bonding: fix double dev_add_pack

Bonding can erroneously register the same packet_type to receive
ARPs (for use by ARP validation): once at device open time, and once via
sysfs.  Since sysfs can change the validate setting (and thus register
or unregister) at any time, a flag is needed to synchronize with device
open in order to avoid double registrations, and the simplest place is
within the packet_type structure itself.  Double unregister is not an
issue.

Bug reported by Ulrich Oelmann [EMAIL PROTECTED].

Signed-off-by: Jay Vosburgh [EMAIL PROTECTED]
Signed-off-by: Jeff Garzik [EMAIL PROTECTED]
---
 drivers/net/bonding/bond_main.c |8 +++-
 1 files changed, 7 insertions(+), 1 deletions(-)

diff --git a/drivers/net/bonding/bond_main.c b/drivers/net/bonding/bond_main.c
index ea73ebf..68afcb5 100644
--- a/drivers/net/bonding/bond_main.c
+++ b/drivers/net/bonding/bond_main.c
@@ -3423,6 +3423,9 @@ void bond_register_arp(struct bonding *bond)
 {
struct packet_type *pt = bond-arp_mon_pt;
 
+   if (pt-type)
+   return;
+
pt-type = htons(ETH_P_ARP);
pt-dev = NULL; /*bond-dev;XXX*/
pt-func = bond_arp_rcv;
@@ -3431,7 +3434,10 @@ void bond_register_arp(struct bonding *bond)
 
 void bond_unregister_arp(struct bonding *bond)
 {
-   dev_remove_pack(bond-arp_mon_pt);
+   struct packet_type *pt = bond-arp_mon_pt;
+
+   dev_remove_pack(pt);
+   pt-type = 0;
 }
 
 /* Hashing Policies -*/
-
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


bonding: only receive ARPs for us

2007-03-06 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=e245cb71d490e5e516c0ca0688fad7de6c22943d
Commit: e245cb71d490e5e516c0ca0688fad7de6c22943d
Parent: c4f283b1f275e5528c13c119e5cfc80cdba55d00
Author: Jay Vosburgh [EMAIL PROTECTED]
AuthorDate: Wed Feb 28 17:03:27 2007 -0800
Committer:  Jeff Garzik [EMAIL PROTECTED]
CommitDate: Tue Mar 6 06:08:11 2007 -0500

bonding: only receive ARPs for us

The ARP validation code only needs ARPs for the bonding device.

Signed-off-by: Jay Vosburgh [EMAIL PROTECTED]
Signed-off-by: Jeff Garzik [EMAIL PROTECTED]
---
 drivers/net/bonding/bond_main.c |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/net/bonding/bond_main.c b/drivers/net/bonding/bond_main.c
index 68afcb5..1ca73b8 100644
--- a/drivers/net/bonding/bond_main.c
+++ b/drivers/net/bonding/bond_main.c
@@ -3427,7 +3427,7 @@ void bond_register_arp(struct bonding *bond)
return;
 
pt-type = htons(ETH_P_ARP);
-   pt-dev = NULL; /*bond-dev;XXX*/
+   pt-dev = bond-dev;
pt-func = bond_arp_rcv;
dev_add_pack(pt);
 }
-
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


bonding: Improve IGMP join processing

2007-03-06 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=a816c7c712ff9f6770168b91facb9bfa9f0acd48
Commit: a816c7c712ff9f6770168b91facb9bfa9f0acd48
Parent: e245cb71d490e5e516c0ca0688fad7de6c22943d
Author: Jay Vosburgh [EMAIL PROTECTED]
AuthorDate: Wed Feb 28 17:03:37 2007 -0800
Committer:  Jeff Garzik [EMAIL PROTECTED]
CommitDate: Tue Mar 6 06:08:11 2007 -0500

bonding: Improve IGMP join processing

In active-backup mode, the current bonding code duplicates IGMP
traffic to all slaves, so that switches are up to date in case of a
failover from an active to a backup interface.  If bonding then fails
back to the original active interface, it is likely that the active
slave switch's IGMP forwarding for the port will be out of date until
some event occurs to refresh the switch (e.g., a membership query).

This patch alters the behavior of bonding to no longer flood
IGMP to all ports, and to issue IGMP JOINs to the newly active port at
the time of a failover.  This insures that switches are kept up to date
for all cases.

GOELLESCH Niels [EMAIL PROTECTED] originally
reported this problem, and included a patch.  His original patch was
modified by Jay Vosburgh to additionally remove the existing IGMP flood
behavior, use RCU, streamline code paths, fix trailing white space, and
adjust for style.

Signed-off-by: Jay Vosburgh [EMAIL PROTECTED]
Signed-off-by: Jeff Garzik [EMAIL PROTECTED]
---
 drivers/net/bonding/bond_main.c |   76 +--
 include/linux/igmp.h|2 +
 net/ipv4/igmp.c |   23 
 3 files changed, 50 insertions(+), 51 deletions(-)

diff --git a/drivers/net/bonding/bond_main.c b/drivers/net/bonding/bond_main.c
index 1ca73b8..e4724d8 100644
--- a/drivers/net/bonding/bond_main.c
+++ b/drivers/net/bonding/bond_main.c
@@ -60,6 +60,7 @@
 #include linux/errno.h
 #include linux/netdevice.h
 #include linux/inetdevice.h
+#include linux/igmp.h
 #include linux/etherdevice.h
 #include linux/skbuff.h
 #include net/sock.h
@@ -861,6 +862,28 @@ static void bond_mc_delete(struct bonding *bond, void 
*addr, int alen)
}
 }
 
+
+/*
+ * Retrieve the list of registered multicast addresses for the bonding
+ * device and retransmit an IGMP JOIN request to the current active
+ * slave.
+ */
+static void bond_resend_igmp_join_requests(struct bonding *bond)
+{
+   struct in_device *in_dev;
+   struct ip_mc_list *im;
+
+   rcu_read_lock();
+   in_dev = __in_dev_get_rcu(bond-dev);
+   if (in_dev) {
+   for (im = in_dev-mc_list; im; im = im-next) {
+   ip_mc_rejoin_group(im);
+   }
+   }
+
+   rcu_read_unlock();
+}
+
 /*
  * Totally destroys the mc_list in bond
  */
@@ -874,6 +897,7 @@ static void bond_mc_list_destroy(struct bonding *bond)
kfree(dmi);
dmi = bond-mc_list;
}
+bond-mc_list = NULL;
 }
 
 /*
@@ -967,6 +991,7 @@ static void bond_mc_swap(struct bonding *bond, struct slave 
*new_active, struct
for (dmi = bond-dev-mc_list; dmi; dmi = dmi-next) {
dev_mc_add(new_active-dev, dmi-dmi_addr, 
dmi-dmi_addrlen, 0);
}
+   bond_resend_igmp_join_requests(bond);
}
 }
 
@@ -4017,42 +4042,6 @@ out:
return 0;
 }
 
-static void bond_activebackup_xmit_copy(struct sk_buff *skb,
-struct bonding *bond,
-struct slave *slave)
-{
-   struct sk_buff *skb2 = skb_copy(skb, GFP_ATOMIC);
-   struct ethhdr *eth_data;
-   u8 *hwaddr;
-   int res;
-
-   if (!skb2) {
-   printk(KERN_ERR DRV_NAME : Error: 
-  bond_activebackup_xmit_copy(): skb_copy() failed\n);
-   return;
-   }
-
-   skb2-mac.raw = (unsigned char *)skb2-data;
-   eth_data = eth_hdr(skb2);
-
-   /* Pick an appropriate source MAC address
-*  -- use slave's perm MAC addr, unless used by bond
-*  -- otherwise, borrow active slave's perm MAC addr
-* since that will not be used
-*/
-   hwaddr = slave-perm_hwaddr;
-   if (!memcmp(eth_data-h_source, hwaddr, ETH_ALEN))
-   hwaddr = bond-curr_active_slave-perm_hwaddr;
-
-   /* Set source MAC address appropriately */
-   memcpy(eth_data-h_source, hwaddr, ETH_ALEN);
-
-   res = bond_dev_queue_xmit(bond, skb2, slave-dev);
-   if (res)
-   dev_kfree_skb(skb2);
-
-   return;
-}
 
 /*
  * in active-backup mode, we know that bond-curr_active_slave is always valid 
if
@@ -4073,21 +4062,6 @@ static int bond_xmit_activebackup(struct sk_buff *skb, 
struct net_device *bond_d
if (!bond-curr_active_slave)
goto out;
 
-   /* Xmit IGMP frames on all slaves to 

natsemi: netpoll fixes

2007-03-06 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=6006f7f517b9a754e4c4628755c62872e322c68a
Commit: 6006f7f517b9a754e4c4628755c62872e322c68a
Parent: a816c7c712ff9f6770168b91facb9bfa9f0acd48
Author: Sergei Shtylyov [EMAIL PROTECTED]
AuthorDate: Tue Mar 6 00:10:08 2007 +0400
Committer:  Jeff Garzik [EMAIL PROTECTED]
CommitDate: Tue Mar 6 06:10:01 2007 -0500

natsemi: netpoll fixes

Fix two issues in this driver's netpoll path: one usual, with 
spin_unlock_irq()
enabling interrupts which nobody asks it to do (that has been fixed 
recently in
a number of drivers) and one unusual, with poll_controller() method possibly
causing loss of interrupts due to the interrupt status register being 
cleared
by a simple read and the interrpupt handler simply storing it, not 
accumulating.

Signed-off-by: Sergei Shtylyov [EMAIL PROTECTED]
Signed-off-by: Jeff Garzik [EMAIL PROTECTED]
---
 drivers/net/natsemi.c |   24 +++-
 1 files changed, 19 insertions(+), 5 deletions(-)

diff --git a/drivers/net/natsemi.c b/drivers/net/natsemi.c
index 5c57433..c6172a7 100644
--- a/drivers/net/natsemi.c
+++ b/drivers/net/natsemi.c
@@ -2024,6 +2024,7 @@ static int start_tx(struct sk_buff *skb, struct 
net_device *dev)
struct netdev_private *np = netdev_priv(dev);
void __iomem * ioaddr = ns_ioaddr(dev);
unsigned entry;
+   unsigned long flags;
 
/* Note: Ordering is important here, set the field with the
   ownership bit last, and only then increment cur_tx. */
@@ -2037,7 +2038,7 @@ static int start_tx(struct sk_buff *skb, struct 
net_device *dev)
 
np-tx_ring[entry].addr = cpu_to_le32(np-tx_dma[entry]);
 
-   spin_lock_irq(np-lock);
+   spin_lock_irqsave(np-lock, flags);
 
if (!np-hands_off) {
np-tx_ring[entry].cmd_status = cpu_to_le32(DescOwn | skb-len);
@@ -2056,7 +2057,7 @@ static int start_tx(struct sk_buff *skb, struct 
net_device *dev)
dev_kfree_skb_irq(skb);
np-stats.tx_dropped++;
}
-   spin_unlock_irq(np-lock);
+   spin_unlock_irqrestore(np-lock, flags);
 
dev-trans_start = jiffies;
 
@@ -,6 +2223,8 @@ static void netdev_rx(struct net_device *dev, int 
*work_done, int work_to_do)
pkt_len = (desc_status  DescSizeMask) - 4;
if ((desc_status(DescMore|DescPktOK|DescRxLong)) != DescPktOK){
if (desc_status  DescMore) {
+   unsigned long flags;
+
if (netif_msg_rx_err(np))
printk(KERN_WARNING
%s: Oversized(?) Ethernet 
@@ -2236,12 +2239,12 @@ static void netdev_rx(struct net_device *dev, int 
*work_done, int work_to_do)
 * reset procedure documented in
 * AN-1287. */
 
-   spin_lock_irq(np-lock);
+   spin_lock_irqsave(np-lock, flags);
reset_rx(dev);
reinit_rx(dev);
writel(np-ring_dma, ioaddr + RxRingPtr);
check_link(dev);
-   spin_unlock_irq(np-lock);
+   spin_unlock_irqrestore(np-lock, flags);
 
/* We'll enable RX on exit from this
 * function. */
@@ -2396,8 +2399,19 @@ static struct net_device_stats *get_stats(struct 
net_device *dev)
 #ifdef CONFIG_NET_POLL_CONTROLLER
 static void natsemi_poll_controller(struct net_device *dev)
 {
+   struct netdev_private *np = netdev_priv(dev);
+
disable_irq(dev-irq);
-   intr_handler(dev-irq, dev);
+
+   /*
+* A real interrupt might have already reached us at this point
+* but NAPI might still haven't called us back.  As the interrupt
+* status register is cleared by reading, we should prevent an
+* interrupt loss in this case...
+*/
+   if (!np-intr_status)
+   intr_handler(dev-irq, dev);
+
enable_irq(dev-irq);
 }
 #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


ucc_geth: Fix BD processing

2007-03-06 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=a394f013f05ba083d8547551280e0309ca70b08d
Commit: a394f013f05ba083d8547551280e0309ca70b08d
Parent: 6006f7f517b9a754e4c4628755c62872e322c68a
Author: Li Yang [EMAIL PROTECTED]
AuthorDate: Tue Mar 6 16:53:46 2007 +0800
Committer:  Jeff Garzik [EMAIL PROTECTED]
CommitDate: Tue Mar 6 06:10:01 2007 -0500

ucc_geth: Fix BD processing

Fix broken BD processing code.

Signed-off-by: Michael Barkowski [EMAIL PROTECTED]
Signed-off-by: Li Yang [EMAIL PROTECTED]
Signed-off-by: Jeff Garzik [EMAIL PROTECTED]
---
 drivers/net/ucc_geth.c |   14 +-
 1 files changed, 9 insertions(+), 5 deletions(-)

diff --git a/drivers/net/ucc_geth.c b/drivers/net/ucc_geth.c
index 885e73d..639e1e6 100644
--- a/drivers/net/ucc_geth.c
+++ b/drivers/net/ucc_geth.c
@@ -3598,9 +3598,9 @@ static int ucc_geth_start_xmit(struct sk_buff *skb, 
struct net_device *dev)
 
/* Move to next BD in the ring */
if (!(bd_status  T_W))
-   ugeth-txBd[txQ] = bd + sizeof(struct qe_bd);
+   bd += sizeof(struct qe_bd);
else
-   ugeth-txBd[txQ] = ugeth-p_tx_bd_ring[txQ];
+   bd = ugeth-p_tx_bd_ring[txQ];
 
/* If the next BD still needs to be cleaned up, then the bds
   are full.  We need to tell the kernel to stop sending us stuff. */
@@ -3609,6 +3609,8 @@ static int ucc_geth_start_xmit(struct sk_buff *skb, 
struct net_device *dev)
netif_stop_queue(dev);
}
 
+   ugeth-txBd[txQ] = bd;
+
if (ugeth-p_scheduler) {
ugeth-cpucount[txQ]++;
/* Indicate to QE that there are more Tx bds ready for
@@ -3722,7 +3724,7 @@ static int ucc_geth_tx(struct net_device *dev, u8 txQ)
/* Handle the transmitted buffer and release */
/* the BD to be used with the current frame  */
 
-   if ((bd = ugeth-txBd[txQ])  (netif_queue_stopped(dev) == 0))
+   if ((bd == ugeth-txBd[txQ])  (netif_queue_stopped(dev) == 0))
break;
 
ugeth-stats.tx_packets++;
@@ -3741,10 +3743,12 @@ static int ucc_geth_tx(struct net_device *dev, u8 txQ)
 
/* Advance the confirmation BD pointer */
if (!(bd_status  T_W))
-   ugeth-confBd[txQ] += sizeof(struct qe_bd);
+   bd += sizeof(struct qe_bd);
else
-   ugeth-confBd[txQ] = ugeth-p_tx_bd_ring[txQ];
+   bd = ugeth-p_tx_bd_ring[txQ];
+   bd_status = in_be32((u32 *)bd);
}
+   ugeth-confBd[txQ] = bd;
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


ucc_geth: returns NETDEV_TX_BUSY when BD ring is full

2007-03-06 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=18babd38547a042a4bfd4154a014d1ad33373eb0
Commit: 18babd38547a042a4bfd4154a014d1ad33373eb0
Parent: a394f013f05ba083d8547551280e0309ca70b08d
Author: Li Yang [EMAIL PROTECTED]
AuthorDate: Tue Mar 6 16:54:05 2007 +0800
Committer:  Jeff Garzik [EMAIL PROTECTED]
CommitDate: Tue Mar 6 06:10:02 2007 -0500

ucc_geth: returns NETDEV_TX_BUSY when BD ring is full

Returns NETDEV_TX_BUSY when BD ring is full.

Signed-off-by: Li Yang [EMAIL PROTECTED]
Signed-off-by: Jeff Garzik [EMAIL PROTECTED]
---
 drivers/net/ucc_geth.c |3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/drivers/net/ucc_geth.c b/drivers/net/ucc_geth.c
index 639e1e6..dab88b9 100644
--- a/drivers/net/ucc_geth.c
+++ b/drivers/net/ucc_geth.c
@@ -3607,6 +3607,7 @@ static int ucc_geth_start_xmit(struct sk_buff *skb, 
struct net_device *dev)
if (bd == ugeth-confBd[txQ]) {
if (!netif_queue_stopped(dev))
netif_stop_queue(dev);
+   return NETDEV_TX_BUSY;
}
 
ugeth-txBd[txQ] = bd;
@@ -3622,7 +3623,7 @@ static int ucc_geth_start_xmit(struct sk_buff *skb, 
struct net_device *dev)
 
spin_unlock_irq(ugeth-lock);
 
-   return 0;
+   return NETDEV_TX_OK;
 }
 
 static int ucc_geth_rx(struct ucc_geth_private *ugeth, u8 rxQ, int 
rx_work_limit)
-
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


revert drivers/net/tulip/dmfe: support basic carrier detection

2007-03-06 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=ead9bffb157a22c1f883beb8d20ba8bf7bc92a58
Commit: ead9bffb157a22c1f883beb8d20ba8bf7bc92a58
Parent: 18babd38547a042a4bfd4154a014d1ad33373eb0
Author: Andrew Morton [EMAIL PROTECTED]
AuthorDate: Tue Mar 6 02:41:49 2007 -0800
Committer:  Jeff Garzik [EMAIL PROTECTED]
CommitDate: Tue Mar 6 06:10:02 2007 -0500

revert drivers/net/tulip/dmfe: support basic carrier detection

Revert 7628b0a8c01a02966d2228bdf741ddedb128e8f8.  Thomas Bachler
reports:

  Commit 7628b0a8c01a02966d2228bdf741ddedb128e8f8 (drivers/net/tulip/dmfe:
  support basic carrier detection) breaks networking on my Davicom DM9009.
  ethtool always reports there is no link.  tcpdump shows incoming packets,
  but TX is disabled.  Reverting the above patch fixes the problem.

Cc: Samuel Thibault [EMAIL PROTECTED]
Cc: Jeff Garzik [EMAIL PROTECTED]
Cc: Valerie Henson [EMAIL PROTECTED]
Cc: Thomas Bachler [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Signed-off-by: Andrew Morton [EMAIL PROTECTED]
Signed-off-by: Jeff Garzik [EMAIL PROTECTED]
---
 drivers/net/tulip/dmfe.c |9 +
 1 files changed, 1 insertions(+), 8 deletions(-)

diff --git a/drivers/net/tulip/dmfe.c b/drivers/net/tulip/dmfe.c
index 7f59a3d..4dd8a0b 100644
--- a/drivers/net/tulip/dmfe.c
+++ b/drivers/net/tulip/dmfe.c
@@ -187,7 +187,7 @@ struct rx_desc {
 struct dmfe_board_info {
u32 chip_id;/* Chip vendor/Device ID */
u32 chip_revision;  /* Chip revision */
-   struct DEVICE *dev; /* net device */
+   struct DEVICE *next_dev;/* next device */
struct pci_dev *pdev;   /* PCI device */
spinlock_t lock;
 
@@ -399,8 +399,6 @@ static int __devinit dmfe_init_one (struct pci_dev *pdev,
/* Init system  device */
db = netdev_priv(dev);
 
-   db-dev = dev;
-
/* Allocate Tx/Rx descriptor memory */
db-desc_pool_ptr = pci_alloc_consistent(pdev, sizeof(struct tx_desc) * 
DESC_ALL_CNT + 0x20, db-desc_pool_dma_ptr);
db-buf_pool_ptr = pci_alloc_consistent(pdev, TX_BUF_ALLOC * 
TX_DESC_CNT + 4, db-buf_pool_dma_ptr);
@@ -428,7 +426,6 @@ static int __devinit dmfe_init_one (struct pci_dev *pdev,
dev-poll_controller = poll_dmfe;
 #endif
dev-ethtool_ops = netdev_ethtool_ops;
-   netif_carrier_off(db-dev);
spin_lock_init(db-lock);
 
pci_read_config_dword(pdev, 0x50, pci_pmr);
@@ -1053,7 +1050,6 @@ static void netdev_get_drvinfo(struct net_device *dev,
 
 static const struct ethtool_ops netdev_ethtool_ops = {
.get_drvinfo= netdev_get_drvinfo,
-   .get_link   = ethtool_op_get_link,
 };
 
 /*
@@ -1148,7 +1144,6 @@ static void dmfe_timer(unsigned long data)
/* Link Failed */
DMFE_DBUG(0, Link Failed, tmp_cr12);
db-link_failed = 1;
-   netif_carrier_off(db-dev);
 
/* For Force 10/100M Half/Full mode: Enable Auto-Nego mode */
/* AUTO or force 1M Homerun/Longrun don't need */
@@ -1171,8 +1166,6 @@ static void dmfe_timer(unsigned long data)
if ( (db-media_mode  DMFE_AUTO) 
dmfe_sense_speed(db) )
db-link_failed = 1;
-   else
-   netif_carrier_on(db-dev);
dmfe_process_mode(db);
/* SHOW_MEDIA_TYPE(db-op_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


dmfe: fix two bugs

2007-03-06 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=4dc68f3de5e36d72663bb51b94662d2d5db84125
Commit: 4dc68f3de5e36d72663bb51b94662d2d5db84125
Parent: f67ba792fa10e3a65226d53dccc1232908d86c20
Author: Maxim Levitsky [EMAIL PROTECTED]
AuthorDate: Tue Mar 6 02:41:52 2007 -0800
Committer:  Jeff Garzik [EMAIL PROTECTED]
CommitDate: Tue Mar 6 06:10:02 2007 -0500

dmfe: fix two bugs

Fix a oops on module removal due to deallocating memory before unregistring
driver Fix a NULL pointer dereference when dev_alloc_skb fails

Signed-off-by: Maxim Levitsky [EMAIL PROTECTED]
Cc: Valerie Henson [EMAIL PROTECTED]
Cc: Jeff Garzik [EMAIL PROTECTED]
Signed-off-by: Andrew Morton [EMAIL PROTECTED]
Signed-off-by: Jeff Garzik [EMAIL PROTECTED]
---
 drivers/net/tulip/dmfe.c |   15 ++-
 1 files changed, 10 insertions(+), 5 deletions(-)

diff --git a/drivers/net/tulip/dmfe.c b/drivers/net/tulip/dmfe.c
index fc4a212..afd5e52 100644
--- a/drivers/net/tulip/dmfe.c
+++ b/drivers/net/tulip/dmfe.c
@@ -501,14 +501,17 @@ static void __devexit dmfe_remove_one (struct pci_dev 
*pdev)
DMFE_DBUG(0, dmfe_remove_one(), 0);
 
if (dev) {
+
+   unregister_netdev(dev);
+
pci_free_consistent(db-pdev, sizeof(struct tx_desc) *
DESC_ALL_CNT + 0x20, db-desc_pool_ptr,
db-desc_pool_dma_ptr);
pci_free_consistent(db-pdev, TX_BUF_ALLOC * TX_DESC_CNT + 4,
db-buf_pool_ptr, db-buf_pool_dma_ptr);
-   unregister_netdev(dev);
pci_release_regions(pdev);
free_netdev(dev);   /* free board information */
+
pci_set_drvdata(pdev, NULL);
}
 
@@ -927,7 +930,7 @@ static inline u32 cal_CRC(unsigned char * Data, unsigned 
int Len, u8 flag)
 static void dmfe_rx_packet(struct DEVICE *dev, struct dmfe_board_info * db)
 {
struct rx_desc *rxptr;
-   struct sk_buff *skb;
+   struct sk_buff *skb, *newskb;
int rxlen;
u32 rdes0;
 
@@ -980,9 +983,11 @@ static void dmfe_rx_packet(struct DEVICE *dev, struct 
dmfe_board_info * db)
} else {
/* Good packet, send to upper layer */
/* Shorst packet used new SKB */
-   if ( (rxlen  RX_COPY_SIZE) 
-   ( (skb = dev_alloc_skb(rxlen + 
2) )
-   != NULL) ) {
+   if ((rxlen  RX_COPY_SIZE) 
+   ((newskb = dev_alloc_skb(rxlen 
+ 2))
+   != NULL)) {
+
+   skb = newskb;
/* size less than COPY_SIZE, 
allocate a rxlen SKB */
skb-dev = dev;
skb_reserve(skb, 2); /* 16byte 
align */
-
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


dmfe: trivial/spelling fixes

2007-03-06 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=f67ba792fa10e3a65226d53dccc1232908d86c20
Commit: f67ba792fa10e3a65226d53dccc1232908d86c20
Parent: ead9bffb157a22c1f883beb8d20ba8bf7bc92a58
Author: Maxim Levitsky [EMAIL PROTECTED]
AuthorDate: Tue Mar 6 02:41:51 2007 -0800
Committer:  Jeff Garzik [EMAIL PROTECTED]
CommitDate: Tue Mar 6 06:10:02 2007 -0500

dmfe: trivial/spelling fixes

Fix a typo, wrap lines on 80-th column, change KERN_ERR to KERN_INFO for
link status message

Signed-off-by: Maxim Levitsky [EMAIL PROTECTED]
Cc: Valerie Henson [EMAIL PROTECTED]
Cc: Jeff Garzik [EMAIL PROTECTED]
Signed-off-by: Andrew Morton [EMAIL PROTECTED]
Signed-off-by: Jeff Garzik [EMAIL PROTECTED]
---
 drivers/net/tulip/dmfe.c |  124 -
 1 files changed, 88 insertions(+), 36 deletions(-)

diff --git a/drivers/net/tulip/dmfe.c b/drivers/net/tulip/dmfe.c
index 4dd8a0b..fc4a212 100644
--- a/drivers/net/tulip/dmfe.c
+++ b/drivers/net/tulip/dmfe.c
@@ -143,9 +143,16 @@
 #define DMFE_TX_TIMEOUT ((3*HZ)/2) /* tx packet time-out time 1.5 s */
 #define DMFE_TX_KICK   (HZ/2)  /* tx packet Kick-out time 0.5 s */
 
-#define DMFE_DBUG(dbug_now, msg, value) if (dmfe_debug || (dbug_now)) 
printk(KERN_ERR DRV_NAME : %s %lx\n, (msg), (long) (value))
+#define DMFE_DBUG(dbug_now, msg, value) \
+   do { \
+   if (dmfe_debug || (dbug_now)) \
+   printk(KERN_ERR DRV_NAME : %s %lx\n,\
+   (msg), (long) (value)); \
+   } while (0)
 
-#define SHOW_MEDIA_TYPE(mode) printk(KERN_ERR DRV_NAME : Change Speed to 
%sMhz %s duplex\n,mode  1 ?100:10, mode  4 ? full:half);
+#define SHOW_MEDIA_TYPE(mode) \
+   printk (KERN_INFO DRV_NAME : Change Speed to %sMhz %s duplex\n , \
+   (mode  1) ? 100:10, (mode  4) ? full:half);
 
 
 /* CR9 definition: SROM/MII */
@@ -163,10 +170,20 @@
 
 #define SROM_V41_CODE   0x14
 
-#define SROM_CLK_WRITE(data, ioaddr) 
outl(data|CR9_SROM_READ|CR9_SRCS,ioaddr);udelay(5);outl(data|CR9_SROM_READ|CR9_SRCS|CR9_SRCLK,ioaddr);udelay(5);outl(data|CR9_SROM_READ|CR9_SRCS,ioaddr);udelay(5);
+#define SROM_CLK_WRITE(data, ioaddr) \
+   outl(data|CR9_SROM_READ|CR9_SRCS,ioaddr); \
+   udelay(5); \
+   outl(data|CR9_SROM_READ|CR9_SRCS|CR9_SRCLK,ioaddr); \
+   udelay(5); \
+   outl(data|CR9_SROM_READ|CR9_SRCS,ioaddr); \
+   udelay(5);
+
+#define __CHK_IO_SIZE(pci_id, dev_rev) \
+ (( ((pci_id)==PCI_DM9132_ID) || ((dev_rev) = 0x0230) ) ? \
+   DM9102A_IO_SIZE: DM9102_IO_SIZE)
 
-#define __CHK_IO_SIZE(pci_id, dev_rev) ( ((pci_id)==PCI_DM9132_ID) || 
((dev_rev) = 0x0230) ) ? DM9102A_IO_SIZE: DM9102_IO_SIZE
-#define CHK_IO_SIZE(pci_dev, dev_rev) __CHK_IO_SIZE(((pci_dev)-device  16) 
| (pci_dev)-vendor, dev_rev)
+#define CHK_IO_SIZE(pci_dev, dev_rev) \
+   (__CHK_IO_SIZE(((pci_dev)-device  16) | (pci_dev)-vendor, dev_rev))
 
 /* Sten Check */
 #define DEVICE net_device
@@ -329,7 +346,7 @@ static void dmfe_program_DM9802(struct dmfe_board_info *);
 static void dmfe_HPNA_remote_cmd_chk(struct dmfe_board_info * );
 static void dmfe_set_phyxcer(struct dmfe_board_info *);
 
-/* DM910X network baord routine  */
+/* DM910X network board routine  */
 
 /*
  * Search DM910X board ,allocate space and register it
@@ -356,7 +373,8 @@ static int __devinit dmfe_init_one (struct pci_dev *pdev,
SET_NETDEV_DEV(dev, pdev-dev);
 
if (pci_set_dma_mask(pdev, DMA_32BIT_MASK)) {
-   printk(KERN_WARNING DRV_NAME : 32-bit PCI DMA not 
available.\n);
+   printk(KERN_WARNING DRV_NAME
+   : 32-bit PCI DMA not available.\n);
err = -ENODEV;
goto err_out_free;
}
@@ -400,8 +418,11 @@ static int __devinit dmfe_init_one (struct pci_dev *pdev,
db = netdev_priv(dev);
 
/* Allocate Tx/Rx descriptor memory */
-   db-desc_pool_ptr = pci_alloc_consistent(pdev, sizeof(struct tx_desc) * 
DESC_ALL_CNT + 0x20, db-desc_pool_dma_ptr);
-   db-buf_pool_ptr = pci_alloc_consistent(pdev, TX_BUF_ALLOC * 
TX_DESC_CNT + 4, db-buf_pool_dma_ptr);
+   db-desc_pool_ptr = pci_alloc_consistent(pdev, sizeof(struct tx_desc) *
+   DESC_ALL_CNT + 0x20, db-desc_pool_dma_ptr);
+
+   db-buf_pool_ptr = pci_alloc_consistent(pdev, TX_BUF_ALLOC *
+   TX_DESC_CNT + 4, db-buf_pool_dma_ptr);
 
db-first_tx_desc = (struct tx_desc *) db-desc_pool_ptr;
db-first_tx_desc_dma = db-desc_pool_dma_ptr;
@@ -437,7 +458,8 @@ static int __devinit dmfe_init_one (struct pci_dev *pdev,
 
/* read 64 word srom data */
for (i = 0; i  64; i++)
-   ((u16 *) db-srom)[i] = cpu_to_le16(read_srom_word(db-ioaddr, 
i));
+   ((u16 *) db-srom)[i] =
+   

dmfe: Fix link detection

2007-03-06 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=cfa51b9dbf5aa385c6d1f8645587fdc4fe8c13fd
Commit: cfa51b9dbf5aa385c6d1f8645587fdc4fe8c13fd
Parent: 4dc68f3de5e36d72663bb51b94662d2d5db84125
Author: Maxim Levitsky [EMAIL PROTECTED]
AuthorDate: Tue Mar 6 02:41:53 2007 -0800
Committer:  Jeff Garzik [EMAIL PROTECTED]
CommitDate: Tue Mar 6 06:10:02 2007 -0500

dmfe: Fix link detection

Add link detection

Signed-off-by: Maxim Levitsky [EMAIL PROTECTED]
Cc: Valerie Henson [EMAIL PROTECTED]
Cc: Jeff Garzik [EMAIL PROTECTED]
Signed-off-by: Andrew Morton [EMAIL PROTECTED]
Signed-off-by: Jeff Garzik [EMAIL PROTECTED]
---
 drivers/net/tulip/dmfe.c |   58 +++--
 1 files changed, 40 insertions(+), 18 deletions(-)

diff --git a/drivers/net/tulip/dmfe.c b/drivers/net/tulip/dmfe.c
index afd5e52..24a29c9 100644
--- a/drivers/net/tulip/dmfe.c
+++ b/drivers/net/tulip/dmfe.c
@@ -248,7 +248,6 @@ struct dmfe_board_info {
u8 media_mode;  /* user specify media mode */
u8 op_mode; /* real work media mode */
u8 phy_addr;
-   u8 link_failed; /* Ever link failed */
u8 wait_reset;  /* Hardware failed, need to reset */
u8 dm910x_chk_mode; /* Operating mode check */
u8 first_in_callback;   /* Flag to record state */
@@ -447,6 +446,7 @@ static int __devinit dmfe_init_one (struct pci_dev *pdev,
dev-poll_controller = poll_dmfe;
 #endif
dev-ethtool_ops = netdev_ethtool_ops;
+   netif_carrier_off(dev);
spin_lock_init(db-lock);
 
pci_read_config_dword(pdev, 0x50, pci_pmr);
@@ -541,7 +541,6 @@ static int dmfe_open(struct DEVICE *dev)
db-tx_packet_cnt = 0;
db-tx_queue_cnt = 0;
db-rx_avail_cnt = 0;
-   db-link_failed = 1;
db-wait_reset = 0;
 
db-first_in_callback = 0;
@@ -1082,6 +1081,7 @@ static void netdev_get_drvinfo(struct net_device *dev,
 
 static const struct ethtool_ops netdev_ethtool_ops = {
.get_drvinfo= netdev_get_drvinfo,
+   .get_link   = ethtool_op_get_link,
 };
 
 /*
@@ -1097,6 +1097,8 @@ static void dmfe_timer(unsigned long data)
struct dmfe_board_info *db = netdev_priv(dev);
unsigned long flags;
 
+   int link_ok, link_ok_phy;
+
DMFE_DBUG(0, dmfe_timer(), 0);
spin_lock_irqsave(db-lock, flags);
 
@@ -1168,15 +1170,35 @@ static void dmfe_timer(unsigned long data)
(db-chip_revision == 0x0210)) ) {
/* DM9102A Chip */
if (tmp_cr12  2)
-   tmp_cr12 = 0x0; /* Link failed */
+   link_ok = 0;
else
-   tmp_cr12 = 0x3; /* Link OK */
+   link_ok = 1;
}
+   else
+   /*0x43 is used instead of 0x3 because bit 6 should represent
+   link status of external PHY */
+   link_ok = (tmp_cr12  0x43) ? 1 : 0;
+
+
+   /* If chip reports that link is failed it could be because external
+   PHY link status pin is not conected correctly to chip
+   To be sure ask PHY too.
+   */
+
+   /* need a dummy read because of PHY's register latch*/
+   phy_read (db-ioaddr, db-phy_addr, 1, db-chip_id);
+   link_ok_phy = (phy_read (db-ioaddr,
+  db-phy_addr, 1, db-chip_id)  0x4) ? 1 : 0;
+
+   if (link_ok_phy != link_ok) {
+   DMFE_DBUG (0, PHY and chip report different link status, 0);
+   link_ok = link_ok | link_ok_phy;
+   }
 
-   if ( !(tmp_cr12  0x3)  !db-link_failed ) {
+   if ( !link_ok  netif_carrier_ok(dev)) {
/* Link Failed */
DMFE_DBUG(0, Link Failed, tmp_cr12);
-   db-link_failed = 1;
+   netif_carrier_off(dev);
 
/* For Force 10/100M Half/Full mode: Enable Auto-Nego mode */
/* AUTO or force 1M Homerun/Longrun don't need */
@@ -1191,19 +1213,19 @@ static void dmfe_timer(unsigned long data)
db-cr6_data=~0x0200;  /* bit9=0, HD mode */
update_cr6(db-cr6_data, db-ioaddr);
}
-   } else
-   if ((tmp_cr12  0x3)  db-link_failed) {
-   DMFE_DBUG(0, Link link OK, tmp_cr12);
-   db-link_failed = 0;
-
-   /* Auto Sense Speed */
-   if ( (db-media_mode  DMFE_AUTO) 
-   dmfe_sense_speed(db) )
-   db-link_failed = 1;
-   dmfe_process_mode(db);
-   /* SHOW_MEDIA_TYPE(db-op_mode); */
+   } else if (!netif_carrier_ok(dev)) {
+
+   DMFE_DBUG(0, Link link OK, tmp_cr12);
+
+   

3c59x: Handle pci_enable_device() failure while resuming

2007-03-06 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=e12651539808437a97f3e33c659c3d7b4000e41e
Commit: e12651539808437a97f3e33c659c3d7b4000e41e
Parent: cfa51b9dbf5aa385c6d1f8645587fdc4fe8c13fd
Author: Dmitriy Monakhov [EMAIL PROTECTED]
AuthorDate: Tue Mar 6 02:41:59 2007 -0800
Committer:  Jeff Garzik [EMAIL PROTECTED]
CommitDate: Tue Mar 6 06:10:02 2007 -0500

3c59x: Handle pci_enable_device() failure while resuming

Handle pci_enable_device() failure while resuming, we can safely exit here.

Signed-off-by: Monakhov Dmitriy [EMAIL PROTECTED]
Signed-off-by: Andrew Morton [EMAIL PROTECTED]
Signed-off-by: Jeff Garzik [EMAIL PROTECTED]
---
 drivers/net/3c59x.c |8 +++-
 1 files changed, 7 insertions(+), 1 deletions(-)

diff --git a/drivers/net/3c59x.c b/drivers/net/3c59x.c
index 716a472..7299577 100644
--- a/drivers/net/3c59x.c
+++ b/drivers/net/3c59x.c
@@ -822,11 +822,17 @@ static int vortex_resume(struct pci_dev *pdev)
 {
struct net_device *dev = pci_get_drvdata(pdev);
struct vortex_private *vp = netdev_priv(dev);
+   int err;
 
if (dev  vp) {
pci_set_power_state(pdev, PCI_D0);
pci_restore_state(pdev);
-   pci_enable_device(pdev);
+   err = pci_enable_device(pdev);
+   if (err) {
+   printk(KERN_WARNING %s: Could not enable device \n,
+   dev-name);
+   return err;
+   }
pci_set_master(pdev);
if (request_irq(dev-irq, vp-full_bus_master_rx ?
boomerang_interrupt : vortex_interrupt, 
IRQF_SHARED, dev-name, 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


__devinit __devexit cleanups for de2104x driver

2007-03-06 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=4c44fd009ae79fc04e2c049f708792ad83400dde
Commit: 4c44fd009ae79fc04e2c049f708792ad83400dde
Parent: e12651539808437a97f3e33c659c3d7b4000e41e
Author: Prarit Bhargava [EMAIL PROTECTED]
AuthorDate: Tue Mar 6 02:42:00 2007 -0800
Committer:  Jeff Garzik [EMAIL PROTECTED]
CommitDate: Tue Mar 6 06:10:02 2007 -0500

__devinit  __devexit cleanups for de2104x driver

Fixes MODPOST warnings similar to:

WARNING: drivers/net/tulip/de2104x.o - Section mismatch: reference to
.init.text:de_init_one from .data.rel.local after 'de_driver' (at offset 
0x20)
WARNING: drivers/net/tulip/de2104x.o - Section mismatch: reference to
.exit.text:de_remove_one from .data.rel.local after 'de_driver' (at offset 
0x28)

Signed-off-by: Prarit Bhargava [EMAIL PROTECTED]
Cc: Valerie Henson [EMAIL PROTECTED]
Signed-off-by: Andrew Morton [EMAIL PROTECTED]
Signed-off-by: Jeff Garzik [EMAIL PROTECTED]
---
 drivers/net/tulip/de2104x.c |6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/net/tulip/de2104x.c b/drivers/net/tulip/de2104x.c
index dacea4f..c82befa 100644
--- a/drivers/net/tulip/de2104x.c
+++ b/drivers/net/tulip/de2104x.c
@@ -1685,7 +1685,7 @@ static const struct ethtool_ops de_ethtool_ops = {
.get_regs   = de_get_regs,
 };
 
-static void __init de21040_get_mac_address (struct de_private *de)
+static void __devinit de21040_get_mac_address (struct de_private *de)
 {
unsigned i;
 
@@ -1703,7 +1703,7 @@ static void __init de21040_get_mac_address (struct 
de_private *de)
}
 }
 
-static void __init de21040_get_media_info(struct de_private *de)
+static void __devinit de21040_get_media_info(struct de_private *de)
 {
unsigned int i;
 
@@ -1765,7 +1765,7 @@ static unsigned __devinit tulip_read_eeprom(void __iomem 
*regs, int location, in
return retval;
 }
 
-static void __init de21041_get_srom_info (struct de_private *de)
+static void __devinit de21041_get_srom_info (struct de_private *de)
 {
unsigned i, sa_offset = 0, ofs;
u8 ee_data[DE_EEPROM_SIZE + 6] = {};
-
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


pcnet32: Fix PCnet32 performance bug on non-coherent architecutres

2007-03-06 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=b2cbbd8e0e8093fbf115ac2669482b016d781c78
Commit: b2cbbd8e0e8093fbf115ac2669482b016d781c78
Parent: 4c44fd009ae79fc04e2c049f708792ad83400dde
Author: Don Fry [EMAIL PROTECTED]
AuthorDate: Mon Mar 5 18:13:09 2007 -0800
Committer:  Jeff Garzik [EMAIL PROTECTED]
CommitDate: Tue Mar 6 06:14:54 2007 -0500

pcnet32: Fix PCnet32 performance bug on non-coherent architecutres

The PCnet32 driver always passed the the size of the largest possible packet
to the pci_dma_sync_single_for_cpu and pci_dma_sync_single_for_device.
This results in a fairly large colateral damage in the caches and makes
the flush operation itself much slower.  On a system with a 40MHz CPU this
patch increases network bandwidth by about 12%.

Signed-off-by: Ralf Baechle [EMAIL PROTECTED]
Acked-by: Don Fry [EMAIL PROTECTED]
Signed-off-by: Jeff Garzik [EMAIL PROTECTED]
---
 drivers/net/pcnet32.c |4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/net/pcnet32.c b/drivers/net/pcnet32.c
index 36f9d98..4d94ba7 100644
--- a/drivers/net/pcnet32.c
+++ b/drivers/net/pcnet32.c
@@ -1234,14 +1234,14 @@ static void pcnet32_rx_entry(struct net_device *dev,
skb_put(skb, pkt_len);  /* Make room */
pci_dma_sync_single_for_cpu(lp-pci_dev,
lp-rx_dma_addr[entry],
-   PKT_BUF_SZ - 2,
+   pkt_len,
PCI_DMA_FROMDEVICE);
eth_copy_and_sum(skb,
 (unsigned char *)(lp-rx_skbuff[entry]-data),
 pkt_len, 0);
pci_dma_sync_single_for_device(lp-pci_dev,
   lp-rx_dma_addr[entry],
-  PKT_BUF_SZ - 2,
+  pkt_len,
   PCI_DMA_FROMDEVICE);
}
lp-stats.rx_bytes += skb-len;
-
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


mv643xx_eth: Place explicit port number in mv643xx_eth_platform_data

2007-03-06 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=84dd619e4dc3b0b1c40dafd98c90fd950bce7bc5
Commit: 84dd619e4dc3b0b1c40dafd98c90fd950bce7bc5
Parent: b2cbbd8e0e8093fbf115ac2669482b016d781c78
Author: Dale Farnsworth [EMAIL PROTECTED]
AuthorDate: Sat Mar 3 06:40:28 2007 -0700
Committer:  Jeff Garzik [EMAIL PROTECTED]
CommitDate: Tue Mar 6 06:14:54 2007 -0500

mv643xx_eth: Place explicit port number in mv643xx_eth_platform_data

We were using the platform_device.id field to identify which ethernet
port is used for mv643xx_eth device.  This is not generally correct.
It will be incorrect, for example, if a hardware platform uses a single
port but not the first port.  Here, we add an explicit port_number field
to struct mv643xx_eth_platform_data.

This makes the mv643xx_eth_platform_data structure required, but that
isn't an issue since all users currently provide it already.

Signed-off-by: Dale Farnsworth [EMAIL PROTECTED]
Signed-off-by: Jeff Garzik [EMAIL PROTECTED]
---
 arch/mips/momentum/jaguar_atx/platform.c  |8 -
 arch/mips/momentum/ocelot_3/platform.c|8 -
 arch/mips/momentum/ocelot_c/platform.c|4 ++
 arch/powerpc/platforms/chrp/pegasos_eth.c |2 +
 arch/ppc/syslib/mv64x60.c |   12 +--
 drivers/net/mv643xx_eth.c |   53 -
 include/linux/mv643xx.h   |1 +
 7 files changed, 59 insertions(+), 29 deletions(-)

diff --git a/arch/mips/momentum/jaguar_atx/platform.c 
b/arch/mips/momentum/jaguar_atx/platform.c
index 771e55f..5618448 100644
--- a/arch/mips/momentum/jaguar_atx/platform.c
+++ b/arch/mips/momentum/jaguar_atx/platform.c
@@ -48,6 +48,8 @@ static struct resource mv64x60_eth0_resources[] = {
 };
 
 static struct mv643xx_eth_platform_data eth0_pd = {
+   .port_number= 0,
+
.tx_sram_addr   = MV_SRAM_BASE_ETH0,
.tx_sram_size   = MV_SRAM_TXRING_SIZE,
.tx_queue_size  = MV_SRAM_TXRING_SIZE / 16,
@@ -77,6 +79,8 @@ static struct resource mv64x60_eth1_resources[] = {
 };
 
 static struct mv643xx_eth_platform_data eth1_pd = {
+   .port_number= 1,
+
.tx_sram_addr   = MV_SRAM_BASE_ETH1,
.tx_sram_size   = MV_SRAM_TXRING_SIZE,
.tx_queue_size  = MV_SRAM_TXRING_SIZE / 16,
@@ -105,7 +109,9 @@ static struct resource mv64x60_eth2_resources[] = {
},
 };
 
-static struct mv643xx_eth_platform_data eth2_pd;
+static struct mv643xx_eth_platform_data eth2_pd = {
+   .port_number= 2,
+};
 
 static struct platform_device eth2_device = {
.name   = MV643XX_ETH_NAME,
diff --git a/arch/mips/momentum/ocelot_3/platform.c 
b/arch/mips/momentum/ocelot_3/platform.c
index b80733f..44e4c3f 100644
--- a/arch/mips/momentum/ocelot_3/platform.c
+++ b/arch/mips/momentum/ocelot_3/platform.c
@@ -48,6 +48,8 @@ static struct resource mv64x60_eth0_resources[] = {
 };
 
 static struct mv643xx_eth_platform_data eth0_pd = {
+   .port_number= 0,
+
.tx_sram_addr   = MV_SRAM_BASE_ETH0,
.tx_sram_size   = MV_SRAM_TXRING_SIZE,
.tx_queue_size  = MV_SRAM_TXRING_SIZE / 16,
@@ -77,6 +79,8 @@ static struct resource mv64x60_eth1_resources[] = {
 };
 
 static struct mv643xx_eth_platform_data eth1_pd = {
+   .port_number= 1,
+
.tx_sram_addr   = MV_SRAM_BASE_ETH1,
.tx_sram_size   = MV_SRAM_TXRING_SIZE,
.tx_queue_size  = MV_SRAM_TXRING_SIZE / 16,
@@ -105,7 +109,9 @@ static struct resource mv64x60_eth2_resources[] = {
},
 };
 
-static struct mv643xx_eth_platform_data eth2_pd;
+static struct mv643xx_eth_platform_data eth2_pd = {
+   .port_number= 2,
+};
 
 static struct platform_device eth2_device = {
.name   = MV643XX_ETH_NAME,
diff --git a/arch/mips/momentum/ocelot_c/platform.c 
b/arch/mips/momentum/ocelot_c/platform.c
index f7cd303..7780aa0 100644
--- a/arch/mips/momentum/ocelot_c/platform.c
+++ b/arch/mips/momentum/ocelot_c/platform.c
@@ -47,6 +47,8 @@ static struct resource mv64x60_eth0_resources[] = {
 };
 
 static struct mv643xx_eth_platform_data eth0_pd = {
+   .port_number= 0,
+
.tx_sram_addr   = MV_SRAM_BASE_ETH0,
.tx_sram_size   = MV_SRAM_TXRING_SIZE,
.tx_queue_size  = MV_SRAM_TXRING_SIZE / 16,
@@ -76,6 +78,8 @@ static struct resource mv64x60_eth1_resources[] = {
 };
 
 static struct mv643xx_eth_platform_data eth1_pd = {
+   .port_number= 1,
+
.tx_sram_addr   = MV_SRAM_BASE_ETH1,
.tx_sram_size   = MV_SRAM_TXRING_SIZE,
.tx_queue_size  = MV_SRAM_TXRING_SIZE / 16,
diff --git a/arch/powerpc/platforms/chrp/pegasos_eth.c 
b/arch/powerpc/platforms/chrp/pegasos_eth.c
index 6ad4b1a..7104567 100644
--- a/arch/powerpc/platforms/chrp/pegasos_eth.c
+++ b/arch/powerpc/platforms/chrp/pegasos_eth.c
@@ -58,6 +58,7 @@ static struct resource mv643xx_eth0_resources[] = {
 
 
 static struct mv643xx_eth_platform_data 

sis900 warning fixes

2007-03-06 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=f3be97427172856d6865ddfedea84fa3a9f33227
Commit: f3be97427172856d6865ddfedea84fa3a9f33227
Parent: 84dd619e4dc3b0b1c40dafd98c90fd950bce7bc5
Author: Andrew Morton [EMAIL PROTECTED]
AuthorDate: Tue Mar 6 02:41:55 2007 -0800
Committer:  Jeff Garzik [EMAIL PROTECTED]
CommitDate: Tue Mar 6 06:14:54 2007 -0500

sis900 warning fixes

drivers/net/sis900.c: In function 'sis900_reset_phy':
drivers/net/sis900.c:972: warning: 'status' may be used uninitialized in 
this function
drivers/net/sis900.c: In function 'sis900_check_mode':
drivers/net/sis900.c:1431: warning: 'status' may be used uninitialized in 
this function
drivers/net/sis900.c: In function 'sis900_timer':
drivers/net/sis900.c:1467: warning: 'status' may be used uninitialized in 
this function

Signed-off-by: Andrew Morton [EMAIL PROTECTED]
Signed-off-by: Jeff Garzik [EMAIL PROTECTED]
---
 drivers/net/sis900.c |   10 +-
 1 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/drivers/net/sis900.c b/drivers/net/sis900.c
index fb2b530..b3750f2 100644
--- a/drivers/net/sis900.c
+++ b/drivers/net/sis900.c
@@ -968,10 +968,10 @@ static void mdio_write(struct net_device *net_dev, int 
phy_id, int location,
 
 static u16 sis900_reset_phy(struct net_device *net_dev, int phy_addr)
 {
-   int i = 0;
+   int i;
u16 status;
 
-   while (i++  2)
+   for (i = 0; i  2; i++)
status = mdio_read(net_dev, phy_addr, MII_STATUS);
 
mdio_write( net_dev, phy_addr, MII_CONTROL, MII_CNTL_RESET );
@@ -1430,7 +1430,7 @@ static void sis900_auto_negotiate(struct net_device 
*net_dev, int phy_addr)
int i = 0;
u32 status;
 
-   while (i++  2)
+   for (i = 0; i  2; i++)
status = mdio_read(net_dev, phy_addr, MII_STATUS);
 
if (!(status  MII_STAT_LINK)){
@@ -1466,9 +1466,9 @@ static void sis900_read_mode(struct net_device *net_dev, 
int *speed, int *duplex
int phy_addr = sis_priv-cur_phy;
u32 status;
u16 autoadv, autorec;
-   int i = 0;
+   int i;
 
-   while (i++  2)
+   for (i = 0; i  2; i++)
status = mdio_read(net_dev, phy_addr, MII_STATUS);
 
if (!(status  MII_STAT_LINK))
-
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


ncpfs: make sure server connection survives a kill

2007-03-06 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=c5f93cf19df633a8dbd7adf8130d604eec96e145
Commit: c5f93cf19df633a8dbd7adf8130d604eec96e145
Parent: c3442e296517aee733d62fc3fe03211598902c7d
Author: Pierre Ossman [EMAIL PROTECTED]
AuthorDate: Mon Feb 19 11:34:43 2007 +0100
Committer:  Pierre Ossman [EMAIL PROTECTED]
CommitDate: Tue Mar 6 13:26:27 2007 +0100

ncpfs: make sure server connection survives a kill

Use internal buffers instead of the ones supplied by the caller
so that a caller can be interrupted without having to abort the
entire ncp connection.

Signed-off-by: Pierre Ossman [EMAIL PROTECTED]
Acked-by: Petr Vandrovec [EMAIL PROTECTED]
---
 fs/ncpfs/inode.c  |   16 -
 fs/ncpfs/sock.c   |  151 ++--
 include/linux/ncp_fs_sb.h |2 +
 3 files changed, 105 insertions(+), 64 deletions(-)

diff --git a/fs/ncpfs/inode.c b/fs/ncpfs/inode.c
index 14939dd..7285c94 100644
--- a/fs/ncpfs/inode.c
+++ b/fs/ncpfs/inode.c
@@ -576,6 +576,12 @@ static int ncp_fill_super(struct super_block *sb, void 
*raw_data, int silent)
server-packet = vmalloc(NCP_PACKET_SIZE);
if (server-packet == NULL)
goto out_nls;
+   server-txbuf = vmalloc(NCP_PACKET_SIZE);
+   if (server-txbuf == NULL)
+   goto out_packet;
+   server-rxbuf = vmalloc(NCP_PACKET_SIZE);
+   if (server-rxbuf == NULL)
+   goto out_txbuf;
 
sock-sk-sk_data_ready   = ncp_tcp_data_ready;
sock-sk-sk_error_report = ncp_tcp_error_report;
@@ -597,7 +603,7 @@ static int ncp_fill_super(struct super_block *sb, void 
*raw_data, int silent)
error = ncp_connect(server);
ncp_unlock_server(server);
if (error  0)
-   goto out_packet;
+   goto out_rxbuf;
DPRINTK(ncp_fill_super: NCP_SBP(sb) = %x\n, (int) NCP_SBP(sb));
 
error = -EMSGSIZE;  /* -EREMOTESIDEINCOMPATIBLE */
@@ -666,8 +672,12 @@ out_disconnect:
ncp_lock_server(server);
ncp_disconnect(server);
ncp_unlock_server(server);
-out_packet:
+out_rxbuf:
ncp_stop_tasks(server);
+   vfree(server-rxbuf);
+out_txbuf:
+   vfree(server-txbuf);
+out_packet:
vfree(server-packet);
 out_nls:
 #ifdef CONFIG_NCPFS_NLS
@@ -723,6 +733,8 @@ static void ncp_put_super(struct super_block *sb)
 
kfree(server-priv.data);
kfree(server-auth.object_name);
+   vfree(server-rxbuf);
+   vfree(server-txbuf);
vfree(server-packet);
sb-s_fs_info = NULL;
kfree(server);
diff --git a/fs/ncpfs/sock.c b/fs/ncpfs/sock.c
index e496d8b..e37df8d 100644
--- a/fs/ncpfs/sock.c
+++ b/fs/ncpfs/sock.c
@@ -14,6 +14,7 @@
 #include linux/socket.h
 #include linux/fcntl.h
 #include linux/stat.h
+#include linux/string.h
 #include asm/uaccess.h
 #include linux/in.h
 #include linux/net.h
@@ -55,10 +56,11 @@ static int _send(struct socket *sock, const void *buff, int 
len)
 struct ncp_request_reply {
struct list_head req;
wait_queue_head_t wq;
-   struct ncp_reply_header* reply_buf;
+   atomic_t refs;
+   unsigned char* reply_buf;
size_t datalen;
int result;
-   enum { RQ_DONE, RQ_INPROGRESS, RQ_QUEUED, RQ_IDLE } status;
+   enum { RQ_DONE, RQ_INPROGRESS, RQ_QUEUED, RQ_IDLE, RQ_ABANDONED } 
status;
struct kvec* tx_ciov;
size_t tx_totallen;
size_t tx_iovlen;
@@ -67,6 +69,32 @@ struct ncp_request_reply {
u_int32_t sign[6];
 };
 
+static inline struct ncp_request_reply* ncp_alloc_req(void)
+{
+   struct ncp_request_reply *req;
+
+   req = kmalloc(sizeof(struct ncp_request_reply), GFP_KERNEL);
+   if (!req)
+   return NULL;
+
+   init_waitqueue_head(req-wq);
+   atomic_set(req-refs, (1));
+   req-status = RQ_IDLE;
+
+   return req;
+}
+
+static void ncp_req_get(struct ncp_request_reply *req)
+{
+   atomic_inc(req-refs);
+}
+
+static void ncp_req_put(struct ncp_request_reply *req)
+{
+   if (atomic_dec_and_test(req-refs))
+   kfree(req);
+}
+
 void ncp_tcp_data_ready(struct sock *sk, int len)
 {
struct ncp_server *server = sk-sk_user_data;
@@ -101,14 +129,17 @@ void ncpdgram_timeout_call(unsigned long v)
schedule_work(server-timeout_tq);
 }
 
-static inline void ncp_finish_request(struct ncp_request_reply *req, int 
result)
+static inline void ncp_finish_request(struct ncp_server *server, struct 
ncp_request_reply *req, int result)
 {
req-result = result;
+   if (req-status != RQ_ABANDONED)
+   memcpy(req-reply_buf, server-rxbuf, req-datalen);
req-status = RQ_DONE;
wake_up_all(req-wq);
+   ncp_req_put(req);
 }
 
-static void __abort_ncp_connection(struct ncp_server *server, struct 
ncp_request_reply *aborted, int err)
+static void __abort_ncp_connection(struct ncp_server *server)
 {

mmc: require explicit support for high-speed

2007-03-06 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=cd9277c011a99769fa371521b460ed57f6d280b1
Commit: cd9277c011a99769fa371521b460ed57f6d280b1
Parent: c5f93cf19df633a8dbd7adf8130d604eec96e145
Author: Pierre Ossman [EMAIL PROTECTED]
AuthorDate: Sun Feb 18 12:07:47 2007 +0100
Committer:  Pierre Ossman [EMAIL PROTECTED]
CommitDate: Tue Mar 6 13:26:55 2007 +0100

mmc: require explicit support for high-speed

The new high-speed timings are similar to each other and the old
system, but not identical. And although things just work most of
the time, sometimes it does not. So we need to start marking which
hosts are known to fully comply with the new timings.

Signed-off-by: Pierre Ossman [EMAIL PROTECTED]
---
 drivers/mmc/mmc.c|   83 ++---
 drivers/mmc/sdhci.c  |   25 +
 include/linux/mmc/host.h |8 
 3 files changed, 66 insertions(+), 50 deletions(-)

diff --git a/drivers/mmc/mmc.c b/drivers/mmc/mmc.c
index 5046a16..4a73e8b 100644
--- a/drivers/mmc/mmc.c
+++ b/drivers/mmc/mmc.c
@@ -376,10 +376,11 @@ static inline void mmc_set_ios(struct mmc_host *host)
 {
struct mmc_ios *ios = host-ios;
 
-   pr_debug(%s: clock %uHz busmode %u powermode %u cs %u Vdd %u width 
%u\n,
+   pr_debug(%s: clock %uHz busmode %u powermode %u cs %u Vdd %u 
+   width %u timing %u\n,
 mmc_hostname(host), ios-clock, ios-bus_mode,
 ios-power_mode, ios-chip_select, ios-vdd,
-ios-bus_width);
+ios-bus_width, ios-timing);
 
host-ops-set_ios(host, ios);
 }
@@ -809,6 +810,7 @@ static void mmc_power_up(struct mmc_host *host)
host-ios.chip_select = MMC_CS_DONTCARE;
host-ios.power_mode = MMC_POWER_UP;
host-ios.bus_width = MMC_BUS_WIDTH_1;
+   host-ios.timing = MMC_TIMING_LEGACY;
mmc_set_ios(host);
 
mmc_delay(1);
@@ -828,6 +830,7 @@ static void mmc_power_off(struct mmc_host *host)
host-ios.chip_select = MMC_CS_DONTCARE;
host-ios.power_mode = MMC_POWER_OFF;
host-ios.bus_width = MMC_BUS_WIDTH_1;
+   host-ios.timing = MMC_TIMING_LEGACY;
mmc_set_ios(host);
 }
 
@@ -1112,46 +1115,50 @@ static void mmc_process_ext_csds(struct mmc_host *host)
continue;
}
 
-   /* Activate highspeed support. */
-   cmd.opcode = MMC_SWITCH;
-   cmd.arg = (MMC_SWITCH_MODE_WRITE_BYTE  24) |
- (EXT_CSD_HS_TIMING  16) |
- (1  8) |
- EXT_CSD_CMD_SET_NORMAL;
-   cmd.flags = MMC_RSP_R1B | MMC_CMD_AC;
+   if (host-caps  MMC_CAP_MMC_HIGHSPEED) {
+   /* Activate highspeed support. */
+   cmd.opcode = MMC_SWITCH;
+   cmd.arg = (MMC_SWITCH_MODE_WRITE_BYTE  24) |
+ (EXT_CSD_HS_TIMING  16) |
+ (1  8) |
+ EXT_CSD_CMD_SET_NORMAL;
+   cmd.flags = MMC_RSP_R1B | MMC_CMD_AC;
 
-   err = mmc_wait_for_cmd(host, cmd, CMD_RETRIES);
-   if (err != MMC_ERR_NONE) {
-   printk(%s: failed to switch card to mmc v4 
-  high-speed mode.\n,
-  mmc_hostname(card-host));
-   continue;
-   }
+   err = mmc_wait_for_cmd(host, cmd, CMD_RETRIES);
+   if (err != MMC_ERR_NONE) {
+   printk(%s: failed to switch card to mmc v4 
+  high-speed mode.\n,
+  mmc_hostname(card-host));
+   continue;
+   }
 
-   mmc_card_set_highspeed(card);
+   mmc_card_set_highspeed(card);
 
-   /* Check for host support for wide-bus modes. */
-   if (!(host-caps  MMC_CAP_4_BIT_DATA)) {
-   continue;
+   host-ios.timing = MMC_TIMING_SD_HS;
+   mmc_set_ios(host);
}
 
-   /* Activate 4-bit support. */
-   cmd.opcode = MMC_SWITCH;
-   cmd.arg = (MMC_SWITCH_MODE_WRITE_BYTE  24) |
- (EXT_CSD_BUS_WIDTH  16) |
- (EXT_CSD_BUS_WIDTH_4  8) |
- EXT_CSD_CMD_SET_NORMAL;
-   cmd.flags = MMC_RSP_R1B | MMC_CMD_AC;
+   /* Check for host support for wide-bus modes. */
+   if (host-caps  MMC_CAP_4_BIT_DATA) {
+   /* Activate 4-bit support. */
+   cmd.opcode = MMC_SWITCH;
+   cmd.arg = (MMC_SWITCH_MODE_WRITE_BYTE  24) |
+ 

sdhci: make isr tolerant of read errors

2007-03-06 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=62df67a523acd7a22d936bf946b1889dbd60ca98
Commit: 62df67a523acd7a22d936bf946b1889dbd60ca98
Parent: cd9277c011a99769fa371521b460ed57f6d280b1
Author: Mark Lord [EMAIL PROTECTED]
AuthorDate: Tue Mar 6 13:30:13 2007 +0100
Committer:  Pierre Ossman [EMAIL PROTECTED]
CommitDate: Tue Mar 6 13:30:13 2007 +0100

sdhci: make isr tolerant of read errors

The interrupt is shared with another device, which resumes earlier than the
sdhci controller, and generates an interrupt.

The sdhci interrupt handler runs, sees 0x in its own device's
interrupt status, and tries to handle it..  The reason for the 0x
is that the device is still suspended, and *all* regs are reading back
0x.

Signed-off-by: Mark Lord [EMAIL PROTECTED]
Signed-off-by: Andrew Morton [EMAIL PROTECTED]
Signed-off-by: Pierre Ossman [EMAIL PROTECTED]
---
 drivers/mmc/sdhci.c |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/mmc/sdhci.c b/drivers/mmc/sdhci.c
index c52b167..f3260ec 100644
--- a/drivers/mmc/sdhci.c
+++ b/drivers/mmc/sdhci.c
@@ -993,7 +993,7 @@ static irqreturn_t sdhci_irq(int irq, void *dev_id)
 
intmask = readl(host-ioaddr + SDHCI_INT_STATUS);
 
-   if (!intmask) {
+   if (!intmask || intmask == 0x) {
result = IRQ_NONE;
goto 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


sdhci: release irq during suspend

2007-03-06 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=a715dfc7b9ef15ed5b398b185bd84cc015ff37f6
Commit: a715dfc7b9ef15ed5b398b185bd84cc015ff37f6
Parent: 62df67a523acd7a22d936bf946b1889dbd60ca98
Author: Pierre Ossman [EMAIL PROTECTED]
AuthorDate: Tue Mar 6 13:38:49 2007 +0100
Committer:  Pierre Ossman [EMAIL PROTECTED]
CommitDate: Tue Mar 6 13:38:49 2007 +0100

sdhci: release irq during suspend

Release the device's irq during sleep, as all well-behaved drivers
should.

Signed-off-by: Pierre Ossman [EMAIL PROTECTED]
---
 drivers/mmc/sdhci.c |   12 
 1 files changed, 12 insertions(+), 0 deletions(-)

diff --git a/drivers/mmc/sdhci.c b/drivers/mmc/sdhci.c
index f3260ec..d749f08 100644
--- a/drivers/mmc/sdhci.c
+++ b/drivers/mmc/sdhci.c
@@ -1079,6 +1079,13 @@ static int sdhci_suspend (struct pci_dev *pdev, 
pm_message_t state)
 
pci_save_state(pdev);
pci_enable_wake(pdev, pci_choose_state(pdev, state), 0);
+
+   for (i = 0;i  chip-num_slots;i++) {
+   if (!chip-hosts[i])
+   continue;
+   free_irq(chip-hosts[i]-irq, chip-hosts[i]);
+   }
+
pci_disable_device(pdev);
pci_set_power_state(pdev, pci_choose_state(pdev, state));
 
@@ -1107,6 +1114,11 @@ static int sdhci_resume (struct pci_dev *pdev)
continue;
if (chip-hosts[i]-flags  SDHCI_USE_DMA)
pci_set_master(pdev);
+   ret = request_irq(chip-hosts[i]-irq, sdhci_irq,
+   IRQF_SHARED, chip-hosts[i]-slot_descr,
+   chip-hosts[i]);
+   if (ret)
+   return ret;
sdhci_init(chip-hosts[i]);
mmiowb();
ret = mmc_resume_host(chip-hosts[i]-mmc);
-
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


[CIFS] Fix locking problem around some cifs uses of i_size write

2007-03-06 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=3677db10a635a39f63ea509f8f0056d95589ff90
Commit: 3677db10a635a39f63ea509f8f0056d95589ff90
Parent: 9654640d0af8f2de40ff3807d3695109d3463f54
Author: Steve French [EMAIL PROTECTED]
AuthorDate: Mon Feb 26 16:46:11 2007 +
Committer:  Steve French [EMAIL PROTECTED]
CommitDate: Mon Feb 26 16:46:11 2007 +

[CIFS] Fix locking problem around some cifs uses of i_size write

Could cause hangs on smp systems in i_size_read on a cifs inode
whose size has been previously simultaneously updated from
different processes.

Thanks to Brian Wang for some great testing/debugging on this
hard problem.

Fixes kernel bugzilla #7903

CC: Shirish Pargoankar [EMAIL PROTECTED]
CC: Shaggy [EMAIL PROTECTED]
Signed-off-by: Steve French [EMAIL PROTECTED]
---
 fs/cifs/CHANGES   |6 ++
 fs/cifs/file.c|   43 +++
 fs/cifs/inode.c   |   50 --
 fs/cifs/readdir.c |6 +-
 4 files changed, 82 insertions(+), 23 deletions(-)

diff --git a/fs/cifs/CHANGES b/fs/cifs/CHANGES
index 5fe1359..e08a147 100644
--- a/fs/cifs/CHANGES
+++ b/fs/cifs/CHANGES
@@ -1,3 +1,9 @@
+Verison 1.48
+
+Fix mtime bouncing around from local idea of last write times to remote time.
+Fix hang (in i_size_read) when simultaneous size update of same remote file
+on smp system corrupts sequence number.
+ 
 Version 1.47
 
 Fix oops in list_del during mount caused by unaligned string.
diff --git a/fs/cifs/file.c b/fs/cifs/file.c
index a1265c9..c07ff83 100644
--- a/fs/cifs/file.c
+++ b/fs/cifs/file.c
@@ -879,18 +879,19 @@ ssize_t cifs_user_write(struct file *file, const char 
__user *write_data,
cifs_stats_bytes_written(pTcon, total_written);
 
/* since the write may have blocked check these pointers again */
-   if (file-f_path.dentry) {
-   if (file-f_path.dentry-d_inode) {
-   struct inode *inode = file-f_path.dentry-d_inode;
-   inode-i_ctime = inode-i_mtime =
-   current_fs_time(inode-i_sb);
-   if (total_written  0) {
-   if (*poffset  
file-f_path.dentry-d_inode-i_size)
-   
i_size_write(file-f_path.dentry-d_inode,
+   if ((file-f_path.dentry)  (file-f_path.dentry-d_inode)) {
+   struct inode *inode = file-f_path.dentry-d_inode;
+/* Do not update local mtime - server will set its actual value on write   

+ * inode-i_ctime = inode-i_mtime = 
+ * current_fs_time(inode-i_sb);*/
+   if (total_written  0) {
+   spin_lock(inode-i_lock);
+   if (*poffset  file-f_path.dentry-d_inode-i_size)
+   i_size_write(file-f_path.dentry-d_inode,
*poffset);
-   }
-   mark_inode_dirty_sync(file-f_path.dentry-d_inode);
+   spin_unlock(inode-i_lock);
}
+   mark_inode_dirty_sync(file-f_path.dentry-d_inode);
}
FreeXid(xid);
return total_written;
@@ -1012,18 +1013,18 @@ static ssize_t cifs_write(struct file *file, const char 
*write_data,
cifs_stats_bytes_written(pTcon, total_written);
 
/* since the write may have blocked check these pointers again */
-   if (file-f_path.dentry) {
-   if (file-f_path.dentry-d_inode) {
+   if ((file-f_path.dentry)  (file-f_path.dentry-d_inode)) {
 /*BB We could make this contingent on superblock ATIME flag too */
-/* file-f_path.dentry-d_inode-i_ctime =
-   file-f_path.dentry-d_inode-i_mtime = CURRENT_TIME;*/
-   if (total_written  0) {
-   if (*poffset  
file-f_path.dentry-d_inode-i_size)
-   
i_size_write(file-f_path.dentry-d_inode,
-*poffset);
-   }
-   mark_inode_dirty_sync(file-f_path.dentry-d_inode);
+/* file-f_path.dentry-d_inode-i_ctime =
+   file-f_path.dentry-d_inode-i_mtime = CURRENT_TIME;*/
+   if (total_written  0) {
+   spin_lock(file-f_path.dentry-d_inode-i_lock);
+   if (*poffset  file-f_path.dentry-d_inode-i_size)
+   i_size_write(file-f_path.dentry-d_inode,
+*poffset);
+   spin_unlock(file-f_path.dentry-d_inode-i_lock);
}
+   mark_inode_dirty_sync(file-f_path.dentry-d_inode);
}
FreeXid(xid);
return total_written;
@@ -1400,6 

[CIFS] small piece missing from previous patch

2007-03-06 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=ba6a46a03f3c46ed68be551c722161bb37caf095
Commit: ba6a46a03f3c46ed68be551c722161bb37caf095
Parent: 3677db10a635a39f63ea509f8f0056d95589ff90
Author: Steve French [EMAIL PROTECTED]
AuthorDate: Mon Feb 26 20:06:29 2007 +
Committer:  Steve French [EMAIL PROTECTED]
CommitDate: Mon Feb 26 20:06:29 2007 +

[CIFS] small piece missing from previous patch

There were two i_size_writes in the new truncate
function - we missed one in the last patch.
Noticed by Shaggy when he reviewed.

Thank you Shaggy ...

CC: Shaggy [EMAIL PROTECTED]
Signed-off-by: Steve French [EMAIL PROTECTED]
---
 fs/cifs/inode.c |   16 +++-
 1 files changed, 11 insertions(+), 5 deletions(-)

diff --git a/fs/cifs/inode.c b/fs/cifs/inode.c
index 24df13a..03ade0f 100644
--- a/fs/cifs/inode.c
+++ b/fs/cifs/inode.c
@@ -1139,15 +1139,17 @@ int cifs_vmtruncate(struct inode * inode, loff_t offset)
struct address_space *mapping = inode-i_mapping;
unsigned long limit;
 
+   spin_lock(inode-i_lock);
if (inode-i_size  offset)
goto do_expand;
/*
 * truncation of in-use swapfiles is disallowed - it would cause
 * subsequent swapout to scribble on the now-freed blocks.
 */
-   if (IS_SWAPFILE(inode))
+   if (IS_SWAPFILE(inode)) {
+   spin_unlock(inode-i_lock);
goto out_busy;
-   spin_lock(inode-i_lock);  
+   }
i_size_write(inode, offset);
spin_unlock(inode-i_lock);
unmap_mapping_range(mapping, offset + PAGE_SIZE - 1, 0, 1);
@@ -1156,12 +1158,16 @@ int cifs_vmtruncate(struct inode * inode, loff_t offset)
 
 do_expand:
limit = current-signal-rlim[RLIMIT_FSIZE].rlim_cur;
-   if (limit != RLIM_INFINITY  offset  limit)
+   if (limit != RLIM_INFINITY  offset  limit) {
+   spin_unlock(inode-i_lock);
goto out_sig;
-   if (offset  inode-i_sb-s_maxbytes)
+   }
+   if (offset  inode-i_sb-s_maxbytes) {
+   spin_unlock(inode-i_lock);
goto out_big;
+   }
i_size_write(inode, offset);
-
+   spin_unlock(inode-i_lock);
 out_truncate:
if (inode-i_op  inode-i_op-truncate)
inode-i_op-truncate(inode);
-
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


[CIFS] cifs export operations

2007-03-06 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=35c11fdda7b556db73631dc17dc1723624690dfb
Commit: 35c11fdda7b556db73631dc17dc1723624690dfb
Parent: ba6a46a03f3c46ed68be551c722161bb37caf095
Author: Steve French [EMAIL PROTECTED]
AuthorDate: Tue Feb 27 05:09:35 2007 +
Committer:  Steve French [EMAIL PROTECTED]
CommitDate: Tue Feb 27 05:09:35 2007 +

[CIFS] cifs export operations

For nfsd to work over cifs mounts (which presumably makes sense when trying
to reexport mounts to windows, network appliances or Samba servers to nfs
clients via nfs server).

This is the first stage of that enablement, marked experimental and turned
off by default.

Signed-off-by: Steve French [EMAIL PROTECTED]
---
 fs/cifs/Makefile |2 +-
 fs/cifs/TODO |   16 +++-
 fs/cifs/cifsfs.c |   12 ++--
 3 files changed, 18 insertions(+), 12 deletions(-)

diff --git a/fs/cifs/Makefile b/fs/cifs/Makefile
index a26f26e..6ecd9d6 100644
--- a/fs/cifs/Makefile
+++ b/fs/cifs/Makefile
@@ -3,4 +3,4 @@
 #
 obj-$(CONFIG_CIFS) += cifs.o
 
-cifs-objs := cifsfs.o cifssmb.o cifs_debug.o connect.o dir.o file.o inode.o 
link.o misc.o netmisc.o smbdes.o smbencrypt.o transport.o asn1.o md4.o md5.o 
cifs_unicode.o nterr.o xattr.o cifsencrypt.o fcntl.o readdir.o ioctl.o sess.o
+cifs-objs := cifsfs.o cifssmb.o cifs_debug.o connect.o dir.o file.o inode.o 
link.o misc.o netmisc.o smbdes.o smbencrypt.o transport.o asn1.o md4.o md5.o 
cifs_unicode.o nterr.o xattr.o cifsencrypt.o fcntl.o readdir.o ioctl.o sess.o 
export.o
diff --git a/fs/cifs/TODO b/fs/cifs/TODO
index 6837294..d7b9c27 100644
--- a/fs/cifs/TODO
+++ b/fs/cifs/TODO
@@ -18,7 +18,9 @@ better)
 
 d) Kerberos/SPNEGO session setup support - (started)
 
-e) NTLMv2 authentication (mostly implemented)
+e) NTLMv2 authentication (mostly implemented - double check
+that NTLMv2 signing works, also need to cleanup now unneeded SessSetup code in
+fs/cifs/connect.c)
 
 f) MD5-HMAC signing SMB PDUs when SPNEGO style SessionSetup 
 used (Kerberos or NTLMSSP). Signing alreadyimplemented for NTLM
@@ -88,11 +90,12 @@ w) Finish up the dos time conversion routines needed to 
return old server
 time to the client (default time, of now or time 0 is used now for these 
 very old servers)
 
-x) Add support for OS/2 (LANMAN 1.2 and LANMAN2.1 based SMB servers)
+x) In support for OS/2 (LANMAN 1.2 and LANMAN2.1 based SMB servers) 
+need to add ability to set time to server (utimes command)
 
 y) Finish testing of Windows 9x/Windows ME server support (started).
 
-KNOWN BUGS (updated April 29, 2005)
+KNOWN BUGS (updated February 26, 2007)
 
 See http://bugzilla.samba.org - search on product CifsVFS for
 current bug list.
@@ -107,11 +110,6 @@ but recognizes them
 succeed but still return access denied (appears to be Windows 
 server not cifs client problem) and has not been reproduced recently.
 NTFS partitions do not have this problem.
-4) debug connectathon lock test case 10 which fails against
-Samba (may be unmappable due to POSIX to Windows lock model
-differences but worth investigating).  Also debug Samba to 
-see why lock test case 7 takes longer to complete to Samba
-than to Windows.
 
 Misc testing to do
 ==
@@ -119,7 +117,7 @@ Misc testing to do
 types. Try nested symlinks (8 deep). Return max path name in stat -f 
information
 
 2) Modify file portion of ltp so it can run against a mounted network
-share and run it against cifs vfs.
+share and run it against cifs vfs in automated fashion.
 
 3) Additional performance testing and optimization using iozone and similar - 
 there are some easy changes that can be done to parallelize sequential writes,
diff --git a/fs/cifs/cifsfs.c b/fs/cifs/cifsfs.c
index bc2c0ac..4dab32a 100644
--- a/fs/cifs/cifsfs.c
+++ b/fs/cifs/cifsfs.c
@@ -1,7 +1,7 @@
 /*
  *   fs/cifs/cifsfs.c
  *
- *   Copyright (C) International Business Machines  Corp., 2002,2004
+ *   Copyright (C) International Business Machines  Corp., 2002,2007
  *   Author(s): Steve French ([EMAIL PROTECTED])
  *
  *   Common Internet FileSystem (CIFS) client
@@ -47,7 +47,11 @@
 
 #ifdef CONFIG_CIFS_QUOTA
 static struct quotactl_ops cifs_quotactl_ops;
-#endif
+#endif /* QUOTA */
+
+#ifdef CONFIG_CIFS_EXPERIMENTAL
+extern struct export_operations cifs_export_ops;
+#endif /* EXPERIMENTAL */
 
 int cifsFYI = 0;
 int cifsERROR = 1;
@@ -110,6 +114,10 @@ cifs_read_super(struct super_block *sb, void *data,
 
sb-s_magic = CIFS_MAGIC_NUMBER;
sb-s_op = cifs_super_ops;
+#ifdef CONFIG_CIFS_EXPERIMENTAL
+   if(experimEnabled != 0)
+   sb-s_export_op = cifs_export_ops;
+#endif /* EXPERIMENTAL */  
 /* if(cifs_sb-tcon-ses-server-maxBuf  MAX_CIFS_HDR_SIZE + 512)
sb-s_blocksize = cifs_sb-tcon-ses-server-maxBuf - 
MAX_CIFS_HDR_SIZE; */
 #ifdef CONFIG_CIFS_QUOTA
-
To unsubscribe from this list: send the line 

[CIFS] New file for previous commit

2007-03-06 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=1ae1bc44d44dd84cc00fb9edbba27458771d860d
Commit: 1ae1bc44d44dd84cc00fb9edbba27458771d860d
Parent: 35c11fdda7b556db73631dc17dc1723624690dfb
Author: Steve French [EMAIL PROTECTED]
AuthorDate: Tue Feb 27 05:16:30 2007 +
Committer:  Steve French [EMAIL PROTECTED]
CommitDate: Tue Feb 27 05:16:30 2007 +

[CIFS] New file for previous commit

Signed-off-by: Steve French [EMAIL PROTECTED]
---
 fs/cifs/export.c |   52 
 1 files changed, 52 insertions(+), 0 deletions(-)

diff --git a/fs/cifs/export.c b/fs/cifs/export.c
new file mode 100644
index 000..1d71639
--- /dev/null
+++ b/fs/cifs/export.c
@@ -0,0 +1,52 @@
+/*
+ *   fs/cifs/export.c
+ *
+ *   Copyright (C) International Business Machines  Corp., 2007
+ *   Author(s): Steve French ([EMAIL PROTECTED])
+ *
+ *   Common Internet FileSystem (CIFS) client
+ * 
+ *   Operations related to support for exporting files via NFSD
+ *
+ *   This library is free software; you can redistribute it and/or modify
+ *   it under the terms of the GNU Lesser General Public License as published
+ *   by the Free Software Foundation; either version 2.1 of the License, or
+ *   (at your option) any later version.
+ *
+ *   This library is distributed in the hope that it will be useful,
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See
+ *   the GNU Lesser General Public License for more details.
+ *
+ *   You should have received a copy of the GNU Lesser General Public License
+ *   along with this library; if not, write to the Free Software
+ *   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ */
+ 
+ /* 
+  * See Documentation/filesystems/Exporting
+  * and examples in fs/exportfs
+  */
+
+#include linux/fs.h
+ 
+#ifdef CONFIG_CIFS_EXPERIMENTAL
+ 
+static struct dentry *cifs_get_parent(struct dentry *dentry)
+{
+   /* BB need to add code here eventually to enable export via NFSD */
+   return ERR_PTR(-EACCES);
+}
+ 
+struct export_operations cifs_export_ops = {
+   .get_parent = cifs_get_parent,
+/* Following five export operations are unneeded so far and can default */ 

+/* .get_dentry =
+   .get_name =
+   .find_exported_dentry =
+   .decode_fh = 
+   .encode_fs =  */
+ };
+ 
+#endif /* EXPERIMENTAL */
+ 
-
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


[CIFS] Remove some unused functions/declarations

2007-03-06 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=99ee4dbd7c99c27129a8e2026003a7680878345f
Commit: 99ee4dbd7c99c27129a8e2026003a7680878345f
Parent: 1ae1bc44d44dd84cc00fb9edbba27458771d860d
Author: Steve French [EMAIL PROTECTED]
AuthorDate: Tue Feb 27 05:35:17 2007 +
Committer:  Steve French [EMAIL PROTECTED]
CommitDate: Tue Feb 27 05:35:17 2007 +

[CIFS] Remove some unused functions/declarations

Signed-off-by: Steve French [EMAIL PROTECTED]
---
 fs/cifs/cifsfs.c|4 ++--
 fs/cifs/cifsfs.h|4 ++--
 fs/cifs/cifsglob.h  |8 +---
 fs/cifs/cifsproto.h |2 +-
 fs/cifs/dir.c   |2 +-
 fs/cifs/inode.c |4 +++-
 6 files changed, 14 insertions(+), 10 deletions(-)

diff --git a/fs/cifs/cifsfs.c b/fs/cifs/cifsfs.c
index 4dab32a..faba4d6 100644
--- a/fs/cifs/cifsfs.c
+++ b/fs/cifs/cifsfs.c
@@ -66,8 +66,8 @@ unsigned int extended_security = CIFSSEC_DEF;
 unsigned int sign_CIFS_PDUs = 1;
 extern struct task_struct * oplockThread; /* remove sparse warning */
 struct task_struct * oplockThread = NULL;
-extern struct task_struct * dnotifyThread; /* remove sparse warning */
-struct task_struct * dnotifyThread = NULL;
+/* extern struct task_struct * dnotifyThread; remove sparse warning */
+static struct task_struct * dnotifyThread = NULL;
 static const struct super_operations cifs_super_ops;
 unsigned int CIFSMaxBufSize = CIFS_MAX_MSGSIZE;
 module_param(CIFSMaxBufSize, int, 0);
diff --git a/fs/cifs/cifsfs.h b/fs/cifs/cifsfs.h
index c97c08e..2c2c384 100644
--- a/fs/cifs/cifsfs.h
+++ b/fs/cifs/cifsfs.h
@@ -38,8 +38,8 @@ extern const struct address_space_operations 
cifs_addr_ops_smallbuf;
 /* Functions related to super block operations */
 /* extern const struct super_operations cifs_super_ops;*/
 extern void cifs_read_inode(struct inode *);
-extern void cifs_delete_inode(struct inode *);
-/* extern void cifs_write_inode(struct inode *); *//* BB not needed yet */
+/*extern void cifs_delete_inode(struct inode *);*/  /* BB not needed yet */
+/* extern void cifs_write_inode(struct inode *); */ /* BB not needed yet */
 
 /* Functions related to inodes */
 extern const struct inode_operations cifs_dir_inode_ops;
diff --git a/fs/cifs/cifsglob.h b/fs/cifs/cifsglob.h
index 74d3ccb..e4de8eb 100644
--- a/fs/cifs/cifsglob.h
+++ b/fs/cifs/cifsglob.h
@@ -525,15 +525,17 @@ require use of the stronger protocol */
  */
 GLOBAL_EXTERN struct smbUidInfo *GlobalUidList[UID_HASH];
 
-GLOBAL_EXTERN struct list_head GlobalServerList; /* BB not implemented yet */
+/* GLOBAL_EXTERN struct list_head GlobalServerList; BB not implemented yet */
 GLOBAL_EXTERN struct list_head GlobalSMBSessionList;
 GLOBAL_EXTERN struct list_head GlobalTreeConnectionList;
 GLOBAL_EXTERN rwlock_t GlobalSMBSeslock;  /* protects list inserts on 3 above 
*/
 
 GLOBAL_EXTERN struct list_head GlobalOplock_Q;
 
-GLOBAL_EXTERN struct list_head GlobalDnotifyReqList; /* Outstanding dir notify 
requests */
-GLOBAL_EXTERN struct list_head GlobalDnotifyRsp_Q;/* DirNotify response queue 
*/
+/* Outstanding dir notify requests */
+GLOBAL_EXTERN struct list_head GlobalDnotifyReqList;
+/* DirNotify response queue */
+GLOBAL_EXTERN struct list_head GlobalDnotifyRsp_Q;
 
 /*
  * Global transaction id (XID) information
diff --git a/fs/cifs/cifsproto.h b/fs/cifs/cifsproto.h
index 6148b82..32eb1ac 100644
--- a/fs/cifs/cifsproto.h
+++ b/fs/cifs/cifsproto.h
@@ -43,7 +43,7 @@ extern void _FreeXid(unsigned int);
 #define FreeXid(curr_xid) {_FreeXid(curr_xid); cFYI(1,(CIFS VFS: leaving %s 
(xid = %d) rc = %d,__FUNCTION__,curr_xid,(int)rc));}
 extern char *build_path_from_dentry(struct dentry *);
 extern char *build_wildcard_path_from_dentry(struct dentry *direntry);
-extern void renew_parental_timestamps(struct dentry *direntry);
+/* extern void renew_parental_timestamps(struct dentry *direntry);*/
 extern int SendReceive(const unsigned int /* xid */ , struct cifsSesInfo *,
struct smb_hdr * /* input */ ,
struct smb_hdr * /* out */ ,
diff --git a/fs/cifs/dir.c b/fs/cifs/dir.c
index 66b825a..3fad638 100644
--- a/fs/cifs/dir.c
+++ b/fs/cifs/dir.c
@@ -31,7 +31,7 @@
 #include cifs_debug.h
 #include cifs_fs_sb.h
 
-void
+static void
 renew_parental_timestamps(struct dentry *direntry)
 {
/* BB check if there is a way to get the kernel to do this or if we 
really need this */
diff --git a/fs/cifs/inode.c b/fs/cifs/inode.c
index 03ade0f..86b9dbb 100644
--- a/fs/cifs/inode.c
+++ b/fs/cifs/inode.c
@@ -1134,7 +1134,7 @@ static int cifs_truncate_page(struct address_space 
*mapping, loff_t from)
return rc;
 }
 
-int cifs_vmtruncate(struct inode * inode, loff_t offset)
+static int cifs_vmtruncate(struct inode * inode, loff_t offset)
 {
struct address_space *mapping = inode-i_mapping;
unsigned long limit;
@@ -1431,9 +1431,11 @@ cifs_setattr_exit:
return rc;
 }
 
+#if 0
 void cifs_delete_inode(struct inode *inode)
 {

[CIFS] cifs_prepare_write was incorrectly rereading page in some cases

2007-03-06 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=8a236264f7d6db3f52881d37a86c5a5f704072b0
Commit: 8a236264f7d6db3f52881d37a86c5a5f704072b0
Parent: c7af1857ef74873bf5a9c8fcab0cfd79883492ac
Author: Steve French [EMAIL PROTECTED]
AuthorDate: Tue Mar 6 00:31:00 2007 +
Committer:  Steve French [EMAIL PROTECTED]
CommitDate: Tue Mar 6 00:31:00 2007 +

[CIFS] cifs_prepare_write was incorrectly rereading page in some cases

Noticed by Shaggy.

Signed-off-by: Shaggy [EMAIL PROTECTED]
Signed-off-by: Steve French [EMAIL PROTECTED]
---
 fs/cifs/CHANGES |5 ++-
 fs/cifs/file.c  |   62 --
 fs/cifs/transport.c |6 +---
 3 files changed, 45 insertions(+), 28 deletions(-)

diff --git a/fs/cifs/CHANGES b/fs/cifs/CHANGES
index e08a147..6247628 100644
--- a/fs/cifs/CHANGES
+++ b/fs/cifs/CHANGES
@@ -2,8 +2,9 @@ Verison 1.48
 
 Fix mtime bouncing around from local idea of last write times to remote time.
 Fix hang (in i_size_read) when simultaneous size update of same remote file
-on smp system corrupts sequence number.
- 
+on smp system corrupts sequence number. Do not reread unnecessarily partial 
page
+(which we are about to overwrite anyway) when writing out file opened rw.
+
 Version 1.47
 
 Fix oops in list_del during mount caused by unaligned string.
diff --git a/fs/cifs/file.c b/fs/cifs/file.c
index c07ff83..2d3275b 100644
--- a/fs/cifs/file.c
+++ b/fs/cifs/file.c
@@ -1992,34 +1992,52 @@ static int cifs_prepare_write(struct file *file, struct 
page *page,
unsigned from, unsigned to)
 {
int rc = 0;
-loff_t offset = (loff_t)page-index  PAGE_CACHE_SHIFT;
+   loff_t i_size;
+   loff_t offset;
+
cFYI(1, (prepare write for page %p from %d to %d,page,from,to));
-   if (!PageUptodate(page)) {
-   /*  if (to - from != PAGE_CACHE_SIZE) {
-   void *kaddr = kmap_atomic(page, KM_USER0);
+   if (PageUptodate(page))
+   return 0;
+
+   /* If we are writing a full page it will be up to date,
+  no need to read from the server */
+   if ((to == PAGE_CACHE_SIZE)  (from == 0)) {
+   SetPageUptodate(page);
+   return 0;
+   }
+
+   offset = (loff_t)page-index  PAGE_CACHE_SHIFT;
+   i_size = i_size_read(page-mapping-host);
+
+   if ((offset = i_size) ||
+   ((from == 0)  (offset + to) = i_size)) {
+   /*
+* We don't need to read data beyond the end of the file.
+* zero it, and set the page uptodate
+*/
+   void *kaddr = kmap_atomic(page, KM_USER0);
+
+   if (from)
memset(kaddr, 0, from);
+   if (to  PAGE_CACHE_SIZE)
memset(kaddr + to, 0, PAGE_CACHE_SIZE - to);
-   flush_dcache_page(page);
-   kunmap_atomic(kaddr, KM_USER0);
-   } */
-   /* If we are writing a full page it will be up to date,
-  no need to read from the server */
-   if ((to == PAGE_CACHE_SIZE)  (from == 0))
-   SetPageUptodate(page);
-
+   flush_dcache_page(page);
+   kunmap_atomic(kaddr, KM_USER0);
+   SetPageUptodate(page);
+   } else if ((file-f_flags  O_ACCMODE) != O_WRONLY) {
/* might as well read a page, it is fast enough */
-   if ((file-f_flags  O_ACCMODE) != O_WRONLY) {
-   rc = cifs_readpage_worker(file, page, offset);
-   } else {
-   /* should we try using another file handle if there is one -
-  how would we lock it to prevent close of that handle
-  racing with this read?
-  In any case this will be written out by commit_write */
-   }
+   rc = cifs_readpage_worker(file, page, offset);
+   } else {
+   /* we could try using another file handle if there is one -
+  but how would we lock it to prevent close of that handle
+  racing with this read? In any case
+  this will be written out by commit_write so is fine */
}
 
-   /* BB should we pass any errors back? 
-  e.g. if we do not have read access to the file */
+   /* we do not need to pass errors back 
+  e.g. if we do not have read access to the file 
+  because cifs_commit_write will do the right thing.  -- shaggy */
+
return 0;
 }
 
diff --git a/fs/cifs/transport.c b/fs/cifs/transport.c
index f80007e..5f46845 100644
--- a/fs/cifs/transport.c
+++ b/fs/cifs/transport.c
@@ -499,7 +499,7 @@ SendReceive2(const unsigned int xid, struct cifsSesInfo 
*ses,
   due to last connection to this server being unmounted */
if 

[ALSA] hda-codec - Add LFE support on Dell M90

2007-03-06 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=f0f9674585c7b0b1abe9efb68667cb16c878cc45
Commit: f0f9674585c7b0b1abe9efb68667cb16c878cc45
Parent: c3442e296517aee733d62fc3fe03211598902c7d
Author: Takashi Iwai [EMAIL PROTECTED]
AuthorDate: Wed Feb 14 00:59:17 2007 +0100
Committer:  Jaroslav Kysela [EMAIL PROTECTED]
CommitDate: Tue Mar 6 10:40:21 2007 +0100

[ALSA] hda-codec - Add LFE support on Dell M90

Added LFE support on Dell M90 laptop.

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

diff --git a/sound/pci/hda/patch_sigmatel.c b/sound/pci/hda/patch_sigmatel.c
index f7ef9c5..54fdf34 100644
--- a/sound/pci/hda/patch_sigmatel.c
+++ b/sound/pci/hda/patch_sigmatel.c
@@ -461,6 +461,8 @@ static struct snd_pci_quirk stac9200_cfg_tbl[] = {
  Dell Inspiron E1705/9400, STAC_REF),
SND_PCI_QUIRK(PCI_VENDOR_ID_DELL, 0x01ce,
  Dell XPS M1710, STAC_REF),
+   SND_PCI_QUIRK(PCI_VENDOR_ID_DELL, 0x01cf,
+ Dell Precision M90, STAC_REF),
{} /* 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] soc - Fix WM9712 register cache entry

2007-03-06 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=847c03e8ac30265787909f5710dee4c564a96df5
Commit: 847c03e8ac30265787909f5710dee4c564a96df5
Parent: 081d17c4726131ba9ed763ea24f7235d8205fdf3
Author: Joe Sauer [EMAIL PROTECTED]
AuthorDate: Wed Feb 14 15:23:11 2007 +0100
Committer:  Jaroslav Kysela [EMAIL PROTECTED]
CommitDate: Tue Mar 6 10:40:24 2007 +0100

[ALSA] soc - Fix WM9712 register cache entry

This patch by Joe Sauer fixes the WM9712 codec register cache value for
register 0x08. Value should be 0x0f0f and not 0xf0f0.

Signed-off-by: Joe Sauer [EMAIL PROTECTED]
Signed-off-by: Liam Girdwood [EMAIL PROTECTED]
Signed-off-by: Takashi Iwai [EMAIL PROTECTED]
Signed-off-by: Jaroslav Kysela [EMAIL PROTECTED]
---
 sound/soc/codecs/wm9712.c |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/sound/soc/codecs/wm9712.c b/sound/soc/codecs/wm9712.c
index 92a6487..b7865c4 100644
--- a/sound/soc/codecs/wm9712.c
+++ b/sound/soc/codecs/wm9712.c
@@ -39,7 +39,7 @@ static int ac97_write(struct snd_soc_codec *codec,
  */
 static const u16 wm9712_reg[] = {
0x6174, 0x8000, 0x8000, 0x8000, // 6
-   0xf0f0, 0xaaa0, 0xc008, 0x6808, // e
+   0x0f0f, 0xaaa0, 0xc008, 0x6808, // e
0xe808, 0xaaa0, 0xad00, 0x8000, // 16
0xe808, 0x3000, 0x8000, 0x, // 1e
0x, 0x, 0x, 0x000f, // 26
-
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 - Define pin configs for MacBooks

2007-03-06 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=3fc24d850708b8dfd3472b25eac0c32dd7708925
Commit: 3fc24d850708b8dfd3472b25eac0c32dd7708925
Parent: cc69d12d0a063fd5f25d9b395357be5ba438b0c6
Author: Takashi Iwai [EMAIL PROTECTED]
AuthorDate: Fri Feb 16 13:27:18 2007 +0100
Committer:  Jaroslav Kysela [EMAIL PROTECTED]
CommitDate: Tue Mar 6 10:40:28 2007 +0100

[ALSA] hda-codec - Define pin configs for MacBooks

Define pin configs for MacBook and MacBook Pro with STAC92xx codecs.
The latter is detected automatically by checking codec SSID now.
Also, fixed the documentation regarding available modeliof sigmatel
codec chips.

Signed-off-by: Takashi Iwai [EMAIL PROTECTED]
Signed-off-by: Jaroslav Kysela [EMAIL PROTECTED]
---
 Documentation/sound/alsa/ALSA-Configuration.txt |8 +-
 sound/pci/hda/patch_sigmatel.c  |   33 --
 2 files changed, 37 insertions(+), 4 deletions(-)

diff --git a/Documentation/sound/alsa/ALSA-Configuration.txt 
b/Documentation/sound/alsa/ALSA-Configuration.txt
index c30ff1b..e127751 100644
--- a/Documentation/sound/alsa/ALSA-Configuration.txt
+++ b/Documentation/sound/alsa/ALSA-Configuration.txt
@@ -895,10 +895,16 @@ Prior to version 0.9.0rc4 options had a 'snd_' prefix. 
This was removed.
can be adjusted.  Appearing only when compiled with
$CONFIG_SND_DEBUG=y
 
-   STAC9200/9205/9220/9221/9254
+   STAC9200/9205/9254
+ ref   Reference board
+
+   STAC9220/9221
  ref   Reference board
  3stackD945 3stack
  5stackD945 5stack + SPDIF
+ macmini   Intel Mac Mini
+ macbook   Intel Mac Book
+ macbook-pro   Intel Mac Book Pro
 
STAC9202/9250/9251
  ref   Reference board, base config
diff --git a/sound/pci/hda/patch_sigmatel.c b/sound/pci/hda/patch_sigmatel.c
index 54fdf34..4c7b039 100644
--- a/sound/pci/hda/patch_sigmatel.c
+++ b/sound/pci/hda/patch_sigmatel.c
@@ -59,6 +59,8 @@ enum {
STAC_D945GTP3,
STAC_D945GTP5,
STAC_MACMINI,
+   STAC_MACBOOK,
+   STAC_MACBOOK_PRO,
STAC_922X_MODELS
 };
 
@@ -521,11 +523,25 @@ static unsigned int d945gtp5_pin_configs[10] = {
0x02a19320, 0x4100,
 };
 
+static unsigned int macbook_pin_configs[10] = {
+   0x0321e230, 0x03a1e020, 0x40fd, 0x9017e110,
+   0x40fe, 0x0381e021, 0x1345e240, 0x13c5e22e,
+   0x40fc, 0x40fb,
+};
+
+static unsigned int macbook_pro_pin_configs[10] = {
+   0x0221401f, 0x90a70120, 0x01813024, 0x01014010,
+   0x40fd, 0x01016011, 0x1345e240, 0x13c5e22e,
+   0x40fc, 0x40fb,
+};
+
 static unsigned int *stac922x_brd_tbl[STAC_922X_MODELS] = {
[STAC_D945_REF] = ref922x_pin_configs,
[STAC_D945GTP3] = d945gtp3_pin_configs,
[STAC_D945GTP5] = d945gtp5_pin_configs,
[STAC_MACMINI] = d945gtp5_pin_configs,
+   [STAC_MACBOOK] = macbook_pin_configs,
+   [STAC_MACBOOK_PRO] = macbook_pro_pin_configs,
 };
 
 static const char *stac922x_models[STAC_922X_MODELS] = {
@@ -533,6 +549,8 @@ static const char *stac922x_models[STAC_922X_MODELS] = {
[STAC_D945GTP5] = 5stack,
[STAC_D945GTP3] = 3stack,
[STAC_MACMINI]  = macmini,
+   [STAC_MACBOOK]  = macbook,
+   [STAC_MACBOOK_PRO]  = macbook-pro,
 };
 
 static struct snd_pci_quirk stac922x_cfg_tbl[] = {
@@ -1866,6 +1884,18 @@ static int patch_stac922x(struct hda_codec *codec)
spec-board_config = snd_hda_check_board_config(codec, STAC_922X_MODELS,
stac922x_models,
stac922x_cfg_tbl);
+   if (spec-board_config == STAC_MACMINI) {
+   spec-gpio_mute = 1;
+   /* Intel Macs have all same PCI SSID, so we need to check
+* codec SSID to distinguish the exact models
+*/
+   switch (codec-subsystem_id) {
+   case 0x106b1e00:
+   spec-board_config = STAC_MACBOOK_PRO;
+   break;
+   }
+   }
+
  again:
if (spec-board_config  0) {
snd_printdd(KERN_INFO hda_codec: Unknown model for STAC922x, 
@@ -1906,9 +1936,6 @@ static int patch_stac922x(struct hda_codec *codec)
return err;
}
 
-   if (spec-board_config == STAC_MACMINI)
-   spec-gpio_mute = 1;
-
codec-patch_ops = stac92xx_patch_ops;
 
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


[ALSA] hda-codec - Add missing Mic Boost controls for ALC262

2007-03-06 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=cc69d12d0a063fd5f25d9b395357be5ba438b0c6
Commit: cc69d12d0a063fd5f25d9b395357be5ba438b0c6
Parent: 53ae5194e2f70939ceacd8a9be87f356c646759a
Author: Takashi Iwai [EMAIL PROTECTED]
AuthorDate: Thu Feb 15 19:29:26 2007 +0100
Committer:  Jaroslav Kysela [EMAIL PROTECTED]
CommitDate: Tue Mar 6 10:40:27 2007 +0100

[ALSA] hda-codec - Add missing Mic Boost controls for ALC262

Added missing Mic Boost controls for ALC262 codec chip.

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

diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c
index 7a4b5d3..84d005e 100644
--- a/sound/pci/hda/patch_realtek.c
+++ b/sound/pci/hda/patch_realtek.c
@@ -5924,8 +5924,10 @@ static struct snd_kcontrol_new alc262_base_mixer[] = {
HDA_CODEC_MUTE(Line Playback Switch, 0x0b, 0x02, HDA_INPUT),
HDA_CODEC_VOLUME(Mic Playback Volume, 0x0b, 0x0, HDA_INPUT),
HDA_CODEC_MUTE(Mic Playback Switch, 0x0b, 0x0, HDA_INPUT),
+   HDA_CODEC_VOLUME(Mic Boost, 0x18, 0, HDA_INPUT),
HDA_CODEC_VOLUME(Front Mic Playback Volume, 0x0b, 0x01, HDA_INPUT),
HDA_CODEC_MUTE(Front Mic Playback Switch, 0x0b, 0x01, HDA_INPUT),
+   HDA_CODEC_VOLUME(Front Mic Boost, 0x19, 0, HDA_INPUT),
/* HDA_CODEC_VOLUME(PC Beep Playback Volume, 0x0b, 0x05, HDA_INPUT),
   HDA_CODEC_MUTE(PC Beelp Playback Switch, 0x0b, 0x05, HDA_INPUT), */
HDA_CODEC_VOLUME(Headphone Playback Volume, 0x0D, 0x0, HDA_OUTPUT),
@@ -5944,8 +5946,10 @@ static struct snd_kcontrol_new alc262_hippo1_mixer[] = {
HDA_CODEC_MUTE(Line Playback Switch, 0x0b, 0x02, HDA_INPUT),
HDA_CODEC_VOLUME(Mic Playback Volume, 0x0b, 0x0, HDA_INPUT),
HDA_CODEC_MUTE(Mic Playback Switch, 0x0b, 0x0, HDA_INPUT),
+   HDA_CODEC_VOLUME(Mic Boost, 0x18, 0, HDA_INPUT),
HDA_CODEC_VOLUME(Front Mic Playback Volume, 0x0b, 0x01, HDA_INPUT),
HDA_CODEC_MUTE(Front Mic Playback Switch, 0x0b, 0x01, HDA_INPUT),
+   HDA_CODEC_VOLUME(Front Mic Boost, 0x19, 0, HDA_INPUT),
/* HDA_CODEC_VOLUME(PC Beep Playback Volume, 0x0b, 0x05, HDA_INPUT),
   HDA_CODEC_MUTE(PC Beelp Playback Switch, 0x0b, 0x05, HDA_INPUT), */
/*HDA_CODEC_VOLUME(Headphone Playback Volume, 0x0D, 0x0, 
HDA_OUTPUT),*/
@@ -5962,8 +5966,10 @@ static struct snd_kcontrol_new alc262_HP_BPC_mixer[] = {
 
HDA_CODEC_VOLUME(Mic Playback Volume, 0x0b, 0x0, HDA_INPUT),
HDA_CODEC_MUTE(Mic Playback Switch, 0x0b, 0x0, HDA_INPUT),
+   HDA_CODEC_VOLUME(Mic Boost, 0x18, 0, HDA_INPUT),
HDA_CODEC_VOLUME(Front Mic Playback Volume, 0x0b, 0x01, HDA_INPUT),
HDA_CODEC_MUTE(Front Mic Playback Switch, 0x0b, 0x01, HDA_INPUT),
+   HDA_CODEC_VOLUME(Front Mic Boost, 0x19, 0, HDA_INPUT),
HDA_CODEC_VOLUME(Line Playback Volume, 0x0b, 0x02, HDA_INPUT),
HDA_CODEC_MUTE(Line Playback Switch, 0x0b, 0x02, HDA_INPUT),
HDA_CODEC_VOLUME(CD Playback Volume, 0x0b, 0x04, HDA_INPUT),
@@ -5984,6 +5990,7 @@ static struct snd_kcontrol_new 
alc262_HP_BPC_WildWest_mixer[] = {
HDA_CODEC_MUTE_MONO(Mono Playback Switch, 0x16, 2, 0x0, HDA_OUTPUT),
HDA_CODEC_VOLUME(Front Mic Playback Volume, 0x0b, 0x02, HDA_INPUT),
HDA_CODEC_MUTE(Front Mic Playback Switch, 0x0b, 0x02, HDA_INPUT),
+   HDA_CODEC_VOLUME(Front Mic Boost, 0x1a, 0, HDA_INPUT),
HDA_CODEC_VOLUME(Line Playback Volume, 0x0b, 0x01, HDA_INPUT),
HDA_CODEC_MUTE(Line Playback Switch, 0x0b, 0x01, HDA_INPUT),
HDA_CODEC_VOLUME(CD Playback Volume, 0x0b, 0x04, HDA_INPUT),
@@ -5996,6 +6003,7 @@ static struct snd_kcontrol_new 
alc262_HP_BPC_WildWest_mixer[] = {
 static struct snd_kcontrol_new alc262_HP_BPC_WildWest_option_mixer[] = {
HDA_CODEC_VOLUME(Rear Mic Playback Volume, 0x0b, 0x0, HDA_INPUT),
HDA_CODEC_MUTE(Rear Mic Playback Switch, 0x0b, 0x0, HDA_INPUT),
+   HDA_CODEC_VOLUME(Rear Mic Boost, 0x18, 0, HDA_INPUT),
{ } /* end */
 };
 
-
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] soc - WM9712 PCM volume

2007-03-06 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=53ae5194e2f70939ceacd8a9be87f356c646759a
Commit: 53ae5194e2f70939ceacd8a9be87f356c646759a
Parent: 847c03e8ac30265787909f5710dee4c564a96df5
Author: Liam Girdwood [EMAIL PROTECTED]
AuthorDate: Wed Feb 14 15:23:57 2007 +0100
Committer:  Jaroslav Kysela [EMAIL PROTECTED]
CommitDate: Tue Mar 6 10:40:26 2007 +0100

[ALSA] soc - WM9712 PCM volume

This patch suggested by Joe Sauer adds PCM playback volume kcontrol for
the WM9712.

Signed-off-by: Liam Girdwood [EMAIL PROTECTED]
Signed-off-by: Takashi Iwai [EMAIL PROTECTED]
Signed-off-by: Jaroslav Kysela [EMAIL PROTECTED]
---
 sound/soc/codecs/wm9712.c |1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/sound/soc/codecs/wm9712.c b/sound/soc/codecs/wm9712.c
index b7865c4..ee7a691 100644
--- a/sound/soc/codecs/wm9712.c
+++ b/sound/soc/codecs/wm9712.c
@@ -96,6 +96,7 @@ SOC_DOUBLE(Speaker Playback Volume, AC97_MASTER, 8, 0, 31, 
1),
 SOC_SINGLE(Speaker Playback Switch, AC97_MASTER, 15, 1, 1),
 SOC_DOUBLE(Headphone Playback Volume, AC97_HEADPHONE, 8, 0, 31, 1),
 SOC_SINGLE(Headphone Playback Switch, AC97_HEADPHONE,15, 1, 1),
+SOC_DOUBLE(PCM Playback Volume, AC97_PCM, 8, 0, 31, 1),
 
 SOC_SINGLE(Speaker Playback ZC Switch, AC97_MASTER, 7, 1, 0),
 SOC_SINGLE(Speaker Playback Invert Switch, AC97_MASTER, 6, 1, 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] Add missing sysfs device assignment for ALSA PCI drivers

2007-03-06 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=c187c041c6552339e4d8883a1a00c3c489354eca
Commit: c187c041c6552339e4d8883a1a00c3c489354eca
Parent: 3fc24d850708b8dfd3472b25eac0c32dd7708925
Author: Takashi Iwai [EMAIL PROTECTED]
AuthorDate: Mon Feb 19 15:27:33 2007 +0100
Committer:  Jaroslav Kysela [EMAIL PROTECTED]
CommitDate: Tue Mar 6 10:40:29 2007 +0100

[ALSA] Add missing sysfs device assignment for ALSA PCI drivers

Added the missing sysfs device assignment for ALSA PCI drivers.

Signed-off-by: Takashi Iwai [EMAIL PROTECTED]
Signed-off-by: Jaroslav Kysela [EMAIL PROTECTED]
---
 sound/pci/ali5451/ali5451.c |2 ++
 sound/pci/echoaudio/echoaudio.c |2 ++
 sound/pci/riptide/riptide.c |2 ++
 sound/pci/rme9652/hdspm.c   |2 ++
 4 files changed, 8 insertions(+), 0 deletions(-)

diff --git a/sound/pci/ali5451/ali5451.c b/sound/pci/ali5451/ali5451.c
index 9327ab2..ba7fa22 100644
--- a/sound/pci/ali5451/ali5451.c
+++ b/sound/pci/ali5451/ali5451.c
@@ -2312,6 +2312,8 @@ static int __devinit snd_ali_create(struct snd_card *card,
return err;
}
 
+   snd_card_set_dev(card, pci-dev);
+
/* initialise synth voices*/
for (i = 0; i  ALI_CHANNELS; i++ ) {
codec-synth.voices[i].number = i;
diff --git a/sound/pci/echoaudio/echoaudio.c b/sound/pci/echoaudio/echoaudio.c
index 6a428b8..e413da0 100644
--- a/sound/pci/echoaudio/echoaudio.c
+++ b/sound/pci/echoaudio/echoaudio.c
@@ -2033,6 +2033,8 @@ static int __devinit snd_echo_probe(struct pci_dev *pci,
if (card == NULL)
return -ENOMEM;
 
+   snd_card_set_dev(card, pci-dev);
+
if ((err = snd_echo_create(card, pci, chip))  0) {
snd_card_free(card);
return err;
diff --git a/sound/pci/riptide/riptide.c b/sound/pci/riptide/riptide.c
index 5e1d5d2..952625d 100644
--- a/sound/pci/riptide/riptide.c
+++ b/sound/pci/riptide/riptide.c
@@ -1919,6 +1919,8 @@ snd_riptide_create(struct snd_card *card, struct pci_dev 
*pci,
return err;
}
 
+   snd_card_set_dev(card, pci-dev);
+
*rchip = chip;
return 0;
 }
diff --git a/sound/pci/rme9652/hdspm.c b/sound/pci/rme9652/hdspm.c
index e0215ac..6e95857 100644
--- a/sound/pci/rme9652/hdspm.c
+++ b/sound/pci/rme9652/hdspm.c
@@ -4468,6 +4468,8 @@ static int __devinit snd_hdspm_probe(struct pci_dev *pci,
hdspm-dev = dev;
hdspm-pci = pci;
 
+   snd_card_set_dev(card, pci-dev);
+
if ((err =
 snd_hdspm_create(card, hdspm, precise_ptr[dev],
  enable_monitor[dev]))  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] hda-codec - Add missing Mic Boost for AD1986A codec

2007-03-06 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=fe8970b47ae191d932f5bac9e225e74db6e188a3
Commit: fe8970b47ae191d932f5bac9e225e74db6e188a3
Parent: a31e8c7236f40b42f27c275a959ef129257b0bcd
Author: Takashi Iwai [EMAIL PROTECTED]
AuthorDate: Mon Feb 26 16:00:34 2007 +0100
Committer:  Jaroslav Kysela [EMAIL PROTECTED]
CommitDate: Tue Mar 6 10:40:32 2007 +0100

[ALSA] hda-codec - Add missing Mic Boost for AD1986A codec

Added the missing 'Mic Boost' switch for AD1986A codec.
This influences largely on the recording level of mic-input on some boards.

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

diff --git a/sound/pci/hda/patch_analog.c b/sound/pci/hda/patch_analog.c
index 38977bc..00ace59 100644
--- a/sound/pci/hda/patch_analog.c
+++ b/sound/pci/hda/patch_analog.c
@@ -523,6 +523,7 @@ static struct snd_kcontrol_new ad1986a_mixers[] = {
HDA_CODEC_MUTE(Aux Playback Switch, 0x16, 0x0, HDA_OUTPUT),
HDA_CODEC_VOLUME(Mic Playback Volume, 0x13, 0x0, HDA_OUTPUT),
HDA_CODEC_MUTE(Mic Playback Switch, 0x13, 0x0, HDA_OUTPUT),
+   HDA_CODEC_VOLUME(Mic Boost, 0x0f, 0x0, HDA_OUTPUT),
HDA_CODEC_VOLUME(PC Speaker Playback Volume, 0x18, 0x0, HDA_OUTPUT),
HDA_CODEC_MUTE(PC Speaker Playback Switch, 0x18, 0x0, HDA_OUTPUT),
HDA_CODEC_VOLUME(Mono Playback Volume, 0x1e, 0x0, HDA_OUTPUT),
@@ -570,6 +571,7 @@ static struct snd_kcontrol_new ad1986a_laptop_mixers[] = {
HDA_CODEC_MUTE(Aux Playback Switch, 0x16, 0x0, HDA_OUTPUT),
HDA_CODEC_VOLUME(Mic Playback Volume, 0x13, 0x0, HDA_OUTPUT),
HDA_CODEC_MUTE(Mic Playback Switch, 0x13, 0x0, HDA_OUTPUT),
+   HDA_CODEC_VOLUME(Mic Boost, 0x0f, 0x0, HDA_OUTPUT),
/* HDA_CODEC_VOLUME(PC Speaker Playback Volume, 0x18, 0x0, 
HDA_OUTPUT),
   HDA_CODEC_MUTE(PC Speaker Playback Switch, 0x18, 0x0, HDA_OUTPUT),
   HDA_CODEC_VOLUME(Mono Playback Volume, 0x1e, 0x0, HDA_OUTPUT),
@@ -658,6 +660,7 @@ static struct snd_kcontrol_new ad1986a_laptop_eapd_mixers[] 
= {
HDA_CODEC_MUTE(Internal Mic Playback Switch, 0x17, 0x0, HDA_OUTPUT),
HDA_CODEC_VOLUME(Mic Playback Volume, 0x13, 0x0, HDA_OUTPUT),
HDA_CODEC_MUTE(Mic Playback Switch, 0x13, 0x0, HDA_OUTPUT),
+   HDA_CODEC_VOLUME(Mic Boost, 0x0f, 0x0, HDA_OUTPUT),
HDA_CODEC_VOLUME(Capture Volume, 0x12, 0x0, HDA_OUTPUT),
HDA_CODEC_MUTE(Capture Switch, 0x12, 0x0, HDA_OUTPUT),
{
-
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 - Add Thinkpad X31 and R40 to AD1981x blacklist

2007-03-06 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=a31e8c7236f40b42f27c275a959ef129257b0bcd
Commit: a31e8c7236f40b42f27c275a959ef129257b0bcd
Parent: c187c041c6552339e4d8883a1a00c3c489354eca
Author: Takashi Iwai [EMAIL PROTECTED]
AuthorDate: Thu Feb 22 12:47:25 2007 +0100
Committer:  Jaroslav Kysela [EMAIL PROTECTED]
CommitDate: Tue Mar 6 10:40:30 2007 +0100

[ALSA] ac97 - Add Thinkpad X31 and R40 to AD1981x blacklist

Added Thinkpad X31 and R40 to AD1981x line/HP-jack-sense blacklist
for avoiding the harmful mixer controls.

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

diff --git a/sound/pci/ac97/ac97_patch.c b/sound/pci/ac97/ac97_patch.c
index bfc2fed..37fabf7 100644
--- a/sound/pci/ac97/ac97_patch.c
+++ b/sound/pci/ac97/ac97_patch.c
@@ -1790,6 +1790,8 @@ static const struct snd_kcontrol_new 
snd_ac97_ad1981x_jack_sense[] = {
  * (SS vendor  16 | device)
  */
 static unsigned int ad1981_jacks_blacklist[] = {
+   0x10140523, /* Thinkpad R40 */
+   0x10140534, /* Thinkpad X31 */
0x10140537, /* Thinkpad T41p */
0x10140554, /* Thinkpad T42p/R50p */
0 /* end */
-
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 logic error in headphone mute for Conexant codecs

2007-03-06 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=dd87da1c5d3fd1d973d52e468f76fcc72ad69bd5
Commit: dd87da1c5d3fd1d973d52e468f76fcc72ad69bd5
Parent: fe8970b47ae191d932f5bac9e225e74db6e188a3
Author: Tobin Davis [EMAIL PROTECTED]
AuthorDate: Mon Feb 26 16:07:42 2007 +0100
Committer:  Jaroslav Kysela [EMAIL PROTECTED]
CommitDate: Tue Mar 6 10:40:33 2007 +0100

[ALSA] hda-codec - Fix logic error in headphone mute for Conexant codecs

This patch fixes a logic error introduced in the previous patch.
Without it, speaker automute mutes the speakers when headphones are
removed and unmutes when headphones are plugged in.
This was reported by Gregorio Guidi after getting the earlier patch
off this mailing list.

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

diff --git a/sound/pci/hda/patch_conexant.c b/sound/pci/hda/patch_conexant.c
index 23a1c75..46e93c6 100644
--- a/sound/pci/hda/patch_conexant.c
+++ b/sound/pci/hda/patch_conexant.c
@@ -629,10 +629,12 @@ static int cxt5045_hp_master_vol_put(struct snd_kcontrol 
*kcontrol,
 static void cxt5045_hp_automute(struct hda_codec *codec)
 {
struct conexant_spec *spec = codec-spec;
-   unsigned int bits = (spec-hp_present || !spec-cur_eapd) ? 0x80 : 0;
+   unsigned int bits;
 
spec-hp_present = snd_hda_codec_read(codec, 0x11, 0,
 AC_VERB_GET_PIN_SENSE, 0)  0x8000;
+
+   bits = (spec-hp_present || !spec-cur_eapd) ? 0x80 : 0;
snd_hda_codec_amp_update(codec, 0x10, 0, HDA_OUTPUT, 0, 0x80, bits);
snd_hda_codec_amp_update(codec, 0x10, 1, HDA_OUTPUT, 0, 0x80, bits);
 }
@@ -979,10 +981,12 @@ static int cxt5047_hp_master_vol_put(struct snd_kcontrol 
*kcontrol,
 static void cxt5047_hp_automute(struct hda_codec *codec)
 {
struct conexant_spec *spec = codec-spec;
-   unsigned int bits = spec-hp_present || !spec-cur_eapd ? 0x80 : 0;
+   unsigned int bits;
 
spec-hp_present = snd_hda_codec_read(codec, 0x13, 0,
 AC_VERB_GET_PIN_SENSE, 0)  0x8000;
+
+   bits = (spec-hp_present || !spec-cur_eapd) ? 0x80 : 0;
snd_hda_codec_amp_update(codec, 0x1d, 0, HDA_OUTPUT, 0, 0x80, bits);
snd_hda_codec_amp_update(codec, 0x1d, 1, HDA_OUTPUT, 0, 0x80, bits);
/* Mute/Unmute PCM 2 for good measure - some systems need this */
-
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] cmipci - Allow to disable integrated FM port

2007-03-06 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=2f24d159d5ac418c946e0d38ada46345753688b1
Commit: 2f24d159d5ac418c946e0d38ada46345753688b1
Parent: dd87da1c5d3fd1d973d52e468f76fcc72ad69bd5
Author: Takashi Iwai [EMAIL PROTECTED]
AuthorDate: Thu Feb 15 18:56:43 2007 +0100
Committer:  Jaroslav Kysela [EMAIL PROTECTED]
CommitDate: Tue Mar 6 11:03:53 2007 +0100

[ALSA] cmipci - Allow to disable integrated FM port

The driver didn't allow to disable the integrated FM port (if available),
and this annoyed people who don't want FM port.  Now fm_port=0 disables
the FM port unconditionally.  fm_port=1 is used for enabling the integrated
FM port (as default).
Also fixed the documentation about this option.
Fix ALSA bug#2491.

Signed-off-by: Takashi Iwai [EMAIL PROTECTED]
Signed-off-by: Jaroslav Kysela [EMAIL PROTECTED]
---
 Documentation/sound/alsa/ALSA-Configuration.txt |4 +++-
 sound/pci/cmipci.c  |   18 +++---
 2 files changed, 14 insertions(+), 8 deletions(-)

diff --git a/Documentation/sound/alsa/ALSA-Configuration.txt 
b/Documentation/sound/alsa/ALSA-Configuration.txt
index e127751..db398a6 100644
--- a/Documentation/sound/alsa/ALSA-Configuration.txt
+++ b/Documentation/sound/alsa/ALSA-Configuration.txt
@@ -370,7 +370,9 @@ Prior to version 0.9.0rc4 options had a 'snd_' prefix. This 
was removed.
 mpu_port   - 0x300,0x310,0x320,0x330 = legacy port,
  1 = integrated PCI port,
  0 = disable (default)
-fm_port - 0x388 (default), 0 = disable (default)
+fm_port - 0x388 = legacy port,
+ 1 = integrated PCI port (default),
+ 0 = disable
 soft_ac3- Software-conversion of raw SPDIF packets (model 033 only)
   (default = 1)
 joystick_port - Joystick port address (0 = disable, 1 = auto-detect)
diff --git a/sound/pci/cmipci.c b/sound/pci/cmipci.c
index 70face7..7d3c5ee 100644
--- a/sound/pci/cmipci.c
+++ b/sound/pci/cmipci.c
@@ -57,7 +57,7 @@ static int index[SNDRV_CARDS] = SNDRV_DEFAULT_IDX;/* 
Index 0-MAX */
 static char *id[SNDRV_CARDS] = SNDRV_DEFAULT_STR;  /* ID for this card */
 static int enable[SNDRV_CARDS] = SNDRV_DEFAULT_ENABLE_PNP; /* Enable 
switches */
 static long mpu_port[SNDRV_CARDS];
-static long fm_port[SNDRV_CARDS];
+static long fm_port[SNDRV_CARDS] = {[0 ... (SNDRV_CARDS-1)]=1};
 static int soft_ac3[SNDRV_CARDS] = {[0 ... (SNDRV_CARDS-1)]=1};
 #ifdef SUPPORT_JOYSTICK
 static int joystick_port[SNDRV_CARDS];
@@ -2779,6 +2779,9 @@ static int __devinit snd_cmipci_create_fm(struct cmipci 
*cm, long fm_port)
struct snd_opl3 *opl3;
int err;
 
+   if (!fm_port)
+   goto disable_fm;
+
/* first try FM regs in PCI port range */
iosynth = cm-iobase + CM_REG_FM_PCI;
err = snd_opl3_create(cm-card, iosynth, iosynth + 2,
@@ -2793,7 +2796,7 @@ static int __devinit snd_cmipci_create_fm(struct cmipci 
*cm, long fm_port)
case 0x3C8: val |= CM_FMSEL_3C8; break;
case 0x388: val |= CM_FMSEL_388; break;
default:
-   return 0;
+   goto disable_fm;
}
snd_cmipci_write(cm, CM_REG_LEGACY_CTRL, val);
/* enable FM */
@@ -2803,11 +2806,7 @@ static int __devinit snd_cmipci_create_fm(struct cmipci 
*cm, long fm_port)
OPL3_HW_OPL3, 0, opl3)  0) {
printk(KERN_ERR cmipci: no OPL device at %#lx, 
   skipping...\n, iosynth);
-   /* disable FM */
-   snd_cmipci_write(cm, CM_REG_LEGACY_CTRL,
-val  ~CM_FMSEL_MASK);
-   snd_cmipci_clear_bit(cm, CM_REG_MISC_CTRL, CM_FM_EN);
-   return 0;
+   goto disable_fm;
}
}
if ((err = snd_opl3_hwdep_new(opl3, 0, 1, NULL))  0) {
@@ -2815,6 +2814,11 @@ static int __devinit snd_cmipci_create_fm(struct cmipci 
*cm, long fm_port)
return err;
}
return 0;
+
+ disable_fm:
+   snd_cmipci_clear_bit(cm, CM_REG_LEGACY_CTRL, CM_FMSEL_MASK);
+   snd_cmipci_clear_bit(cm, CM_REG_MISC_CTRL, CM_FM_EN);
+   return 0;
 }
 
 static int __devinit snd_cmipci_create(struct snd_card *card, struct pci_dev 
*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] version 1.0.14rc3

2007-03-06 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=6185af1f4254a53563fe6d6af652f5775fc70e25
Commit: 6185af1f4254a53563fe6d6af652f5775fc70e25
Parent: 2f24d159d5ac418c946e0d38ada46345753688b1
Author: Jaroslav Kysela [EMAIL PROTECTED]
AuthorDate: Tue Mar 6 14:10:08 2007 +0100
Committer:  Jaroslav Kysela [EMAIL PROTECTED]
CommitDate: Tue Mar 6 14:10:08 2007 +0100

[ALSA] version 1.0.14rc3

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 a9ba7ee..5f72750 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.14rc2
-#define CONFIG_SND_DATE  (Wed Feb 14 07:42:13 2007 UTC)
+#define CONFIG_SND_VERSION 1.0.14rc3
+#define CONFIG_SND_DATE  (Tue Mar 06 13:10:00 2007 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


HID blacklisting of all Code Mercenaries IOWarrior devices

2007-03-06 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=5ddc3229488f4cad719f47aecfa1459ebbbde5b3
Commit: 5ddc3229488f4cad719f47aecfa1459ebbbde5b3
Parent: 606135a3081e045b677cde164a296c51f66c4633
Author: Robert Marquardt [EMAIL PROTECTED]
AuthorDate: Fri Mar 2 16:01:52 2007 +0100
Committer:  Jiri Kosina [EMAIL PROTECTED]
CommitDate: Fri Mar 2 16:08:16 2007 +0100

HID blacklisting of all Code Mercenaries IOWarrior devices

Put all Code Mercenaries (VID 0x07c0) IOWarriors (PIDs 0x1500 to 0x15ff) on
the HID blacklist. The range of PIDs has been reserved for IOWarriors. Only
5 PIDs are really used yet.

Signed-off-by: Robert Marquardt [EMAIL PROTECTED]
Signed-off-by: Jiri Kosina [EMAIL PROTECTED]
---
 drivers/usb/input/hid-core.c |   21 ++---
 1 files changed, 10 insertions(+), 11 deletions(-)

diff --git a/drivers/usb/input/hid-core.c b/drivers/usb/input/hid-core.c
index ef09952..8e86c3c 100644
--- a/drivers/usb/input/hid-core.c
+++ b/drivers/usb/input/hid-core.c
@@ -689,10 +689,8 @@ void usbhid_init_reports(struct hid_device *hid)
 #define USB_DEVICE_ID_SMARTJOY_DUAL_PLUS 0x8802
 
 #define USB_VENDOR_ID_CODEMERCS0x07c0
-#define USB_DEVICE_ID_CODEMERCS_IOW40  0x1500
-#define USB_DEVICE_ID_CODEMERCS_IOW24  0x1501
-#define USB_DEVICE_ID_CODEMERCS_IOW48  0x1502
-#define USB_DEVICE_ID_CODEMERCS_IOW28  0x1503
+#define USB_DEVICE_ID_CODEMERCS_IOW_FIRST  0x1500
+#define USB_DEVICE_ID_CODEMERCS_IOW_LAST   0x15ff
 
 #define USB_VENDOR_ID_DELORME  0x1163
 #define USB_DEVICE_ID_DELORME_EARTHMATE 0x0100
@@ -788,10 +786,6 @@ static const struct hid_blacklist {
{ USB_VENDOR_ID_AIRCABLE, USB_DEVICE_ID_AIRCABLE1, HID_QUIRK_IGNORE },
{ USB_VENDOR_ID_ALCOR, USB_DEVICE_ID_ALCOR_USBRS232, HID_QUIRK_IGNORE },
{ USB_VENDOR_ID_BERKSHIRE, USB_DEVICE_ID_BERKSHIRE_PCWD, 
HID_QUIRK_IGNORE },
-   { USB_VENDOR_ID_CODEMERCS, USB_DEVICE_ID_CODEMERCS_IOW40, 
HID_QUIRK_IGNORE },
-   { USB_VENDOR_ID_CODEMERCS, USB_DEVICE_ID_CODEMERCS_IOW24, 
HID_QUIRK_IGNORE },
-   { USB_VENDOR_ID_CODEMERCS, USB_DEVICE_ID_CODEMERCS_IOW48, 
HID_QUIRK_IGNORE },
-   { USB_VENDOR_ID_CODEMERCS, USB_DEVICE_ID_CODEMERCS_IOW28, 
HID_QUIRK_IGNORE },
{ USB_VENDOR_ID_CYPRESS, USB_DEVICE_ID_CYPRESS_HIDCOM, HID_QUIRK_IGNORE 
},
{ USB_VENDOR_ID_CYPRESS, USB_DEVICE_ID_CYPRESS_ULTRAMOUSE, 
HID_QUIRK_IGNORE },
{ USB_VENDOR_ID_DELORME, USB_DEVICE_ID_DELORME_EARTHMATE, 
HID_QUIRK_IGNORE },
@@ -1052,9 +1046,14 @@ static struct hid_device *usb_hid_configure(struct 
usb_interface *intf)
int n, len, insize = 0;
struct usbhid_device *usbhid;
 
-/* Ignore all Wacom devices */
-if (le16_to_cpu(dev-descriptor.idVendor) == USB_VENDOR_ID_WACOM)
-return NULL;
+   /* Ignore all Wacom devices */
+   if (le16_to_cpu(dev-descriptor.idVendor) == USB_VENDOR_ID_WACOM)
+   return NULL;
+   /* ignore all Code Mercenaries IOWarrior devices */
+   if (le16_to_cpu(dev-descriptor.idVendor) == USB_VENDOR_ID_CODEMERCS)
+   if (le16_to_cpu(dev-descriptor.idProduct) = 
USB_DEVICE_ID_CODEMERCS_IOW_FIRST 
+   le16_to_cpu(dev-descriptor.idProduct) = 
USB_DEVICE_ID_CODEMERCS_IOW_LAST)
+   return NULL;
 
for (n = 0; hid_blacklist[n].idVendor; n++)
if ((hid_blacklist[n].idVendor == 
le16_to_cpu(dev-descriptor.idVendor)) 
-
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] suspend regression: sysfs deadlock

2007-03-06 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=266d4f40370757459f8aa063976c932d0de5e59b
Commit: 266d4f40370757459f8aa063976c932d0de5e59b
Parent: 7c368bb1049bde17fc4f8655492478d7f2918da9
Author: Hugh Dickins [EMAIL PROTECTED]
AuthorDate: Tue Mar 6 19:20:11 2007 +
Committer:  Linus Torvalds [EMAIL PROTECTED]
CommitDate: Tue Mar 6 17:59:14 2007 -0800

[PATCH] suspend regression: sysfs deadlock

Suspend deadlocks when trying to unregister /sys/block/sr0.

This comes from Oliver's commit 94bebf4d1b8e7719f0f3944c037a21cfd99a4af7
Driver core: fix race in sysfs between sysfs_remove_file() and
read()/write().

sysfs_write_file downs buffer-sem while calling flush_write_buffer, and
flushing that particular write buffer entails downing buffer-sem in
orphan_all_buffers, resulting in the obvious self-deadlock.

Signed-off-by: Linus Torvalds [EMAIL PROTECTED]
---
 fs/sysfs/inode.c |5 +
 1 files changed, 1 insertions(+), 4 deletions(-)

diff --git a/fs/sysfs/inode.c b/fs/sysfs/inode.c
index dd1344b..ccb7d72 100644
--- a/fs/sysfs/inode.c
+++ b/fs/sysfs/inode.c
@@ -227,11 +227,8 @@ static inline void orphan_all_buffers(struct inode *node)
 
mutex_lock_nested(node-i_mutex, I_MUTEX_CHILD);
if (node-i_private) {
-   list_for_each_entry(buf, set-associates, associates) {
-   down(buf-sem);
+   list_for_each_entry(buf, set-associates, associates)
buf-orphaned = 1;
-   up(buf-sem);
-   }
}
mutex_unlock(node-i_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


[PATCH] Fix buffer overflow in Omnikey CardMan 4040 driver (CVE-2007-0005)

2007-03-06 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=059819a41d4331316dd8ddcf977a24ab338f4300
Commit: 059819a41d4331316dd8ddcf977a24ab338f4300
Parent: 266d4f40370757459f8aa063976c932d0de5e59b
Author: Marcel Holtmann [EMAIL PROTECTED]
AuthorDate: Tue Mar 6 22:12:00 2007 +0100
Committer:  Linus Torvalds [EMAIL PROTECTED]
CommitDate: Tue Mar 6 18:01:04 2007 -0800

[PATCH] Fix buffer overflow in Omnikey CardMan 4040 driver (CVE-2007-0005)

Based on a patch from Don Howard [EMAIL PROTECTED]

When calling write() with a buffer larger than 512 bytes, the
driver's write buffer overflows, allowing to overwrite the EIP and
execute arbitrary code with kernel privileges.

In read(), there exists a similar problem, but coming from the device.
A malicous or buggy device sending more than 512 bytes can overflow
of the driver's read buffer, with the same effects as above.

Signed-off-by: Marcel Holtmann [EMAIL PROTECTED]
Signed-off-by: Harald Welte [EMAIL PROTECTED]
Signed-off-by: Linus Torvalds [EMAIL PROTECTED]
---
 drivers/char/pcmcia/cm4040_cs.c |3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/drivers/char/pcmcia/cm4040_cs.c b/drivers/char/pcmcia/cm4040_cs.c
index 0e82968..f2e4ec4 100644
--- a/drivers/char/pcmcia/cm4040_cs.c
+++ b/drivers/char/pcmcia/cm4040_cs.c
@@ -273,6 +273,7 @@ static ssize_t cm4040_read(struct file *filp, char __user 
*buf,
DEBUGP(6, dev, BytesToRead=%lu\n, bytes_to_read);
 
min_bytes_to_read = min(count, bytes_to_read + 5);
+   min_bytes_to_read = min_t(size_t, min_bytes_to_read, 
READ_WRITE_BUFFER_SIZE);
 
DEBUGP(6, dev, Min=%lu\n, min_bytes_to_read);
 
@@ -340,7 +341,7 @@ static ssize_t cm4040_write(struct file *filp, const char 
__user *buf,
return 0;
}
 
-   if (count  5) {
+   if ((count  5) || (count  READ_WRITE_BUFFER_SIZE)) {
DEBUGP(2, dev, - cm4040_write buffersize=%Zd  5\n, count);
return -EIO;
}
-
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] minor updat to tlclk Kconfig entry

2007-03-06 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=03154a271012031ad6336dc3344679440ba49c24
Commit: 03154a271012031ad6336dc3344679440ba49c24
Parent: 059819a41d4331316dd8ddcf977a24ab338f4300
Author: Mark Gross [EMAIL PROTECTED]
AuthorDate: Tue Mar 6 13:58:45 2007 -0800
Committer:  Linus Torvalds [EMAIL PROTECTED]
CommitDate: Tue Mar 6 18:02:22 2007 -0800

[PATCH] minor updat to tlclk Kconfig entry

The tlclk driver is going on the MPCBL005 so I need to make the Kconfig
more more generic.  Just some text changes.

Signed-off-by: Mark Gross [EMAIL PROTECTED]
Signed-off-by: Linus Torvalds [EMAIL PROTECTED]
---
 drivers/char/Kconfig |   15 ---
 1 files changed, 8 insertions(+), 7 deletions(-)

diff --git a/drivers/char/Kconfig b/drivers/char/Kconfig
index d0a6dc5..3429ece 100644
--- a/drivers/char/Kconfig
+++ b/drivers/char/Kconfig
@@ -1026,16 +1026,17 @@ config MMTIMER
 source drivers/char/tpm/Kconfig
 
 config TELCLOCK
-   tristate Telecom clock driver for MPBL0010 ATCA SBC
+   tristate Telecom clock driver for ATCA SBC
depends on EXPERIMENTAL  X86
default n
help
- The telecom clock device is specific to the MPBL0010 ATCA computer and
- allows direct userspace access to the configuration of the telecom 
clock
- configuration settings.  This device is used for hardware 
synchronization
- across the ATCA backplane fabric.  Upon loading, the driver exports a
- sysfs directory, /sys/devices/platform/telco_clock, with a number of
- files for controlling the behavior of this hardware.
+ The telecom clock device is specific to the MPCBL0010 and MPCBL0050
+ ATCA computers and allows direct userspace access to the
+ configuration of the telecom clock configuration settings.  This
+ device is used for hardware synchronization across the ATCA backplane
+ fabric.  Upon loading, the driver exports a sysfs directory,
+ /sys/devices/platform/telco_clock, with a number of files for
+ controlling the behavior of this hardware.
 
 endmenu
 
-
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


[MIPS] Atlas, Malta: Fix build warning.

2007-03-06 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=f76b7ea48afb6daecbbc26f5408a75ac66b1cf23
Commit: f76b7ea48afb6daecbbc26f5408a75ac66b1cf23
Parent: c3442e296517aee733d62fc3fe03211598902c7d
Author: Ralf Baechle [EMAIL PROTECTED]
AuthorDate: Sun Mar 4 17:26:56 2007 +
Committer:  Ralf Baechle [EMAIL PROTECTED]
CommitDate: Wed Mar 7 00:07:15 2007 +

[MIPS] Atlas, Malta: Fix build warning.

Signed-off-by: Ralf Baechle [EMAIL PROTECTED]
---
 arch/mips/mips-boards/generic/init.c |4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/mips/mips-boards/generic/init.c 
b/arch/mips/mips-boards/generic/init.c
index b113376..1acdf09 100644
--- a/arch/mips/mips-boards/generic/init.c
+++ b/arch/mips/mips-boards/generic/init.c
@@ -251,8 +251,6 @@ void __init mips_ejtag_setup (void)
 
 void __init prom_init(void)
 {
-   u32 start, map, mask, data;
-
prom_argc = fw_arg0;
_prom_argv = (int *) fw_arg1;
_prom_envp = (int *) fw_arg2;
@@ -278,6 +276,8 @@ void __init prom_init(void)
mips_revision_corid = MIPS_REVISION_CORID_CORE_EMUL_MSC;
}
switch(mips_revision_corid) {
+   u32 start, map, mask, data;
+
case MIPS_REVISION_CORID_QED_RM5261:
case MIPS_REVISION_CORID_CORE_LV:
case MIPS_REVISION_CORID_CORE_FPGA:
-
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


[MIPS] SMTC: asm/smtc_ipi.h must include linux/spinlock.h

2007-03-06 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=22e651c6ae78bc779e420d3092f962442dd31305
Commit: 22e651c6ae78bc779e420d3092f962442dd31305
Parent: f76b7ea48afb6daecbbc26f5408a75ac66b1cf23
Author: Ralf Baechle [EMAIL PROTECTED]
AuthorDate: Sun Mar 4 18:22:56 2007 +
Committer:  Ralf Baechle [EMAIL PROTECTED]
CommitDate: Wed Mar 7 00:07:15 2007 +

[MIPS] SMTC: asm/smtc_ipi.h must include linux/spinlock.h

Signed-off-by: Ralf Baechle [EMAIL PROTECTED]
---
 include/asm-mips/smtc_ipi.h |2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/include/asm-mips/smtc_ipi.h b/include/asm-mips/smtc_ipi.h
index 55f3419..360ea6d 100644
--- a/include/asm-mips/smtc_ipi.h
+++ b/include/asm-mips/smtc_ipi.h
@@ -4,6 +4,8 @@
 #ifndef __ASM_SMTC_IPI_H
 #define __ASM_SMTC_IPI_H
 
+#include linux/spinlock.h
+
 //#define SMTC_IPI_DEBUG
 
 #ifdef SMTC_IPI_DEBUG
-
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


[MIPS] SMTC: asm/mips_mt.h must include linux/cpumask.h

2007-03-06 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=32fac80be6df4a2a09f7093b7f51bb6bc3ebef97
Commit: 32fac80be6df4a2a09f7093b7f51bb6bc3ebef97
Parent: 22e651c6ae78bc779e420d3092f962442dd31305
Author: Ralf Baechle [EMAIL PROTECTED]
AuthorDate: Sun Mar 4 18:23:48 2007 +
Committer:  Ralf Baechle [EMAIL PROTECTED]
CommitDate: Wed Mar 7 00:07:15 2007 +

[MIPS] SMTC: asm/mips_mt.h must include linux/cpumask.h

Signed-off-by: Ralf Baechle [EMAIL PROTECTED]
---
 include/asm-mips/mips_mt.h |2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/include/asm-mips/mips_mt.h b/include/asm-mips/mips_mt.h
index fdfff0b..8045abc 100644
--- a/include/asm-mips/mips_mt.h
+++ b/include/asm-mips/mips_mt.h
@@ -6,6 +6,8 @@
 #ifndef __ASM_MIPS_MT_H
 #define __ASM_MIPS_MT_H
 
+#include linux/cpumask.h
+
 extern cpumask_t mt_fpu_cpumask;
 extern unsigned long mt_fpemul_threshold;
 
-
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


[MIPS] SMTC: Add fordward declarations for mm_struct and task_struct.

2007-03-06 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=b3920590b589a1dbb41eb58ef0ed2699f136482a
Commit: b3920590b589a1dbb41eb58ef0ed2699f136482a
Parent: 32fac80be6df4a2a09f7093b7f51bb6bc3ebef97
Author: Ralf Baechle [EMAIL PROTECTED]
AuthorDate: Sun Mar 4 18:25:51 2007 +
Committer:  Ralf Baechle [EMAIL PROTECTED]
CommitDate: Wed Mar 7 00:07:16 2007 +

[MIPS] SMTC: Add fordward declarations for mm_struct and task_struct.

Signed-off-by: Ralf Baechle [EMAIL PROTECTED]
---
 include/asm-mips/smtc.h |3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/include/asm-mips/smtc.h b/include/asm-mips/smtc.h
index e1941d1..44dfa4a 100644
--- a/include/asm-mips/smtc.h
+++ b/include/asm-mips/smtc.h
@@ -34,6 +34,9 @@ typedef long asiduse;
 
 extern asiduse smtc_live_asid[MAX_SMTC_TLBS][MAX_SMTC_ASIDS];
 
+struct mm_struct;
+struct task_struct;
+
 void smtc_get_new_mmu_context(struct mm_struct *mm, unsigned long cpu);
 
 void smtc_flush_tlb_asid(unsigned long asid);
-
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


[MIPS] SMTC: De-obscure Malta hooks.

2007-03-06 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=57a2050c408620613c5715171364de2cc5566f22
Commit: 57a2050c408620613c5715171364de2cc5566f22
Parent: b3920590b589a1dbb41eb58ef0ed2699f136482a
Author: Ralf Baechle [EMAIL PROTECTED]
AuthorDate: Sun Mar 4 18:27:34 2007 +
Committer:  Ralf Baechle [EMAIL PROTECTED]
CommitDate: Wed Mar 7 00:07:16 2007 +

[MIPS] SMTC: De-obscure Malta hooks.

Should now be understandable why the thing works ...

Signed-off-by: Ralf Baechle [EMAIL PROTECTED]
---
 arch/mips/mips-boards/malta/Makefile |2 +-
 arch/mips/mips-boards/malta/malta_smp.c  |  109 --
 arch/mips/mips-boards/malta/malta_smtc.c |   88 
 3 files changed, 89 insertions(+), 110 deletions(-)

diff --git a/arch/mips/mips-boards/malta/Makefile 
b/arch/mips/mips-boards/malta/Makefile
index cb7f349..377d9e8 100644
--- a/arch/mips/mips-boards/malta/Makefile
+++ b/arch/mips/mips-boards/malta/Makefile
@@ -21,4 +21,4 @@
 
 obj-y := malta_int.o malta_setup.o
 obj-$(CONFIG_MTD) += malta_mtd.o
-obj-$(CONFIG_SMP) += malta_smp.o
+obj-$(CONFIG_MIPS_MT_SMTC) += malta_smtc.o
diff --git a/arch/mips/mips-boards/malta/malta_smp.c 
b/arch/mips/mips-boards/malta/malta_smp.c
deleted file mode 100644
index cf96717..000
--- a/arch/mips/mips-boards/malta/malta_smp.c
+++ /dev/null
@@ -1,109 +0,0 @@
-/*
- * Malta Platform-specific hooks for SMP operation
- */
-
-#include linux/kernel.h
-#include linux/sched.h
-#include linux/cpumask.h
-#include linux/interrupt.h
-
-#include asm/atomic.h
-#include asm/cpu.h
-#include asm/processor.h
-#include asm/system.h
-#include asm/hardirq.h
-#include asm/mmu_context.h
-#include asm/smp.h
-#ifdef CONFIG_MIPS_MT_SMTC
-#include asm/smtc_ipi.h
-#endif /* CONFIG_MIPS_MT_SMTC */
-
-/* VPE/SMP Prototype implements platform interfaces directly */
-#if !defined(CONFIG_MIPS_MT_SMP)
-
-/*
- * Cause the specified action to be performed on a targeted CPU
- */
-
-void core_send_ipi(int cpu, unsigned int action)
-{
-/* CPU may be TC of same VPE, VPE of same CPU, or different CPU */
-#ifdef CONFIG_MIPS_MT_SMTC
-   smtc_send_ipi(cpu, LINUX_SMP_IPI, action);
-#endif /* CONFIG_MIPS_MT_SMTC */
-}
-
-/*
- * Platform CPU startup hook
- */
-
-void prom_boot_secondary(int cpu, struct task_struct *idle)
-{
-#ifdef CONFIG_MIPS_MT_SMTC
-   smtc_boot_secondary(cpu, idle);
-#endif /* CONFIG_MIPS_MT_SMTC */
-}
-
-/*
- * Post-config but pre-boot cleanup entry point
- */
-
-void prom_init_secondary(void)
-{
-#ifdef CONFIG_MIPS_MT_SMTC
-void smtc_init_secondary(void);
-   int myvpe;
-
-   /* Don't enable Malta I/O interrupts (IP2) for secondary VPEs */
-   myvpe = read_c0_tcbind()  TCBIND_CURVPE;
-   if (myvpe != 0) {
-   /* Ideally, this should be done only once per VPE, but... */
-   clear_c0_status(STATUSF_IP2);
-   set_c0_status(STATUSF_IP0 | STATUSF_IP1 | STATUSF_IP3
-   | STATUSF_IP4 | STATUSF_IP5 | STATUSF_IP6
-   | STATUSF_IP7);
-   }
-
-smtc_init_secondary();
-#endif /* CONFIG_MIPS_MT_SMTC */
-}
-
-/*
- * Platform SMP pre-initialization
- *
- * As noted above, we can assume a single CPU for now
- * but it may be multithreaded.
- */
-
-void plat_smp_setup(void)
-{
-   if (read_c0_config3()  (12))
-   mipsmt_build_cpu_map(0);
-}
-
-void __init plat_prepare_cpus(unsigned int max_cpus)
-{
-   if (read_c0_config3()  (12))
-   mipsmt_prepare_cpus();
-}
-
-/*
- * SMP initialization finalization entry point
- */
-
-void prom_smp_finish(void)
-{
-#ifdef CONFIG_MIPS_MT_SMTC
-   smtc_smp_finish();
-#endif /* CONFIG_MIPS_MT_SMTC */
-}
-
-/*
- * Hook for after all CPUs are online
- */
-
-void prom_cpus_done(void)
-{
-}
-
-#endif /* CONFIG_MIPS32R2_MT_SMP */
diff --git a/arch/mips/mips-boards/malta/malta_smtc.c 
b/arch/mips/mips-boards/malta/malta_smtc.c
new file mode 100644
index 000..d1c80f6
--- /dev/null
+++ b/arch/mips/mips-boards/malta/malta_smtc.c
@@ -0,0 +1,88 @@
+/*
+ * Malta Platform-specific hooks for SMP operation
+ */
+#include linux/init.h
+
+#include asm/mipsregs.h
+#include asm/mipsmtregs.h
+#include asm/smtc.h
+#include asm/smtc_ipi.h
+
+/* VPE/SMP Prototype implements platform interfaces directly */
+
+/*
+ * Cause the specified action to be performed on a targeted CPU
+ */
+
+void core_send_ipi(int cpu, unsigned int action)
+{
+   /* CPU may be TC of same VPE, VPE of same CPU, or different CPU */
+   smtc_send_ipi(cpu, LINUX_SMP_IPI, action);
+}
+
+/*
+ * Platform CPU startup hook
+ */
+
+void prom_boot_secondary(int cpu, struct task_struct *idle)
+{
+   smtc_boot_secondary(cpu, idle);
+}
+
+/*
+ * Post-config but pre-boot cleanup entry point
+ */
+
+void prom_init_secondary(void)
+{
+void smtc_init_secondary(void);
+   int myvpe;
+
+   /* Don't enable Malta I/O interrupts (IP2) 

[MIPS] Cobalt: Fix early printk

2007-03-06 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=0a22e0d43b6d6468544dd7559d5f3c4acb8b536e
Commit: 0a22e0d43b6d6468544dd7559d5f3c4acb8b536e
Parent: 57a2050c408620613c5715171364de2cc5566f22
Author: Yoichi Yuasa [EMAIL PROTECTED]
AuthorDate: Fri Mar 2 12:42:33 2007 +0900
Committer:  Ralf Baechle [EMAIL PROTECTED]
CommitDate: Wed Mar 7 00:07:16 2007 +

[MIPS] Cobalt: Fix early printk

Signed-off-by: Yoichi Yuasa [EMAIL PROTECTED]
Signed-off-by: Ralf Baechle [EMAIL PROTECTED]
---
 arch/mips/Kconfig  |2 +-
 arch/mips/cobalt/Kconfig   |7 ---
 arch/mips/cobalt/console.c |5 +
 3 files changed, 2 insertions(+), 12 deletions(-)

diff --git a/arch/mips/Kconfig b/arch/mips/Kconfig
index 4ec2dd5..a1cd84f 100644
--- a/arch/mips/Kconfig
+++ b/arch/mips/Kconfig
@@ -167,6 +167,7 @@ config MIPS_COBALT
select IRQ_CPU
select MIPS_GT64111
select SYS_HAS_CPU_NEVADA
+   select SYS_HAS_EARLY_PRINTK
select SYS_SUPPORTS_32BIT_KERNEL
select SYS_SUPPORTS_64BIT_KERNEL if EXPERIMENTAL
select SYS_SUPPORTS_LITTLE_ENDIAN
@@ -837,7 +838,6 @@ source arch/mips/tx4927/Kconfig
 source arch/mips/tx4938/Kconfig
 source arch/mips/vr41xx/Kconfig
 source arch/mips/philips/pnx8550/common/Kconfig
-source arch/mips/cobalt/Kconfig
 
 endmenu
 
diff --git a/arch/mips/cobalt/Kconfig b/arch/mips/cobalt/Kconfig
deleted file mode 100644
index 7c42b08..000
--- a/arch/mips/cobalt/Kconfig
+++ /dev/null
@@ -1,7 +0,0 @@
-config EARLY_PRINTK
-   bool Early console support
-   depends on MIPS_COBALT
-   help
- Provide early console support by direct access to the
- on board UART. The UART must have been previously
- initialised by the boot loader.
diff --git a/arch/mips/cobalt/console.c b/arch/mips/cobalt/console.c
index fff20d2..ca56b41 100644
--- a/arch/mips/cobalt/console.c
+++ b/arch/mips/cobalt/console.c
@@ -9,11 +9,8 @@
 #include asm/addrspace.h
 #include asm/mach-cobalt/cobalt.h
 
-static void putchar(int c)
+void prom_putchar(char c)
 {
-   if(c == '\n')
-   putchar('\r');
-
while(!(COBALT_UART[UART_LSR]  UART_LSR_THRE))
;
 
-
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


[MIPS] TX39: Remove redundant tx39_blast_icache() calls

2007-03-06 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=a5664c40750ce423f308dfd01ad4e82ecb7ac127
Commit: a5664c40750ce423f308dfd01ad4e82ecb7ac127
Parent: 0a22e0d43b6d6468544dd7559d5f3c4acb8b536e
Author: Atsushi Nemoto [EMAIL PROTECTED]
AuthorDate: Mon Mar 5 00:41:39 2007 +0900
Committer:  Ralf Baechle [EMAIL PROTECTED]
CommitDate: Wed Mar 7 00:07:16 2007 +

[MIPS] TX39: Remove redundant tx39_blast_icache() calls

Apply commit 0550d9d13e02b30efa117d47fcadea450bb23d23 to c-tx39.c too.
And fix a warning in local_tx39_flush_data_cache_page().

Signed-off-by: Atsushi Nemoto [EMAIL PROTECTED]
Signed-off-by: Ralf Baechle [EMAIL PROTECTED]
---
 arch/mips/mm/c-tx39.c |   18 ++
 1 files changed, 6 insertions(+), 12 deletions(-)

diff --git a/arch/mips/mm/c-tx39.c b/arch/mips/mm/c-tx39.c
index f32ebde..560a6de 100644
--- a/arch/mips/mm/c-tx39.c
+++ b/arch/mips/mm/c-tx39.c
@@ -128,7 +128,6 @@ static inline void tx39_flush_cache_all(void)
return;
 
tx39_blast_dcache();
-   tx39_blast_icache();
 }
 
 static inline void tx39___flush_cache_all(void)
@@ -142,24 +141,19 @@ static void tx39_flush_cache_mm(struct mm_struct *mm)
if (!cpu_has_dc_aliases)
return;
 
-   if (cpu_context(smp_processor_id(), mm) != 0) {
-   tx39_flush_cache_all();
-   }
+   if (cpu_context(smp_processor_id(), mm) != 0)
+   tx39_blast_dcache();
 }
 
 static void tx39_flush_cache_range(struct vm_area_struct *vma,
unsigned long start, unsigned long end)
 {
-   int exec;
-
+   if (!cpu_has_dc_aliases)
+   return;
if (!(cpu_context(smp_processor_id(), vma-vm_mm)))
return;
 
-   exec = vma-vm_flags  VM_EXEC;
-   if (cpu_has_dc_aliases || exec)
-   tx39_blast_dcache();
-   if (exec)
-   tx39_blast_icache();
+   tx39_blast_dcache();
 }
 
 static void tx39_flush_cache_page(struct vm_area_struct *vma, unsigned long 
page, unsigned long pfn)
@@ -218,7 +212,7 @@ static void tx39_flush_cache_page(struct vm_area_struct 
*vma, unsigned long page
 
 static void local_tx39_flush_data_cache_page(void * addr)
 {
-   tx39_blast_dcache_page(addr);
+   tx39_blast_dcache_page((unsigned long)addr);
 }
 
 static void tx39_flush_data_cache_page(unsigned long addr)
-
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


[MIPS] R2 bitops compile fix for gcc 4.0.

2007-03-06 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=b961153be981884d9eea4a6752b8169e44857c09
Commit: b961153be981884d9eea4a6752b8169e44857c09
Parent: a5664c40750ce423f308dfd01ad4e82ecb7ac127
Author: Ralf Baechle [EMAIL PROTECTED]
AuthorDate: Mon Mar 5 00:56:15 2007 +
Committer:  Ralf Baechle [EMAIL PROTECTED]
CommitDate: Wed Mar 7 00:07:17 2007 +

[MIPS] R2 bitops compile fix for gcc  4.0.

Signed-off-by: Ralf Baechle [EMAIL PROTECTED]
---
 include/asm-mips/bitops.h |   56 ++--
 1 files changed, 33 insertions(+), 23 deletions(-)

diff --git a/include/asm-mips/bitops.h b/include/asm-mips/bitops.h
index 89436b9..8959da2 100644
--- a/include/asm-mips/bitops.h
+++ b/include/asm-mips/bitops.h
@@ -54,6 +54,7 @@
 static inline void set_bit(unsigned long nr, volatile unsigned long *addr)
 {
unsigned long *m = ((unsigned long *) addr) + (nr  SZLONG_LOG);
+   unsigned short bit = nr  SZLONG_MASK;
unsigned long temp;
 
if (cpu_has_llsc  R1_LLSC_WAR) {
@@ -65,9 +66,9 @@ static inline void set_bit(unsigned long nr, volatile 
unsigned long *addr)
   beqzl   %0, 1b  \n
   .setmips0   \n
: =r (temp), =m (*m)
-   : ir (1UL  (nr  SZLONG_MASK)), m (*m));
+   : ir (1UL  bit), m (*m));
 #ifdef CONFIG_CPU_MIPSR2
-   } else if (__builtin_constant_p(nr)) {
+   } else if (__builtin_constant_p(bit)) {
__asm__ __volatile__(
1:  __LL %0, %1  # set_bit   \n
__INS %0, %4, %2, 1  \n
@@ -77,7 +78,7 @@ static inline void set_bit(unsigned long nr, volatile 
unsigned long *addr)
2: b   1b  \n
   .previous   \n
: =r (temp), =m (*m)
-   : ir (nr  SZLONG_MASK), m (*m), r (~0));
+   : ir (bit), m (*m), r (~0));
 #endif /* CONFIG_CPU_MIPSR2 */
} else if (cpu_has_llsc) {
__asm__ __volatile__(
@@ -91,14 +92,14 @@ static inline void set_bit(unsigned long nr, volatile 
unsigned long *addr)
   .previous   \n
   .setmips0   \n
: =r (temp), =m (*m)
-   : ir (1UL  (nr  SZLONG_MASK)), m (*m));
+   : ir (1UL  bit), m (*m));
} else {
volatile unsigned long *a = addr;
unsigned long mask;
unsigned long flags;
 
a += nr  SZLONG_LOG;
-   mask = 1UL  (nr  SZLONG_MASK);
+   mask = 1UL  bit;
local_irq_save(flags);
*a |= mask;
local_irq_restore(flags);
@@ -118,6 +119,7 @@ static inline void set_bit(unsigned long nr, volatile 
unsigned long *addr)
 static inline void clear_bit(unsigned long nr, volatile unsigned long *addr)
 {
unsigned long *m = ((unsigned long *) addr) + (nr  SZLONG_LOG);
+   unsigned short bit = nr  SZLONG_MASK;
unsigned long temp;
 
if (cpu_has_llsc  R1_LLSC_WAR) {
@@ -129,9 +131,9 @@ static inline void clear_bit(unsigned long nr, volatile 
unsigned long *addr)
   beqzl   %0, 1b  \n
   .setmips0   \n
: =r (temp), =m (*m)
-   : ir (~(1UL  (nr  SZLONG_MASK))), m (*m));
+   : ir (~(1UL  bit)), m (*m));
 #ifdef CONFIG_CPU_MIPSR2
-   } else if (__builtin_constant_p(nr)) {
+   } else if (__builtin_constant_p(bit)) {
__asm__ __volatile__(
1:  __LL %0, %1  # clear_bit \n
__INS %0, $0, %2, 1  \n
@@ -141,7 +143,7 @@ static inline void clear_bit(unsigned long nr, volatile 
unsigned long *addr)
2: b   1b  \n
   .previous   \n
: =r (temp), =m (*m)
-   : ir (nr  SZLONG_MASK), m (*m));
+   : ir (bit), m (*m));
 #endif /* CONFIG_CPU_MIPSR2 */
} else if (cpu_has_llsc) {
__asm__ __volatile__(
@@ -155,14 +157,14 @@ static inline void clear_bit(unsigned long nr, volatile 
unsigned long *addr)
   .previous   \n
   .setmips0   \n
: =r (temp), =m (*m)
-   : ir (~(1UL  (nr  SZLONG_MASK))), m (*m));
+   : ir (~(1UL  bit)), m (*m));
} else {
volatile unsigned long *a = 

[MIPS] Fix __raw_read_trylock() to allow multiple readers

2007-03-06 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=d52c2d5a626a2cb1848fa7063b3ab79e2752dac7
Commit: d52c2d5a626a2cb1848fa7063b3ab79e2752dac7
Parent: d0c91ae2bb3df9d7bef279d8f400e0c8ddde0b5e
Author: Dave Johnson [EMAIL PROTECTED]
AuthorDate: Mon Mar 5 20:50:27 2007 -0500
Committer:  Ralf Baechle [EMAIL PROTECTED]
CommitDate: Wed Mar 7 00:07:17 2007 +

[MIPS] Fix __raw_read_trylock() to allow multiple readers

A deadlock can occur for mixed irq and non-irq rwlock readers if a 2nd
reader attempts to take lock by looping around __raw_read_trylock().

Signed-off-by: Dave Johnson [EMAIL PROTECTED]
Signed-off-by: Ralf Baechle [EMAIL PROTECTED]
---
 include/asm-mips/spinlock.h |4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/include/asm-mips/spinlock.h b/include/asm-mips/spinlock.h
index f1755d2..35e431c 100644
--- a/include/asm-mips/spinlock.h
+++ b/include/asm-mips/spinlock.h
@@ -287,7 +287,7 @@ static inline int __raw_read_trylock(raw_rwlock_t *rw)
   .setnoreorder   # __raw_read_trylock\n
   li  %2, 0   \n
1: ll  %1, %3  \n
-  bnez%1, 2f  \n
+  bltz%1, 2f  \n
addu   %1, 1   \n
   sc  %1, %0  \n
   .setreorder \n
@@ -304,7 +304,7 @@ static inline int __raw_read_trylock(raw_rwlock_t *rw)
   .setnoreorder   # __raw_read_trylock\n
   li  %2, 0   \n
1: ll  %1, %3  \n
-  bnez%1, 2f  \n
+  bltz%1, 2f  \n
addu   %1, 1   \n
   sc  %1, %0  \n
   beqz%1, 1b  \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


[MIPS] Wire up ioprio_set and ioprio_get.

2007-03-06 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=08253b39f861e6167aa3acbe155f304ee800ce5a
Commit: 08253b39f861e6167aa3acbe155f304ee800ce5a
Parent: d52c2d5a626a2cb1848fa7063b3ab79e2752dac7
Author: Ralf Baechle [EMAIL PROTECTED]
AuthorDate: Tue Mar 6 17:04:49 2007 +
Committer:  Ralf Baechle [EMAIL PROTECTED]
CommitDate: Wed Mar 7 00:07:18 2007 +

[MIPS] Wire up ioprio_set and ioprio_get.

Signed-off-by: Ralf Baechle [EMAIL PROTECTED]
---
 arch/mips/kernel/scall32-o32.S |2 ++
 arch/mips/kernel/scall64-64.S  |3 +++
 arch/mips/kernel/scall64-n32.S |5 -
 arch/mips/kernel/scall64-o32.S |2 ++
 include/asm-mips/unistd.h  |   18 --
 5 files changed, 23 insertions(+), 7 deletions(-)

diff --git a/arch/mips/kernel/scall32-o32.S b/arch/mips/kernel/scall32-o32.S
index 7c0b393..0c9a9ff 100644
--- a/arch/mips/kernel/scall32-o32.S
+++ b/arch/mips/kernel/scall32-o32.S
@@ -656,6 +656,8 @@ einval: li  v0, -EINVAL
sys sys_kexec_load  4
sys sys_getcpu  3
sys sys_epoll_pwait 6
+   sys sys_ioprio_set  3
+   sys sys_ioprio_get  2
.endm
 
/* We pre-compute the number of _instruction_ bytes needed to
diff --git a/arch/mips/kernel/scall64-64.S b/arch/mips/kernel/scall64-64.S
index e569b84..23f3b11 100644
--- a/arch/mips/kernel/scall64-64.S
+++ b/arch/mips/kernel/scall64-64.S
@@ -471,3 +471,6 @@ sys_call_table:
PTR sys_kexec_load  /* 5270 */
PTR sys_getcpu
PTR sys_epoll_pwait
+   PTR sys_ioprio_set
+   PTR sys_ioprio_get
+   .size   sys_call_table,.-sys_call_table
diff --git a/arch/mips/kernel/scall64-n32.S b/arch/mips/kernel/scall64-n32.S
index f17e31e..6eac283 100644
--- a/arch/mips/kernel/scall64-n32.S
+++ b/arch/mips/kernel/scall64-n32.S
@@ -395,5 +395,8 @@ EXPORT(sysn32_call_table)
PTR compat_sys_set_robust_list
PTR compat_sys_get_robust_list
PTR compat_sys_kexec_load
-   PTR sys_getcpu
+   PTR sys_getcpu  /* 6275 */
PTR compat_sys_epoll_pwait
+   PTR sys_ioprio_set
+   PTR sys_ioprio_get
+   .size   sysn32_call_table,.-sysn32_call_table
diff --git a/arch/mips/kernel/scall64-o32.S b/arch/mips/kernel/scall64-o32.S
index 142c9b7..7e74b41 100644
--- a/arch/mips/kernel/scall64-o32.S
+++ b/arch/mips/kernel/scall64-o32.S
@@ -519,4 +519,6 @@ sys_call_table:
PTR compat_sys_kexec_load
PTR sys_getcpu
PTR compat_sys_epoll_pwait
+   PTR sys_ioprio_set
+   PTR sys_ioprio_get  /* 4315 */
.size   sys_call_table,.-sys_call_table
diff --git a/include/asm-mips/unistd.h b/include/asm-mips/unistd.h
index 696cff3..2f1087b 100644
--- a/include/asm-mips/unistd.h
+++ b/include/asm-mips/unistd.h
@@ -334,16 +334,18 @@
 #define __NR_kexec_load(__NR_Linux + 311)
 #define __NR_getcpu(__NR_Linux + 312)
 #define __NR_epoll_pwait   (__NR_Linux + 313)
+#define __NR_ioprio_set(__NR_Linux + 314)
+#define __NR_ioprio_get(__NR_Linux + 315)
 
 /*
  * Offset of the last Linux o32 flavoured syscall
  */
-#define __NR_Linux_syscalls313
+#define __NR_Linux_syscalls315
 
 #endif /* _MIPS_SIM == _MIPS_SIM_ABI32 */
 
 #define __NR_O32_Linux 4000
-#define __NR_O32_Linux_syscalls313
+#define __NR_O32_Linux_syscalls315
 
 #if _MIPS_SIM == _MIPS_SIM_ABI64
 
@@ -624,16 +626,18 @@
 #define __NR_kexec_load(__NR_Linux + 270)
 #define __NR_getcpu(__NR_Linux + 271)
 #define __NR_epoll_pwait   (__NR_Linux + 272)
+#define __NR_ioprio_set(__NR_Linux + 273)
+#define __NR_ioprio_get(__NR_Linux + 274)
 
 /*
  * Offset of the last Linux 64-bit flavoured syscall
  */
-#define __NR_Linux_syscalls272
+#define __NR_Linux_syscalls274
 
 #endif /* _MIPS_SIM == _MIPS_SIM_ABI64 */
 
 #define __NR_64_Linux  5000
-#define __NR_64_Linux_syscalls 272
+#define __NR_64_Linux_syscalls 274
 
 #if _MIPS_SIM == _MIPS_SIM_NABI32
 
@@ -918,16 +922,18 @@
 #define __NR_kexec_load(__NR_Linux + 274)
 #define __NR_getcpu(__NR_Linux + 275)
 #define __NR_epoll_pwait   (__NR_Linux + 276)
+#define __NR_ioprio_set(__NR_Linux + 277)
+#define __NR_ioprio_get(__NR_Linux + 278)
 
 /*
  * Offset of the last N32 flavoured syscall
  */
-#define __NR_Linux_syscalls276
+#define __NR_Linux_syscalls278
 
 #endif /* _MIPS_SIM == _MIPS_SIM_NABI32 */
 
 #define __NR_N32_Linux 6000

[MIPS] IP27: Build fix

2007-03-06 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=063ea774b021c70fa96139eb601f894aff8941c0
Commit: 063ea774b021c70fa96139eb601f894aff8941c0
Parent: 08253b39f861e6167aa3acbe155f304ee800ce5a
Author: Ralf Baechle [EMAIL PROTECTED]
AuthorDate: Tue Mar 6 20:28:02 2007 +
Committer:  Ralf Baechle [EMAIL PROTECTED]
CommitDate: Wed Mar 7 00:07:18 2007 +

[MIPS] IP27: Build fix

Signed-off-by: Ralf Baechle [EMAIL PROTECTED]
---
 arch/mips/sgi-ip27/ip27-init.c |2 --
 1 files changed, 0 insertions(+), 2 deletions(-)

diff --git a/arch/mips/sgi-ip27/ip27-init.c b/arch/mips/sgi-ip27/ip27-init.c
index 9094baf..74158d3 100644
--- a/arch/mips/sgi-ip27/ip27-init.c
+++ b/arch/mips/sgi-ip27/ip27-init.c
@@ -191,7 +191,6 @@ static inline void ioc3_eth_init(void)
ioc3-eier = 0;
 }
 
-extern void ip27_setup_console(void);
 extern void ip27_time_init(void);
 extern void ip27_reboot_setup(void);
 
@@ -200,7 +199,6 @@ void __init plat_mem_setup(void)
hubreg_t p, e, n_mode;
nasid_t nid;
 
-   ip27_setup_console();
ip27_reboot_setup();
 
/*
-
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


Revert [IA64] swiotlb abstraction (e.g. for Xen)

2007-03-06 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=25667d675454f2cd258c5fa798a2281af1ef2ae9
Commit: 25667d675454f2cd258c5fa798a2281af1ef2ae9
Parent: c3442e296517aee733d62fc3fe03211598902c7d
Author: Tony Luck [EMAIL PROTECTED]
AuthorDate: Tue Mar 6 13:31:45 2007 -0800
Committer:  Tony Luck [EMAIL PROTECTED]
CommitDate: Tue Mar 6 13:31:45 2007 -0800

Revert [IA64] swiotlb abstraction (e.g. for Xen)

This reverts commit 51099005ab8e09d68a13fea8d55bc739c1040ca6.
---
 include/asm-ia64/swiotlb.h   |9 --
 include/asm-x86_64/swiotlb.h |1 -
 lib/swiotlb.c|  184 --
 3 files changed, 35 insertions(+), 159 deletions(-)

diff --git a/include/asm-ia64/swiotlb.h b/include/asm-ia64/swiotlb.h
deleted file mode 100644
index 452c162..000
--- a/include/asm-ia64/swiotlb.h
+++ /dev/null
@@ -1,9 +0,0 @@
-#ifndef _ASM_SWIOTLB_H
-#define _ASM_SWIOTLB_H 1
-
-#include asm/machvec.h
-
-#define SWIOTLB_ARCH_NEED_LATE_INIT
-#define SWIOTLB_ARCH_NEED_ALLOC
-
-#endif /* _ASM_SWIOTLB_H */
diff --git a/include/asm-x86_64/swiotlb.h b/include/asm-x86_64/swiotlb.h
index ab913ff..f9c5895 100644
--- a/include/asm-x86_64/swiotlb.h
+++ b/include/asm-x86_64/swiotlb.h
@@ -44,7 +44,6 @@ extern void swiotlb_init(void);
 extern int swiotlb_force;
 
 #ifdef CONFIG_SWIOTLB
-#define SWIOTLB_ARCH_NEED_ALLOC
 extern int swiotlb;
 #else
 #define swiotlb 0
diff --git a/lib/swiotlb.c b/lib/swiotlb.c
index 623a68a..9970e55 100644
--- a/lib/swiotlb.c
+++ b/lib/swiotlb.c
@@ -28,7 +28,6 @@
 #include asm/io.h
 #include asm/dma.h
 #include asm/scatterlist.h
-#include asm/swiotlb.h
 
 #include linux/init.h
 #include linux/bootmem.h
@@ -36,10 +35,8 @@
 #define OFFSET(val,align) ((unsigned long) \
   ( (val)  ( (align) - 1)))
 
-#ifndef SG_ENT_VIRT_ADDRESS
 #define SG_ENT_VIRT_ADDRESS(sg)(page_address((sg)-page) + 
(sg)-offset)
 #define SG_ENT_PHYS_ADDRESS(sg)virt_to_bus(SG_ENT_VIRT_ADDRESS(sg))
-#endif
 
 /*
  * Maximum allowable number of contiguous slabs to map,
@@ -104,25 +101,13 @@ static unsigned int io_tlb_index;
  * We need to save away the original address corresponding to a mapped entry
  * for the sync operations.
  */
-#ifndef SWIOTLB_ARCH_HAS_IO_TLB_ADDR_T
-typedef char *io_tlb_addr_t;
-#define swiotlb_orig_addr_null(buffer) (!(buffer))
-#define ptr_to_io_tlb_addr(ptr) (ptr)
-#define page_to_io_tlb_addr(pg, off) (page_address(pg) + (off))
-#define sg_to_io_tlb_addr(sg) SG_ENT_VIRT_ADDRESS(sg)
-#endif
-static io_tlb_addr_t *io_tlb_orig_addr;
+static unsigned char **io_tlb_orig_addr;
 
 /*
  * Protect the above data structures in the map and unmap calls
  */
 static DEFINE_SPINLOCK(io_tlb_lock);
 
-#ifdef SWIOTLB_EXTRA_VARIABLES
-SWIOTLB_EXTRA_VARIABLES;
-#endif
-
-#ifndef SWIOTLB_ARCH_HAS_SETUP_IO_TLB_NPAGES
 static int __init
 setup_io_tlb_npages(char *str)
 {
@@ -137,25 +122,9 @@ setup_io_tlb_npages(char *str)
swiotlb_force = 1;
return 1;
 }
-#endif
 __setup(swiotlb=, setup_io_tlb_npages);
 /* make io_tlb_overflow tunable too? */
 
-#ifndef swiotlb_adjust_size
-#define swiotlb_adjust_size(size) ((void)0)
-#endif
-
-#ifndef swiotlb_adjust_seg
-#define swiotlb_adjust_seg(start, size) ((void)0)
-#endif
-
-#ifndef swiotlb_print_info
-#define swiotlb_print_info(bytes) \
-   printk(KERN_INFO Placing %luMB software IO TLB between 0x%lx -  \
-  0x%lx\n, bytes  20, \
-  virt_to_bus(io_tlb_start), virt_to_bus(io_tlb_end))
-#endif
-
 /*
  * Statically reserve bounce buffer space and initialize bounce buffer data
  * structures for the software IO TLB used to implement the DMA API.
@@ -169,8 +138,6 @@ swiotlb_init_with_default_size(size_t default_size)
io_tlb_nslabs = (default_size  IO_TLB_SHIFT);
io_tlb_nslabs = ALIGN(io_tlb_nslabs, IO_TLB_SEGSIZE);
}
-   swiotlb_adjust_size(io_tlb_nslabs);
-   swiotlb_adjust_size(io_tlb_overflow);
 
bytes = io_tlb_nslabs  IO_TLB_SHIFT;
 
@@ -188,14 +155,10 @@ swiotlb_init_with_default_size(size_t default_size)
 * between io_tlb_start and io_tlb_end.
 */
io_tlb_list = alloc_bootmem(io_tlb_nslabs * sizeof(int));
-   for (i = 0; i  io_tlb_nslabs; i++) {
-   if ( !(i % IO_TLB_SEGSIZE) )
-   swiotlb_adjust_seg(io_tlb_start + (i  IO_TLB_SHIFT),
-   IO_TLB_SEGSIZE  IO_TLB_SHIFT);
+   for (i = 0; i  io_tlb_nslabs; i++)
io_tlb_list[i] = IO_TLB_SEGSIZE - OFFSET(i, IO_TLB_SEGSIZE);
-   }
io_tlb_index = 0;
-   io_tlb_orig_addr = alloc_bootmem(io_tlb_nslabs * sizeof(io_tlb_addr_t));
+   io_tlb_orig_addr = alloc_bootmem(io_tlb_nslabs * sizeof(char *));
 
/*
 * Get the overflow emergency buffer
@@ -203,21 +166,17 @@ swiotlb_init_with_default_size(size_t default_size)
io_tlb_overflow_buffer = 

[IA64] point saved_max_pfn to the max_pfn of the entire system

2007-03-06 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=f4a570997e71b892805a1e71303d09c327af135f
Commit: f4a570997e71b892805a1e71303d09c327af135f
Parent: 25667d675454f2cd258c5fa798a2281af1ef2ae9
Author: Horms [EMAIL PROTECTED]
AuthorDate: Tue Mar 6 02:34:21 2007 -0800
Committer:  Tony Luck [EMAIL PROTECTED]
CommitDate: Tue Mar 6 14:47:54 2007 -0800

[IA64] point saved_max_pfn to the max_pfn of the entire system

Make saved_max_pfn point to max_pfn of entire system.

Without this patch is so that vmcore is zero length on ia64.  This is
because saved_max_pfn was wrongly being set to the max_pfn of the crash
kernel's address space, rather than the max_pfg on the physical memory of
the machine - the whole purpose of vmcore is to access physical memory that
is not part of the crash kernel's addresss space.

Signed-off-by: Simon Horman [EMAIL PROTECTED]
Signed-off-by: Zou Nan hai [EMAIL PROTECTED]
Sort-Of-Acked-By: Jay Lan [EMAIL PROTECTED]
Signed-off-by: Andrew Morton [EMAIL PROTECTED]
Signed-off-by: Tony Luck [EMAIL PROTECTED]
---
 arch/ia64/kernel/efi.c   |6 ++
 arch/ia64/mm/contig.c|5 -
 arch/ia64/mm/discontig.c |6 --
 3 files changed, 6 insertions(+), 11 deletions(-)

diff --git a/arch/ia64/kernel/efi.c b/arch/ia64/kernel/efi.c
index 772ba6f..32ce330 100644
--- a/arch/ia64/kernel/efi.c
+++ b/arch/ia64/kernel/efi.c
@@ -21,6 +21,7 @@
  * Skip non-WB memory and ignore empty memory ranges.
  */
 #include linux/module.h
+#include linux/bootmem.h
 #include linux/kernel.h
 #include linux/init.h
 #include linux/types.h
@@ -1009,6 +1010,11 @@ efi_memmap_init(unsigned long *s, unsigned long *e)
} else
ae = efi_md_end(md);
 
+#ifdef CONFIG_CRASH_DUMP
+   /* saved_max_pfn should ignore max_addr= command line arg */
+   if (saved_max_pfn  (ae  PAGE_SHIFT))
+   saved_max_pfn = (ae  PAGE_SHIFT);
+#endif
/* keep within max_addr= and min_addr= command line arg */
as = max(as, min_addr);
ae = min(ae, max_addr);
diff --git a/arch/ia64/mm/contig.c b/arch/ia64/mm/contig.c
index ca4d41e..fb0f469 100644
--- a/arch/ia64/mm/contig.c
+++ b/arch/ia64/mm/contig.c
@@ -197,11 +197,6 @@ find_memory (void)
 
find_initrd();
 
-#ifdef CONFIG_CRASH_DUMP
-   /* If we are doing a crash dump, we still need to know the real mem
-* size before original memory map is reset. */
-   saved_max_pfn = max_pfn;
-#endif
 }
 
 #ifdef CONFIG_SMP
diff --git a/arch/ia64/mm/discontig.c b/arch/ia64/mm/discontig.c
index 1683510..11a2d88 100644
--- a/arch/ia64/mm/discontig.c
+++ b/arch/ia64/mm/discontig.c
@@ -480,12 +480,6 @@ void __init find_memory(void)
max_pfn = max_low_pfn;
 
find_initrd();
-
-#ifdef CONFIG_CRASH_DUMP
-   /* If we are doing a crash dump, we still need to know the real mem
-* size before original memory map is reset. */
-saved_max_pfn = max_pfn;
-#endif
 }
 
 #ifdef CONFIG_SMP
-
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


[IA64] Remove stack hard limit on ia64

2007-03-06 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=d826393cdebe340b3716002bfb1298ab19b57e83
Commit: d826393cdebe340b3716002bfb1298ab19b57e83
Parent: f4a570997e71b892805a1e71303d09c327af135f
Author: [EMAIL PROTECTED] [EMAIL PROTECTED]
AuthorDate: Tue Mar 6 02:34:22 2007 -0800
Committer:  Tony Luck [EMAIL PROTECTED]
CommitDate: Tue Mar 6 14:48:19 2007 -0800

[IA64] Remove stack hard limit on ia64

Un-Breaks pthreads, since Oct 2003.

Signed-off-by: Olaf Hering [EMAIL PROTECTED]
Signed-off-by: Andrew Morton [EMAIL PROTECTED]
Signed-off-by: Tony Luck [EMAIL PROTECTED]
---
 include/asm-ia64/resource.h |1 -
 1 files changed, 0 insertions(+), 1 deletions(-)

diff --git a/include/asm-ia64/resource.h b/include/asm-ia64/resource.h
index 77b1eee..ba2272a 100644
--- a/include/asm-ia64/resource.h
+++ b/include/asm-ia64/resource.h
@@ -2,7 +2,6 @@
 #define _ASM_IA64_RESOURCE_H
 
 #include asm/ustack.h
-#define _STK_LIM_MAX   DEFAULT_USER_STACK_SIZE
 #include asm-generic/resource.h
 
 #endif /* _ASM_IA64_RESOURCE_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


[IA64] always build arch/ia64/lib/xor.o

2007-03-06 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=a27e5a13d5863bb9de0ac80cb4bb3f4442f0aad1
Commit: a27e5a13d5863bb9de0ac80cb4bb3f4442f0aad1
Parent: d826393cdebe340b3716002bfb1298ab19b57e83
Author: Lee Schermerhorn [EMAIL PROTECTED]
AuthorDate: Tue Mar 6 02:34:23 2007 -0800
Committer:  Tony Luck [EMAIL PROTECTED]
CommitDate: Tue Mar 6 14:48:52 2007 -0800

[IA64] always build arch/ia64/lib/xor.o

Always build ia64 xor.o because multiple config options now depend on it.

Necessary to build .20-mm* on ia64 when, e.g., CONFIG_ASYNC_TX_DMA is
defined.  Don't know if '_ASYNC_TX_DMA makes sense on ia64.  If not, maybe
Kconfig should preclude it.

Could have defined a Kconfig option that defaults to true if MD_RAID456 ||
ASYNC_TX_DMA to control building of xor.o, but xor.o is only 848 bytes and
this IS ia64...

Signed-off-by:  Lee Schermerhorn [EMAIL PROTECTED]
Cc: Bob Picco [EMAIL PROTECTED]
Cc: Eric Whitney [EMAIL PROTECTED]
Signed-off-by: Andrew Morton [EMAIL PROTECTED]
Signed-off-by: Tony Luck [EMAIL PROTECTED]
---
 arch/ia64/lib/Makefile |3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)

diff --git a/arch/ia64/lib/Makefile b/arch/ia64/lib/Makefile
index 38fa6e4..46edf84 100644
--- a/arch/ia64/lib/Makefile
+++ b/arch/ia64/lib/Makefile
@@ -9,12 +9,11 @@ lib-y := __divsi3.o __udivsi3.o __modsi3.o __umodsi3.o
\
checksum.o clear_page.o csum_partial_copy.o \
clear_user.o strncpy_from_user.o strlen_user.o strnlen_user.o   \
flush.o ip_fast_csum.o do_csum.o\
-   memset.o strlen.o
+   memset.o strlen.o xor.o
 
 lib-$(CONFIG_ITANIUM)  += copy_page.o copy_user.o memcpy.o
 lib-$(CONFIG_MCKINLEY) += copy_page_mck.o memcpy_mck.o
 lib-$(CONFIG_PERFMON)  += carta_random.o
-lib-$(CONFIG_MD_RAID456)   += xor.o
 
 AFLAGS___divdi3.o  =
 AFLAGS___udivdi3.o = -DUNSIGNED
-
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


[IA64] sync compat getdents

2007-03-06 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=50157b09b33c2ec3637d3b317b06a7235c57c7f2
Commit: 50157b09b33c2ec3637d3b317b06a7235c57c7f2
Parent: a27e5a13d5863bb9de0ac80cb4bb3f4442f0aad1
Author: Alexandr Andreev [EMAIL PROTECTED]
AuthorDate: Tue Mar 6 02:34:24 2007 -0800
Committer:  Tony Luck [EMAIL PROTECTED]
CommitDate: Tue Mar 6 14:49:24 2007 -0800

[IA64] sync compat getdents

Add VERIFY_WRITE check in the beginning like compat_sys_getdents() (EINVAL 
vs
EFAULT).

Signed-off-by: Alexandr Andreev [EMAIL PROTECTED]
Signed-off-by: Alexey Dobriyan [EMAIL PROTECTED]
Signed-off-by: Andrew Morton [EMAIL PROTECTED]
Signed-off-by: Tony Luck [EMAIL PROTECTED]
---
 arch/ia64/ia32/sys_ia32.c |   10 +++---
 1 files changed, 7 insertions(+), 3 deletions(-)

diff --git a/arch/ia64/ia32/sys_ia32.c b/arch/ia64/ia32/sys_ia32.c
index d430d36..0afb4fe 100644
--- a/arch/ia64/ia32/sys_ia32.c
+++ b/arch/ia64/ia32/sys_ia32.c
@@ -1267,6 +1267,10 @@ sys32_getdents (unsigned int fd, struct compat_dirent 
__user *dirent, unsigned i
struct getdents32_callback buf;
int error;
 
+   error = -EFAULT;
+   if (!access_ok(VERIFY_WRITE, dirent, count))
+   goto out;
+
error = -EBADF;
file = fget(fd);
if (!file)
@@ -1283,10 +1287,10 @@ sys32_getdents (unsigned int fd, struct compat_dirent 
__user *dirent, unsigned i
error = buf.error;
lastdirent = buf.previous;
if (lastdirent) {
-   error = -EINVAL;
if (put_user(file-f_pos, lastdirent-d_off))
-   goto out_putf;
-   error = count - buf.count;
+   error = -EFAULT;
+   else
+   error = count - buf.count;
}
 
 out_putf:
-
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


[IA64] permon use-after-free fix

2007-03-06 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=41d5e5d73ecef4ef56b7b4cde962929a712689b4
Commit: 41d5e5d73ecef4ef56b7b4cde962929a712689b4
Parent: 50157b09b33c2ec3637d3b317b06a7235c57c7f2
Author: Nick Piggin [EMAIL PROTECTED]
AuthorDate: Tue Mar 6 02:34:25 2007 -0800
Committer:  Tony Luck [EMAIL PROTECTED]
CommitDate: Tue Mar 6 14:49:52 2007 -0800

[IA64] permon use-after-free fix

Perfmon associates vmalloc()ed memory with a file descriptor, and installs
a vma mapping that memory.  Unfortunately, the vm_file field is not filled
in, so processes with mappings to that memory do not prevent the file from
being closed and the memory freed.  This results in use-after-free bugs and
multiple freeing of pages, etc.

I saw this bug on an Altix on SLES9.  Haven't reproduced upstream but it
looks like the same issue is there.

Signed-off-by: Nick Piggin [EMAIL PROTECTED]
Cc: Stephane Eranian [EMAIL PROTECTED]
Signed-off-by: Andrew Morton [EMAIL PROTECTED]
Signed-off-by: Tony Luck [EMAIL PROTECTED]
---
 arch/ia64/kernel/perfmon.c |   11 +++
 1 files changed, 7 insertions(+), 4 deletions(-)

diff --git a/arch/ia64/kernel/perfmon.c b/arch/ia64/kernel/perfmon.c
index 9ddf896..abc7ad0 100644
--- a/arch/ia64/kernel/perfmon.c
+++ b/arch/ia64/kernel/perfmon.c
@@ -2299,7 +2299,7 @@ pfm_remap_buffer(struct vm_area_struct *vma, unsigned 
long buf, unsigned long ad
  * allocate a sampling buffer and remaps it into the user address space of the 
task
  */
 static int
-pfm_smpl_buffer_alloc(struct task_struct *task, pfm_context_t *ctx, unsigned 
long rsize, void **user_vaddr)
+pfm_smpl_buffer_alloc(struct task_struct *task, struct file *filp, 
pfm_context_t *ctx, unsigned long rsize, void **user_vaddr)
 {
struct mm_struct *mm = task-mm;
struct vm_area_struct *vma = NULL;
@@ -2349,6 +2349,7 @@ pfm_smpl_buffer_alloc(struct task_struct *task, 
pfm_context_t *ctx, unsigned lon
 * partially initialize the vma for the sampling buffer
 */
vma-vm_mm   = mm;
+   vma-vm_file = filp;
vma-vm_flags= VM_READ| VM_MAYREAD |VM_RESERVED;
vma-vm_page_prot= PAGE_READONLY; /* XXX may need to change */
 
@@ -2387,6 +2388,8 @@ pfm_smpl_buffer_alloc(struct task_struct *task, 
pfm_context_t *ctx, unsigned lon
goto error;
}
 
+   get_file(filp);
+
/*
 * now insert the vma in the vm list for the process, must be
 * done with mmap lock held
@@ -2464,7 +2467,7 @@ pfarg_is_sane(struct task_struct *task, pfarg_context_t 
*pfx)
 }
 
 static int
-pfm_setup_buffer_fmt(struct task_struct *task, pfm_context_t *ctx, unsigned 
int ctx_flags,
+pfm_setup_buffer_fmt(struct task_struct *task, struct file *filp, 
pfm_context_t *ctx, unsigned int ctx_flags,
 unsigned int cpu, pfarg_context_t *arg)
 {
pfm_buffer_fmt_t *fmt = NULL;
@@ -2505,7 +2508,7 @@ pfm_setup_buffer_fmt(struct task_struct *task, 
pfm_context_t *ctx, unsigned int
/*
 * buffer is always remapped into the caller's address space
 */
-   ret = pfm_smpl_buffer_alloc(current, ctx, size, uaddr);
+   ret = pfm_smpl_buffer_alloc(current, filp, ctx, size, uaddr);
if (ret) goto error;
 
/* keep track of user address of buffer */
@@ -2716,7 +2719,7 @@ pfm_context_create(pfm_context_t *ctx, void *arg, int 
count, struct pt_regs *reg
 * does the user want to sample?
 */
if (pfm_uuid_cmp(req-ctx_smpl_buf_id, pfm_null_uuid)) {
-   ret = pfm_setup_buffer_fmt(current, ctx, ctx_flags, 0, req);
+   ret = pfm_setup_buffer_fmt(current, filp, ctx, ctx_flags, 0, 
req);
if (ret) goto buffer_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


[IA64] kexec: Use EFI_LOADER_DATA for ELF core header

2007-03-06 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=cee87af2a5f75713b98d3e65e43872e547122cd5
Commit: cee87af2a5f75713b98d3e65e43872e547122cd5
Parent: 41d5e5d73ecef4ef56b7b4cde962929a712689b4
Author: Magnus Damm [EMAIL PROTECTED]
AuthorDate: Tue Mar 6 02:34:26 2007 -0800
Committer:  Tony Luck [EMAIL PROTECTED]
CommitDate: Tue Mar 6 14:50:33 2007 -0800

[IA64] kexec: Use EFI_LOADER_DATA for ELF core header

The address where the ELF core header is stored is passed to the secondary
kernel as a kernel command line option.  The memory area for this header is
also marked as a separate EFI memory descriptor on ia64.

The separate EFI memory descriptor is at the moment of the type
EFI_UNUSABLE_MEMORY.  With such a type the secondary kernel skips over the
entire memory granule (config option, 16M or 64M) when detecting memory.
If we are lucky we will just lose some memory, but if we happen to have
data in the same granule (such as an initramfs image), then this data will
never get mapped and the kernel bombs out when trying to access it.

So this is an attempt to fix this by changing the EFI memory descriptor
type into EFI_LOADER_DATA.  This type is the same type used for the kernel
data and for initramfs.  In the secondary kernel we then handle the ELF
core header data the same way as we handle the initramfs image.

This patch contains the kernel changes to make this happen.  Pretty
straightforward, we reserve the area in reserve_memory().  The address for
the area comes from the kernel command line and the size comes from the
specialized EFI parsing function vmcore_find_descriptor_size().

The kexec-tools-testing code for this can be found here:
http://lists.osdl.org/pipermail/fastboot/2007-February/005983.html

Signed-off-by: Magnus Damm [EMAIL PROTECTED]
Cc: Simon Horman [EMAIL PROTECTED]
Cc: Vivek Goyal [EMAIL PROTECTED]
Signed-off-by: Andrew Morton [EMAIL PROTECTED]
Signed-off-by: Tony Luck [EMAIL PROTECTED]
---
 arch/ia64/kernel/efi.c |   30 ++
 arch/ia64/kernel/setup.c   |   30 ++
 include/asm-ia64/meminit.h |6 +-
 3 files changed, 65 insertions(+), 1 deletions(-)

diff --git a/arch/ia64/kernel/efi.c b/arch/ia64/kernel/efi.c
index 32ce330..4061593 100644
--- a/arch/ia64/kernel/efi.c
+++ b/arch/ia64/kernel/efi.c
@@ -1183,3 +1183,33 @@ kdump_find_rsvd_region (unsigned long size,
   return ~0UL;
 }
 #endif
+
+#ifdef CONFIG_PROC_VMCORE
+/* locate the size find a the descriptor at a certain address */
+unsigned long
+vmcore_find_descriptor_size (unsigned long address)
+{
+   void *efi_map_start, *efi_map_end, *p;
+   efi_memory_desc_t *md;
+   u64 efi_desc_size;
+   unsigned long ret = 0;
+
+   efi_map_start = __va(ia64_boot_param-efi_memmap);
+   efi_map_end   = efi_map_start + ia64_boot_param-efi_memmap_size;
+   efi_desc_size = ia64_boot_param-efi_memdesc_size;
+
+   for (p = efi_map_start; p  efi_map_end; p += efi_desc_size) {
+   md = p;
+   if (efi_wb(md)  md-type == EFI_LOADER_DATA
+md-phys_addr == address) {
+   ret = efi_md_size(md);
+   break;
+   }
+   }
+
+   if (ret == 0)
+   printk(KERN_WARNING Cannot locate EFI vmcore descriptor\n);
+
+   return ret;
+}
+#endif
diff --git a/arch/ia64/kernel/setup.c b/arch/ia64/kernel/setup.c
index 5fa09d1..7d6fe65 100644
--- a/arch/ia64/kernel/setup.c
+++ b/arch/ia64/kernel/setup.c
@@ -251,6 +251,12 @@ reserve_memory (void)
}
 #endif
 
+#ifdef CONFIG_PROC_VMCORE
+   if (reserve_elfcorehdr(rsvd_region[n].start,
+  rsvd_region[n].end) == 0)
+   n++;
+#endif
+
efi_memmap_init(rsvd_region[n].start, rsvd_region[n].end);
n++;
 
@@ -453,6 +459,30 @@ static int __init parse_elfcorehdr(char *arg)
return 0;
 }
 early_param(elfcorehdr, parse_elfcorehdr);
+
+int __init reserve_elfcorehdr(unsigned long *start, unsigned long *end)
+{
+   unsigned long length;
+
+   /* We get the address using the kernel command line,
+* but the size is extracted from the EFI tables.
+* Both address and size are required for reservation
+* to work properly.
+*/
+
+   if (elfcorehdr_addr = ELFCORE_ADDR_MAX)
+   return -EINVAL;
+
+   if ((length = vmcore_find_descriptor_size(elfcorehdr_addr)) == 0) {
+   elfcorehdr_addr = ELFCORE_ADDR_MAX;
+   return -EINVAL;
+   }
+
+   *start = (unsigned long)__va(elfcorehdr_addr);
+   *end = *start + length;
+   return 0;
+}
+
 #endif /* CONFIG_PROC_VMCORE */
 
 void __init
diff --git a/include/asm-ia64/meminit.h b/include/asm-ia64/meminit.h
index 6dd476b..21ec5f3 100644
--- 

[PATCH] m68knommu: use irq_handler_t for passing handler types in 68360 setup

2007-03-06 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=b032fde9097605f9f1099eeca28f3b5b09e55ec0
Commit: b032fde9097605f9f1099eeca28f3b5b09e55ec0
Parent: 1ba73b99c34c31ea18b44dcf161c6e1f2838e0fa
Author: Greg Ungerer [EMAIL PROTECTED]
AuthorDate: Wed Mar 7 11:28:13 2007 +1000
Committer:  Linus Torvalds [EMAIL PROTECTED]
CommitDate: Tue Mar 6 18:08:38 2007 -0800

[PATCH] m68knommu: use irq_handler_t for passing handler types in 68360 
setup

Use irq_handler_t type for passing around timer interrupt routine.

Signed-off-by: Greg Ungerer [EMAIL PROTECTED]
Signed-off-by: Linus Torvalds [EMAIL PROTECTED]
---
 arch/m68knommu/platform/68360/config.c |3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/arch/m68knommu/platform/68360/config.c 
b/arch/m68knommu/platform/68360/config.c
index 1b36f62..4ff13bd 100644
--- a/arch/m68knommu/platform/68360/config.c
+++ b/arch/m68knommu/platform/68360/config.c
@@ -16,6 +16,7 @@
 #include linux/mm.h
 #include linux/tty.h
 #include linux/console.h
+#include linux/interrupt.h
 
 #include asm/setup.h
 #include asm/system.h
@@ -50,7 +51,7 @@ extern unsigned long int system_clock; //In kernel setup.c
 
 extern void config_M68360_irq(void);
 
-void BSP_sched_init(void (*timer_routine)(int, void *, struct pt_regs *))
+void BSP_sched_init(irq_handler_t timer_routine)
 {
   unsigned char prescaler;
   unsigned short tgcr_save;
-
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] m68knommu: use irq_handler_t for passing handler types in 68328 setup

2007-03-06 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=1ea9acc7823587266a26293a3b74deafc6637427
Commit: 1ea9acc7823587266a26293a3b74deafc6637427
Parent: b032fde9097605f9f1099eeca28f3b5b09e55ec0
Author: Greg Ungerer [EMAIL PROTECTED]
AuthorDate: Wed Mar 7 11:28:13 2007 +1000
Committer:  Linus Torvalds [EMAIL PROTECTED]
CommitDate: Tue Mar 6 18:08:38 2007 -0800

[PATCH] m68knommu: use irq_handler_t for passing handler types in 68328 
setup

Use irq_handler_t type for passing around timer interrupt routine
in 368360 setup code.

Signed-off-by: Greg Ungerer [EMAIL PROTECTED]
Signed-off-by: Linus Torvalds [EMAIL PROTECTED]
---
 arch/m68knommu/platform/68328/timers.c   |3 ++-
 arch/m68knommu/platform/68EZ328/config.c |3 ++-
 arch/m68knommu/platform/68VZ328/config.c |3 ++-
 3 files changed, 6 insertions(+), 3 deletions(-)

diff --git a/arch/m68knommu/platform/68328/timers.c 
b/arch/m68knommu/platform/68328/timers.c
index 438ef6e..ef067f4 100644
--- a/arch/m68knommu/platform/68328/timers.c
+++ b/arch/m68knommu/platform/68328/timers.c
@@ -17,6 +17,7 @@
 #include linux/types.h
 #include linux/kernel.h
 #include linux/mm.h
+#include linux/interrupt.h
 #include asm/setup.h
 #include asm/system.h
 #include asm/pgtable.h
@@ -52,7 +53,7 @@
 
 /***/
 
-void m68328_timer_init(irqreturn_t (*timer_routine) (int, void *, struct 
pt_regs *))
+void m68328_timer_init(irq_handler_t timer_routine)
 {
/* disable timer 1 */
TCTL = 0;
diff --git a/arch/m68knommu/platform/68EZ328/config.c 
b/arch/m68knommu/platform/68EZ328/config.c
index 659b80a..ab36551 100644
--- a/arch/m68knommu/platform/68EZ328/config.c
+++ b/arch/m68knommu/platform/68EZ328/config.c
@@ -19,6 +19,7 @@
 #include linux/mm.h
 #include linux/tty.h
 #include linux/console.h
+#include linux/interrupt.h
 
 #include asm/setup.h
 #include asm/system.h
@@ -31,7 +32,7 @@
 
 /***/
 
-void m68328_timer_init(irqreturn_t (*timer_routine) (int, void *, struct 
pt_regs *));
+void m68328_timer_init(irq_handler_t timer_routine);
 void m68328_timer_tick(void);
 unsigned long m68328_timer_gettimeoffset(void);
 void m68328_timer_gettod(int *year, int *mon, int *day, int *hour, int *min, 
int *sec);
diff --git a/arch/m68knommu/platform/68VZ328/config.c 
b/arch/m68knommu/platform/68VZ328/config.c
index fcd100b..8abe0f6 100644
--- a/arch/m68knommu/platform/68VZ328/config.c
+++ b/arch/m68knommu/platform/68VZ328/config.c
@@ -21,6 +21,7 @@
 #include linux/console.h
 #include linux/kd.h
 #include linux/netdevice.h
+#include linux/interrupt.h
 
 #include asm/setup.h
 #include asm/system.h
@@ -36,7 +37,7 @@
 
 /***/
 
-void m68328_timer_init(irqreturn_t (*timer_routine) (int, void *, struct 
pt_regs *));
+void m68328_timer_init(irq_handler_t timer_routine);
 void m68328_timer_tick(void);
 unsigned long m68328_timer_gettimeoffset(void);
 void m68328_timer_gettod(int *year, int *mon, int *day, int *hour, int *min, 
int *sec);
-
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] m68knommu: use irq_handler_t and remove regs arg for 68328

2007-03-06 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=8668fb5d8d1bbae1492baf4b8d72b5151a5c4d40
Commit: 8668fb5d8d1bbae1492baf4b8d72b5151a5c4d40
Parent: 1ea9acc7823587266a26293a3b74deafc6637427
Author: Greg Ungerer [EMAIL PROTECTED]
AuthorDate: Wed Mar 7 11:28:13 2007 +1000
Committer:  Linus Torvalds [EMAIL PROTECTED]
CommitDate: Tue Mar 6 18:08:38 2007 -0800

[PATCH] m68knommu: use irq_handler_t and remove regs arg for 68328

Remove regs arg from bad interrupt handler.
Use irq_handler_t type for handler arg of local request_irq().

Signed-off-by: Greg Ungerer [EMAIL PROTECTED]
Signed-off-by: Linus Torvalds [EMAIL PROTECTED]
---
 arch/m68knommu/platform/68328/ints.c |5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/arch/m68knommu/platform/68328/ints.c 
b/arch/m68knommu/platform/68328/ints.c
index 2dda733..3de6e33 100644
--- a/arch/m68knommu/platform/68328/ints.c
+++ b/arch/m68knommu/platform/68328/ints.c
@@ -15,6 +15,7 @@
 #include linux/sched.h
 #include linux/kernel_stat.h
 #include linux/errno.h
+#include linux/interrupt.h
 
 #include asm/system.h
 #include asm/irq.h
@@ -64,7 +65,7 @@ asmlinkage void trap44(void);
 asmlinkage void trap45(void);
 asmlinkage void trap46(void);
 asmlinkage void trap47(void);
-asmlinkage irqreturn_t bad_interrupt(int, void *, struct pt_regs *);
+asmlinkage irqreturn_t bad_interrupt(int, void *);
 asmlinkage irqreturn_t inthandler(void);
 asmlinkage irqreturn_t inthandler1(void);
 asmlinkage irqreturn_t inthandler2(void);
@@ -121,7 +122,7 @@ void init_IRQ(void)
 
 int request_irq(
unsigned int irq,
-   irqreturn_t (*handler)(int, void *, struct pt_regs *),
+   irq_handler_t handler,
unsigned long flags,
const char *devname,
void *dev_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


[PATCH] m68knommu: set GPIO lines for serial ports on 5282 in mcfserial.c

2007-03-06 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=ebfcfef44e4a759dd08a4b5e28848787b5530c0c
Commit: ebfcfef44e4a759dd08a4b5e28848787b5530c0c
Parent: 8668fb5d8d1bbae1492baf4b8d72b5151a5c4d40
Author: Greg Ungerer [EMAIL PROTECTED]
AuthorDate: Wed Mar 7 11:28:13 2007 +1000
Committer:  Linus Torvalds [EMAIL PROTECTED]
CommitDate: Tue Mar 6 18:08:38 2007 -0800

[PATCH] m68knommu: set GPIO lines for serial ports on 5282 in mcfserial.c

For the Freescale M5282 ColdFire,
Port UA Pin Assignment Register should set to UART mode.
Patch submitted by David Wu [EMAIL PROTECTED].

Signed-off-by: Greg Ungerer [EMAIL PROTECTED]
Signed-off-by: Linus Torvalds [EMAIL PROTECTED]
---
 drivers/serial/mcfserial.c |   11 +--
 1 files changed, 9 insertions(+), 2 deletions(-)

diff --git a/drivers/serial/mcfserial.c b/drivers/serial/mcfserial.c
index 0843096..4e2eb35 100644
--- a/drivers/serial/mcfserial.c
+++ b/drivers/serial/mcfserial.c
@@ -1541,8 +1541,8 @@ static void mcfrs_irqinit(struct mcf_serial *info)
 * External Pin Mask Setting  Enable External Pin for Interface
 * [EMAIL PROTECTED]
 */
-   unsigned short *serpin_enable_mask;
-   serpin_enable_mask = (MCF_IPSBAR + MCF_GPIO_PAR_UART);
+   u16 *serpin_enable_mask;
+   serpin_enable_mask = (u16 *) (MCF_IPSBAR + MCF_GPIO_PAR_UART);
if (info-line == 0)
*serpin_enable_mask |= UART0_ENABLE_MASK;
else if (info-line == 1)
@@ -1551,6 +1551,13 @@ static void mcfrs_irqinit(struct mcf_serial *info)
*serpin_enable_mask |= UART2_ENABLE_MASK;
}
 #endif
+#if defined(CONFIG_M528x)
+   /* make sure PUAPAR is set for UART0 and UART1 */
+   if (info-line  2) {
+   volatile unsigned char *portp = (volatile unsigned char *) 
(MCF_MBAR + MCF5282_GPIO_PUAPAR);
+   *portp |= (0x03  (info-line * 2));
+   }
+#endif
 #elif defined(CONFIG_M520x)
volatile unsigned char *icrp, *uartp;
volatile unsigned long *imrp;
-
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] m68knommu: fix work queues in mcfserial.c driver

2007-03-06 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=28580df03e18c33dd29af83c23c1d52f3df320f1
Commit: 28580df03e18c33dd29af83c23c1d52f3df320f1
Parent: ebfcfef44e4a759dd08a4b5e28848787b5530c0c
Author: Greg Ungerer [EMAIL PROTECTED]
AuthorDate: Wed Mar 7 11:28:13 2007 +1000
Committer:  Linus Torvalds [EMAIL PROTECTED]
CommitDate: Tue Mar 6 18:08:38 2007 -0800

[PATCH] m68knommu: fix work queues in mcfserial.c driver

Fix work queue code to support new model.

Signed-off-by: Greg Ungerer [EMAIL PROTECTED]
Signed-off-by: Linus Torvalds [EMAIL PROTECTED]
---
 drivers/serial/mcfserial.c |   33 ++---
 1 files changed, 14 insertions(+), 19 deletions(-)

diff --git a/drivers/serial/mcfserial.c b/drivers/serial/mcfserial.c
index 4e2eb35..99af084 100644
--- a/drivers/serial/mcfserial.c
+++ b/drivers/serial/mcfserial.c
@@ -425,15 +425,13 @@ irqreturn_t mcfrs_interrupt(int irq, void *dev_id)
  * ---
  */
 
-static void mcfrs_offintr(void *private)
+static void mcfrs_offintr(struct work_struct *work)
 {
-   struct mcf_serial   *info = (struct mcf_serial *) private;
-   struct tty_struct   *tty;
+   struct mcf_serial *info = container_of(work, struct mcf_serial, tqueue);
+   struct tty_struct *tty = info-tty;

-   tty = info-tty;
-   if (!tty)
-   return;
-   tty_wakeup(tty);
+   if (tty)
+   tty_wakeup(tty);
 }
 
 
@@ -497,16 +495,13 @@ static void mcfrs_timer(void)
  * do_serial_hangup() - tty-hangup() - mcfrs_hangup()
  * 
  */
-static void do_serial_hangup(void *private)
+static void do_serial_hangup(struct work_struct *work)
 {
-   struct mcf_serial   *info = (struct mcf_serial *) private;
-   struct tty_struct   *tty;
+   struct mcf_serial *info = container_of(work, struct mcf_serial, 
tqueue_hangup);
+   struct tty_struct *tty = info-tty;

-   tty = info-tty;
-   if (!tty)
-   return;
-
-   tty_hangup(tty);
+   if (tty)
+   tty_hangup(tty);
 }
 
 static int startup(struct mcf_serial * info)
@@ -857,7 +852,7 @@ static void mcfrs_throttle(struct tty_struct * tty)
 #ifdef SERIAL_DEBUG_THROTTLE
charbuf[64];

-   printk(throttle %s: %d\n, _tty_name(tty, buf),
+   printk(throttle %s: %d\n, tty_name(tty, buf),
   tty-ldisc.chars_in_buffer(tty));
 #endif
 
@@ -876,7 +871,7 @@ static void mcfrs_unthrottle(struct tty_struct * tty)
 #ifdef SERIAL_DEBUG_THROTTLE
charbuf[64];

-   printk(unthrottle %s: %d\n, _tty_name(tty, buf),
+   printk(unthrottle %s: %d\n, tty_name(tty, buf),
   tty-ldisc.chars_in_buffer(tty));
 #endif
 
@@ -1790,8 +1785,8 @@ mcfrs_init(void)
info-event = 0;
info-count = 0;
info-blocked_open = 0;
-   INIT_WORK(info-tqueue, mcfrs_offintr, info);
-   INIT_WORK(info-tqueue_hangup, do_serial_hangup, info);
+   INIT_WORK(info-tqueue, mcfrs_offintr);
+   INIT_WORK(info-tqueue_hangup, do_serial_hangup);
init_waitqueue_head(info-open_wait);
init_waitqueue_head(info-close_wait);
 
-
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] m68knommu: GPIO line defines for the ColdFire 5282

2007-03-06 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=8bb25184b3bed4930f65a138faf1905ca96054af
Commit: 8bb25184b3bed4930f65a138faf1905ca96054af
Parent: 28580df03e18c33dd29af83c23c1d52f3df320f1
Author: Greg Ungerer [EMAIL PROTECTED]
AuthorDate: Wed Mar 7 11:28:13 2007 +1000
Committer:  Linus Torvalds [EMAIL PROTECTED]
CommitDate: Tue Mar 6 18:08:38 2007 -0800

[PATCH] m68knommu: GPIO line defines for the ColdFire 5282

For the Freescale M5282 ColdFire,
Port UA Pin Assignment Register should set to UART mode.
Patch submitted by David Wu [EMAIL PROTECTED].

Signed-off-by: Greg Ungerer [EMAIL PROTECTED]
Signed-off-by: Linus Torvalds [EMAIL PROTECTED]
---
 include/asm-m68knommu/m528xsim.h |3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/include/asm-m68knommu/m528xsim.h b/include/asm-m68knommu/m528xsim.h
index 1a3b1ae..28bf783 100644
--- a/include/asm-m68knommu/m528xsim.h
+++ b/include/asm-m68knommu/m528xsim.h
@@ -47,6 +47,9 @@
 /* set Port AS pin for I2C or UART */
 #define MCF5282_GPIO_PASPAR (volatile u16 *) (MCF_IPSBAR + 0x00100056)
 
+/* Port UA Pin Assignment Register (8 Bit) */
+#define MCF5282_GPIO_PUAPAR0x10005C
+
 /* Interrupt Mask Register Register Low */ 
 #define MCF5282_INTC0_IMRL  (volatile u32 *) (MCF_IPSBAR + 0x0C0C)
 /* Interrupt Control Register 7 */
-
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] m68knommu: use irq_handler_t and rtc_time in prototypes

2007-03-06 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=1ed35e0d8afd7cd57f5b592e56f2af6794bab5c5
Commit: 1ed35e0d8afd7cd57f5b592e56f2af6794bab5c5
Parent: 8bb25184b3bed4930f65a138faf1905ca96054af
Author: Greg Ungerer [EMAIL PROTECTED]
AuthorDate: Wed Mar 7 11:28:13 2007 +1000
Committer:  Linus Torvalds [EMAIL PROTECTED]
CommitDate: Tue Mar 6 18:08:38 2007 -0800

[PATCH] m68knommu: use irq_handler_t and rtc_time in prototypes

Use irq_handler_t for passing clock handler routine around.
And use new rtc_time in place of hwclock_time.

Signed-off-by: Greg Ungerer [EMAIL PROTECTED]
Signed-off-by: Linus Torvalds [EMAIL PROTECTED]
---
 arch/m68knommu/kernel/setup.c |4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/m68knommu/kernel/setup.c b/arch/m68knommu/kernel/setup.c
index d5c25d2..8133b10 100644
--- a/arch/m68knommu/kernel/setup.c
+++ b/arch/m68knommu/kernel/setup.c
@@ -51,7 +51,7 @@ static void dummy_waitbut(void)
 {
 }
 
-void (*mach_sched_init) (irqreturn_t (*handler)(int, void *, struct pt_regs 
*));
+void (*mach_sched_init) (irq_handler_t handler);
 void (*mach_tick)( void );
 /* machine dependent keyboard functions */
 int (*mach_keyb_init) (void);
@@ -66,7 +66,7 @@ void (*mach_trap_init) (void);
 /* machine dependent timer functions */
 unsigned long (*mach_gettimeoffset) (void);
 void (*mach_gettod) (int*, int*, int*, int*, int*, int*);
-int (*mach_hwclk) (int, struct hwclk_time*);
+int (*mach_hwclk) (int, struct rtc_time*);
 int (*mach_set_clock_mmss) (unsigned long);
 void (*mach_mksound)( unsigned int count, unsigned int ticks );
 void (*mach_reset)( void );
-
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] m68knommu: remove local_bh_count

2007-03-06 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=5d6deb940f880140fbcf5ec42e92534e78785e99
Commit: 5d6deb940f880140fbcf5ec42e92534e78785e99
Parent: 1ed35e0d8afd7cd57f5b592e56f2af6794bab5c5
Author: Greg Ungerer [EMAIL PROTECTED]
AuthorDate: Wed Mar 7 11:28:13 2007 +1000
Committer:  Linus Torvalds [EMAIL PROTECTED]
CommitDate: Tue Mar 6 18:08:38 2007 -0800

[PATCH] m68knommu: remove local_bh_count

Remove un-used/un-referenced local_bh_count.

Signed-off-by: Greg Ungerer [EMAIL PROTECTED]
Signed-off-by: Linus Torvalds [EMAIL PROTECTED]
---
 arch/m68knommu/platform/5307/ints.c |1 -
 1 files changed, 0 insertions(+), 1 deletions(-)

diff --git a/arch/m68knommu/platform/5307/ints.c 
b/arch/m68knommu/platform/5307/ints.c
index 20f12a1..7516330 100644
--- a/arch/m68knommu/platform/5307/ints.c
+++ b/arch/m68knommu/platform/5307/ints.c
@@ -42,7 +42,6 @@ static irq_node_t nodes[NUM_IRQ_NODES];
 /* The number of spurious interrupts */
 volatile unsigned int num_spurious;
 
-unsigned int local_bh_count[NR_CPUS];
 unsigned int local_irq_count[NR_CPUS];
 
 static irqreturn_t default_irq_handler(int irq, void *ptr)
-
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


pata_pdc202xx_old: fix data corruption and other problems

2007-03-06 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=63ed71019c4437caef65fca1f83c990ae729024f
Commit: 63ed71019c4437caef65fca1f83c990ae729024f
Parent: 8b966dddc29899008fb178a533263afa8d1ad849
Author: Bartlomiej Zolnierkiewicz [EMAIL PROTECTED]
AuthorDate: Sun Mar 4 04:48:08 2007 +0100
Committer:  Jeff Garzik [EMAIL PROTECTED]
CommitDate: Tue Mar 6 04:04:30 2007 -0500

pata_pdc202xx_old: fix data corruption and other problems

Fix wrong port calculations in pdc202xx_{configure_piomode,set_dmamode}()
They were broken for all configurations except one (master device on primary
channel, no other devices) and as a result device settings + PIO/DMA timings
were being programmed into the wrong PCI registers.  This could result in
a large variety of problems including data corruption, hangs etc. (depending
on devices used and your luck :-).

  ap-port_no   ap-devno   used PCI registers   correct PCI registers
0   00x60-0x62   0x60-0x62
0   10x62-0x64   0x64-0x66
1   00x64-0x66   0x68-0x6a
1   10x66-0x68   0x6c-0x6e

Also forward port recent fixes from drivers/ide pdc202xx_old driver:

* fix XFER_MW_DMA0 timings (they were overclocked, use the official ones)

* fix bitmasks for clearing bits of register B:

  - when programming DMA mode bit 0x10 of register B was cleared which
resulted in overclocked PIO timing setting (iff PIO0 was used)

  - when programming PIO mode bits 0x18 weren't cleared so suboptimal
timings were used for PIO1-4 if PIO0 was previously set (bit 0x10)
and for PIO0/3/4 if PIO1/2 was previously set (bit 0x08)

and finally bump driver version.

Signed-off-by: Bartlomiej Zolnierkiewicz [EMAIL PROTECTED]
Signed-off-by: Jeff Garzik [EMAIL PROTECTED]
---
 drivers/ata/pata_pdc202xx_old.c |   22 ++
 1 files changed, 14 insertions(+), 8 deletions(-)

diff --git a/drivers/ata/pata_pdc202xx_old.c b/drivers/ata/pata_pdc202xx_old.c
index 3fb4177..acdc52c 100644
--- a/drivers/ata/pata_pdc202xx_old.c
+++ b/drivers/ata/pata_pdc202xx_old.c
@@ -2,13 +2,14 @@
  * pata_pdc202xx_old.c - Promise PDC202xx PATA for new ATA layer
  *   (C) 2005 Red Hat Inc
  *   Alan Cox [EMAIL PROTECTED]
+ *   (C) 2007 Bartlomiej Zolnierkiewicz
  *
  * Based in part on linux/drivers/ide/pci/pdc202xx_old.c
  *
  * First cut with LBA48/ATAPI
  *
  * TODO:
- * Channel interlock/reset on both required ?
+ * Channel interlock/reset on both required
  */
 
 #include linux/kernel.h
@@ -21,7 +22,7 @@
 #include linux/libata.h
 
 #define DRV_NAME pata_pdc202xx_old
-#define DRV_VERSION 0.3.0
+#define DRV_VERSION 0.4.0
 
 /**
  * pdc2024x_pre_reset  -   probe begin
@@ -76,7 +77,7 @@ static void pdc2026x_error_handler(struct ata_port *ap)
 static void pdc202xx_configure_piomode(struct ata_port *ap, struct ata_device 
*adev, int pio)
 {
struct pci_dev *pdev = to_pci_dev(ap-host-dev);
-   int port = 0x60 + 4 * ap-port_no + 2 * adev-devno;
+   int port = 0x60 + 8 * ap-port_no + 4 * adev-devno;
static u16 pio_timing[5] = {
0x0913, 0x050C , 0x0308, 0x0206, 0x0104
};
@@ -85,7 +86,7 @@ static void pdc202xx_configure_piomode(struct ata_port *ap, 
struct ata_device *a
pci_read_config_byte(pdev, port, r_ap);
pci_read_config_byte(pdev, port + 1, r_bp);
r_ap = ~0x3F;  /* Preserve ERRDY_EN, SYNC_IN */
-   r_bp = ~0x07;
+   r_bp = ~0x1F;
r_ap |= (pio_timing[pio]  8);
r_bp |= (pio_timing[pio]  0xFF);
 
@@ -123,7 +124,7 @@ static void pdc202xx_set_piomode(struct ata_port *ap, 
struct ata_device *adev)
 static void pdc202xx_set_dmamode(struct ata_port *ap, struct ata_device *adev)
 {
struct pci_dev *pdev = to_pci_dev(ap-host-dev);
-   int port = 0x60 + 4 * ap-port_no + 2 * adev-devno;
+   int port = 0x60 + 8 * ap-port_no + 4 * adev-devno;
static u8 udma_timing[6][2] = {
{ 0x60, 0x03 }, /* 33 Mhz Clock */
{ 0x40, 0x02 },
@@ -132,12 +133,17 @@ static void pdc202xx_set_dmamode(struct ata_port *ap, 
struct ata_device *adev)
{ 0x20, 0x01 },
{ 0x20, 0x01 }
};
+   static u8 mdma_timing[3][2] = {
+   { 0x60, 0x03 },
+   { 0x60, 0x04 },
+   { 0xe0, 0x0f },
+   };
u8 r_bp, r_cp;
 
pci_read_config_byte(pdev, port + 1, r_bp);
pci_read_config_byte(pdev, port + 2, r_cp);
 
-   r_bp = ~0xF0;
+   r_bp = ~0xE0;
r_cp = ~0x0F;
 
if (adev-dma_mode = XFER_UDMA_0) {
@@ -147,8 +153,8 @@ static void pdc202xx_set_dmamode(struct 

pata_legacy: fix io/irq mismatch

2007-03-06 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=8b966dddc29899008fb178a533263afa8d1ad849
Commit: 8b966dddc29899008fb178a533263afa8d1ad849
Parent: 8af12cdb7c4aa9ed278ed71a8b5b130f2d8c8920
Author: Mikael Pettersson [EMAIL PROTECTED]
AuthorDate: Sat Mar 3 20:57:44 2007 +0100
Committer:  Jeff Garzik [EMAIL PROTECTED]
CommitDate: Tue Mar 6 04:04:30 2007 -0500

pata_legacy: fix io/irq mismatch

pata_legacy fails to detect the disk on my old ISA/VLB 486:
it starts to probe io=0x1f0 ctr=0x3f6 irq=15, complains
loudly about IDENTIFYs timing out, and finally fails.
(Sorry I couldn't capture the kernel's boot messages.)

It turns out that the driver's mapping from io to irq in
legacy_irq[] is wrong: index 0 for io=0x1f0 has irq=15 but
should have irq=14, and index 1 for io=0x170 has irq=14 but
should have irq=15. This is confirmed by a comparison with
include/asm-i386/ide.h:ide_default_irq().

This patch swaps the first two elements in legacy_irq[],
which makes pata_legacy work on my 486.

Signed-off-by: Mikael Pettersson [EMAIL PROTECTED]
Signed-off-by: Jeff Garzik [EMAIL PROTECTED]
---
 drivers/ata/pata_legacy.c |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/ata/pata_legacy.c b/drivers/ata/pata_legacy.c
index fc5b73d..86fbcd6 100644
--- a/drivers/ata/pata_legacy.c
+++ b/drivers/ata/pata_legacy.c
@@ -69,7 +69,7 @@
 #define NR_HOST 6
 
 static int legacy_port[NR_HOST] = { 0x1f0, 0x170, 0x1e8, 0x168, 0x1e0, 0x160 };
-static int legacy_irq[NR_HOST] = { 15, 14, 11, 10, 8, 12 };
+static int legacy_irq[NR_HOST] = { 14, 15, 11, 10, 8, 12 };
 
 struct legacy_data {
unsigned long timing;
-
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


Revert [PATCH] LOG2: Alter get_order() so that it can make use of ilog2() on a constant

2007-03-06 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=38f3323037de22bb0089d08be27be01196e7148b
Commit: 38f3323037de22bb0089d08be27be01196e7148b
Parent: 5d6deb940f880140fbcf5ec42e92534e78785e99
Author: Linus Torvalds [EMAIL PROTECTED]
AuthorDate: Tue Mar 6 19:38:01 2007 -0800
Committer:  Linus Torvalds [EMAIL PROTECTED]
CommitDate: Tue Mar 6 19:38:01 2007 -0800

Revert [PATCH] LOG2: Alter get_order() so that it can make use of ilog2() 
on a constant

This reverts commit 39d61db0edb34d60b83c5e0d62d0e906578cc707.

The commit was buggy in multiple ways:
 - the conversion to ilog2() was incorrect to begin with
 - it tested the wrong #defines, so on all architectures but FRV you'd
   never see the bug except for constant arguments.
 - the new get_order() macro used its arguments multiple times, and
   didn't even parenthesize them properly
 - despite the comments, it was not true that you could use it for
   constant initializers, since not all architectures even use the
   generic page.h header file.

All of the problems are individually fixable, but it all boils down to:
better just revert it, and re-do it from scratch.

Cc: David Howells [EMAIL PROTECTED]
Cc: Benjamin Herrenschmidt [EMAIL PROTECTED]
Cc: Paul Mackerras [EMAIL PROTECTED]
Cc: Andrew Morton [EMAIL PROTECTED]
Signed-off-by: Linus Torvalds [EMAIL PROTECTED]
---
 include/asm-generic/page.h |   38 --
 1 files changed, 4 insertions(+), 34 deletions(-)

diff --git a/include/asm-generic/page.h b/include/asm-generic/page.h
index b55052c..a96b5d9 100644
--- a/include/asm-generic/page.h
+++ b/include/asm-generic/page.h
@@ -4,51 +4,21 @@
 #ifdef __KERNEL__
 #ifndef __ASSEMBLY__
 
-#include linux/log2.h
+#include linux/compiler.h
 
-/*
- * non-const pure 2^n version of get_order
- * - the arch may override these in asm/bitops.h if they can be implemented
- *   more efficiently than using the arch log2 routines
- * - we use the non-const log2() instead if the arch has defined one suitable
- */
-#ifndef ARCH_HAS_GET_ORDER
-static inline __attribute__((const))
-int __get_order(unsigned long size, int page_shift)
+/* Pure 2^n version of get_order */
+static __inline__ __attribute_const__ int get_order(unsigned long size)
 {
-#if BITS_PER_LONG == 32  defined(ARCH_HAS_ILOG2_U32)
-   int order = __ilog2_u32(size) - page_shift;
-   return order = 0 ? order : 0;
-#elif BITS_PER_LONG == 64  defined(ARCH_HAS_ILOG2_U64)
-   int order = __ilog2_u64(size) - page_shift;
-   return order = 0 ? order : 0;
-#else
int order;
 
-   size = (size - 1)  (page_shift - 1);
+   size = (size - 1)  (PAGE_SHIFT - 1);
order = -1;
do {
size = 1;
order++;
} while (size);
return order;
-#endif
 }
-#endif
-
-/**
- * get_order - calculate log2(pages) to hold a block of the specified size
- * @n - size
- *
- * calculate allocation order based on the current page size
- * - this can be used to initialise global variables from constant data
- */
-#define get_order(n)   \
-(  \
-   __builtin_constant_p(n) ?   \
-   ((n  (1UL  PAGE_SHIFT)) ? 0 : ilog2(n) - PAGE_SHIFT) :   \
-   __get_order(n, PAGE_SHIFT)  \
- )
 
 #endif /* __ASSEMBLY__ */
 #endif /* __KERNEL__ */
-
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


ahci: RAID mode SATA patch for Intel ICH9M

2007-03-06 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=8af12cdb7c4aa9ed278ed71a8b5b130f2d8c8920
Commit: 8af12cdb7c4aa9ed278ed71a8b5b130f2d8c8920
Parent: c3442e296517aee733d62fc3fe03211598902c7d
Author: Jason Gaston [EMAIL PROTECTED]
AuthorDate: Fri Mar 2 17:39:46 2007 -0800
Committer:  Jeff Garzik [EMAIL PROTECTED]
CommitDate: Tue Mar 6 04:04:30 2007 -0500

ahci: RAID mode SATA patch for Intel ICH9M

This patch adds the Intel ICH9M RAID controller DID for SATA support.

Signed-off-by:  Jason Gaston [EMAIL PROTECTED]
Signed-off-by: Jeff Garzik [EMAIL PROTECTED]
---
 drivers/ata/ahci.c |1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/drivers/ata/ahci.c b/drivers/ata/ahci.c
index 43cc43d..dc7b562 100644
--- a/drivers/ata/ahci.c
+++ b/drivers/ata/ahci.c
@@ -389,6 +389,7 @@ static const struct pci_device_id ahci_pci_tbl[] = {
{ PCI_VDEVICE(INTEL, 0x2929), board_ahci_pi }, /* ICH9M */
{ PCI_VDEVICE(INTEL, 0x292a), board_ahci_pi }, /* ICH9M */
{ PCI_VDEVICE(INTEL, 0x292b), board_ahci_pi }, /* ICH9M */
+   { PCI_VDEVICE(INTEL, 0x292c), board_ahci_pi }, /* ICH9M */
{ PCI_VDEVICE(INTEL, 0x292f), board_ahci_pi }, /* ICH9M */
{ PCI_VDEVICE(INTEL, 0x294d), board_ahci_pi }, /* ICH9 */
{ PCI_VDEVICE(INTEL, 0x294e), board_ahci_pi }, /* ICH9M */
-
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


[S390] kprobes breaks BUG_ON

2007-03-06 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=f794c8279d02ccd69429d816eb03fa12c130d06d
Commit: f794c8279d02ccd69429d816eb03fa12c130d06d
Parent: c3442e296517aee733d62fc3fe03211598902c7d
Author: Martin Schwidefsky [EMAIL PROTECTED]
AuthorDate: Mon Mar 5 23:35:38 2007 +0100
Committer:  Martin Schwidefsky [EMAIL PROTECTED]
CommitDate: Mon Mar 5 23:35:38 2007 +0100

[S390] kprobes breaks BUG_ON

The illegal operation handler calls the die notifier with DIE_BPT to
let kprobes pick up its breakpoint. If kprobes does not find its
breakpoint it returns NOTIFY_STOP instead of NOTIFY_DONE.
Since we use stop_machine_run on s390 to arm/disarm the kprobes
breakpoints the race that kprobe_handler tries to solve by checking
for the kprobes breakpoints does not exist. Removing the check makes
BUG_ON working again.

Signed-off-by: Martin Schwidefsky [EMAIL PROTECTED]
---
 arch/s390/kernel/kprobes.c |   21 +++--
 1 files changed, 7 insertions(+), 14 deletions(-)

diff --git a/arch/s390/kernel/kprobes.c b/arch/s390/kernel/kprobes.c
index a466bab..8af549e 100644
--- a/arch/s390/kernel/kprobes.c
+++ b/arch/s390/kernel/kprobes.c
@@ -337,21 +337,14 @@ static int __kprobes kprobe_handler(struct pt_regs *regs)
}
 
p = get_kprobe(addr);
-   if (!p) {
-   if (*addr != BREAKPOINT_INSTRUCTION) {
-   /*
-* The breakpoint instruction was removed right
-* after we hit it.  Another cpu has removed
-* either a probepoint or a debugger breakpoint
-* at this address.  In either case, no further
-* handling of this interrupt is appropriate.
-*
-*/
-   ret = 1;
-   }
-   /* Not one of ours: let kernel handle it */
+   if (!p)
+   /*
+* No kprobe at this address. The fault has not been
+* caused by a kprobe breakpoint. The race of breakpoint
+* vs. kprobe remove does not exist because on s390 we
+* use stop_machine_run to arm/disarm the breakpoints.
+*/
goto no_kprobe;
-   }
 
kcb-kprobe_status = KPROBE_HIT_ACTIVE;
set_current_kprobe(p, regs, kcb);
-
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


[S390] smp: disable preemption in smp_call_function/smp_call_function_on

2007-03-06 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=25864162c15e61b494aa619974a4d521270362f7
Commit: 25864162c15e61b494aa619974a4d521270362f7
Parent: f794c8279d02ccd69429d816eb03fa12c130d06d
Author: Heiko Carstens [EMAIL PROTECTED]
AuthorDate: Mon Mar 5 23:35:41 2007 +0100
Committer:  Martin Schwidefsky [EMAIL PROTECTED]
CommitDate: Mon Mar 5 23:35:41 2007 +0100

[S390] smp: disable preemption in smp_call_function/smp_call_function_on

Avoid sprinkling a _lot_ of preempt_disable/preempt_enable pairs.
This would be necessary for e.g. the iucv driver. Also this way we
are more consistent with other architectures which disable
preemption at least for smp_call_function.

Signed-off-by: Heiko Carstens [EMAIL PROTECTED]
Signed-off-by: Martin Schwidefsky [EMAIL PROTECTED]
---
 arch/s390/kernel/smp.c |   15 ---
 1 files changed, 8 insertions(+), 7 deletions(-)

diff --git a/arch/s390/kernel/smp.c b/arch/s390/kernel/smp.c
index ecaa432..97764f7 100644
--- a/arch/s390/kernel/smp.c
+++ b/arch/s390/kernel/smp.c
@@ -94,10 +94,9 @@ static void __smp_call_function_map(void (*func) (void 
*info), void *info,
int cpu, local = 0;
 
/*
-* Can deadlock when interrupts are disabled or if in wrong context,
-* caller must disable preemption
+* Can deadlock when interrupts are disabled or if in wrong context.
 */
-   WARN_ON(irqs_disabled() || in_irq() || preemptible());
+   WARN_ON(irqs_disabled() || in_irq());
 
/*
 * Check for local function call. We have to have the same call order
@@ -152,17 +151,18 @@ out:
  * Run a function on all other CPUs.
  *
  * You must not call this function with disabled interrupts or from a
- * hardware interrupt handler. Must be called with preemption disabled.
- * You may call it from a bottom half.
+ * hardware interrupt handler. You may call it from a bottom half.
  */
 int smp_call_function(void (*func) (void *info), void *info, int nonatomic,
  int wait)
 {
cpumask_t map;
 
+   preempt_disable();
map = cpu_online_map;
cpu_clear(smp_processor_id(), map);
__smp_call_function_map(func, info, nonatomic, wait, map);
+   preempt_enable();
return 0;
 }
 EXPORT_SYMBOL(smp_call_function);
@@ -178,16 +178,17 @@ EXPORT_SYMBOL(smp_call_function);
  * Run a function on one processor.
  *
  * You must not call this function with disabled interrupts or from a
- * hardware interrupt handler. Must be called with preemption disabled.
- * You may call it from a bottom half.
+ * hardware interrupt handler. You may call it from a bottom half.
  */
 int smp_call_function_on(void (*func) (void *info), void *info, int nonatomic,
  int wait, int cpu)
 {
cpumask_t map = CPU_MASK_NONE;
 
+   preempt_disable();
cpu_set(cpu, map);
__smp_call_function_map(func, info, nonatomic, wait, map);
+   preempt_enable();
return 0;
 }
 EXPORT_SYMBOL(smp_call_function_on);
-
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


[S390] reipl: move dump_prefix_page out of text section.

2007-03-06 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=c5dd8586707800cd7bbdefcd675ad7d3c9afcd57
Commit: c5dd8586707800cd7bbdefcd675ad7d3c9afcd57
Parent: 25864162c15e61b494aa619974a4d521270362f7
Author: Heiko Carstens [EMAIL PROTECTED]
AuthorDate: Mon Mar 5 23:35:43 2007 +0100
Committer:  Martin Schwidefsky [EMAIL PROTECTED]
CommitDate: Mon Mar 5 23:35:43 2007 +0100

[S390] reipl: move dump_prefix_page out of text section.

Reipl doesn't work on older machines were s390_reset_machine() gets
called. The reason is that the text section is read-only but the
variable dump_prefix_page is there. Since s390_reset_machine() writes
to it we get a protection exception.
Therefore move dump_prefix_page to the bss section.

Signed-off-by: Heiko Carstens [EMAIL PROTECTED]
Signed-off-by: Martin Schwidefsky [EMAIL PROTECTED]
---
 arch/s390/kernel/ipl.c |4 ++--
 arch/s390/kernel/reipl.S   |   13 +++--
 arch/s390/kernel/reipl64.S |   13 +
 include/asm-s390/ipl.h |1 +
 4 files changed, 19 insertions(+), 12 deletions(-)

diff --git a/arch/s390/kernel/ipl.c b/arch/s390/kernel/ipl.c
index 5a863a3..d125a4e 100644
--- a/arch/s390/kernel/ipl.c
+++ b/arch/s390/kernel/ipl.c
@@ -1066,7 +1066,7 @@ static void do_reset_calls(void)
reset-fn();
 }
 
-extern __u32 dump_prefix_page;
+u32 dump_prefix_page;
 
 void s390_reset_system(void)
 {
@@ -1078,7 +1078,7 @@ void s390_reset_system(void)
lc-panic_stack = S390_lowcore.panic_stack;
 
/* Save prefix page address for dump case */
-   dump_prefix_page = (unsigned long) lc;
+   dump_prefix_page = (u32)(unsigned long) lc;
 
/* Disable prefixing */
set_prefix(0);
diff --git a/arch/s390/kernel/reipl.S b/arch/s390/kernel/reipl.S
index c3f4d9b..2f481cc 100644
--- a/arch/s390/kernel/reipl.S
+++ b/arch/s390/kernel/reipl.S
@@ -8,6 +8,10 @@
 
 #include asm/lowcore.h
 
+#
+# do_reipl_asm
+# Parameter: r2 = schid of reipl device
+#
.globl  do_reipl_asm
 do_reipl_asm:  basr%r13,0
 .Lpg0: lpsw.Lnewpsw-.Lpg0(%r13)
@@ -16,12 +20,12 @@ do_reipl_asm:   basr%r13,0
stm %r0,%r15,__LC_GPREGS_SAVE_AREA
stctl   %c0,%c15,__LC_CREGS_SAVE_AREA
stam%a0,%a15,__LC_AREGS_SAVE_AREA
-   mvc __LC_PREFIX_SAVE_AREA(4),dump_prefix_page-.Lpg0(%r13)
+   l   %r10,.Ldump_pfx-.Lpg0(%r13)
+   mvc __LC_PREFIX_SAVE_AREA(4),0(%r10)
stckc   .Lclkcmp-.Lpg0(%r13)
mvc __LC_CLOCK_COMP_SAVE_AREA(8),.Lclkcmp-.Lpg0(%r13)
stpt__LC_CPU_TIMER_SAVE_AREA
st  %r13, __LC_PSW_SAVE_AREA+4
-
lctl%c6,%c6,.Lall-.Lpg0(%r13)
lr  %r1,%r2
mvc __LC_PGM_NEW_PSW(8),.Lpcnew-.Lpg0(%r13)
@@ -55,6 +59,7 @@ do_reipl_asm: basr%r13,0
.align  8
 .Lclkcmp:  .quad   0x
 .Lall: .long   0xff00
+.Ldump_pfx:.long   dump_prefix_page
.align  8
 .Lnewpsw:  .long   0x0008,0x8000+.Lpg1
 .Lpcnew:   .long   0x0008,0x8000+.Lecs
@@ -79,7 +84,3 @@ do_reipl_asm: basr%r13,0
.long   0x,0x
.long   0x,0x
.long   0x,0x
-   .globl dump_prefix_page
-dump_prefix_page:
-   .long 0x
-
diff --git a/arch/s390/kernel/reipl64.S b/arch/s390/kernel/reipl64.S
index dbb3eed..c419304 100644
--- a/arch/s390/kernel/reipl64.S
+++ b/arch/s390/kernel/reipl64.S
@@ -8,6 +8,12 @@
  */
 
 #include asm/lowcore.h
+
+#
+# do_reipl_asm
+# Parameter: r2 = schid of reipl device
+#
+
.globl  do_reipl_asm
 do_reipl_asm:  basr%r13,0
 .Lpg0: lpswe   .Lnewpsw-.Lpg0(%r13)
@@ -20,7 +26,8 @@ do_reipl_asm: basr%r13,0
stg %r0,__LC_GPREGS_SAVE_AREA-0x1000+8(%r1)
stctg   %c0,%c15,__LC_CREGS_SAVE_AREA-0x1000(%r1)
stam%a0,%a15,__LC_AREGS_SAVE_AREA-0x1000(%r1)
-   mvc 
__LC_PREFIX_SAVE_AREA-0x1000(4,%r1),dump_prefix_page-.Lpg0(%r13)
+   lg  %r10,.Ldump_pfx-.Lpg0(%r13)
+   mvc __LC_PREFIX_SAVE_AREA-0x1000(4,%r1),0(%r10)
stfpc   __LC_FP_CREG_SAVE_AREA-0x1000(%r1)
stckc   .Lclkcmp-.Lpg0(%r13)
mvc 
__LC_CLOCK_COMP_SAVE_AREA-0x1000(8,%r1),.Lclkcmp-.Lpg0(%r13)
@@ -64,6 +71,7 @@ do_reipl_asm: basr%r13,0
.align  8
 .Lclkcmp:  .quad   0x
 .Lall: .quad   0xff00
+.Ldump_pfx:.quad   dump_prefix_page
 .Lregsave: .quad   0x
.align  16
 /*
@@ -103,6 +111,3 @@ do_reipl_asm:   basr%r13,0
.long   0x,0x
.long   0x,0x
.long   

[S390] nss: disable kexec.

2007-03-06 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=9c9c17613a78545a4a93b1370924f62eb282c903
Commit: 9c9c17613a78545a4a93b1370924f62eb282c903
Parent: c5dd8586707800cd7bbdefcd675ad7d3c9afcd57
Author: Heiko Carstens [EMAIL PROTECTED]
AuthorDate: Mon Mar 5 23:35:45 2007 +0100
Committer:  Martin Schwidefsky [EMAIL PROTECTED]
CommitDate: Mon Mar 5 23:35:45 2007 +0100

[S390] nss: disable kexec.

nss and kexec don't work together since kexec wants to write to the
read-only text section of the shared kernel image.

Signed-off-by: Heiko Carstens [EMAIL PROTECTED]
Signed-off-by: Martin Schwidefsky [EMAIL PROTECTED]
---
 arch/s390/Kconfig|2 ++
 arch/s390/kernel/machine_kexec.c |5 +
 2 files changed, 7 insertions(+), 0 deletions(-)

diff --git a/arch/s390/Kconfig b/arch/s390/Kconfig
index d9425f5..0f293aa 100644
--- a/arch/s390/Kconfig
+++ b/arch/s390/Kconfig
@@ -376,6 +376,8 @@ config SHARED_KERNEL
  Select this option, if you want to share the text segment of the
  Linux kernel between different VM guests. This reduces memory
  usage with lots of guests but greatly increases kernel size.
+ Also if a kernel was IPL'ed from a shared segment the kexec system
+ call will not work.
  You should only select this option if you know what you are
  doing and want to exploit this feature.
 
diff --git a/arch/s390/kernel/machine_kexec.c b/arch/s390/kernel/machine_kexec.c
index 52f57af..3c77dd3 100644
--- a/arch/s390/kernel/machine_kexec.c
+++ b/arch/s390/kernel/machine_kexec.c
@@ -19,6 +19,7 @@
 #include asm/system.h
 #include asm/smp.h
 #include asm/reset.h
+#include asm/ipl.h
 
 typedef void (*relocate_kernel_t)(kimage_entry_t *, unsigned long);
 
@@ -29,6 +30,10 @@ int machine_kexec_prepare(struct kimage *image)
 {
void *reboot_code_buffer;
 
+   /* Can't replace kernel image since it is read-only. */
+   if (ipl_flags  IPL_NSS_VALID)
+   return -ENOSYS;
+
/* We don't support anything but the default image type for now. */
if (image-type != KEXEC_TYPE_DEFAULT)
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


[S390] tape: Compression overwrites crypto setting

2007-03-06 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=4925c7e22293dbf2b85351e8c2323ad8282396b3
Commit: 4925c7e22293dbf2b85351e8c2323ad8282396b3
Parent: 9c9c17613a78545a4a93b1370924f62eb282c903
Author: Michael Holzheu [EMAIL PROTECTED]
AuthorDate: Mon Mar 5 23:35:47 2007 +0100
Committer:  Martin Schwidefsky [EMAIL PROTECTED]
CommitDate: Mon Mar 5 23:35:47 2007 +0100

[S390] tape: Compression overwrites crypto setting

After switching compression on/off with the mt command, tape encryption is 
no
longer working. The reason for that is, that the modeset_byte is set to
the compression value instead of using bitwise and/or bit operations to
enable/disable the corresponding bit.

Signed-off-by: Michael Holzheu [EMAIL PROTECTED]
Signed-off-by: Martin Schwidefsky [EMAIL PROTECTED]
---
 drivers/s390/char/tape_std.c |5 -
 1 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/drivers/s390/char/tape_std.c b/drivers/s390/char/tape_std.c
index 7a76ec4..2a1af4e 100644
--- a/drivers/s390/char/tape_std.c
+++ b/drivers/s390/char/tape_std.c
@@ -647,7 +647,10 @@ tape_std_mtcompression(struct tape_device *device, int 
mt_count)
return PTR_ERR(request);
request-op = TO_NOP;
/* setup ccws */
-   *device-modeset_byte = (mt_count == 0) ? 0x00 : 0x08;
+   if (mt_count == 0)
+   *device-modeset_byte = ~0x08;
+   else
+   *device-modeset_byte |= 0x08;
tape_ccw_cc(request-cpaddr, MODE_SET_DB, 1, device-modeset_byte);
tape_ccw_end(request-cpaddr + 1, NOP, 0, NULL);
/* execute it */
-
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


[S390] check_bugs() should be inline.

2007-03-06 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=5ea732fba7cf1ccded5e762f219a892be4d8d8dc
Commit: 5ea732fba7cf1ccded5e762f219a892be4d8d8dc
Parent: 4925c7e22293dbf2b85351e8c2323ad8282396b3
Author: Heiko Carstens [EMAIL PROTECTED]
AuthorDate: Mon Mar 5 23:35:50 2007 +0100
Committer:  Martin Schwidefsky [EMAIL PROTECTED]
CommitDate: Mon Mar 5 23:35:50 2007 +0100

[S390] check_bugs() should be inline.

Don't have functions in header files unless they are inline.

Signed-off-by: Heiko Carstens [EMAIL PROTECTED]
Signed-off-by: Martin Schwidefsky [EMAIL PROTECTED]
---
 include/asm-s390/bugs.h |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/include/asm-s390/bugs.h b/include/asm-s390/bugs.h
index 2c36596..011f1e6 100644
--- a/include/asm-s390/bugs.h
+++ b/include/asm-s390/bugs.h
@@ -16,7 +16,7 @@
  *  void check_bugs(void);
  */
 
-static void __init check_bugs(void)
+static inline void check_bugs(void)
 {
   /* s390 has no bugs ... */
 }
-
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   >