linux-2.6
16 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc-2.6
Linus Torvalds [Mon, 17 Dec 2007 16:43:02 +0000 (08:43 -0800)] 
Merge git://git./linux/kernel/git/davem/sparc-2.6

* git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc-2.6:
  [SPARC32]: Silence sparc32 warnings on missing syscalls.
  [SPARC64]: Fix two kernel linear mapping setup bugs.

16 years agoMerge branch 'for-linus' of git://git390.osdl.marist.edu/pub/scm/linux-2.6
Linus Torvalds [Mon, 17 Dec 2007 16:42:23 +0000 (08:42 -0800)] 
Merge branch 'for-linus' of git://git390.osdl.marist.edu/linux-2.6

* 'for-linus' of git://git390.osdl.marist.edu/pub/scm/linux-2.6:
  [S390] pud_present/pmd_present bug.

16 years agoMerge branch 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc
Linus Torvalds [Mon, 17 Dec 2007 16:41:56 +0000 (08:41 -0800)] 
Merge branch 'merge' of git://git./linux/kernel/git/paulus/powerpc

* 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc:
  [POWERPC] Make PS3_SYS_MANAGER default y, not m
  [POWERPC] Fix rounding bug in emulation for double float operating
  [POWERPC] iSeries: don't printk with HV spinlock held
  [POWERPC] 82xx: mpc8272ads, pq2fads: Update defconfig with CONFIG_FS_ENET_MDIO_FCC
  [POWRPC] CPM2: Eliminate section mismatch warning in cpm2_reset().
  [POWERPC] Kill non-existent symbols from ksyms and commproc.h
  [POWERPC] Fix typo #ifdef -> #ifndef

16 years agoMerge branch 'upstream' of git://ftp.linux-mips.org/pub/scm/upstream-linus
Linus Torvalds [Mon, 17 Dec 2007 16:41:25 +0000 (08:41 -0800)] 
Merge branch 'upstream' of git://ftp.linux-mips.org/upstream-linus

* 'upstream' of git://ftp.linux-mips.org/pub/scm/upstream-linus:
  [MIPS] Ensure that ST0_FR is never set on a 32 bit kernel
  [MIPS] time: Delete weak definition of plat_time_init() due to gcc bug.
  [MIPS] PCI: Make pcibios_fixup_device_resources ignore legacy resources.
  [MIPS] Atlas, Malta: Don't free firmware memory on free_initmem.
  [MIPS] Alchemy: fix off by two error in __fixup_bigphys_addr()
  [MIPS] Alchemy: fix PCI resource conflict
  [MIPS] time: Set up Cobalt's mips_hpt_frequency

16 years ago[S390] pud_present/pmd_present bug.
Martin Schwidefsky [Mon, 17 Dec 2007 15:25:48 +0000 (16:25 +0100)] 
[S390] pud_present/pmd_present bug.

Git commit 3610cce87af0693603db171d5b6f6735f5e3dc5b (yeah my own :-/)
introduced a bug in regard to pud/pmd table entries.
If the address of the page table refered to by a pud/pmd value happens
to have zeroes in the lower 32 bits, pud_present and pmd_present return
false. The obvious effect is that this triggers the BUG_ON in exit_mmap
because some ptes will not get released on process end.  Worse is that
the next fault for memory covered by that pud/pmd will allocate another
pmd/pte table and populate the pud/pmd entry. The old page table
entries hanging below this entry are lost!

The fix is simple, properly check against 0. The check is added for
pud_none/pmd_none as well even if these two functions work because
the invalid bit is in the lower 32 bits.

Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
16 years agoPull bugzilla-9362 into release branch
Len Brown [Fri, 14 Dec 2007 20:14:52 +0000 (15:14 -0500)] 
Pull bugzilla-9362 into release branch

16 years agoACPI: SBS: Return rate in mW if capacity in mWh
Alexey Starikovskiy [Sat, 8 Dec 2007 10:02:46 +0000 (13:02 +0300)] 
ACPI: SBS: Return rate in mW if capacity in mWh

klaptopd assumes rate to be in same units as capacity.

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

Signed-off-by: Alexey Starikovskiy <astarikovskiy@suse.de>
Signed-off-by: Len Brown <len.brown@intel.com>
16 years agoACPI: SBS: Ignore alarms coming from unknown devices
Alexey Starikovskiy [Sat, 8 Dec 2007 10:02:40 +0000 (13:02 +0300)] 
ACPI: SBS: Ignore alarms coming from unknown devices

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

Signed-off-by: Alexey Starikovskiy <astarikovskiy@suse.de>
Signed-off-by: Len Brown <len.brown@intel.com>
16 years agoACPI: SBS: Reset alarm bit
Alexey Starikovskiy [Sat, 8 Dec 2007 10:02:33 +0000 (13:02 +0300)] 
ACPI: SBS: Reset alarm bit

Alarm bit should be cleared in order for other alarms to be sent.
http://bugzilla.kernel.org/show_bug.cgi?id=9362

Signed-off-by: Alexey Starikovskiy <astarikovskiy@suse.de>
Signed-off-by: Len Brown <len.brown@intel.com>
16 years agoPull hotplug into release branch
Len Brown [Fri, 14 Dec 2007 19:54:09 +0000 (14:54 -0500)] 
Pull hotplug into release branch

16 years ago[SPARC32]: Silence sparc32 warnings on missing syscalls.
Martin Habets [Fri, 14 Dec 2007 18:59:50 +0000 (10:59 -0800)] 
[SPARC32]: Silence sparc32 warnings on missing syscalls.

Silence sparc32 warnings on missing syscalls, these won't be added.
This patch is based on this mail:
http://www.mail-archive.com/linux-arch@vger.kernel.org/msg02571.html

Signed-off-by: Martin Habets <errandir_news@mph.eclipse.co.uk>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[MIPS] Ensure that ST0_FR is never set on a 32 bit kernel
Chris Dearman [Thu, 13 Dec 2007 22:42:19 +0000 (22:42 +0000)] 
[MIPS] Ensure that ST0_FR is never set on a 32 bit kernel

Signed-off-by: Chris Dearman <chris@mips.com>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
16 years ago[MIPS] time: Delete weak definition of plat_time_init() due to gcc bug.
Ralf Baechle [Fri, 14 Dec 2007 00:05:34 +0000 (00:05 +0000)] 
[MIPS] time: Delete weak definition of plat_time_init() due to gcc bug.

Frank Rowand <frank.rowand@am.sony.com> reports:

> In linux-2.6.24-rc4 the Toshiba RBTX4927 hangs on boot.
>
> The cause is that plat_time_init() from arch/mips/tx4927/common/
> tx4927_setup.c does not override the __weak plat_time_init() from
> arch/mips/kernel/time.c.  This is due to a compiler bug in gcc 4.1.1.  The
> bug is reported to not exist in earlier versions of gcc, and to be fixed in
> 4.1.2.  The problem is that the __weak plat_time_init() is empty and thus
> gets optimized out of existence (thus the linker is never given the option
> to replace the __weak function).

[ He meant the call to plat_time_init() from time_init() gets optimized away ]

> For more info on the gcc bug see
>
>    http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27781
>
> The attached patch is one workaround.  Another possible workaround

[ His patch adds -fno-unit-at-a-time for time.c ]

> would be to change the __weak plat_time_init() to be a non-empty
> function.

The __weak definition of plat_time_init was only ever meant to be a
migration helper to keep platforms that don't have a plat_time_init
compiling.  A few greps says that all platforms now supply their own
plat_time_init() so the weak definition is no longer needed.  So I
instead delete it.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
16 years ago[MIPS] PCI: Make pcibios_fixup_device_resources ignore legacy resources.
Ralf Baechle [Tue, 11 Dec 2007 19:49:24 +0000 (19:49 +0000)] 
[MIPS] PCI: Make pcibios_fixup_device_resources ignore legacy resources.

