]> err.no Git - linux-2.6/log
linux-2.6
16 years agoKVM: MMU: Fix is_empty_shadow_page() check
Avi Kivity [Tue, 20 May 2008 13:21:13 +0000 (16:21 +0300)]
KVM: MMU: Fix is_empty_shadow_page() check

The check is only looking at one of two possible empty ptes.

Signed-off-by: Avi Kivity <avi@qumranet.com>
16 years agoKVM: MMU: Fix printk() format string
Avi Kivity [Tue, 20 May 2008 13:21:58 +0000 (16:21 +0300)]
KVM: MMU: Fix printk() format string

Signed-off-by: Avi Kivity <avi@qumranet.com>
16 years agoKVM: IOAPIC: only set remote_irr if interrupt was injected
Marcelo Tosatti [Thu, 5 Jun 2008 03:08:11 +0000 (00:08 -0300)]
KVM: IOAPIC: only set remote_irr if interrupt was injected

There's a bug in the IOAPIC code for level-triggered interrupts. Its
relatively easy to trigger by sharing (virtio-blk + usbtablet was the
testcase, initially reported by Gerd von Egidy).

The "remote_irr" variable is used to indicate accepted but not yet acked
interrupts. Its cleared from the EOI handler.

Problem is that the EOI handler clears remote_irr unconditionally, even
if it reinjected another pending interrupt.

In that case, kvm_ioapic_set_irq() proceeds to ioapic_service() which
sets remote_irr even if it failed to inject (since the IRR was high due
to EOI reinjection).

Since the TMR bit has been cleared by the first EOI, the second one
fails to clear remote_irr.

End result is interrupt line dead.

Fix it by setting remote_irr only if a new pending interrupt has been
generated (and the TMR bit for vector in question set).

Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
Signed-off-by: Avi Kivity <avi@qumranet.com>
16 years agoKVM: MMU: reschedule during shadow teardown
Avi Kivity [Wed, 4 Jun 2008 15:42:24 +0000 (18:42 +0300)]
KVM: MMU: reschedule during shadow teardown

Shadows for large guests can take a long time to tear down, so reschedule
occasionally to avoid softlockup warnings.

Signed-off-by: Avi Kivity <avi@qumranet.com>
16 years agoKVM: VMX: Clear CR4.VMXE in hardware_disable
Eli Collins [Mon, 2 Jun 2008 03:24:40 +0000 (20:24 -0700)]
KVM: VMX: Clear CR4.VMXE in hardware_disable

Clear CR4.VMXE in hardware_disable. There's no reason to leave it set
after doing a VMXOFF.

VMware Workstation 6.5 checks CR4.VMXE as a proxy for whether the CPU is
in VMX mode, so leaving VMXE set means we'll refuse to power on. With this
change the user can power on after unloading the kvm-intel module. I
tested on kvm-67 and kvm-69.

Signed-off-by: Eli Collins <ecollins@vmware.com>
Signed-off-by: Avi Kivity <avi@qumranet.com>
16 years agoKVM: migrate PIT timer
Marcelo Tosatti [Tue, 27 May 2008 15:10:20 +0000 (12:10 -0300)]
KVM: migrate PIT timer

Migrate the PIT timer to the physical CPU which vcpu0 is scheduled on,
similarly to what is done for the LAPIC timers, otherwise PIT interrupts
will be delayed until an unrelated event causes an exit.

Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
Signed-off-by: Avi Kivity <avi@qumranet.com>
16 years agoKVM: ppc: Report bad GFNs
Hollis Blanchard [Wed, 21 May 2008 23:22:55 +0000 (18:22 -0500)]
KVM: ppc: Report bad GFNs

This code shouldn't be hit anyways, but when it is, it's useful to have a
little more information about the failure.

Signed-off-by: Hollis Blanchard <hollisb@us.ibm.com>
Signed-off-by: Avi Kivity <avi@qumranet.com>
16 years agoKVM: ppc: Use a read lock around MMU operations, and release it on error
Hollis Blanchard [Wed, 21 May 2008 23:22:54 +0000 (18:22 -0500)]
KVM: ppc: Use a read lock around MMU operations, and release it on error

gfn_to_page() and kvm_release_page_clean() are called from other contexts with
mmap_sem locked only for reading.

Signed-off-by: Hollis Blanchard <hollisb@us.ibm.com>
Signed-off-by: Avi Kivity <avi@qumranet.com>
16 years agoKVM: ppc: Remove unmatched kunmap() call
Hollis Blanchard [Wed, 21 May 2008 23:22:53 +0000 (18:22 -0500)]
KVM: ppc: Remove unmatched kunmap() call

We're not calling kmap() now, so we shouldn't call kunmap() either. This has no
practical effect in the non-highmem case, which is why it hasn't caused more
obvious problems.

Pointed out by Anthony Liguori.

Signed-off-by: Hollis Blanchard <hollisb@us.ibm.com>
Signed-off-by: Avi Kivity <avi@qumranet.com>
16 years agoKVM: ppc: add lwzx/stwz emulation
Hollis Blanchard [Wed, 21 May 2008 23:22:52 +0000 (18:22 -0500)]
KVM: ppc: add lwzx/stwz emulation

Somehow these load/store instructions got missed before, but weren't used by
the guest so didn't break anything.

Signed-off-by: Hollis Blanchard <hollisb@us.ibm.com>
Signed-off-by: Christian Ehrhardt <ehrhardt@linux.vnet.ibm.com>
Signed-off-by: Avi Kivity <avi@qumranet.com>
16 years agoKVM: ppc: Remove duplicate function
Hollis Blanchard [Wed, 21 May 2008 23:22:51 +0000 (18:22 -0500)]
KVM: ppc: Remove duplicate function

This was left behind from some code movement.

Signed-off-by: Hollis Blanchard <hollisb@us.ibm.com>
Signed-off-by: Avi Kivity <avi@qumranet.com>
16 years agoKVM: s390: Fix race condition in kvm_s390_handle_wait
Carsten Otte [Wed, 21 May 2008 11:37:44 +0000 (13:37 +0200)]
KVM: s390: Fix race condition in kvm_s390_handle_wait

The call to add_timer was issued before local_int.lock was taken and before
timer_due was set to 0. If the timer expires before the lock is being taken,
the timer function will set timer_due to 1 and exit before the vcpu falls
asleep. Depending on other external events, the vcpu might sleep forever.
This fix pulls setting timer_due to the beginning of the function before
add_timer, which ensures correct behavior.