There might be other reasons why a resource might be marked as fixed
such as a PCI UART holding the system console but until we use
IORESOURCE_PCI_FIXED that way also this will work.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
16 years ago[MIPS] Atlas, Malta: Don't free firmware memory on free_initmem.
Ralf Baechle [Tue, 11 Dec 2007 19:38:12 +0000 (19:38 +0000)] 
[MIPS] Atlas, Malta: Don't free firmware memory on free_initmem.

A proper fix for this needs to turn a few MIPS-generic bits which I
don't want at this stage.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
16 years ago[MIPS] Alchemy: fix off by two error in __fixup_bigphys_addr()
Sergei Shtylyov [Mon, 10 Dec 2007 17:36:50 +0000 (20:36 +0300)] 
[MIPS] Alchemy: fix off by two error in __fixup_bigphys_addr()

the PCI specific code in this function doesn't check for the address range
being under the upper bound of the PCI memory window correctly -- fix this,
somewhat beautifying the code around the check, while at it...

Signed-off-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
16 years ago[MIPS] Alchemy: fix PCI resource conflict
Sergei Shtylyov [Mon, 10 Dec 2007 17:28:51 +0000 (20:28 +0300)] 
[MIPS] Alchemy: fix PCI resource conflict

... by getting the PCI resources back into the 32-bit range -- there's no
need therefore for CONFIG_RESOURCES_64BIT either. This makes Alchemy PCI
work again while currently the kernel skips the bus scan.

Signed-off-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
16 years ago[MIPS] time: Set up Cobalt's mips_hpt_frequency
Yoichi Yuasa [Sun, 9 Dec 2007 12:22:04 +0000 (21:22 +0900)] 
[MIPS] time: Set up Cobalt's mips_hpt_frequency

Signed-off-by: Yoichi Yuasa <yoichi_yuasa@tripeaks.co.jp>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
16 years agoMerge branch 'for-2.6.24' of master.kernel.org:/pub/scm/linux/kernel/git/galak/powerp...
Paul Mackerras [Fri, 14 Dec 2007 05:46:50 +0000 (16:46 +1100)] 
Merge branch 'for-2.6.24' of /linux/kernel/git/galak/powerpc into merge

16 years ago[POWERPC] Make PS3_SYS_MANAGER default y, not m
Michael Ellerman [Mon, 10 Dec 2007 04:17:43 +0000 (15:17 +1100)] 
[POWERPC] Make PS3_SYS_MANAGER default y, not m

Currently it's impossible to build a ps3_defconfig which will reboot
without modules installed. This makes it all too easy to find yourself
with a PS3 that won't reboot.

This is because the system manager driver, which provides the reboot
mechanism, is only selectable if PS3_ADVANCED is set, else it defaults
to m. In ps3_defconfig PS3_ADVANCED is not set, therefore the system
manager is built as a module.

It would be desirable IMHO for the defconfig to produce a kernel that
boots and reboots, without needing modules to be installed.

Signed-off-by: Michael Ellerman <michael@ellerman.id.au>
Acked-by: Geoff Levand <geoffrey.levand@am.sony.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
16 years ago[POWERPC] Fix rounding bug in emulation for double float operating
Liu Yu [Mon, 10 Dec 2007 05:00:52 +0000 (13:00 +0800)] 
[POWERPC] Fix rounding bug in emulation for double float operating

This patch fixes rounding bug in emulation for double float operating on PowerPC platform.

When pack double float operand, it need to truncate the tail due to the limited precision.
If the truncated part is not zero, the last bit of work bit (totally 3 bits) need to '|' 1.

This patch is completed in _FP_FRAC_SRS_2(X,N,sz) (arch/powerpc/math-emu/op-2.h).
Originally the code leftwards rotates the operand to just keep the truncated part,
then check whether it is zero. However, the number it rotates is not correct when
N is not smaller than _FP_W_TYPE_SIZE, and it will cause the work bit '|' 1 in the improper case.

This patch fixes this issue.

Signed-off-by: Liu Yu <b13201@freescale.com>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
16 years ago[POWERPC] iSeries: don't printk with HV spinlock held
Stephen Rothwell [Wed, 12 Dec 2007 03:58:12 +0000 (14:58 +1100)] 
[POWERPC] iSeries: don't printk with HV spinlock held

Printk was observed to hang during module unload due to a limited
window of characters that may be sent to the hypervisor.  The window
only reexpands when we receive an ack from the HV and the spinlock here
prevents us from ever processing that ack.  This fixes it by dropping
the lock before doing the printk, then looping back to the top to
reacquire the lock.

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Paul Mackerras <paulus@samba.org>
16 years ago[POWERPC] 82xx: mpc8272ads, pq2fads: Update defconfig with CONFIG_FS_ENET_MDIO_FCC
Scott Wood [Mon, 10 Dec 2007 17:10:45 +0000 (11:10 -0600)] 
[POWERPC] 82xx: mpc8272ads, pq2fads: Update defconfig with CONFIG_FS_ENET_MDIO_FCC

This was recently made configurable, and needs to be set for these boards.

Signed-off-by: Scott Wood <scottwood@freescale.com>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
16 years ago[POWRPC] CPM2: Eliminate section mismatch warning in cpm2_reset().
Scott Wood [Wed, 12 Dec 2007 22:54:32 +0000 (16:54 -0600)] 
[POWRPC] CPM2: Eliminate section mismatch warning in cpm2_reset().

Signed-off-by: Scott Wood <scottwood@freescale.com>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
16 years ago[POWERPC] Kill non-existent symbols from ksyms and commproc.h
Jochen Friedrich [Thu, 22 Nov 2007 16:53:54 +0000 (17:53 +0100)] 
[POWERPC] Kill non-existent symbols from ksyms and commproc.h

Remove exports of __res and cpm_install_handler/cpm_free_handler.  Remove
cpm_install_handler/cpm_free_handler from the commproc.h as well.  Both
were used for ARCH=ppc and aren't defined for ARCH=powerpc.

CC      arch/powerpc/kernel/ppc_ksyms.o
arch/powerpc/kernel/ppc_ksyms.c:180: error: '__res' undeclared here (not in a function)
arch/powerpc/kernel/ppc_ksyms.c:180: warning: type defaults to 'int' in declaration of '__res'
make[1]: *** [arch/powerpc/kernel/ppc_ksyms.o] Error 1
make: *** [arch/powerpc/kernel] Error 2

LD      .tmp_vmlinux1
arch/powerpc/kernel/built-in.o:(__ksymtab+0x198): undefined reference to `cpm_free_handler'
arch/powerpc/kernel/built-in.o:(__ksymtab+0x1a0): undefined reference to `cpm_install_handler'
make: *** [.tmp_vmlinux1] Error 1

Signed-off-by: Jochen Friedrich <jochen@scram.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Vitaly Bordug <vitb@kernel.crashing.org>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
16 years ago[POWERPC] Fix typo #ifdef -> #ifndef
Jochen Friedrich [Thu, 22 Nov 2007 16:53:47 +0000 (17:53 +0100)] 
[POWERPC] Fix typo #ifdef -> #ifndef

fpi->cp_command should be overwritten only if CONFIG_PPC_CPM_NEW_BINDING
is NOT set. Otherwise it is already set from the device tree.

Signed-off-by: Jochen Friedrich <jochen@scram.de>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Jeff Garzik <jeff@garzik.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Vitaly Bordug <vitb@kernel.crashing.org>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
16 years agoPull battery-2.6.24 into release branch
Len Brown [Fri, 14 Dec 2007 03:16:14 +0000 (22:16 -0500)] 
Pull battery-2.6.24 into release branch