Signed-off-by: Carsten Otte <cotte@de.ibm.com>
Signed-off-by: Avi Kivity <avi@qumranet.com>
16 years agoKVM: s390: Send program check on access error
Carsten Otte [Wed, 21 May 2008 11:37:40 +0000 (13:37 +0200)]
KVM: s390: Send program check on access error

If the guest accesses non-existing memory, the sie64a function returns
-EFAULT. We must check the return value and send a program check to the
guest if the sie instruction faulted, otherwise the guest will loop at
the faulting code.

Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
Signed-off-by: Carsten Otte <cotte@de.ibm.com>
Signed-off-by: Avi Kivity <avi@qumranet.com>
16 years agoKVM: s390: fix interrupt delivery
Carsten Otte [Wed, 21 May 2008 11:37:37 +0000 (13:37 +0200)]
KVM: s390: fix interrupt delivery

The current code delivers pending interrupts before it checks for
need_resched. On a busy host, this can lead to a longer interrupt
latency if the interrupt is injected while the process is scheduled
away. This patch moves delivering the interrupt _after_ schedule(),
which makes more sense.

Signed-off-by: Carsten Otte <cotte@de.ibm.com>
Signed-off-by: Avi Kivity <avi@qumranet.com>
16 years agoKVM: s390: handle machine checks when guest is running
Christian Borntraeger [Wed, 21 May 2008 11:37:34 +0000 (13:37 +0200)]
KVM: s390: handle machine checks when guest is running

The low-level interrupt handler on s390 checks for _TIF_WORK_INT and
exits the guest context, if work is pending.
TIF_WORK_INT is defined as_TIF_SIGPENDING | _TIF_NEED_RESCHED |
 _TIF_MCCK_PENDING. Currently the sie loop checks for signals and
reschedule, but it does not check for machine checks. That means that
we exit the guest context if a machine check is pending, but we do not
handle the machine check.

Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
CC: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Carsten Otte <cotte@de.ibm.com>
Signed-off-by: Avi Kivity <avi@qumranet.com>
16 years agoKVM: s390: fix locking order problem in enable_sie
Christian Borntraeger [Wed, 21 May 2008 11:37:29 +0000 (13:37 +0200)]
KVM: s390: fix locking order problem in enable_sie

There are potential locking problem in enable_sie. We take the task_lock
and the mmap_sem. As exit_mm uses the same locks vice versa, this triggers
a lockdep warning.
The second problem is that dup_mm and mmput might sleep, so we must not
hold the task_lock at that moment.

The solution is to dup the mm unconditional and use the task_lock before and
afterwards to check  if we can use the new mm. dup_mm and mmput are called
outside the task_lock, but we run update_mm while holding the task_lock,
protection us against ptrace.

Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
Signed-off-by: Carsten Otte <cotte@de.ibm.com>
Acked-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Signed-off-by: Avi Kivity <avi@qumranet.com>
16 years agoKVM: s390: use yield instead of schedule to implement diag 0x44
Christian Borntraeger [Wed, 21 May 2008 11:37:16 +0000 (13:37 +0200)]
KVM: s390: use yield instead of schedule to implement diag 0x44

diag 0x44 is the common way on s390 to yield the cpu to the hypervisor.
It is called by the guest in cpu_relax and in the spinlock code to
yield to other guest cpus.

This semantic is similar to yield. Lets replace the call to schedule with
yield to make sure that current is really yielding.

Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
Signed-off-by: Carsten Otte <cotte@de.ibm.com>
Signed-off-by: Avi Kivity <avi@qumranet.com>
16 years agoKVM: x86 emulator: fix hypercall return value on AMD
Avi Kivity [Wed, 21 May 2008 12:34:25 +0000 (15:34 +0300)]
KVM: x86 emulator: fix hypercall return value on AMD

The hypercall instructions on Intel and AMD are different.  KVM allows the
guest to choose one or the other (the default is Intel), and if the guest
chooses incorrectly, KVM will patch it at runtime to select the correct
instruction.  This allows live migration between Intel and AMD machines.

This patching occurs in the x86 emulator.  The current code also executes
the hypercall.  Unfortunately, the tail end of the x86 emulator code also
executes, overwriting the return value of the hypercall with the original
contents of rax (which happens to be the hypercall number).

Fix not by executing the hypercall in the emulator context; instead let the
guest reissue the patched instruction and execute the hypercall via the
normal path.

Signed-off-by: Avi Kivity <avi@qumranet.com>
16 years agoKVM: ia64: fix zero extending for mmio ld1/2/4 emulation in KVM
Jes Sorensen [Tue, 20 May 2008 11:13:50 +0000 (13:13 +0200)]
KVM: ia64: fix zero extending for mmio ld1/2/4 emulation in KVM

Only copy in the data actually requested by the instruction emulation
and zero pad the destination register first. This avoids the problem
where emulated mmio access got garbled data from ld2.acq instructions
in the vga console driver.

Signed-off-by: Jes Sorensen <jes@sgi.com>
Acked-by: Xiantao Zhang <xiantao.zhang@intel.com>
Signed-off-by: Avi Kivity <avi@qumranet.com>
16 years agoMerge master.kernel.org:/home/rmk/linux-2.6-arm
Linus Torvalds [Thu, 5 Jun 2008 23:15:00 +0000 (16:15 -0700)]
Merge master.kernel.org:/home/rmk/linux-2.6-arm

* master.kernel.org:/home/rmk/linux-2.6-arm:
  [ARM] pxa: fix tosa.c build error
  [ARM] 5067/1: _raw_write_can_lock macro bugfix
  [ARM] 5070/1: pxa: add GPIO104_PSKTSEL to pxa27x MFP configuration
  [ARM] 5068/1: PXA2xx Additional gpio definitions
  [ARM] 5066/2: EM-X270: Fix DM9000 IRQ flags initialisation
  [ARM] 5065/2: CM-X270: Fix DM9000 IRQ flags initialisation
  [ARM] 5062/1: pxa: remove unused definition of CONFIG_ARCH_COTULLA_IDP
  [ARM] 5060/1: remove unnecessary include of asm/io.h
  [ARM] fix AT91 include loops

16 years agommc: Fix crash in mmc_block on 64-bit
Ben Collins [Thu, 5 Jun 2008 23:10:21 +0000 (19:10 -0400)]
mmc: Fix crash in mmc_block on 64-bit

Fairly simple. "dev_use" was being allocated as a zero length array
because of bad math on 64-bit systems, causing a crash in
find_first_zero_bit(). One-liner follows:

Signed-off-by: Ben Collins <ben.collins@canonical.com>
Acked-by: Pierre Ossman <drzeus@drzeus.cx>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/v4l-dvb
Linus Torvalds [Thu, 5 Jun 2008 21:30:47 +0000 (14:30 -0700)]
Merge git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/v4l-dvb

* git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/v4l-dvb: (48 commits)
  V4L/DVB (8001): dib0070: fix dib0070_attach when !CONFIG_DVB_TUNER_DIB0070
  V4L/DVB (8000): tda827x: fix NULL pointer in tda827xa_lna_gain
  V4L/DVB (7990): Fix entry for PowerColor RA 330 and make it run with firmware version 2.7
  V4L/DVB (7983): tda18271_calc_rf_cal must return the return value of tda18271_lookup_map
  V4L/DVB (7978): cx18: explicitly test for XC2028 tuner
  V4L/DVB (7977): cx18: fix init order and remove duplicate open_on_first_use.
  V4L/DVB (7975): saa7134_empress
  V4L/DVB (7974): fix MEDIA_TUNER && FW_LOADER build error
  V4L/DVB (7972): or51132.c: unaligned
  V4L/DVB (7971): usb: unaligned
  V4L/DVB (7970): mix trivial endianness annotations
  V4L/DVB (7969): m920x: unaligned access
  V4L/DVB (7968): zoran: endianness annotations
  V4L/DVB (7967): bt8xx: unaligned access
  V4L/DVB (7966): cx18: direct dereferencing of iomem
  V4L/DVB (7965): annotate bcx_riscmem
  V4L/DVB (7964): cx18 iomem annotations
  V4L/DVB (7963): ivtv: trivial annotations
  V4L/DVB (7962): ttusb endianness annotations and fixes
  V4L/DVB (7961): fix endianness bug in dib0700_devices.c
  ...

16 years agoMerge branch 'upstream' of git://ftp.linux-mips.org/pub/scm/upstream-linus
Linus Torvalds [Thu, 5 Jun 2008 21:29:53 +0000 (14:29 -0700)]
Merge branch 'upstream' of git://ftp.linux-mips.org/pub/scm/upstream-linus

* 'upstream' of git://ftp.linux-mips.org/pub/scm/upstream-linus:
  Fix divide by zero error in build_clear_page() and build_copy_page()
  [MIPS] Fix typo in header guard
  [MIPS] Fix build error - Delete debugging crap that crept in with CMP
  [MIPS] Add accessors for random register.
  [MIPS] IP27: misc fixes
  [MIPS] IP27: Fix clockevent setup
  [MIPS] IP27: Fix bootmem memory setup
  [MIPS] remove CONFIG_CPU_R4000 line from Makefile
  [MIPS] Fix check for valid stack pointer during backtrace
  [MIPS] Add missing braces to pte_mkyoung
  [MIPS] R4700: Fix build_tlb_probe_entry
  [MIPS] Alchemy: dbdma: add API to delete custom DDMA device ids.
  [MIPS] Alchemy: export get_au1x00_speed for modules

16 years agoMerge git://git.infradead.org/~dwmw2/mtd-2.6.26
Linus Torvalds [Thu, 5 Jun 2008 21:25:48 +0000 (14:25 -0700)]
Merge git://git.infradead.org/~dwmw2/mtd-2.6.26

* git://git.infradead.org/~dwmw2/mtd-2.6.26:
  [MTD] [MAPS] Fix cmdlineparse handling in mapping files
  [MTD] [NAND] pxa: fix incorrect calling of pxa3xx_nand_config() on resume path

16 years agodoc: add suggestions about good practises for maintainers
Willy Tarreau [Mon, 2 Jun 2008 22:20:28 +0000 (00:20 +0200)]
doc: add suggestions about good practises for maintainers

Suggest how to deal with patch modifications caused by
merging or back-porting when you're a maintainer.

Signed-off-by: Willy Tarreau <w@1wt.eu>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agoasn1: additional sanity checking during BER decoding
Chris Wright [Wed, 4 Jun 2008 16:16:33 +0000 (09:16 -0700)]
asn1: additional sanity checking during BER decoding

- Don't trust a length which is greater than the working buffer.
  An invalid length could cause overflow when calculating buffer size
  for decoding oid.

- An oid length of zero is invalid and allows for an off-by-one error when
  decoding oid because the first subid actually encodes first 2 subids.

- A primitive encoding may not have an indefinite length.

Thanks to Wei Wang from McAfee for report.

Cc: Steven French <sfrench@us.ibm.com>
Cc: stable@kernel.org
Acked-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: Chris Wright <chrisw@sous-sol.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agoAdd 'rd' alias to new brd ramdisk driver
Nick Piggin [Wed, 4 Jun 2008 15:18:42 +0000 (17:18 +0200)]
Add 'rd' alias to new brd ramdisk driver

Alias brd to rd in the hope of helping legacy users. Suggested by Jan.

Signed-off-by: Nick Piggin <npiggin@suse.de>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agox86: fix CONFIG_NONPROMISC_DEVMEM prompt and help text
Stefan Richter [Thu, 5 Jun 2008 20:47:13 +0000 (22:47 +0200)]
x86: fix CONFIG_NONPROMISC_DEVMEM prompt and help text

Here is an attempt to translate the prompt and help text into something
which is legible and, as a bonus, correct.

Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agoFRV: ip_fast_csum() requires a memory clobber on its inline asm
David Howells [Thu, 5 Jun 2008 16:07:35 +0000 (17:07 +0100)]
FRV: ip_fast_csum() requires a memory clobber on its inline asm

ip_fast_csum() requires a memory clobber on its inline asm as it accesses
memory in a fashion that gcc can't predict.