16 years agoPull thinkpad-2.6.24 into release branch
Len Brown [Fri, 14 Dec 2007 03:12:38 +0000 (22:12 -0500)] 
Pull thinkpad-2.6.24 into release branch

16 years agoACPI: thinkpad-acpi: fix lenovo keymap for brightness
Henrique de Moraes Holschuh [Thu, 13 Dec 2007 14:14:09 +0000 (12:14 -0200)] 
ACPI: thinkpad-acpi: fix lenovo keymap for brightness

Starting in 2.6.23...

Several reports from X60 users complained that the default Lenovo keymap
issuing EV_KEY KEY_BRIGHTNESS_UP/DOWN input events caused major issues when
the proper brightness support through ACPI video.c was loaded.

Therefore, remove the generation of these events by default, which is the
right thing for T60, X60, R60, T61, X61 and R61 with their latest BIOSes.

Distros that want to misuse these events into OSD reporting (which requires
an ugly hack from hell in HAL) are welcome to set up the key map they need
through HAL.  That way, we don't break everyone else's systems.

Signed-off-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br>
Signed-off-by: Len Brown <len.brown@intel.com>
16 years agoACPI: fix modpost warnings
Jan Beulich [Thu, 13 Dec 2007 08:32:26 +0000 (08:32 +0000)] 
ACPI: fix modpost warnings

for sn2_defconfig:

WARNING: vmlinux.o(.text+0x4b8601): Section mismatch: reference to .init.data:node_to_pxm_map (between '__acpi_map_pxm_to_node' and 'acpi_get_pxm')
WARNING: vmlinux.o(.text+0x4b8741): Section mismatch: reference to .init.data:pxm_to_node_map (between 'acpi_map_pxm_to_node' and 'acpi_get_node')

Signed-off-by: Jan Beulich <jbeulich@novell.com>
Signed-off-by: Len Brown <len.brown@intel.com>
16 years agoACPI: video_device_list corruption
William Lee Irwin III [Wed, 12 Dec 2007 11:56:55 +0000 (03:56 -0800)] 
ACPI: video_device_list corruption

The ->cap fields of struct acpi_video_device and struct acpi_video_bus
are 1B each, not 4B. The oversized memset()'s corrupted the subsequent
list_head fields. This resulted in silent corruption without
CONFIG_DEBUG_LIST and BUG's with it. This patch uses sizeof() to pass
the proper bounds to the memset() calls and thereby correct the bugs.

Signed-off-by: William Irwin <wli@holomorphy.com>
Acked-by: Mikael Pettersson <mikpe@it.uu.se>
Signed-off-by: Len Brown <len.brown@intel.com>
16 years ago[SPARC64]: Fix two kernel linear mapping setup bugs.
David S. Miller [Thu, 13 Dec 2007 14:13:38 +0000 (06:13 -0800)] 
[SPARC64]: Fix two kernel linear mapping setup bugs.

This was caught and identified by Greg Onufer.

Since we setup the 256M/4M bitmap table after taking over the trap
table, it's possible for some 4M mapping to get loaded in the TLB
beforhand which later will be 256M mappings.

This can cause illegal TLB multiple-match conditions.  Fix this by
setting up the bitmap before we take over the trap table.

Next, __flush_tlb_all() was not doing anything on hypervisor
platforms.  Fix by adding sun4v_mmu_demap_all() and calling it.

Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agoMerge master.kernel.org:/pub/scm/linux/kernel/git/davem/sparc-2.6
Linus Torvalds [Wed, 12 Dec 2007 17:52:12 +0000 (09:52 -0800)] 
Merge /pub/scm/linux/kernel/git/davem/sparc-2.6

* master.kernel.org:/pub/scm/linux/kernel/git/davem/sparc-2.6:
  [SPARC64]: Fix endless loop in cheetah_xcall_deliver().
  [SERIAL] sparc: Infrastructure to fix section mismatch bugs.

16 years agoMerge branch 'i2c-for-linus' of git://jdelvare.pck.nerim.net/jdelvare-2.6
Linus Torvalds [Wed, 12 Dec 2007 16:43:51 +0000 (08:43 -0800)] 
Merge branch 'i2c-for-linus' of git://jdelvare.pck.nerim.net/jdelvare-2.6

* 'i2c-for-linus' of git://jdelvare.pck.nerim.net/jdelvare-2.6:
  i2c/isp1301_omap: Build fix
  i2c: Add missing spaces in split log messages
  i2c-gpio: Initialize adapter class
  i2c: Delete an outdated piece of documentation

16 years ago[SPARC64]: Fix endless loop in cheetah_xcall_deliver().
David S. Miller [Wed, 12 Dec 2007 15:31:46 +0000 (07:31 -0800)] 
[SPARC64]: Fix endless loop in cheetah_xcall_deliver().

We need to mask out the proper bits when testing the dispatch status
register else we can see unrelated NACK bits from previous cross call
sends.

Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[SERIAL] sparc: Infrastructure to fix section mismatch bugs.
Martin Habets [Tue, 11 Dec 2007 11:37:04 +0000 (03:37 -0800)] 
[SERIAL] sparc: Infrastructure to fix section mismatch bugs.

This patch against 2.6.23 sparc-2.6.git contains a number of minor
cleanups of the sparc serial drivers.  Initially I fixed this build
warning:

WARNING: vmlinux.o(.text+0x107a2c): Section mismatch: reference to .init.text:add_preferred_console (between 'sunserial_console_match' and 'sunserial_console_termios')

which is done by declaring sunserial_console_match() as __init.  This
resulted in build warnings on sunserial_current_minor.  To resolve
these the variable was changed so it is no longer global, and to hide
operations on it inside 2 new functions. These functions handle the
UART minor handling code that is common to all sparc serial drivers.

These changes allowed to clean up the uart counters in all the sparc
serial drivers, and the administration of minor device numbers.

Lastly, sunserial_console_termios() does not need to be exported since
it is only called from non-modular code.

Sadly, the following build warning still exists:

WARNING: vmlinux.o(__ksymtab+0x2910): Section mismatch: reference to .init.text:sunserial_console_match (between '__ksymtab_sunserial_console_match' and '__ksymtab_sunserial_unregister_minors')

This could be resolved by not exporting sunserial_console_match(), but
this is not possible at the moment because it is being called from
modular code. On the other hand, this is a bogus warning since it
comes from a ksymtab section.

Signed-off-by: Martin Habets <errandir_news@mph.eclipse.co.uk>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agoi2c/isp1301_omap: Build fix
David Brownell [Wed, 12 Dec 2007 12:45:25 +0000 (13:45 +0100)] 
i2c/isp1301_omap: Build fix

Build fix to the isp1301_omap driver ... this driver gets built
more often in the OMAP tree than in mainline, partly because the
defconfig for H2 (plus probably H3 and H4) needs updating.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
16 years agoi2c: Add missing spaces in split log messages
Joe Perches [Wed, 12 Dec 2007 12:45:24 +0000 (13:45 +0100)] 
i2c: Add missing spaces in split log messages

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
16 years agoi2c-gpio: Initialize adapter class
Atsushi Nemoto [Wed, 12 Dec 2007 12:45:24 +0000 (13:45 +0100)] 
i2c-gpio: Initialize adapter class

This is required to let hwmon drivers attach to the adapter.

Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
16 years agoi2c: Delete an outdated piece of documentation
Jean Delvare [Wed, 12 Dec 2007 12:45:24 +0000 (13:45 +0100)] 
i2c: Delete an outdated piece of documentation

I'm amazed that this old piece of documentation managed to survive
until today.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
16 years agoV4L/DVB (6609): Re-adds lock safe videobuf_read_start
Mauro Carvalho Chehab [Fri, 16 Nov 2007 02:09:30 +0000 (23:09 -0300)] 
V4L/DVB (6609): Re-adds lock safe videobuf_read_start