The GCC manual says:

 If your assembler instructions access memory in an unpredictable
 fashion, add `memory' to the list of clobbered registers.  This will
 cause GCC to not keep memory values cached in registers across the
 assembler instruction and not optimize stores or loads to that memory.

The bug hasn't been noticed in FRV, but it has been seen in PA-RISC.

Signed-off-by: David Howells <dhowells@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agoPNP: skip UNSET MEM resources as well as DISABLED ones
Bjorn Helgaas [Thu, 5 Jun 2008 16:32:23 +0000 (10:32 -0600)]
PNP: skip UNSET MEM resources as well as DISABLED ones

We don't need to reserve "unset" resources.  Trying to reserve
them results in messages like this, which are ugly but harmless:

    system 00:08: iomem range 0x0-0x0 could not be reserved

Future PNP patches will remove use of IORESOURCE_UNSET, but
we still need it for now.

Signed-off-by: Bjorn Helgaas <bjorn.helgaas@hp.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agoFix divide by zero error in build_clear_page() and build_copy_page()
Yoichi Yuasa [Wed, 7 May 2008 14:38:15 +0000 (23:38 +0900)]
Fix divide by zero error in build_clear_page() and build_copy_page()

Signed-off-by: Yoichi Yuasa <yoichi_yuasa@tripeaks.co.jp>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
16 years ago[MIPS] Fix typo in header guard
Vegard Nossum [Tue, 27 May 2008 15:27:28 +0000 (17:27 +0200)]
[MIPS] Fix typo in header guard

Signed-off-by: Vegard Nossum <vegard.nossum@gmail.com>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
16 years ago[MIPS] Fix build error - Delete debugging crap that crept in with CMP
Ralf Baechle [Mon, 26 May 2008 08:47:55 +0000 (09:47 +0100)]
[MIPS] Fix build error - Delete debugging crap that crept in with CMP

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
16 years ago[MIPS] Add accessors for random register.
Ralf Baechle [Mon, 26 May 2008 08:35:47 +0000 (09:35 +0100)]
[MIPS] Add accessors for random register.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
16 years ago[MIPS] IP27: misc fixes
Thomas Bogendoerfer [Thu, 17 Apr 2008 20:07:42 +0000 (22:07 +0200)]
[MIPS] IP27: misc fixes

- fix PCI interrupt assignment by emulating ioc3 interrupt pin register
- use pci_probe_only mode
- select correct page size in bridge
- remove no longer needed ioc3_sio_init() code

[Ralf: Fix for 64kB or larger pagesizes]

Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
16 years ago[MIPS] IP27: Fix clockevent setup
Thomas Bogendoerfer [Tue, 8 Apr 2008 21:43:57 +0000 (23:43 +0200)]
[MIPS] IP27: Fix clockevent setup

Fix breakage introduced by converting hub_rt to clockevent.

Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
16 years ago[MIPS] IP27: Fix bootmem memory setup
Thomas Bogendoerfer [Tue, 8 Apr 2008 21:43:46 +0000 (23:43 +0200)]
[MIPS] IP27: Fix bootmem memory setup

Changes in the generic bootmem code broke memory setup for IP27. This
patch fixes this by replacing lots of special IP27 code with generic
bootmon code. This has been tested only on a single node.

Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
16 years ago[MIPS] remove CONFIG_CPU_R4000 line from Makefile
Adrian Bunk [Tue, 20 May 2008 22:55:02 +0000 (01:55 +0300)]
[MIPS] remove CONFIG_CPU_R4000 line from Makefile

The existing options are named CONFIG_CPU_R4300 and CONFIG_CPU_R4X00,
and they are directly below.

Reported-by: Robert P. J. Day <rpjday@crashcourse.ca>
Signed-off-by: Adrian Bunk <bunk@kernel.org>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
16 years ago[MIPS] Fix check for valid stack pointer during backtrace
Thomas Bogendoerfer [Mon, 12 May 2008 15:58:48 +0000 (17:58 +0200)]
[MIPS] Fix check for valid stack pointer during backtrace

The newly added check for valid stack pointer address breaks at least for
64bit kernels.  Use __get_user() for accessing stack content to avoid crashes,
when doing the backtrace.

Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
16 years ago[MIPS] Add missing braces to pte_mkyoung
Ilpo Järvinen [Fri, 2 May 2008 11:08:20 +0000 (14:08 +0300)]
[MIPS] Add missing braces to pte_mkyoung

Only the version pte_mkyoung for 36-bit pagetables on 32-bit hw was
affected and with this bug being around since November 29, 2004 there
is evidence to suport the assumption it was benign ;-)

Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@helsinki.fi>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
16 years ago[MIPS] R4700: Fix build_tlb_probe_entry
Thomas Bogendoerfer [Mon, 12 May 2008 11:55:42 +0000 (13:55 +0200)]
[MIPS] R4700: Fix build_tlb_probe_entry

Treat R4700 like R4600 in build_tlb_probe_entry. Without this fix kernel
will lock up.

Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
16 years ago[MIPS] Alchemy: dbdma: add API to delete custom DDMA device ids.
Manuel Lauss [Wed, 7 May 2008 11:45:23 +0000 (13:45 +0200)]
[MIPS] Alchemy: dbdma: add API to delete custom DDMA device ids.

Add API to delete custom DDMA device ids create with
au1xxx_ddma_device_add().

Signed-off-by: Manuel Lauss <mano@roarinelk.homelinux.net>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
16 years ago[MIPS] Alchemy: export get_au1x00_speed for modules
Manuel Lauss [Wed, 7 May 2008 11:42:55 +0000 (13:42 +0200)]
[MIPS] Alchemy: export get_au1x00_speed for modules

au1xmmc.c driver depends on it, so export it for modules.

Signed-off-by: Manuel Lauss <mano@roarinelk.homelinux.net>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
16 years agolibata: fix G5 SATA broken on -rc5
Hugh Dickins [Thu, 5 Jun 2008 13:44:39 +0000 (14:44 +0100)]
libata: fix G5 SATA broken on -rc5

Fix G5 SATA irq 18: nobody cared, reported on -rc5 by Olaf Hering:
fixlet to a57c1bade5a0ee5cd8b74502db9cbebb7f5780b2 libata-sff:
Fix oops reported in kerneloops.org for pnp devices with no ctl

Signed-off-by: Hugh Dickins <hugh@veritas.com>
Acked-by: Alan Cox <alan@lxorguk.ukuu.org.uk>
Tested-by: Olaf Hering <olaf@aepfle.de>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
16 years agoV4L/DVB (8001): dib0070: fix dib0070_attach when !CONFIG_DVB_TUNER_DIB0070
Michael Krufky [Thu, 5 Jun 2008 16:08:29 +0000 (13:08 -0300)]
V4L/DVB (8001): dib0070: fix dib0070_attach when !CONFIG_DVB_TUNER_DIB0070

Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
16 years agoV4L/DVB (8000): tda827x: fix NULL pointer in tda827xa_lna_gain
Sigmund Augdal [Thu, 5 Jun 2008 15:53:08 +0000 (12:53 -0300)]
V4L/DVB (8000): tda827x: fix NULL pointer in tda827xa_lna_gain

Check that tda827x_config is defined before attempting to use it.

Signed-off-by: Sigmund Augdal <sigmund@snap.tv>
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
16 years agoV4L/DVB (7990): Fix entry for PowerColor RA 330 and make it run with firmware version 2.7
Daniel Gimpelevich [Wed, 4 Jun 2008 00:29:45 +0000 (21:29 -0300)]
V4L/DVB (7990): Fix entry for PowerColor RA 330 and make it run with firmware version 2.7

Signed-off-by: Daniel Gimpelevich <daniel@gimpelevich.san-francisco.ca.us>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
16 years agoV4L/DVB (7983): tda18271_calc_rf_cal must return the return value of tda18271_lookup_map
Michael Krufky [Sat, 31 May 2008 21:18:55 +0000 (18:18 -0300)]
V4L/DVB (7983): tda18271_calc_rf_cal must return the return value of tda18271_lookup_map

On the TDA18271HD/C1, we perform RF tracking filter correction for VHF low
band, only. If supplied a frequency out of range, the error must be returned
to the caller (tda18271c1_rf_tracking_filter_calibration) so that it can
decide whether or not to write to register EB14, RFC_CPROG[7:0]

Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
16 years agoV4L/DVB (7978): cx18: explicitly test for XC2028 tuner
Hans Verkuil [Fri, 30 May 2008 14:03:12 +0000 (11:03 -0300)]
V4L/DVB (7978): cx18: explicitly test for XC2028 tuner

Testing whether xceive_pin is non-zero is not good enough as 0 is a valid
value. Instead explicitly test whether the Xceive tuner is used.

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
16 years agoV4L/DVB (7977): cx18: fix init order and remove duplicate open_on_first_use.
Hans Verkuil [Fri, 30 May 2008 13:51:53 +0000 (10:51 -0300)]
V4L/DVB (7977): cx18: fix init order and remove duplicate open_on_first_use.

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
16 years agoV4L/DVB (7975): saa7134_empress
Dmitri Belimov [Wed, 21 May 2008 04:20:34 +0000 (01:20 -0300)]
V4L/DVB (7975): saa7134_empress

This is patch for fix data structure in querycap syscall.

Signed-off-by: Beholder Intl. Ltd. Dmitry Belimov <d.belimov@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
16 years agoV4L/DVB (7974): fix MEDIA_TUNER && FW_LOADER build error
Ingo Molnar [Tue, 20 May 2008 22:34:09 +0000 (19:34 -0300)]
V4L/DVB (7974): fix MEDIA_TUNER && FW_LOADER build error

-tip testing found the following build failure:

  LD      .tmp_vmlinux1
  drivers/built-in.o: In function `generic_set_freq':
  tuner-xc2028.c:(.text+0xbd896): undefined reference to `request_firmware'
  tuner-xc2028.c:(.text+0xbdd7a): undefined reference to `release_firmware'
  drivers/built-in.o: In function `xc_load_fw_and_init_tuner':
  xc5000.c:(.text+0xc68e6): undefined reference to `request_firmware'
  xc5000.c:(.text+0xc6abe): undefined reference to `release_firmware'

with this config:

  http://redhat.com/~mingo/misc/config-Tue_May_20_18_11_34_CEST_2008.bad

the reason is another kconfig tool bug that has to be worked around in
the driver's Kconfig file: if FW_LOADER is selected in a second
dependency, that is not properly propagated up the dependencies.

in this case, FW_LOADER is selected from MEDIA_TUNER_XC2028:

  config MEDIA_TUNER_XC2028
        tristate "XCeive xc2028/xc3028 tuners"
        depends on VIDEO_MEDIA && I2C
        depends on HOTPLUG
        select FW_LOADER

which got selected by MEDIA_TUNER:

  config MEDIA_TUNER
        tristate
        default VIDEO_MEDIA && I2C
        depends on VIDEO_MEDIA && I2C
        select FW_LOADER if !MEDIA_TUNER_CUSTOMIZE && HOTPLUG

but the kconfig tool did not pick up this second-order dependency and
allowed CONFIG_FW_LOADER=m to be selected - in which case the build
fails.

the workaround i found was to move the select of FW_LOADER one level up,
so that the buggy kconfig tool can notice it and can act appropriately.
This problem can probably be worked around in other ways as well, i went
for the minimal fix.

Obviously, the kconfig tool should be fixed, it is not reasonable to
expect driver authors to do manual dependency resolution (that kconfig
itself already does) and uglify the Kconfig files. The kconfig tool did
nothing to warn about this situation and did not prevent this faulty
.config from being constructed.

Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
16 years agoV4L/DVB (7972): or51132.c: unaligned
Al Viro [Wed, 21 May 2008 03:33:11 +0000 (00:33 -0300)]
V4L/DVB (7972): or51132.c: unaligned

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
16 years agoV4L/DVB (7971): usb: unaligned
Al Viro [Wed, 21 May 2008 03:33:01 +0000 (00:33 -0300)]
V4L/DVB (7971): usb: unaligned

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
16 years agoV4L/DVB (7970): mix trivial endianness annotations
Al Viro [Wed, 21 May 2008 03:32:51 +0000 (00:32 -0300)]
V4L/DVB (7970): mix trivial endianness annotations

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
16 years agoV4L/DVB (7969): m920x: unaligned access
Al Viro [Wed, 21 May 2008 03:32:41 +0000 (00:32 -0300)]
V4L/DVB (7969): m920x: unaligned access

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
16 years agoV4L/DVB (7968): zoran: endianness annotations
Al Viro [Wed, 21 May 2008 03:32:31 +0000 (00:32 -0300)]
V4L/DVB (7968): zoran: endianness annotations

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
16 years agoV4L/DVB (7967): bt8xx: unaligned access
Al Viro [Wed, 21 May 2008 03:32:21 +0000 (00:32 -0300)]
V4L/DVB (7967): bt8xx: unaligned access

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
16 years agoV4L/DVB (7966): cx18: direct dereferencing of iomem
Al Viro [Wed, 21 May 2008 03:32:11 +0000 (00:32 -0300)]
V4L/DVB (7966): cx18: direct dereferencing of iomem

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
16 years agoV4L/DVB (7965): annotate bcx_riscmem
Al Viro [Wed, 21 May 2008 03:31:51 +0000 (00:31 -0300)]
V4L/DVB (7965): annotate bcx_riscmem

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
16 years agoV4L/DVB (7964): cx18 iomem annotations
Al Viro [Wed, 21 May 2008 03:32:01 +0000 (00:32 -0300)]
V4L/DVB (7964): cx18 iomem annotations

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
16 years agoV4L/DVB (7963): ivtv: trivial annotations
Al Viro [Wed, 21 May 2008 03:31:41 +0000 (00:31 -0300)]
V4L/DVB (7963): ivtv: trivial annotations

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
16 years agoV4L/DVB (7962): ttusb endianness annotations and fixes
Al Viro [Wed, 21 May 2008 03:31:31 +0000 (00:31 -0300)]
V4L/DVB (7962): ttusb endianness annotations and fixes

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
16 years agoV4L/DVB (7961): fix endianness bug in dib0700_devices.c
Al Viro [Wed, 21 May 2008 03:31:21 +0000 (00:31 -0300)]
V4L/DVB (7961): fix endianness bug in dib0700_devices.c

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
16 years agoV4L/DVB (7960): net: endianness annotations
Al Viro [Wed, 21 May 2008 03:31:11 +0000 (00:31 -0300)]
V4L/DVB (7960): net: endianness annotations

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
16 years agoV4L/DVB (7959): endianness fix in flexcop-usb.c
Al Viro [Wed, 21 May 2008 03:31:01 +0000 (00:31 -0300)]
V4L/DVB (7959): endianness fix in flexcop-usb.c

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
16 years agoV4L/DVB (7958): fix unaligned access in av7110.c
Al Viro [Wed, 21 May 2008 03:30:51 +0000 (00:30 -0300)]
V4L/DVB (7958): fix unaligned access in av7110.c

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
16 years agoV4L/DVB (7957): fix the roothole in av7110_av.c
Al Viro [Wed, 21 May 2008 03:30:41 +0000 (00:30 -0300)]
V4L/DVB (7957): fix the roothole in av7110_av.c

direct dereferencing from user-supplied address

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Reviewed-by: Oliver Endriss <o.endriss@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
16 years agoV4L/DVB (7956): cinergyT2: endianness annotations, endianness and race fixes
Al Viro [Wed, 21 May 2008 03:30:31 +0000 (00:30 -0300)]
V4L/DVB (7956): cinergyT2: endianness annotations, endianness and race fixes

Endianness annotations and fixes + fixing the handling of
->uncorrected_block_count

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
16 years agoV4L/DVB (7166): [v4l] Add new user class controls and deprecate others
David Woodhouse [Mon, 2 Jun 2008 18:46:51 +0000 (15:46 -0300)]
V4L/DVB (7166): [v4l] Add new user class controls and deprecate others

These were removed in commit 26d507fcfef7f7d0cd2eec874a87169cc121c835:

> -#define V4L2_CID_HCENTER               (V4L2_CID_BASE+22)
> -#define V4L2_CID_VCENTER               (V4L2_CID_BASE+23)
> -#define V4L2_CID_LASTP1                        (V4L2_CID_BASE+24) /*
> last CID + 1 */
> +
> +/* Deprecated, use V4L2_CID_PAN_RESET and V4L2_CID_TILT_RESET */
> +#define V4L2_CID_HCENTER_DEPRECATED    (V4L2_CID_BASE+22)
> +#define V4L2_CID_VCENTER_DEPRECATED    (V4L2_CID_BASE+23)

But there was no warning in Documentation/feature-removal-schedule.txt
and I'm receiving reports that it's breaking userspace apps (the
gstreamer-v4l2 plugin breaks in Fedora rawhide). You can't just pull
things from the published userspace API like that.

Please can we revert the addition of _DEPRECATED to these ioctl
definitions. Perhaps we can add a runtime warning if they actually get
used? Or a compile-time warning if we can manage that?

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
16 years agoV4L/DVB (7944): tuner-xc2028: use hybrid_tuner_request_state
Michael Krufky [Sat, 19 Apr 2008 00:22:50 +0000 (21:22 -0300)]
V4L/DVB (7944): tuner-xc2028: use hybrid_tuner_request_state

Use a standard method to manage multiple instances of a hybrid tuner.

Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
16 years agoV4L/DVB (7943): tuner: add macro, hybrid_tuner_report_instance_count
Michael Krufky [Fri, 18 Apr 2008 23:26:04 +0000 (20:26 -0300)]
V4L/DVB (7943): tuner: add macro, hybrid_tuner_report_instance_count

Create a macro to report the number of instances of the tuner driver
currently in use.  This will allow drivers to perform specific cleanups
before destroying the last instance of a tuner.

Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
16 years agoV4L/DVB (7934): cx18: move gpio_dir/val statics to the cx18 struct.
Hans Verkuil [Sun, 25 May 2008 17:34:36 +0000 (14:34 -0300)]
V4L/DVB (7934): cx18: move gpio_dir/val statics to the cx18 struct.

The gpio_dir/val statics cannot be global, they are card-specific.

Thanks to Andy Walls for pointing this out.

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
16 years agoV4L/DVB (7932): cx18: mark Compro H900 as fully supported.
Hans Verkuil [Sun, 25 May 2008 14:45:53 +0000 (11:45 -0300)]
V4L/DVB (7932): cx18: mark Compro H900 as fully supported.

I always assumed that the Compro H900 could do digital as well,
but it turned out that it is an analog-only card.

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
16 years agoV4L/DVB (7931): cx18: allow for simultaneous digital and analog capture
Hans Verkuil [Sun, 25 May 2008 14:21:27 +0000 (11:21 -0300)]
V4L/DVB (7931): cx18: allow for simultaneous digital and analog capture

The HVR-1600 can do both analog and digital capture at the same time.
Due to a driver bug -EBUSY would be returned when attempting to setup an
analog capture while a digital capture was already in progress.

Separate the two internally.

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
16 years agoV4L/DVB (7930): ivtv: bump version to 1.3.0.
Hans Verkuil [Sat, 24 May 2008 15:43:43 +0000 (12:43 -0300)]
V4L/DVB (7930): ivtv: bump version to 1.3.0.

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
16 years agoV4L/DVB (7928): cx18: fix audio registers 808 and 80c
Hans Verkuil [Wed, 21 May 2008 20:40:19 +0000 (17:40 -0300)]
V4L/DVB (7928): cx18: fix audio registers 808 and 80c

The handling of the audio registers 808 and 80c were based on old datasheets.
Updated to the latest information.

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
16 years agoV4L/DVB (7925): cx18: ensure that the xceive pin is always asserted on init.
Hans Verkuil [Tue, 20 May 2008 01:13:02 +0000 (22:13 -0300)]
V4L/DVB (7925): cx18: ensure that the xceive pin is always asserted on init.

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
16 years agoV4L/DVB (7922): tuner-simple: fix tuner_warn() induced kernel oops in simple_tuner_at...
Andy Walls [Mon, 26 May 2008 04:31:17 +0000 (01:31 -0300)]
V4L/DVB (7922): tuner-simple: fix tuner_warn() induced kernel oops in simple_tuner_attach()

The tuner_warn() macro relies on the local variable "priv" to be a valid
pointer.  There was a case in simple_tuner_attach() where this cannot be the
case yet, so tuner_warn() would dereference a NULL "priv" pointer.  Changed
the tuner_warn() to a printk() with the originally intended output format.

Signed-off-by: Andy Walls <awalls@radix.net>
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
16 years agoV4L/DVB (7919): VIDEO_AU0828 does not depend on VIDEO_DEV
Michael Krufky [Sun, 25 May 2008 02:49:03 +0000 (23:49 -0300)]
V4L/DVB (7919): VIDEO_AU0828 does not depend on VIDEO_DEV

Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
16 years agoV4L/DVB (7918): au0828: remove irrelevent analog tuner standby code
Michael Krufky [Sun, 25 May 2008 02:48:16 +0000 (23:48 -0300)]
V4L/DVB (7918): au0828: remove irrelevent analog tuner standby code

This code is irrelevant to this driver and should be removed.  This was
copied from a hack in cx88-dvb.c, which prevents noise coming from the
analog tuner (via an audio patch cable from the pci card to the sound
hardware) when in digital mode by muting the tda988x.  This issue does
not apply to this USB hybrid chip design, where a single piece of
silicon handles both analog and digital demodulation.

Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
16 years agoV4L/DVB (7916): dib7000p: fix dib7000p_attach when !CONFIG_DVB_DIB7000P
Michael Krufky [Sun, 25 May 2008 16:09:51 +0000 (13:09 -0300)]
V4L/DVB (7916): dib7000p: fix dib7000p_attach when !CONFIG_DVB_DIB7000P

somebody forgot to to fix this header...

Thanks to Ingo Molnar for pointing this out.

Tested-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
16 years agoV4L/DVB (7911): Remove v4l2_video_std_fps prototype declaration
Guennadi Liakhovetski [Thu, 22 May 2008 22:30:40 +0000 (19:30 -0300)]
V4L/DVB (7911): Remove v4l2_video_std_fps prototype declaration

The v4l2_video_std_fps function has been removed by Adrian Bunk in 2004
but then its prototype re-appeared in include/media/v4l2-dev.h. Remove it.

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
16 years agoV4L/DVB (7910): usb: input layer dependency fixes
Ingo Molnar [Tue, 20 May 2008 11:02:33 +0000 (08:02 -0300)]
V4L/DVB (7910): usb: input layer dependency fixes

testing of the -tip tree found the following build failures on
2.6.26-rc3:

  drivers/built-in.o: In function `ttusb_dec_disconnect':
  ttusb_dec.c:(.text+0xa2c95): undefined reference to `input_unregister_device'

  drivers/built-in.o: In function `dvb_usb_read_remote_control':
  dvb-usb-remote.c:(.text+0xa6a94): undefined reference to `input_event'

with this config:

  http://redhat.com/~mingo/misc/config-Tue_May_20_03_48_57_CEST_2008.bad

these are due to the media/dvb/usb layer having dependencies on INPUT
functionality, without having that spelled out in the Kconfig file.

this patch makes that dependency explicit (for the drivers affected),
which solves the build error.

Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
16 years agoV4L/DVB (7908): always enter drivers/media/video/
Adrian Bunk [Mon, 26 May 2008 17:23:49 +0000 (14:23 -0300)]
V4L/DVB (7908): always enter drivers/media/video/

After commit 039d40019f3c5e26ea50ec5af4270189f63365e1
(V4L/DVB (7898): Fix VIDEO_MEDIA Kconfig logic)
VIDEO_MEDIA is no longer usable in Makefile's for deciding
which directories we enter, resulting in compile errors like the
following with CONFIG_VIDEO_DEV=y, CONFIG_DVB_CORE=m:

<--  snip  -->

...
  MODPOST 187 modules
...
make[2]: *** [__modpost] Error 1

<--  snip  -->

The easiest solution is to always enter video/

Signed-off-by: Adrian Bunk <bunk@kernel.org>
Acked-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
16 years agoV4L/DVB (7906): tuners/mxl5005s.c: don't define variables for enums
Adrian Bunk [Fri, 16 May 2008 03:15:53 +0000 (00:15 -0300)]
V4L/DVB (7906): tuners/mxl5005s.c: don't define variables for enums

It doesn't seem to be intended that "tuner_modu_type" and
"MXL5005_ControlName" were global variables.

Signed-off-by: Adrian Bunk <bunk@kernel.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
16 years agoV4L/DVB (7905): check_v4l2 should return -EINVAL on error
Marcin Slusarz [Sun, 11 May 2008 22:58:59 +0000 (19:58 -0300)]
V4L/DVB (7905): check_v4l2 should return -EINVAL on error

check_v4l2 always returns 0, so this change is an noop for now,
but a comment says it will return something else in the future

Signed-off-by: Marcin Slusarz <marcin.slusarz@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
16 years agoV4L/DVB (7904): v4l/tuner-core: consistent handling of return values
Marcin Slusarz [Mon, 26 May 2008 17:03:02 +0000 (14:03 -0300)]
V4L/DVB (7904): v4l/tuner-core: consistent handling of return values

change check_mode and set_mode to return negative errors and fix all callers

Signed-off-by: Marcin Slusarz <marcin.slusarz@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
16 years agoV4L/DVB (7903): gp8psk_power_ctrl should return negative errors
Marcin Slusarz [Sun, 11 May 2008 22:53:39 +0000 (19:53 -0300)]
V4L/DVB (7903): gp8psk_power_ctrl should return negative errors

Signed-off-by: Marcin Slusarz <marcin.slusarz@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
16 years agoV4L/DVB (7902): fix handling of tea5761_autodetection return value
Marcin Slusarz [Sun, 11 May 2008 22:51:07 +0000 (19:51 -0300)]
V4L/DVB (7902): fix handling of tea5761_autodetection return value

tea5761_autodetection returns -EINVAL on error

Signed-off-by: Marcin Slusarz <marcin.slusarz@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
16 years agoV4L/DVB (7901): zoran: use correct type for CPU flags
Andrew Morton [Thu, 15 May 2008 02:14:04 +0000 (23:14 -0300)]
V4L/DVB (7901): zoran: use correct type for CPU flags

locking-add-typecheck-on-irqsave-and-friends-for-correct-flags.patch will cause

drivers/media/video/zoran_driver.c: In function 'zoran_close_end_session':
drivers/media/video/zoran_driver.c:1172: warning: comparison of distinct pointer types lacks a cast

Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
16 years agoV4L/DVB (7885): ivtv/cx18: add compat_ioctl entries
Hans Verkuil [Mon, 12 May 2008 14:21:58 +0000 (11:21 -0300)]
V4L/DVB (7885): ivtv/cx18: add compat_ioctl entries

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
16 years ago[MTD] [MAPS] Fix cmdlineparse handling in mapping files
Kyungmin Park [Wed, 7 May 2008 02:54:10 +0000 (11:54 +0900)]
[MTD] [MAPS] Fix cmdlineparse handling in mapping files

Now it returns the 0 if cmdlineparse not supplied.

Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
16 years agoLinux 2.6.26-rc5 v2.6.26-rc5
Linus Torvalds [Thu, 5 Jun 2008 03:10:44 +0000 (20:10 -0700)]
Linux 2.6.26-rc5

16 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6
Linus Torvalds [Thu, 5 Jun 2008 00:39:33 +0000 (17:39 -0700)]
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6

* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6: (56 commits)
  l2tp: Fix possible oops if transmitting or receiving when tunnel goes down
  tcp: Fix for race due to temporary drop of the socket lock in skb_splice_bits.
  tcp: Increment OUTRSTS in tcp_send_active_reset()
  raw: Raw socket leak.
  lt2p: Fix possible WARN_ON from socket code when UDP socket is closed
  USB ID for Philips CPWUA054/00 Wireless USB Adapter 11g
  ssb: Fix context assertion in ssb_pcicore_dev_irqvecs_enable
  libertas: fix command size for CMD_802_11_SUBSCRIBE_EVENT
  ipw2200: expire and use oldest BSS on adhoc create
  airo warning fix
  b43legacy: Fix controller restart crash
  sctp: Fix ECN markings for IPv6
  sctp: Flush the queue only once during fast retransmit.
  sctp: Start T3-RTX timer when fast retransmitting lowest TSN
  sctp: Correctly implement Fast Recovery cwnd manipulations.
  sctp: Move sctp_v4_dst_saddr out of loop
  sctp: retran_path update bug fix
  tcp: fix skb vs fack_count out-of-sync condition
  sunhme: Cleanup use of deprecated calls to save_and_cli and restore_flags.
  xfrm: xfrm_algo: correct usage of RIPEMD-160
  ...

16 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc-2.6
Linus Torvalds [Thu, 5 Jun 2008 00:38:44 +0000 (17:38 -0700)]
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc-2.6

* git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc-2.6:
  sparc: switch /proc/led to seq_file
  sparc64: IO accessors fix

16 years agol2tp: Fix possible oops if transmitting or receiving when tunnel goes down
James Chapman [Wed, 4 Jun 2008 22:54:07 +0000 (15:54 -0700)]
l2tp: Fix possible oops if transmitting or receiving when tunnel goes down

Some problems have been experienced in the field which cause an oops
in the pppol2tp driver if L2TP tunnels fail while passing data.

The pppol2tp driver uses private data that is referenced via the
sk->sk_user_data of its UDP and PPPoL2TP sockets. This patch makes
sure that the driver uses sock_hold() when it holds a reference to the
sk pointer. This affects its sendmsg(), recvmsg(), getname(),
[gs]etsockopt() and ioctl() handlers.

Tested by ISP where problem was seen. System has been up 10 days with
no oops since running this patch. Without the patch, an oops would
occur every 1-2 days.

Signed-off-by: James Chapman <jchapman@katalix.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agotcp: Fix for race due to temporary drop of the socket lock in skb_splice_bits.
Octavian Purdila [Wed, 4 Jun 2008 22:45:58 +0000 (15:45 -0700)]
tcp: Fix for race due to temporary drop of the socket lock in skb_splice_bits.

skb_splice_bits temporary drops the socket lock while iterating over
the socket queue in order to break a reverse locking condition which
happens with sendfile. This, however, opens a window of opportunity
for tcp_collapse() to aggregate skbs and thus potentially free the
current skb used in skb_splice_bits and tcp_read_sock.

This patch fixes the problem by (re-)getting the same "logical skb"
after the lock has been temporary dropped.

Based on idea and initial patch from Evgeniy Polyakov.

Signed-off-by: Octavian Purdila <opurdila@ixiacom.com>
Acked-by: Evgeniy Polyakov <johnpol@2ka.mipt.ru>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agotcp: Increment OUTRSTS in tcp_send_active_reset()
Sridhar Samudrala [Wed, 4 Jun 2008 22:19:35 +0000 (15:19 -0700)]
tcp: Increment OUTRSTS in tcp_send_active_reset()

TCP "resets sent" counter is not incremented when a TCP Reset is
sent via tcp_send_active_reset().

Signed-off-by: Sridhar Samudrala <sri@us.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agoraw: Raw socket leak.
Denis V. Lunev [Wed, 4 Jun 2008 22:16:12 +0000 (15:16 -0700)]
raw: Raw socket leak.

The program below just leaks the raw kernel socket

int main() {
        int fd = socket(PF_INET, SOCK_RAW, IPPROTO_UDP);
        struct sockaddr_in addr;

        memset(&addr, 0, sizeof(addr));
        inet_aton("127.0.0.1", &addr.sin_addr);
        addr.sin_family = AF_INET;
        addr.sin_port = htons(2048);
        sendto(fd,  "a", 1, MSG_MORE, &addr, sizeof(addr));
        return 0;
}

Corked packet is allocated via sock_wmalloc which holds the owner socket,
so one should uncork it and flush all pending data on close. Do this in the
same way as in UDP.

Signed-off-by: Denis V. Lunev <den@openvz.org>
Acked-by: Alexey Kuznetsov <kuznet@ms2.inr.ac.ru>
Signed-off-by: David S. Miller <davem@davemloft.net>