videobuf_dvb needs videobuf_read_start. The EXPORT_SYMBOL_GPL() were removed by
a previous patch. However, videobuf_dvb needs this.

This patch re-adds videobuf_read_start, doing the proper lock.

Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
16 years agoRevert "make bnx2x select ZLIB_INFLATE"
Linus Torvalds [Wed, 12 Dec 2007 03:28:36 +0000 (19:28 -0800)] 
Revert "make bnx2x select ZLIB_INFLATE"

This reverts commit 70eba18b5664f90d7620905e005b89388e5fd94b, as per
Jeff Garzik:

   "That was meant for 2.6.25, and actually (due to patching) applied to
    a completely unrelated 2.6.24 net driver."

Noted-by: Roland Dreier <rdreier@cisco.com>
Requested-by: Jeff Garzik <jgarzik@pobox.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agoV4L/DVB (6797): bt8xx/ section fixes
Adrian Bunk [Tue, 11 Dec 2007 22:23:43 +0000 (19:23 -0300)] 
V4L/DVB (6797): bt8xx/ section fixes

This patch fixes the following section mismatch with CONFIG_HOTPLUG=n:

<--  snip  -->

...
...

<--  snip  -->

Signed-off-by: Adrian Bunk <bunk@kernel.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
16 years agoV4L/DVB (6796): ivtv/ section fix
Adrian Bunk [Tue, 11 Dec 2007 22:23:49 +0000 (19:23 -0300)] 
V4L/DVB (6796): ivtv/ section fix

This patch fixes the following section mismatch with CONFIG_HOTPLUG=n:

<--  snip  -->

...
...

<--  snip  -->

Signed-off-by: Adrian Bunk <bunk@kernel.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
16 years agoV4L/DVB (6794): Fix compilation when dib3000mc is compiled as a module
Mauro Carvalho Chehab [Tue, 11 Dec 2007 17:59:10 +0000 (14:59 -0300)] 
V4L/DVB (6794): Fix compilation when dib3000mc is compiled as a module

As reported by Andrew Morton:

> ERROR: "dibusb_dib3000mc_frontend_attach" [drivers/media/dvb/dvb-usb/dvb-usb-nova-t-usb2.ko] undefined!
> ERROR: "dibusb_dib3000mc_tuner_attach" [drivers/media/dvb/dvb-usb/dvb-usb-nova-t-usb2.ko] undefined!
> ERROR: "dibusb_dib3000mc_frontend_attach" [drivers/media/dvb/dvb-usb/dvb-usb-dibusb-mc.ko] undefined!
> ERROR: "dibusb_dib3000mc_tuner_attach" [drivers/media/dvb/dvb-usb/dvb-usb-dibusb-mc.ko] undefined!
> ERROR: "dibusb_dib3000mc_frontend_attach" [drivers/media/dvb/dvb-usb/dvb-usb-a800.ko] undefined!
> ERROR: "dibusb_dib3000mc_tuner_attach" [drivers/media/dvb/dvb-usb/dvb-usb-a800.ko] undefined

Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
16 years agoV4L/DVB (6733): DVB: Compile 3000MC-specific DIB code only for CONFIG_DVB_DIB3000MC
Jiri Kosina [Wed, 5 Dec 2007 18:14:19 +0000 (15:14 -0300)] 
V4L/DVB (6733): DVB: Compile 3000MC-specific DIB code only for CONFIG_DVB_DIB3000MC

On Tue, 4 Dec 2007, Ingo Molnar wrote:

>  drivers/built-in.o: In function `dibusb_dib3000mc_tuner_attach':
>  : undefined reference to `dib3000mc_get_tuner_i2c_master'
>  drivers/built-in.o: In function `dibusb_dib3000mc_tuner_attach':
>  : undefined reference to `dib3000mc_set_config'

Seems like -common part contains also code that is not completely
common to all the modules.

Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Tested-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
16 years agoV4L/DVB (6750): Fix in-kernel compilation for cxusb
Mauro Carvalho Chehab [Sat, 8 Dec 2007 12:34:37 +0000 (09:34 -0300)] 
V4L/DVB (6750): Fix in-kernel compilation for cxusb

cxusb needs tuner-xc2028*.h files, but Makefile is not adding its patch

drivers/media/dvb/dvb-usb/cxusb.c:33:26: error: tuner-xc2028.h: File not found
drivers/media/dvb/dvb-usb/cxusb.c:34:32: error: tuner-xc2028-types.h: File not found

Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
16 years agoV4L/DVB (6746): saa7134-dvb: fix tuning for WinTV HVR-1110
Benoit Istin [Fri, 7 Dec 2007 05:00:04 +0000 (02:00 -0300)] 
V4L/DVB (6746): saa7134-dvb: fix tuning for WinTV HVR-1110

There are several months my hvr1110 stop working.
This is very simple to fix, for my card revision at least, by setting a
missing field to the hauppauge_hvr_1110_config.

Signed-off-by: Benoit Istin <beistin@gmail.com>
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
16 years agoV4L/DVB (6751): V4L: Memory leak! Fix count in videobuf-vmalloc mmap
Brandon Philips [Sun, 9 Dec 2007 02:05:53 +0000 (23:05 -0300)] 
V4L/DVB (6751): V4L: Memory leak!  Fix count in videobuf-vmalloc mmap

This is pretty serious bug.  map->count is never initialized after the
call to kmalloc making the count start at some random trash value.  The
end result is leaking videobufs.

Also, fix up the debug statements to print unsigned values.

Pushed to http://ifup.org/hg/v4l-dvb too

Signed-off-by: Brandon Philips <bphilips@suse.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
16 years agoV4L/DVB (6690): saa7134: fix ignored interrupts
Heikki Lindholm [Fri, 30 Nov 2007 16:27:26 +0000 (13:27 -0300)] 
V4L/DVB (6690): saa7134: fix ignored interrupts

The saa7134 video driver starts dropping frames when used together with the
saa7134-alsa driver. Frames are dropped because when an audio event is waiting
the driver simply ignores the interrupt and passes it on to the saa7134-alsa
interrupt handler. The alsa interrupt handler in turn acknowledges all types
of events thus clearing the pending video events as well. Fix by only masking
out the audio event in the video interrupt handler and by only acknowledging
the audio event in the alsa driver.

Signed-off-by: Heikki Lindholm <holindho@cs.helsinki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
16 years agoV4L/DVB (6686): saa7134: fix composite over s-video input on the Tevion MD 9717
Hermann Pitton [Thu, 29 Nov 2007 00:50:26 +0000 (21:50 -0300)] 
V4L/DVB (6686): saa7134: fix composite over s-video input on the Tevion MD 9717

The vmux for composite over s-video input was wrong.

Signed-off-by: Hermann Pitton <hermann-pitton@arcor.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
16 years agoV4L/DVB (6684): Complement va_start() with va_end() + style fixes
Richard Knutsson [Tue, 27 Nov 2007 09:59:37 +0000 (06:59 -0300)] 
V4L/DVB (6684): Complement va_start() with va_end() + style fixes

Complement va_start() with va_end() + minor style fixes in the same function.

Signed-off-by: Richard Knutsson <ricknu-0@student.ltu.se>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
16 years agoV4L/DVB (6666): saa7134-alsa: fix period handling
Heikki Lindholm [Fri, 23 Nov 2007 21:59:18 +0000 (18:59 -0300)] 
V4L/DVB (6666): saa7134-alsa: fix period handling

The period handling in saa7134-alsa is broken in two ways. First, the
minimum number of periods of two does not work, because the dma is setup
two periods ahead in the irq handler. Fix the minimum to four periods.
Second, the code assumes that the number of periods is divisible by two,
which isn't always the case on ALSA. Fix by adding a constraint.

Signed-off-by: Heikki Lindholm <holindho@cs.helsinki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
16 years agoV4L/DVB (6629): zl10353: fix default adc_clock and TRL nominal rate calculation
Chris Pascoe [Mon, 19 Nov 2007 06:47:07 +0000 (03:47 -0300)] 
V4L/DVB (6629): zl10353: fix default adc_clock and TRL nominal rate calculation

The default adc_clock for the zl10353 is different from what was originally
thought to be the case and the TRL nominal rate formula was incorrect as a
result.  Use a better (and hopefully now correct) formula.

Signed-off-by: Chris Pascoe <c.pascoe@itee.uq.edu.au>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
16 years agoV4L/DVB (6615): V4L: Fix VIDIOCGMBUF locking in saa7146
Brandon Philips [Mon, 19 Nov 2007 18:10:48 +0000 (15:10 -0300)] 
V4L/DVB (6615): V4L: Fix  VIDIOCGMBUF locking in saa7146

Fallout from videobuf_mmap_setup() locking fixes.

Signed-off-by: Brandon Philips <bphilips@suse.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
16 years agoV4L/DVB (6602): V4L: Convert videobuf drivers to videobuf_stop
Brandon Philips [Tue, 13 Nov 2007 23:11:26 +0000 (20:11 -0300)] 
V4L/DVB (6602): V4L: Convert videobuf drivers to videobuf_stop

Drivers were using cookie cutter code for stopping the read/stream.  Use the
new videobuf_stop function which is lock safe.

Signed-off-by: Brandon Philips <bphilips@suse.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
16 years agoV4L/DVB (6601): V4L: videobuf-core locking fixes and comments
Brandon Philips [Tue, 13 Nov 2007 23:05:38 +0000 (20:05 -0300)] 
V4L/DVB (6601): V4L: videobuf-core locking fixes and comments

- Add comments to functions that require that caller hold q->lock
- Add __videobuf_mmap_free that doesn't hold q->lock for use within videobuf
- Add locking to videobuf_mmap_free
- Fix linux/drivers/media/common/saa7146_video.c which was holding lock around
  videobuf_read_stop
- Add locking to functions that operate on a queue
- Add videobuf_stop to take care of stopping in both the read and stream case

TODO: bttv still has an unsafe call to videobuf_queue_is_busy

Signed-off-by: Brandon Philips <bphilips@suse.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
16 years agoV4L/DVB (6581): Fix: avoids negative vma usage count
Mauro Carvalho Chehab [Sat, 10 Nov 2007 13:26:20 +0000 (10:26 -0300)] 
V4L/DVB (6581): Fix: avoids negative vma usage count

Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
16 years agoV4L/DVB (6579): Fix bug #8824: Correct support for Diseqc on tda10086
Hartmut Hackmann [Thu, 8 Nov 2007 11:54:53 +0000 (08:54 -0300)] 
V4L/DVB (6579): Fix bug #8824: Correct support for Diseqc on tda10086

This is a modified version of a patch previously posted by Thomas
Unverzagt.

Signed-off-by: Hartmut Hackmann <hartmut.hackmann@t-online.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
16 years agoV4L/DVB (6542): Fix S-video mode on tvp5150
Mauro Carvalho Chehab [Sun, 4 Nov 2007 01:40:24 +0000 (22:40 -0300)] 
V4L/DVB (6542): Fix S-video mode on tvp5150

Thanks to Markus Reichberger to point this.

Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
16 years agoV4L/DVB (6540): em28xx: fix failing autodetection after the reboot
Sascha Sommer [Sat, 3 Nov 2007 19:48:01 +0000 (16:48 -0300)] 
V4L/DVB (6540): em28xx: fix failing autodetection after the reboot

The attached patch is required so that the autodetecion code also works after
a reboot.

Setting the I2C speed does not seem to be supported for em2800.

Signed-off-by: Sascha Sommer <saschasommer@freenet.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
16 years agoV4L/DVB (6485): ivtv: fix compile warning
Hans Verkuil [Tue, 30 Oct 2007 07:16:35 +0000 (04:16 -0300)] 
V4L/DVB (6485): ivtv: fix compile warning

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
16 years ago[IPSEC]: Fix potential dst leak in xfrm_lookup
Herbert Xu [Tue, 11 Dec 2007 12:38:08 +0000 (04:38 -0800)] 
[IPSEC]: Fix potential dst leak in xfrm_lookup

If we get an error during the actual policy lookup we don't free the
original dst while the caller expects us to always free the original
dst in case of error.

This patch fixes that.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[VLAN]: Fix potential race in vlan_cleanup_module vs vlan_ioctl_handler.
Pavel Emelyanov [Tue, 11 Dec 2007 10:41:25 +0000 (02:41 -0800)] 
[VLAN]: Fix potential race in vlan_cleanup_module vs vlan_ioctl_handler.

The vlan module cleanup function starts with

vlan_netlink_fini();
vlan_ioctl_set(NULL);

The first call removes all the vlan devices and
the second one closes the vlan ioctl.

AFAIS there's a tiny race window between these two
calls - after rtnl unregistered all the vlans, but
the ioctl handler isn't set to NULL yet, user can
manage to call this ioctl and create one vlan device,
and that this function will later BUG_ON seeing
non-emply hashes.

I think, that we must first close the vlan ioctl
and only after this remove all the vlans with the
vlan_netlink_fini() call.

Signed-off-by: Pavel Emelyanov <xemul@openvz.org>
Acked-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[NET]: Fix wrong comments for unregister_net*
Wang Chen [Tue, 11 Dec 2007 10:28:03 +0000 (02:28 -0800)] 
[NET]: Fix wrong comments for unregister_net*

There are some return value comments for void functions.
Fixed it.

Signed-off-by: Wang Chen <wangchen@cn.fujitsu.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[BNX2]: Update version to 1.6.9.
Michael Chan [Tue, 11 Dec 2007 01:18:51 +0000 (17:18 -0800)] 
[BNX2]: Update version to 1.6.9.

Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[BNX2]: Fix RX packet rot.
Michael Chan [Tue, 11 Dec 2007 01:18:37 +0000 (17:18 -0800)] 
[BNX2]: Fix RX packet rot.

Packets can be left in the RX ring if the NAPI budget is reached.
This is caused by storing the latest rx index at the beginning of
bnx2_rx_int().  We may not process all the work up to this index
if the budget is reached and so some packets in the RX ring may rot
when we later check for more work using this stored rx index.

The fix is to not store this latest hw index and only store the
processed rx index.  We use a new function bnx2_get_hw_rx_cons()
to fetch the latest hw rx index.

Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[BNX2]: Add PHY_DIS_EARLY_DAC workaround.
Michael Chan [Tue, 11 Dec 2007 01:18:23 +0000 (17:18 -0800)] 
[BNX2]: Add PHY_DIS_EARLY_DAC workaround.

5709 Ax and Bx chips all need this workaround.

Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[S390]: Fix use of skb after netif_rx
Julia Lawall [Tue, 11 Dec 2007 01:17:37 +0000 (17:17 -0800)] 
[S390]: Fix use of skb after netif_rx

Recently, Wang Chen submitted a patch
(d30f53aeb31d453a5230f526bea592af07944564) to move a call to netif_rx(skb)
after a subsequent reference to skb, because netif_rx may call kfree_skb on
its argument.  netif_rx_ni calls netif_rx, so the same problem occurs in
the files below.

I have left the updating of dev->last_rx after the calls to netif_rx_ni
because it seems time dependent, but moved the other field updates before.

This was found using the following semantic match.
(http://www.emn.fr/x-info/coccinelle/)

// <smpl>
@@
expression skb, e,e1;
@@

(
 netif_rx(skb);
|
 netif_rx_ni(skb);
)
  ... when != skb = e
(
  skb = e1
|
* skb
)
// </smpl>

Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[XTENSA]: Fix use of skb after netif_rx
Julia Lawall [Tue, 11 Dec 2007 01:16:56 +0000 (17:16 -0800)] 
[XTENSA]: Fix use of skb after netif_rx

Recently, Wang Chen submitted a patch
(d30f53aeb31d453a5230f526bea592af07944564) to move a call to netif_rx(skb)
after a subsequent reference to skb, because netif_rx may call kfree_skb on
its argument.  The same problem occurs in some other drivers as well.

This was found using the following semantic match.
(http://www.emn.fr/x-info/coccinelle/)

// <smpl>
@@
expression skb, e,e1;
@@

(
 netif_rx(skb);
|
 netif_rx_ni(skb);
)
  ... when != skb = e
(
  skb = e1
|
* skb
)
// </smpl>

Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[UM]: Fix use of skb after netif_rx
Julia Lawall [Tue, 11 Dec 2007 01:14:46 +0000 (17:14 -0800)] 
[UM]: Fix use of skb after netif_rx

Recently, Wang Chen submitted a patch
(d30f53aeb31d453a5230f526bea592af07944564) to move a call to netif_rx(skb)
after a subsequent reference to skb, because netif_rx may call kfree_skb on
its argument.  The same problem occurs in some other drivers as well.

This was found using the following semantic match.
(http://www.emn.fr/x-info/coccinelle/)

// <smpl>
@@
expression skb, e,e1;
@@

(
 netif_rx(skb);
|
 netif_rx_ni(skb);
)
  ... when != skb = e
(
  skb = e1
|
* skb
)
// </smpl>

Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[IPv6] ESP: Discard dummy packets introduced in rfc4303
Thomas Graf [Tue, 11 Dec 2007 00:53:29 +0000 (16:53 -0800)] 
[IPv6] ESP: Discard dummy packets introduced in rfc4303

RFC4303 introduces dummy packets with a nexthdr value of 59
to implement traffic confidentiality. Such packets need to
be dropped silently and the payload may not be attempted to
be parsed as it consists of random chunk.

Signed-off-by: Thomas Graf <tgraf@suug.ch>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[IPv4] ESP: Discard dummy packets introduced in rfc4303
Thomas Graf [Tue, 11 Dec 2007 00:53:05 +0000 (16:53 -0800)] 
[IPv4] ESP: Discard dummy packets introduced in rfc4303

RFC4303 introduces dummy packets with a nexthdr value of 59
to implement traffic confidentiality. Such packets need to
be dropped silently and the payload may not be attempted to
be parsed as it consists of random chunk.

Signed-off-by: Thomas Graf <tgraf@suug.ch>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[IPV4]: Swap the ifa allocation with the"ipv4_devconf_setall" call
Pavel Emelyanov [Sat, 8 Dec 2007 07:55:43 +0000 (23:55 -0800)] 
[IPV4]: Swap the ifa allocation with the"ipv4_devconf_setall" call

According to Herbert, the ipv4_devconf_setall should be called
only when the ifa is added to the device. However, failed
ifa allocation may bring things into inconsistent state.

Move the call to ipv4_devconf_setall after the ifa allocation.

Fits both net-2.6 (with offsets) and net-2.6.25 (cleanly).

Signed-off-by: Pavel Emelyanov <xemul@openvz.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[IPV6] XFRM: Fix auditing rt6i_flags; use RTF_xxx flags instead of RTCF_xxx.
YOSHIFUJI Hideaki [Sat, 8 Dec 2007 07:50:40 +0000 (23:50 -0800)] 
[IPV6] XFRM: Fix auditing rt6i_flags; use RTF_xxx flags instead of RTCF_xxx.

RTCF_xxx flags, defined in include/linux/in_route.h) are available for
IPv4 route (rtable) entries only.  Use RTF_xxx flags instead, defined
in include/linux/ipv6_route.h, for IPv6 route entries (rt6_info).

Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agoLinux 2.6.24-rc5 v2.6.24-rc5
Linus Torvalds [Tue, 11 Dec 2007 03:48:43 +0000 (19:48 -0800)] 
Linux 2.6.24-rc5

16 years agoxen: relax signature check
Jeremy Fitzhardinge [Mon, 10 Dec 2007 21:00:41 +0000 (13:00 -0800)] 
xen: relax signature check

Some versions of Xen 3.x set their magic number to "xen-3.[12]", so
relax the test to match them.

Signed-off-by: Jeremy Fitzhardinge <jeremy@xensource.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agoMerge branch 'upstream' of git://ftp.linux-mips.org/pub/scm/upstream-linus
Linus Torvalds [Tue, 11 Dec 2007 03:45:17 +0000 (19:45 -0800)] 
Merge branch 'upstream' of git://ftp.linux-mips.org/upstream-linus

* 'upstream' of git://ftp.linux-mips.org/pub/scm/upstream-linus:
  [MIPS] Malta: Enable tickless and highres timers.
  [MIPS] Bigsur: Enable tickless and and highres timers.
  qemu: do not enable IP7 blindly
  [MIPS] Alchemy: Fix Au1x SD controller IRQ
  [MIPS] Don't byteswap writes to display when running bigendian

16 years agoproc: remove/Fix proc generic d_revalidate
Eric W. Biederman [Mon, 10 Dec 2007 23:49:36 +0000 (15:49 -0800)] 
proc: remove/Fix proc generic d_revalidate

Ultimately to implement /proc perfectly we need an implementation of
d_revalidate because files and directories can be removed behind the back
of the VFS, and d_revalidate is the only way we can let the VFS know that
this has happened.

Unfortunately the linux VFS can not cope with anything in the path to a
mount point going away.  So a proper d_revalidate method that calls d_drop
also needs to call have_submounts which is moderately expensive, so you
really don't want a d_revalidate method that unconditionally calls it, but
instead only calls it when the backing object has really gone away.

proc generic entries only disappear on module_unload (when not counting the
fledgling network namespace) so it is quite rare that we actually encounter
that case and has not actually caused us real world trouble yet.

So until we get a proper test for keeping dentries in the dcache fix the
current d_revalidate method by completely removing it.  This returns us to
the current status quo.

So with CONFIG_NETNS=n things should look as they have always looked.

For CONFIG_NETNS=y things work most of the time but there are a few rare
corner cases that don't behave properly.  As the network namespace is
barely present in 2.6.24 this should not be a problem.

Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
Cc: "Rafael J. Wysocki" <rjw@sisk.pl>
Cc: Pavel Emelyanov <xemul@openvz.org>
Cc: "David S. Miller" <davem@davemloft.net>
Cc: Herbert Xu <herbert@gondor.apana.org.au>
Cc: Alexey Dobriyan <adobriyan@gmail.com>
Cc: Trond Myklebust <trond.myklebust@fys.uio.no>
Cc: "Denis V. Lunev" <den@openvz.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agoatmel_spi: reload RCR before TCR
Rini van Zetten [Mon, 10 Dec 2007 23:49:34 +0000 (15:49 -0800)] 
atmel_spi: reload RCR before TCR

We have a wifi module connected to the spi bus and got sometimes FIFO
overrun errors on the spi bus.

After some investigation i found that the driver loads the TCR (transmit
count) register before the RCR (receive count).  When the transfer list is
not empty the atmel_spi_next_message is called while tx and rx are enabled.
 As soon as the TCR is loaded, hardware starts transfer and causes a rx
fifo overrun because the RCR is not loaded yet.

Load the RCR before the TCR.  After this patch the fifo overrun disapears
at out setup.

Signed-off-by: Haavard Skinnemoen <hskinnemoen@atmel.com>
Signed-off-by: Rini van Zetten <rini@arvoo.nl>
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agoMAINTAINERS: update stale entries
Joe Perches [Mon, 10 Dec 2007 23:49:32 +0000 (15:49 -0800)] 
MAINTAINERS: update stale entries

Some bad email addresses are removed:

        linux-tr@linuxtr.net
        ehaase@inf.fu-berlin.de

Some are updated:

        linux@maxim.org.za to andrew@sanpeople.com
        linux-kernel@linux-mips.org to linux-mips@linux-mips.org
        jdike@karaya.com to jdike@addtoit.com

The PCMCIA entry is corrected to a web address

The ZR36120 VIDEO FOR LINUX DRIVER entry is removed

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agoesp_scsi: fix reset cleanup spinlock recursion
Maciej W. Rozycki [Mon, 10 Dec 2007 23:49:31 +0000 (15:49 -0800)] 
esp_scsi: fix reset cleanup spinlock recursion

The esp_reset_cleanup() function is called with the host lock held and
invokes starget_for_each_device() which wants to take it too.  Here is a
fix along the lines of shost_for_each_device()/__shost_for_each_device()
adding a __starget_for_each_device() counterpart which assumes the lock
has already been taken.

Eventually, I think the driver should get modified so that more work is
done as a softirq rather than in the interrupt context, but for now it
fixes a bug that causes the spinlock debugger to fire.

While at it, it fixes a small number of cosmetic problems with
starget_for_each_device() too.

Signed-off-by: Maciej W. Rozycki <macro@linux-mips.org>
Acked-by: David S. Miller <davem@davemloft.net>
Cc: James Bottomley <James.Bottomley@steeleye.com>
Cc: <stable@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agoFix NULL dereference in umem.c
Neil Brown [Mon, 10 Dec 2007 23:49:30 +0000 (15:49 -0800)] 
Fix NULL dereference in umem.c

Fix NULL dereference in umem.c

Signed-off-by: Neil Brown <neilb@suse.de>
Tested-by: Dave Chinner <dgc@sgi.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agodrivers/serial/uartlite.c: Add missing of_node_put
Julia Lawall [Mon, 10 Dec 2007 23:49:28 +0000 (15:49 -0800)] 
drivers/serial/uartlite.c: Add missing of_node_put

There should be an of_node_put when breaking out of a loop that iterates
using for_each_compatible_node.

This was detected and fixed using the following semantic patch.
(http://www.emn.fr/x-info/coccinelle/)

// <smpl>
@@
identifier d;
type T;
expression e;
iterator for_each_compatible_node;
@@

T *d;
...
for_each_compatible_node(d,...)
  {... when != of_node_put(d)
       when != e = d
(
   return d;
|
+  of_node_put(d);
?  return ...;
)
...}
// </smpl>

Signed-off-by: Julia Lawall <julia@diku.dk>
Acked-by: Grant Likely <grant.likely@secretlab.ca>
Acked-by: Peter Korsgaard <jacmet@sunsite.dk>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agohugetlb: handle write-protection faults in follow_hugetlb_page
Adam Litke [Mon, 10 Dec 2007 23:49:28 +0000 (15:49 -0800)] 
hugetlb: handle write-protection faults in follow_hugetlb_page

The follow_hugetlb_page() fix I posted (merged as git commit
5b23dbe8173c212d6a326e35347b038705603d39) missed one case.  If the pte is
present, but not writable and write access is requested by the caller to
get_user_pages(), the code will do the wrong thing.  Rather than calling
hugetlb_fault to make the pte writable, it notes the presence of the pte
and continues.

This simple one-liner makes sure we also fault on the pte for this case.
Please apply.

Signed-off-by: Adam Litke <agl@us.ibm.com>
Acked-by: Dave Kleikamp <shaggy@us.ibm.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agospi_imx: fix typo in description
Will Newton [Mon, 10 Dec 2007 23:49:27 +0000 (15:49 -0800)] 
spi_imx: fix typo in description

Signed-off-by: Will Newton <will.newton@gmail.com>
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agospi_bfin5xx: fix typo in description
Will Newton [Mon, 10 Dec 2007 23:49:26 +0000 (15:49 -0800)] 
spi_bfin5xx: fix typo in description

Signed-off-by: Will Newton <will.newton@gmail.com>
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agopxa2xx_spi: fix typo in description
Will Newton [Mon, 10 Dec 2007 23:49:25 +0000 (15:49 -0800)] 
pxa2xx_spi: fix typo in description

Signed-off-by: Will Newton <will.newton@gmail.com>
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agoasm-h8300: parentheses around definition CLOCK_TICK_RATE
Roel Kluin [Mon, 10 Dec 2007 23:49:24 +0000 (15:49 -0800)] 
asm-h8300: parentheses around definition CLOCK_TICK_RATE

Some places where CLOCK_TICK_RATE may be used incorrectly:

arch/arm/mach-mx3/time.c:125:   __raw_writel((v / CLOCK_TICK_RATE) - 1, MXC_GPT_GPTPR);
drivers/watchdog/davinci_wdt.c:103:     timer_margin = (((u64)heartbeat * CLOCK_TICK_RATE) & 0xffffffff);
drivers/watchdog/davinci_wdt.c:105:     timer_margin = (((u64)heartbeat * CLOCK_TICK_RATE) >> 32);
drivers/watchdog/ks8695_wdt.c:64:       unsigned long tval = wdt_time * CLOCK_TICK_RATE;

I'm not sure whether this definition is used there, but adding parentheses
should be good anyway.

Signed-off-by: Roel Kluin <12o3l@tiscali.nl>
Cc: Yoshinori Sato <ysato@users.sourceforge.jp>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agopcmcia: fix kernel-doc comments
Randy Dunlap [Mon, 10 Dec 2007 23:49:22 +0000 (15:49 -0800)] 
pcmcia: fix kernel-doc comments

Fix kernel-doc comments in drivers/pcmcia/:

- ti113x.h does not contain kernel-doc, so don't use /** to begin a doc
  comment
- yenta_socket.c: remove /** on non-kernel-doc comments;
  escape the ':' in an "http:" comment so that it won't be treated as a
  section heading;
- cs.c: remove /** on non-kernel-doc comments & add function parameter info
- ds.c: fix function parameter info

Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agorevert "dpt_i2o: convert to SCSI hotplug model"
Andrew Morton [Mon, 10 Dec 2007 23:49:20 +0000 (15:49 -0800)] 
revert "dpt_i2o: convert to SCSI hotplug model"

revert

    commit 55d9fcf57ba5ec427544fca7abc335cf3da78160
    Author: Matthew Wilcox <matthew@wil.cx>
    Date:   Mon Jul 30 15:19:18 2007 -0600

        [SCSI] dpt_i2o: convert to SCSI hotplug model

         - Delete refereces to HOSTS_C
         - Switch to module_init/module_exit instead of detect/release
         - Don't pass around the host template and rename it to adpt_template
         - Switch from scsi_register/scsi_unregister to scsi_host_alloc,
           scsi_add_host, scsi_scan_host and scsi_host_put.

Because it caused (for unknown reasons) Andres' all-data-reads-as-zeroes
problem, reported at
http://groups.google.com/group/fa.linux.kernel/msg/083a9acff0330234

Cc: Matthew Wilcox <matthew@wil.cx>
Cc: "Salyzyn, Mark" <mark_salyzyn@adaptec.com>
Cc: James Bottomley <James.Bottomley@SteelEye.com>
Acked-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Cc: Anders Henke <anders.henke@1und1.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Cc: <stable@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agoaoe: properly initialise the request_queue's backing_dev_info
Andrew Morton [Mon, 10 Dec 2007 23:49:13 +0000 (15:49 -0800)] 
aoe: properly initialise the request_queue's backing_dev_info

AOE forgot to initialise its queue's backing_dev_info, so kernels crash.
(http://bugzilla.kernel.org/show_bug.cgi?id=9482)

Fix that and consoldate aoeblk_gdalloc()'s error handling.

Thanks be to Jon for reporting and testing.

Cc: "Ed L. Cashin" <ecashin@coraid.com>
Cc: <stable@kernel.org>
Cc: "Jon Nelson" <jnelson@jamponi.net>
Acked-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ieee1394...
Linus Torvalds [Mon, 10 Dec 2007 22:47:11 +0000 (14:47 -0800)] 
Merge branch 'for-linus' of git://git./linux/kernel/git/ieee1394/linux1394-2.6

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ieee1394/linux1394-2.6:
  firewire: OHCI 1.0 Isochronous Receive support

16 years agoMerge branch 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/aegl/linux-2.6
Linus Torvalds [Mon, 10 Dec 2007 22:40:46 +0000 (14:40 -0800)] 
Merge branch 'release' of git://git./linux/kernel/git/aegl/linux-2.6

* 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/aegl/linux-2.6:
  [IA64] Fix iosapic interrupt delivery mode for CPE
  [IA64] kprobe: make kreturn probe handler stack unwind correct
  [IA64] operator priority fix in acpi_map_lsapic()
  [IA64] Add missing "space" to concatenated strings
  [IA64] make full use of macro efi_md_size
  [IA64] rename _bss to __bss_start
  [IA64] SGI Altix : fix bug in sn_io_late_init()
  [IA64] iosapic cleanup
  [IA64] signal : fix missing error checkings
  [IA64] export copy_page() to modules
  [IA64] don't assume that unwcheck.py is executable
  [IA64] increase .data.patch offset

16 years agofirewire: OHCI 1.0 Isochronous Receive support
Jarod Wilson [Mon, 3 Dec 2007 18:43:12 +0000 (13:43 -0500)] 
firewire: OHCI 1.0 Isochronous Receive support

Third rendition of FireWire OHCI 1.0 Isochronous Receive support, using a
zer-copy method similar to OHCI 1.1 which puts the IR data payload directly
into the userspace buffer. The zero-copy implementation eliminates the
video artifacts, audio popping, and buffer underrun problems seen with
version 1 of this patch, as well as fixing a regression in OHCI 1.1 support
introduced by version 2 of this patch.

Successfully tested in OHCI 1.1 mode on the following chipsets:

- NEC uPD72847 (rev 01), OHCI 1.1 (PCI)
- Ti XIO2200(A) (rev 01), OHCI 1.1 (PCIe)
- Ti TSB41AB2 (rev 01), OHCI 1.1 (PCI on SB Audigy)
- Apple UniNorth 2 (rev 81), OHCI 1.1 (PowerBook G4 onboard)

Successfully tested in OHCI 1.0 mode on the following chipsets:

- Agere FW323 (rev 06), OHCI 1.0 (Mac Mini onboard)
- Agere FW323 (rev 06), OHCI 1.0 (PCI)
- Via VT6306 (rev 46), OHCI 1.0 (PCI)
- NEC OrangeLink (rev 01), OHCI 1.0 (PCI)
- NEC uPD72847 (rev 01), OHCI 1.1 (PCI)
- Ti XIO2200(A) (rev 01), OHCI 1.1 (PCIe)

The bulk of testing was done in an x86_64 system, but was also successfully
sanity-tested on other systems, including a PPC(32) PowerBook G4 and an i686
EPIA M10k. Crude benchmarking (watching top during capture) puts the cpu
utilization during capture on the EPIA's 1GHz Via C3 processor around 13%,
which is down from 30% with the v1 code.

Some implementation details:

To maintain the same userspace API as dual-buffer mode, we set up two
descriptors for every incoming packet. The first is an INPUT_MORE descriptor,
pointing to a buffer large enough to hold just the packet's iso headers,
immediately followed by an INPUT_LAST descriptor, pointing to a chunk of the
userspace buffer big enough for the packet's data payload. With this setup,
each incoming packet fills in these two descriptors in a manner that very
closely emulates dual-buffer receive, to the point where the bulk of the
handle_ir_* code is now identical between the two (and probably primed for
some restructuring to share code between them).

The only caveat I have at the moment is that neither of my OHCI 1.0 Via
VT6307-based FireWire controllers work particularly well with this code
for reasons I have yet to figure out.

Signed-off-by: Jarod Wilson <jwilson@redhat.com>
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
16 years agoMerge branch 'for-linus' of git://oss.sgi.com:8090/xfs/xfs-2.6
Linus Torvalds [Mon, 10 Dec 2007 18:18:27 +0000 (10:18 -0800)] 
Merge branch 'for-linus' of git://oss.sgi.com:8090/xfs/xfs-2.6

* 'for-linus' of git://oss.sgi.com:8090/xfs/xfs-2.6:
  [XFS] Fix xfs_ichgtime()s broken usage of I_SYNC
  [XFS] Make xfsbufd threads freezable
  [XFS] revert to double-buffering readdir
  [XFS] Fix broken inode cluster setup.
  [XFS] Clear XBF_READ_AHEAD flag on I/O completion.
  [XFS] Fixed a few bugs in xfs_buf_associate_memory()
  [XFS] 971064 Various fixups for xfs_bulkstat().
  [XFS] Fix dbflush panic in xfs_qm_sync.

16 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/sam/fix-kbuild
Linus Torvalds [Mon, 10 Dec 2007 18:17:07 +0000 (10:17 -0800)] 
Merge git://git./linux/kernel/git/sam/fix-kbuild

* git://git.kernel.org/pub/scm/linux/kernel/git/sam/fix-kbuild:
  kbuild: fix building with O=.. options
  kbuild: fix building with redirected output.

16 years agoRevert "PCI: fix IDE legacy mode resources"
Linus Torvalds [Mon, 10 Dec 2007 15:40:54 +0000 (07:40 -0800)] 
Revert "PCI: fix IDE legacy mode resources"

This reverts commit fd6e732186ab522c812ab19c2c5e5befb8ec8115, which
helped up things on MIPS, but was wrong for everything else.  As Ralf
Baechle puts it:

  "It seems the whole MIPS resource managment is complicated enough (out
   of necessity) that only a few people actually grok it.  Ioports being
   actually memory mapped on MIPS only makes the confusion worse, sigh."

Requested-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Acked-by: Alan Cox <alan@redhat.com>
Acked-by: Ralf Baechle <ralf@linux-mips.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agopowerpc: Fix IDE legacy vs. native fixups
Benjamin Herrenschmidt [Mon, 10 Dec 2007 04:29:22 +0000 (15:29 +1100)] 
powerpc: Fix IDE legacy vs. native fixups

PowerMac and CHRP/BriQ platforms have quirks to switch some IDE
controllers from legacy mode to fully native mode. Those quirks
however will not work properly anymore due to a change to the
generic code to better handle legacy IDE resources.

This fixes it by moving those quirk to "early" quirks (so they
run before resources are probed for the devices) and clearing
all BARs after the conversion to force a reallocation of sane
values.

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Acked-by: Alan Cox <alan@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years ago[XFS] Fix xfs_ichgtime()s broken usage of I_SYNC
David Chinner [Fri, 7 Dec 2007 03:09:11 +0000 (14:09 +1100)] 
[XFS] Fix xfs_ichgtime()s broken usage of I_SYNC

The recent I_LOCK->I_SYNC changes mistakenly changed xfs_ichgtime to look
at I_SYNC instead of I_LOCK. This was incorrect and prevents newly created
inodes from moving to the dirty list. Change this to the correct check
which is for I_NEW, not I_LOCK or I_SYNC so that behaviour is correct.

SGI-PV: 974225
SGI-Modid: xfs-linux-melb:xfs-kern:30204a

Signed-off-by: David Chinner <dgc@sgi.com>
Signed-off-by: Lachlan McIlroy <lachlan@sgi.com>