openwrt/staging/blogic.git
14 years agoMIPS: Alchemy: remove unused SYS area structure
Manuel Lauss [Thu, 15 Oct 2009 17:32:01 +0000 (19:32 +0200)]
MIPS: Alchemy: remove unused SYS area structure

Nothing in-tree uses it, so get rid of it.

Signed-off-by: Manuel Lauss <manuel.lauss@gmail.com>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
14 years agoMIPS: Alchemy: get rid of superfluous UART definitions
Manuel Lauss [Thu, 15 Oct 2009 17:07:34 +0000 (19:07 +0200)]
MIPS: Alchemy: get rid of superfluous UART definitions

Remove unused uart bit definitions and base macros.

Signed-off-by: Manuel Lauss <manuel.lauss@gmail.com>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
14 years agoMIPS: Alchemy: prom_putchar is board dependent
Manuel Lauss [Thu, 15 Oct 2009 16:49:27 +0000 (18:49 +0200)]
MIPS: Alchemy: prom_putchar is board dependent

This patch replaces the general alchemy prom_putchar() implementation
in favor of board-specific versions:  The UART where the output of
prom_putchar is directed to really depends on the board, the current
implementation hardcodes this on a per-SoC basis which is just wrong.

So a generic uart tx function is provided in the alchemy headers,
and the boards can provide their own prom_putchar with custom
destination uart, and all in-kernel alchemy boards support
early printk.

Signed-off-by: Manuel Lauss <manuel.lauss@gmail.com>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
14 years agoMIPS: Alchemy: change dbdma to accept physical memory addresses
Manuel Lauss [Tue, 13 Oct 2009 18:22:35 +0000 (20:22 +0200)]
MIPS: Alchemy: change dbdma to accept physical memory addresses

DMA can only be done from physical addresses; move the "virt_to_phys"
source/destination buffer address translation from the dbdma queueing
functions (since the hardware can only DMA to/from physical addresses)
to their respective users.

Signed-off-by: Manuel Lauss <manuel.lauss@gmail.com>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
14 years agoMIPS: Alchemy: remove dbdma compat macros
Manuel Lauss [Tue, 13 Oct 2009 18:22:34 +0000 (20:22 +0200)]
MIPS: Alchemy: remove dbdma compat macros

Remove dbdma compat macros, move remaining users over to default
queueing functions and -flags.

(Queueing function signature has changed in order to give
 a build failure instead of silent functional changes due
 to the no longer implicitly specified DDMA_FLAGS_IE flag)

Signed-off-by: Manuel Lauss <manuel.lauss@gmail.com>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
14 years agoMIPS: Alchemy: reduce size of irq dispatcher
Manuel Lauss [Tue, 13 Oct 2009 18:26:31 +0000 (20:26 +0200)]
MIPS: Alchemy: reduce size of irq dispatcher

By replacing an extra do_IRQ with a goto, the assembly shrinks
from 260 to 212 bytes (gcc-4.3.4).

Signed-off-by: Manuel Lauss <manuel.lauss@gmail.com>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
14 years agoMIPS: Alchemy: Stop IRQ name sharing
Manuel Lauss [Wed, 7 Oct 2009 18:15:15 +0000 (20:15 +0200)]
MIPS: Alchemy: Stop IRQ name sharing

Eliminate the sharing of IRQ names among the differenct Alchemy
variants.  IRQ numbers need no longer be hidden behind a
CONFIG_SOC_AU1XXX symbol: step 1 in my quest to make the Alchemy
code less reliant on a hardcoded subtype.

This patch also renames the GPIO irq number constants. It's really
an interrupt line, NOT a GPIO number!

Code which relied on certain irq numbers to have the same name
across all supported cpu subtypes is changed to determine current
cpu subtype at runtime; in some places this isn't possible so
a "compat" symbol is used.

Run-tested on DB1200.

Signed-off-by: Manuel Lauss <manuel.lauss@gmail.com>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
14 years agoMIPS: Alchemy: Simple cpu subtype detector
Manuel Lauss [Wed, 7 Oct 2009 18:15:14 +0000 (20:15 +0200)]
MIPS: Alchemy: Simple cpu subtype detector

Extract the alchemy chip variant from c0_prid register.

Signed-off-by: Manuel Lauss <manuel.lauss@gmail.com>
Cc: linux-mips@linux-mips.org
Patchwork: http://patchwork.linux-mips.org/patch/14/
Patchwork: http://patchwork.linux-mips.org/patch/707/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
14 years agoMIPS: Alchemy: higher priority for system timer.
Manuel Lauss [Wed, 7 Oct 2009 18:15:13 +0000 (20:15 +0200)]
MIPS: Alchemy: higher priority for system timer.

Raise RTCMATCH2 interrupt priority in case it is used as the system
timer tick.

Signed-off-by: Manuel Lauss <manuel.lauss@gmail.com>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
14 years agoMIPS: Alchemy: Remove USB_DEV_REQ_INT prioritization hack
Manuel Lauss [Wed, 7 Oct 2009 18:15:12 +0000 (20:15 +0200)]
MIPS: Alchemy: Remove USB_DEV_REQ_INT prioritization hack

The Alchemy hardware provides a method to prioritize interrupts
on a controller by assigning them to a differenct core request line.
Assign usb device request interrupt to IC0 Request 0 (which has
highest priority in the core and the dispatcher) and others to
Request 1.  The explicit check for usb device request occurrence
should be obsolete now.

Signed-off-by: Manuel Lauss <manuel.lauss@gmail.com>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
14 years agoMIPS: Alchemy: XXS1500 PCMCIA driver rewrite
Manuel Lauss [Sun, 4 Oct 2009 12:55:29 +0000 (14:55 +0200)]
MIPS: Alchemy: XXS1500 PCMCIA driver rewrite

Rewritten XXS1500 PCMCIA socket driver, standalone (doesn't depend on
au1000_generic.c) and added carddetect IRQ support.

Signed-off-by: Manuel Lauss <manuel.lauss@gmail.com>
Cc: Florian Fainelli <florian@openwrt.org>
Cc: Linux-PCMCIA <linux-pcmcia@lists.infradead.org>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
14 years agoMIPS: Alchemy: devboards: wire up new PCMCIA driver.
Manuel Lauss [Sun, 4 Oct 2009 12:55:28 +0000 (14:55 +0200)]
MIPS: Alchemy: devboards: wire up new PCMCIA driver.

Register the PCMCIA driver on all boards supported by it,
get rid of now-unused pcmcia macros in the board headers
(and subsequently empty pb1100/pb1500 ones).

Signed-off-by: Manuel Lauss <manuel.lauss@gmail.com>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
14 years agoMIPS: PCMCIA: new socket driver for Au1000 demoboards.
Manuel Lauss [Sun, 4 Oct 2009 12:55:27 +0000 (14:55 +0200)]
MIPS: PCMCIA: new socket driver for Au1000 demoboards.

New PCMCIA socket driver for all Db/Pb1xxx boards (except Pb1000),
which replaces au1000_db1x00.c and (most of) au1000_pb1x00.c.
Notable improvements:
        - supports Db1000, DB/PB1100/1500/1550/1200.
        - support for carddetect and statuschange IRQs.
        - pcmcia socket mem/io/attr areas and irqs passed through
          platform resource information.
        - doesn't freeze system during card insertion/ejection like
          the one it replaces.
        - boardtype is automatically detected using BCSR ID register.

Run-tested on the DB1200.

Cc: Linux-PCMCIA <linux-pcmcia@lists.infradead.org>
Signed-off-by: Manuel Lauss <manuel.lauss@gmail.com>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
14 years agoMIPS: Alchemy: remove board_init_irq() function.
Manuel Lauss [Sun, 4 Oct 2009 12:55:26 +0000 (14:55 +0200)]
MIPS: Alchemy: remove board_init_irq() function.

remove board_init_irq():  On all in-kernel boards it is sufficient to
initialize board interrupts in an arch_initcall by using the default
linux irq functions.

Some small irqmap.c files have been folded into board_setup files.

Run-tested on DB1200; compile-tested on all other affected boards.

Signed-off-by: Manuel Lauss <manuel.lauss@gmail.com>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
14 years agoMIPS: Alchemy: devboards: factor out PB1200 IRQ cascade code.
Manuel Lauss [Sun, 4 Oct 2009 12:55:25 +0000 (14:55 +0200)]
MIPS: Alchemy: devboards: factor out PB1200 IRQ cascade code.

Move the PB1200 IRQ cascade code out to the BCSR support code:
upcoming DB1300 support can use it too.

Signed-off-by: Manuel Lauss <manuel.lauss@gmail.com>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
14 years agoMIPS: Alchemy: devboard register abstraction
Manuel Lauss [Sun, 4 Oct 2009 12:55:24 +0000 (14:55 +0200)]
MIPS: Alchemy: devboard register abstraction

All Alchemy development boards have external CPLDs with a few registers
in them.  They all share an identical register layout with only a few
minor differences (except the PB1000) in bit functions and base
addresses.

This patch
- adds a primitive facility to initialize and use these external
  registers,
- replaces all occurrences of bcsr->xxx accesses with calls to the new
  functions (the pb1200 cascade irq handling code is special).
- collects BCSR register information scattered throughout the board
  headers in a central place.

Signed-off-by: Manuel Lauss <manuel.lauss@gmail.com>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
14 years agoMIPS: Fix build error for uncompressed non-plain vmlinux kernels
Ralf Baechle [Fri, 26 Feb 2010 12:57:12 +0000 (13:57 +0100)]
MIPS: Fix build error for uncompressed non-plain vmlinux kernels

Seen on rm200_defconfig for example:

  CC      arch/mips/boot/compressed/decompress.o
/home/ralf/src/linux/upstream-linus/arch/mips/boot/compressed/decompress.c: In function ‘decompress_kernel’:
/home/ralf/src/linux/upstream-linus/arch/mips/boot/compressed/decompress.c:116: error: implicit declaration of function ‘decompress’
make[3]: *** [arch/mips/boot/compressed/decompress.o] Error 1
make[2]: *** [vmlinuz.ecoff] Error 2
make[1]: *** [sub-make] Error 2
make: *** [all] Error 2

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
14 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael...
Linus Torvalds [Sat, 27 Feb 2010 01:22:53 +0000 (17:22 -0800)]
Merge branch 'for-linus' of git://git./linux/kernel/git/rafael/suspend-2.6

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/suspend-2.6:
  PM / Hibernate: Fix preallocating of memory
  PM / Hibernate: Remove swsusp.c finally
  PM / Hibernate: Remove trailing space in message
  PM: Allow SCSI devices to suspend/resume asynchronously
  PM: Allow USB devices to suspend/resume asynchronously
  USB: implement non-tree resume ordering constraints for PCI host controllers
  PM: Allow PCI devices to suspend/resume asynchronously
  PM / Hibernate: Swap, remove useless check from swsusp_read()
  PM / Hibernate: Really deprecate deprecated user ioctls
  PM: Allow device drivers to use dpm_wait()
  PM: Start asynchronous resume threads upfront
  PM: Add facility for advanced testing of async suspend/resume
  PM: Add a switch for disabling/enabling asynchronous suspend/resume
  PM: Asynchronous suspend and resume of devices
  PM: Add parent information to timing messages
  PM: Document device power attributes in sysfs
  PM / Runtime: Add sysfs switch for disabling device run-time PM

14 years agoRemove EXPERIMENTAL from NFS_FSCACHE
Christian Kujau [Fri, 26 Feb 2010 17:25:14 +0000 (17:25 +0000)]
Remove EXPERIMENTAL from NFS_FSCACHE

There's currently an open Ubuntu bug[0], with the intent to compile NFS_FSCACHE
(and possibly AFS_FSCACHE, 9P_FSCACHE) into the standard Ubuntu kernel.
However, since *_FSCACHE still depends on EXPERIMENTAL, this won't happen.

As Arjan van de Ven pointed out[1], the EXPERIMENTAL flag doesn't mean that
much any more, I propose the following patch to fs/nfs/Kconfig.  I'd do the
same for fs/9p/Kconfig and fs/afs/Kconfig, but as I did not test 9p or AFS, I
feel it would not be appropriate for me to remove the flag.

[0] https://bugs.launchpad.net/ubuntu/+source/linux/+bug/440522/comments/5
[1] http://lkml.org/lkml/2010/1/23/145

Signed-off-by: Christian Kujau <lists@nerdbynature.de>
Signed-off-by: David Howells <dhowells@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
14 years agoMerge branch 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mjg59/platf...
Linus Torvalds [Sat, 27 Feb 2010 01:20:18 +0000 (17:20 -0800)]
Merge branch 'for_linus' of git://git./linux/kernel/git/mjg59/platform-drivers-x86

* 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mjg59/platform-drivers-x86:
  toshiba_acpi: Add full hotkey support
  hp-wmi: Add support for tablet rotation key
  dell-laptop: Add another Dell laptop to the DMI whitelist
  classmate-laptop: use a single MODULE_DEVICE_TABLE to get correct aliases
  dell-laptop: Pay attention to which devices the hardware switch controls
  dell-laptop: Use buffer with 32-bit physical address
  dell-laptop: Blacklist machines not supporting dell-laptop
  dell-laptop: Block software state changes when rfkill hard blocked
  dell-laptop: Fix small memory leak
  dell-laptop: Fix platform device unregistration
  dell-laptop: Update rfkill state on kill switch
  compal-laptop: Replace sysfs support with rfkill support
  compal-laptop: Add support for known Compal made Dell laptops
  MAINTAINERS: update drivers/platform/x86 information

14 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/teigland/dlm
Linus Torvalds [Sat, 27 Feb 2010 01:19:30 +0000 (17:19 -0800)]
Merge branch 'for-linus' of git://git./linux/kernel/git/teigland/dlm

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/teigland/dlm:
  dlm: use bastmode in debugfs output
  dlm: Send lockspace name with uevents
  dlm: send reply before bast
  dlm: fix ordering of bast and cast

14 years agoMerge branch 'for-linus' of git://oss.sgi.com/xfs/xfs
Linus Torvalds [Sat, 27 Feb 2010 01:18:52 +0000 (17:18 -0800)]
Merge branch 'for-linus' of git://oss.sgi.com/xfs/xfs

* 'for-linus' of git://oss.sgi.com/xfs/xfs: (52 commits)
  fs/xfs: Correct NULL test
  xfs: optimize log flushing in xfs_fsync
  xfs: only clear the suid bit once in xfs_write
  xfs: kill xfs_bawrite
  xfs: log changed inodes instead of writing them synchronously
  xfs: remove invalid barrier optimization from xfs_fsync
  xfs: kill the unused XFS_QMOPT_* flush flags V2
  xfs: Use delay write promotion for dquot flushing
  xfs: Sort delayed write buffers before dispatch
  xfs: Don't issue buffer IO direct from AIL push V2
  xfs: Use delayed write for inodes rather than async V2
  xfs: Make inode reclaim states explicit
  xfs: more reserved blocks fixups
  xfs: turn off sign warnings
  xfs: don't hold onto reserved blocks on remount,ro
  xfs: quota limit statvfs available blocks
  xfs: replace KM_LARGE with explicit vmalloc use
  xfs: cleanup up xfs_log_force calling conventions
  xfs: kill XLOG_VEC_SET_TYPE
  xfs: remove duplicate buffer flags
  ...

14 years agoMerge branch 'ibft-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/konrad...
Linus Torvalds [Sat, 27 Feb 2010 01:18:11 +0000 (17:18 -0800)]
Merge branch 'ibft-fixes' of git://git./linux/kernel/git/konrad/ibft-2.6

* 'ibft-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/konrad/ibft-2.6:
  ibft: Update MAINTAINERS file.
  drivers/firmware/iscsi_ibft.c: remove NIPQUAD_FMT, use %pI4

14 years agoMerge branch 'v4l_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab...
Linus Torvalds [Sat, 27 Feb 2010 01:16:20 +0000 (17:16 -0800)]
Merge branch 'v4l_for_linus' of git://git./linux/kernel/git/mchehab/linux-2.6

* 'v4l_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-2.6: (362 commits)
  V4L-DVB: cx88-dvb: remove extra attribution for core
  V4L/DVB: v4l: soc_camera: fix bound checking of mbus_fmt[] index
  V4L/DVB: Add support for SMT7020 to cx88
  V4L/DVB: radio-si470x: Use UTF-8 encoding on a comment
  V4L/DVB: MAINTAINERS: Telegent tlg2300 section fix
  V4L/DVB: gspca_stv06xx: Add support for camera button
  V4L/DVB: gspca_ov519: add support for the button on ov511 based cams
  V4L/DVB: gspca_ov519: Add support for the button on ov518 based cams
  V4L/DVB: gspca_ov519: add support for the button on ov519 based cams
  V4L/DVB: gspca_main: Fix a compile error when CONFIG_INPUT is not set
  V4L/DVB: gspca_main: some input error handling fixes
  V4L/DVB: gspca_main: Allow use of input device creation code for non int. inputs
  V4L/DVB: gspca_pac7302: much improved exposure control
  V4L/DVB: gspca_sonixb: Make sonixb driver handle pas106 and pas202 cameras
  V4L/DVB: gspca_sonixb: pas106: fixup bright ctrl and add gain and exposure ctrls
  V4L/DVB: Documentation: gspca.txt: update known mr97310a cams
  V4L/DVB: gspca_mr97310a: add support for the Sakar 1638x CyberPix
  V4L/DVB: gscpa_sonixb: limit ov7630 max framerate at 640x480
  V4L/DVB: gspca_sonixb: pas202: fixup brightness ctrl and add gain and exposure ctrls
  V4L/DVB: gscpa_sonixb: Differentiate between sensors with a coarse and fine expo ctrl
  ...

14 years agodvb-core: Fix DoS bug in ULE decapsulation code that can be triggered by an invalid...
Ang Way Chuang [Thu, 25 Feb 2010 01:45:03 +0000 (09:45 +0800)]
dvb-core: Fix DoS bug in ULE decapsulation code that can be triggered by an invalid Payload Pointer

ULE (Unidirectional Lightweight Encapsulation RFC 4326) decapsulation
has a bug that causes endless loop when Payload Pointer of MPEG2-TS
frame is 182 or 183.  Anyone who sends malicious MPEG2-TS frame will
cause the receiver of ULE SNDU to go into endless loop.

This patch was generated and tested against linux-2.6.32.9 and should
apply cleanly to linux-2.6.33 as well because there was only one typo
fix to dvb_net.c since v2.6.32.

This bug was brought to you by modern day Santa Claus who decided to
shower the satellite dish at Keio University with heavy snow causing
huge burst of errors.  We, receiver end, received Santa Claus's gift in
the form of kernel bug.

Care has been taken not to introduce more bug by fixing this bug, but
please scrutinize the code for I always produces buggy code.

Signed-off-by: Ang Way Chuang <wcang79@gmail.com>
Acked-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Cc: stable@kernel.org
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
14 years agoMerge branch 'kmemcheck-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git...
Linus Torvalds [Sat, 27 Feb 2010 01:11:11 +0000 (17:11 -0800)]
Merge branch 'kmemcheck-for-linus' of git://git./linux/kernel/git/penberg/slab-2.6

* 'kmemcheck-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/penberg/slab-2.6:
  kmemcheck: Test the full object in kmemcheck_is_obj_initialized()

14 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/jejb/xfs-vipt
Linus Torvalds [Sat, 27 Feb 2010 01:05:10 +0000 (17:05 -0800)]
Merge git://git./linux/kernel/git/jejb/xfs-vipt

* git://git.kernel.org/pub/scm/linux/kernel/git/jejb/xfs-vipt:
  xfs: fix xfs to work with Virtually Indexed architectures
  sh: add mm API for DMA to vmalloc/vmap areas
  arm: add mm API for DMA to vmalloc/vmap areas
  parisc: add mm API for DMA to vmalloc/vmap areas
  mm: add coherence API for DMA to vmalloc/vmap areas

14 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi-misc-2.6
Linus Torvalds [Sat, 27 Feb 2010 00:55:27 +0000 (16:55 -0800)]
Merge git://git./linux/kernel/git/jejb/scsi-misc-2.6

* git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi-misc-2.6: (158 commits)
  [SCSI] Fix printing of failed 32-byte commands
  [SCSI] Fix printing of variable length commands
  [SCSI] libsrp: fix bug in ADDITIONAL CDB LENGTH interpretation
  [SCSI] scsi_dh_alua: Add IBM Power Virtual SCSI ALUA device to dev list
  [SCSI] scsi_dh_alua: add netapp to dev list
  [SCSI] qla2xxx: Update version number to 8.03.02-k1.
  [SCSI] qla2xxx: EEH: Restore PCI saved state during pci slot reset.
  [SCSI] qla2xxx: Add firmware ETS burst support.
  [SCSI] qla2xxx: Correct loop-resync issues during SNS scans.
  [SCSI] qla2xxx: Correct use-after-free issue in terminate_rport_io callback.
  [SCSI] qla2xxx: Correct EH bus-reset handling.
  [SCSI] qla2xxx: Proper clean-up of BSG requests when request times out.
  [SCSI] qla2xxx: Initialize payload receive length in failure path of vendor commands
  [SCSI] fix duplicate removal on error path in scsi_sysfs_add_sdev
  [SCSI] fix refcounting bug in scsi_get_host_dev
  [SCSI] fix memory leak in scsi_report_lun_scan
  [SCSI] lpfc: correct PPC build failure
  [SCSI] raid_class: add raid1e
  [SCSI] mpt2sas: Do not call sas_is_tlr_enabled for RAID volumes.
  [SCSI] zfcp: Introduce header file for qdio structs and inline functions
  ...

14 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/lethal/sh-2.6
Linus Torvalds [Sat, 27 Feb 2010 00:54:27 +0000 (16:54 -0800)]
Merge git://git./linux/kernel/git/lethal/sh-2.6

* git://git.kernel.org/pub/scm/linux/kernel/git/lethal/sh-2.6: (187 commits)
  sh: remove dead LED code for migo-r and ms7724se
  sh: ecovec build fix for CONFIG_I2C=n
  sh: ecovec r-standby support
  sh: ms7724se r-standby support
  sh: SH-Mobile R-standby register save/restore
  clocksource: Fix up a registration/IRQ race in the sh drivers.
  sh: ms7724: modify scan_timing for KEYSC
  sh: ms7724: Add sh_sir support
  sh: mach-ecovec24: Add sh_sir support
  sh: wire up SET/GET_UNALIGN_CTL.
  sh: allow alignment fault mode to be configured at kernel boot.
  sh: sh7724: Update FSI/SPU2 clock
  sh: always enable sh7724 vpu_clk and set to 166MHz on Ecovec
  sh: add sh7724 kick callback to clk_div4_table
  sh: introduce struct clk_div4_table
  sh: clock-cpg div4 set_rate() shift fix
  sh: Turn on speculative return for SH7785 and SH7786
  sh: Merge legacy and dynamic PMB modes.
  sh: Use uncached I/O helpers in PMB setup.
  sh: Provide uncached I/O helpers.
  ...

14 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6
Linus Torvalds [Sat, 27 Feb 2010 00:50:02 +0000 (16:50 -0800)]
Merge git://git./linux/kernel/git/herbert/crypto-2.6

* git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6: (31 commits)
  crypto: aes_generic - Fix checkpatch errors
  crypto: fcrypt - Fix checkpatch errors
  crypto: ecb - Fix checkpatch errors
  crypto: des_generic - Fix checkpatch errors
  crypto: deflate - Fix checkpatch errors
  crypto: crypto_null - Fix checkpatch errors
  crypto: cipher - Fix checkpatch errors
  crypto: crc32 - Fix checkpatch errors
  crypto: compress - Fix checkpatch errors
  crypto: cast6 - Fix checkpatch errors
  crypto: cast5 - Fix checkpatch errors
  crypto: camellia - Fix checkpatch errors
  crypto: authenc - Fix checkpatch errors
  crypto: api - Fix checkpatch errors
  crypto: anubis - Fix checkpatch errors
  crypto: algapi - Fix checkpatch errors
  crypto: blowfish - Fix checkpatch errors
  crypto: aead - Fix checkpatch errors
  crypto: ablkcipher - Fix checkpatch errors
  crypto: pcrypt - call the complete function on error
  ...

14 years agoibft: Update MAINTAINERS file.
Konrad Rzeszutek Wilk [Fri, 26 Feb 2010 03:53:00 +0000 (03:53 +0000)]
ibft: Update MAINTAINERS file.

Provide the right e-mail and names for me and Peter.

Signed-off-by: Konrad Rzeszutek Wilk <konrad@kernel.org>
14 years agodrivers/firmware/iscsi_ibft.c: remove NIPQUAD_FMT, use %pI4
Joe Perches [Thu, 14 Jan 2010 16:34:19 +0000 (11:34 -0500)]
drivers/firmware/iscsi_ibft.c: remove NIPQUAD_FMT, use %pI4

Convert netmask to __be32 and format it with %pI4

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Konrad Rzeszutek <ketuzsezr@darnok.org>
Reviewed-by: Mike Christie <michaelc@cs.wisc.edu>
Cc: Peter Jones <pjones@redhat.com>
Cc: James Bottomley <James.Bottomley@HansenPartnership.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
14 years agoMerge branch 'linux-2.6.33'
Alex Elder [Fri, 26 Feb 2010 20:34:02 +0000 (14:34 -0600)]
Merge branch 'linux-2.6.33'

14 years agoPM / Hibernate: Fix preallocating of memory
Rafael J. Wysocki [Thu, 25 Feb 2010 21:32:37 +0000 (22:32 +0100)]
PM / Hibernate: Fix preallocating of memory

The hibernate memory preallocation code allocates memory to push some
user space data out of physical RAM, so that the hibernation image is
not too large.  It allocates more memory than necessary for creating
the image, so it has to release some pages to make room for
allocations made while suspending devices and disabling nonboot CPUs,
or the system will hang due to the lack of free pages to allocate
from.  Unfortunately, the function used for freeing these pages,
free_unnecessary_pages(), contains a bug that prevents it from doing
the job on all systems without highmem.

Fix this problem, which is a regression from the 2.6.30 kernel, by
using the right condition for the termination of the loop in
free_unnecessary_pages().

Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Reported-and-tested-by: Alan Jenkins <sourcejedi.lkml@googlemail.com>
Cc: stable@kernel.org
14 years agoPM / Hibernate: Remove swsusp.c finally
Jiri Slaby [Sun, 21 Feb 2010 21:14:44 +0000 (22:14 +0100)]
PM / Hibernate: Remove swsusp.c finally

Its contents and entry in Makefile were already removed in
8e60c6a1348e17e68ad73589a52a03876e7059be
(Shift remaining code from swsusp.c to hibernate.c)
but somehow it remained in-place (rjw: which most likely was my
mistake).

Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Acked-by: Nigel Cunningham <nigel@tuxonice.net>
Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
14 years agoPM / Hibernate: Remove trailing space in message
Frans Pop [Thu, 11 Feb 2010 22:09:08 +0000 (23:09 +0100)]
PM / Hibernate: Remove trailing space in message

Remove a trailing space from a message in swsusp_save().

Signed-off-by: Frans Pop <elendil@planet.nl>
Acked-by: Pavel Machek <pavel@ucw.cz>
Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
14 years agoPM: Allow SCSI devices to suspend/resume asynchronously
Rafael J. Wysocki [Mon, 8 Feb 2010 18:18:26 +0000 (19:18 +0100)]
PM: Allow SCSI devices to suspend/resume asynchronously

Set power.async_suspend for all SCSI devices, targets and hosts, so
that they can be suspended and resumed in parallel with the main
suspend/resume thread and possibly with other devices they don't
depend on in a known way (i.e. devices which are not their parents or
children).

The power.async_suspend flag is also set for devices that don't have
suspend or resume callbacks, because otherwise they would make the
main suspend/resume thread wait for their "asynchronous" children
(during suspend) or parents (during resume), effectively negating the
possible gains from executing these devices' suspend and resume
callbacks asynchronously.

Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
14 years agoPM: Allow USB devices to suspend/resume asynchronously
Rafael J. Wysocki [Mon, 8 Feb 2010 18:18:16 +0000 (19:18 +0100)]
PM: Allow USB devices to suspend/resume asynchronously

Set power.async_suspend for USB devices, endpoints and interfaces,
allowing them to be suspended and resumed asynchronously during
system sleep transitions.

The power.async_suspend flag is also set for devices that don't have
suspend or resume callbacks, because otherwise they would make the
main suspend/resume thread wait for their "asynchronous" children
(during suspend) or parents (during resume), effectively negating the
possible gains from executing these devices' suspend and resume
callbacks asynchronously.

Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
14 years agoUSB: implement non-tree resume ordering constraints for PCI host controllers
Alan Stern [Fri, 12 Feb 2010 11:21:11 +0000 (12:21 +0100)]
USB: implement non-tree resume ordering constraints for PCI host controllers

This patch (as1331) adds non-tree ordering constraints needed for
proper resume of PCI USB host controllers from hibernation.  The main
issue is that non-high-speed devices must not be resumed before the
high-speed root hub, because it is the ehci_bus_resume() routine which
takes care of handing the device connection over to the companion
controller.  If the device resume is attempted before the handover
then the device won't be found and it will be treated as though it had
disconnected.

The patch adds a new field to the usb_bus structure; for each
full/low-speed bus this field will contain a pointer to the companion
high-speed bus (if one exists).  It is used during normal device
resume; if the hs_companion pointer isn't NULL then we wait for the
root-hub device on the hs_companion bus.

A secondary issue is that an EHCI controlller shouldn't be resumed
before any of its companions.  On some machines I have observed
handovers failing if the companion controller is reinitialized after
the handover.  Thus, the EHCI resume routine must wait for the
companion controllers to be resumed.

The patch also fixes a small bug in usb_hcd_pci_probe(); an error path
jumps to the wrong label, causing a memory leak.

[rjw: Fixed compilation for CONFIG_PM_SLEEP unset.]

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Acked-by: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
14 years agoPM: Allow PCI devices to suspend/resume asynchronously
Rafael J. Wysocki [Mon, 8 Feb 2010 18:16:33 +0000 (19:16 +0100)]
PM: Allow PCI devices to suspend/resume asynchronously

Set power.async_suspend for all PCI devices and PCIe port services,
so that they can be suspended and resumed in parallel with other
devices they don't depend on in a known way (i.e. devices which are
not their parents or children).

This only affects the "regular" suspend and resume stages, which
means in particular that the restoration of the PCI devices' standard
configuration registers during resume will still be carried out
synchronously (at the "early" resume stage).

Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
14 years agoPM / Hibernate: Swap, remove useless check from swsusp_read()
Jiri Slaby [Wed, 27 Jan 2010 22:47:56 +0000 (23:47 +0100)]
PM / Hibernate: Swap, remove useless check from swsusp_read()

It will never reach here if the sws_resume_bdev is erratic.
swsusp_read() is called only from software_resume(), but after
swsusp_check() which would catch the error state.

Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
14 years agoPM / Hibernate: Really deprecate deprecated user ioctls
Jiri Slaby [Wed, 27 Jan 2010 22:47:50 +0000 (23:47 +0100)]
PM / Hibernate: Really deprecate deprecated user ioctls

They were deprecated and removed from exported headers more than 2
years ago. Inform users about their removal in the future now.

(Switch cases needed to be reorderded for an easy fall through.)

And add an entry to feature-removal-schedule.

Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Acked-by: Pavel Machek <pavel@ucw.cz>
Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
14 years agoPM: Allow device drivers to use dpm_wait()
Rafael J. Wysocki [Wed, 27 Jan 2010 22:47:38 +0000 (23:47 +0100)]
PM: Allow device drivers to use dpm_wait()

There are some dependencies between devices (in particular, between
EHCI USB controllers and their OHCI/UHCI siblings) which are not
reflected by the structure of the device tree.  With synchronous
suspend and resume these dependencies are taken into accout
automatically, because the devices in question are always registered
in the right order, but to meet these constraints with asynchronous
suspend and resume the drivers of these devices will need to use
dpm_wait() in their suspend/resume routines, so introduce a helper
function allowing them to do that.

Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
14 years agoPM: Start asynchronous resume threads upfront
Rafael J. Wysocki [Sat, 23 Jan 2010 21:25:31 +0000 (22:25 +0100)]
PM: Start asynchronous resume threads upfront

It has been shown by testing that total device resume time can be
reduced significantly (by as much as 50% or more) if the async
threads executing some devices' resume routines are all started
before the main resume thread starts to handle the "synchronous"
devices.

This is a consequence of the fact that the slowest devices tend to be
located at the end of dpm_list, so their resume routines are started
very late.  Consequently, they have to wait for all the preceding
"synchronous" devices before their resume routines can be started
by the main resume thread, even if they are "asynchronous".  By
starting their async threads upfront we effectively move those
devices towards the beginning of dpm_list, without breaking their
ordering with respect to their parents and children.  As a result,
their resume routines are started much earlier and we are able to
save much more device resume time this way.

Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
14 years agoPM: Add facility for advanced testing of async suspend/resume
Rafael J. Wysocki [Sat, 23 Jan 2010 21:25:23 +0000 (22:25 +0100)]
PM: Add facility for advanced testing of async suspend/resume

Add configuration switch CONFIG_PM_ADVANCED_DEBUG for compiling in
extra PM debugging/testing code allowing one to access some
PM-related attributes of devices from the user space via sysfs.

If CONFIG_PM_ADVANCED_DEBUG is set, add sysfs attribute power/async
for every device allowing the user space to access the device's
power.async_suspend flag and modify it, if desired.

Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
14 years agoPM: Add a switch for disabling/enabling asynchronous suspend/resume
Rafael J. Wysocki [Sat, 23 Jan 2010 21:25:15 +0000 (22:25 +0100)]
PM: Add a switch for disabling/enabling asynchronous suspend/resume

Add sysfs attribute /sys/power/pm_async allowing the user space to
disable/enable asynchronous suspend/resume of devices.

Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
14 years agoPM: Asynchronous suspend and resume of devices
Rafael J. Wysocki [Sat, 23 Jan 2010 21:23:32 +0000 (22:23 +0100)]
PM: Asynchronous suspend and resume of devices

Theoretically, the total time of system sleep transitions (suspend
to RAM, hibernation) can be reduced by running suspend and resume
callbacks of device drivers in parallel with each other.  However,
there are dependencies between devices such that we're not allowed
to suspend the parent of a device before suspending the device
itself.  Analogously, we're not allowed to resume a device before
resuming its parent.

The most straightforward way to take these dependencies into accout
is to start the async threads used for suspending and resuming
devices at the core level, so that async_schedule() is called for
each suspend and resume callback supposed to be executed
asynchronously.

For this purpose, introduce a new device flag, power.async_suspend,
used to mark the devices whose suspend and resume callbacks are to be
executed asynchronously (ie. in parallel with the main suspend/resume
thread and possibly in parallel with each other) and helper function
device_enable_async_suspend() allowing one to set power.async_suspend
for given device (power.async_suspend is unset by default for all
devices).  For each device with the power.async_suspend flag set the
PM core will use async_schedule() to execute its suspend and resume
callbacks.

The async threads started for different devices as a result of
calling async_schedule() are synchronized with each other and with
the main suspend/resume thread with the help of completions, in the
following way:
(1) There is a completion, power.completion, for each device object.
(2) Each device's completion is reset before calling async_schedule()
    for the device or, in the case of devices with the
    power.async_suspend flags unset, before executing the device's
    suspend and resume callbacks.
(3) During suspend, right before running the bus type, device type
    and device class suspend callbacks for the device, the PM core
    waits for the completions of all the device's children to be
    completed.
(4) During resume, right before running the bus type, device type and
    device class resume callbacks for the device, the PM core waits
    for the completion of the device's parent to be completed.
(5) The PM core completes power.completion for each device right
    after the bus type, device type and device class suspend (or
    resume) callbacks executed for the device have returned.

Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
14 years agoPM: Add parent information to timing messages
Rafael J. Wysocki [Sat, 23 Jan 2010 21:03:29 +0000 (22:03 +0100)]
PM: Add parent information to timing messages

Add parent information to the messages printed by the suspend/resume
core when initcall_debug is set.

Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
14 years agoPM: Document device power attributes in sysfs
Rafael J. Wysocki [Sat, 23 Jan 2010 21:03:22 +0000 (22:03 +0100)]
PM: Document device power attributes in sysfs

There are sysfs attributes in /sys/devices/.../power/ that haven't
been documented yet in Documentation/ABI/.  Document them as
appropriate.

Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
14 years agoPM / Runtime: Add sysfs switch for disabling device run-time PM
Rafael J. Wysocki [Sat, 23 Jan 2010 21:02:51 +0000 (22:02 +0100)]
PM / Runtime: Add sysfs switch for disabling device run-time PM

Add new device sysfs attribute, power/control, allowing the user
space to block the run-time power management of the devices.  If this
attribute is set to "on", the driver of the device won't be able to power
manage it at run time (without breaking the rules) and the device will
always be in the full power state (except when the entire system goes
into a sleep state).

Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Acked-by: Alan Stern <stern@rowland.harvard.edu>
14 years agoV4L-DVB: cx88-dvb: remove extra attribution for core
Mauro Carvalho Chehab [Fri, 26 Feb 2010 18:58:11 +0000 (15:58 -0300)]
V4L-DVB: cx88-dvb: remove extra attribution for core

This is not needed, since the function already do it. Also, it causes
a warning at the compilation, since a new var is declared in the middle
of the code.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoMerge branch 'linux-next' of git://git.kernel.org/pub/scm/linux/kernel/git/jbarnes...
Linus Torvalds [Fri, 26 Feb 2010 18:35:27 +0000 (10:35 -0800)]
Merge branch 'linux-next' of git://git./linux/kernel/git/jbarnes/pci-2.6

* 'linux-next' of git://git.kernel.org/pub/scm/linux/kernel/git/jbarnes/pci-2.6: (48 commits)
  x86/PCI: Prevent mmconfig memory corruption
  ACPI: Use GPE reference counting to support shared GPEs
  x86/PCI: use host bridge _CRS info by default on 2008 and newer machines
  PCI: augment bus resource table with a list
  PCI: add pci_bus_for_each_resource(), remove direct bus->resource[] refs
  PCI: read bridge windows before filling in subtractive decode resources
  PCI: split up pci_read_bridge_bases()
  PCIe PME: use pci_pcie_cap()
  PCI PM: Run-time callbacks for PCI bus type
  PCIe PME: use pci_is_pcie()
  PCI / ACPI / PM: Platform support for PCI PME wake-up
  ACPI / ACPICA: Multiple system notify handlers per device
  ACPI / PM: Add more run-time wake-up fields
  ACPI: Use GPE reference counting to support shared GPEs
  PCI PM: Make it possible to force using INTx for PCIe PME signaling
  PCI PM: PCIe PME root port service driver
  PCI PM: Add function for checking PME status of devices
  PCI: mark is_pcie obsolete
  PCI: set PCI_PREF_RANGE_TYPE_64 in pci_bridge_check_ranges
  PCI: pciehp: second try to get big range for pcie devices
  ...

14 years agodlm: use bastmode in debugfs output
David Teigland [Thu, 25 Feb 2010 18:20:57 +0000 (12:20 -0600)]
dlm: use bastmode in debugfs output

The bast mode that appears in the debugfs output should be
useful on both master and process nodes.  lkb_highbast is
currently printed, and is only useful on the master node.
lkb_bastmode is only useful on the process node.  This
patch sets lkb_bastmode on the master node as well, and
uses that value in the debugfs print.

Signed-off-by: David Teigland <teigland@redhat.com>
14 years agodlm: Send lockspace name with uevents
Steven Whitehouse [Wed, 17 Feb 2010 09:41:34 +0000 (09:41 +0000)]
dlm: Send lockspace name with uevents

Although it is possible to get this information from the path,
its much easier to provide the lockspace as a seperate env
variable.

Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
Signed-off-by: David Teigland <teigland@redhat.com>
14 years agoV4L/DVB: v4l: soc_camera: fix bound checking of mbus_fmt[] index
Baruch Siach [Fri, 19 Feb 2010 17:09:25 +0000 (14:09 -0300)]
V4L/DVB: v4l: soc_camera: fix bound checking of mbus_fmt[] index

When code <= V4L2_MBUS_FMT_FIXED soc_mbus_get_fmtdesc returns a pointer to
mbus_fmt[x], where x < 0. Fix this.

Signed-off-by: Baruch Siach <baruch@tkos.co.il>
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
CC: stable@kernel.org
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB: Add support for SMT7020 to cx88
Dirk Herrendoerfer [Thu, 11 Feb 2010 21:06:34 +0000 (18:06 -0300)]
V4L/DVB: Add support for SMT7020 to cx88

This patch adds support for the built-in dvb device
of a Samsung SMT7020s (x86 based STB) to the cx88 family.

Signed-off-by: Dirk Herrendoerfer <d.herrendoerfer@herrendoerfer.name>
Signed-off-by: Helmut Auer <helmut@helmutauer.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB: radio-si470x: Use UTF-8 encoding on a comment
Tobias Lorenz [Thu, 18 Feb 2010 19:33:46 +0000 (16:33 -0300)]
V4L/DVB: radio-si470x: Use UTF-8 encoding on a comment

This cosmetic patch corrects a wrong unicode "micro" character in a comment.

Signed-off-by: Tobias Lorenz <tobias.lorenz@gmx.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB: MAINTAINERS: Telegent tlg2300 section fix
Joe Perches [Tue, 23 Feb 2010 17:08:20 +0000 (14:08 -0300)]
V4L/DVB: MAINTAINERS: Telegent tlg2300 section fix

linux-next commit 2ff8223957d901999bf76aaf2c6183e33a6ad14e
exposes an infinite loop defect in scripts/get_maintainer.pl

Fix the incorrect format of the MAINTAINERS "M:" entries.

Signed-off-by: Joe Perches <joe@perches.com>
Acked-by: Huang Shijie <shijie8@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB: gspca_stv06xx: Add support for camera button
Hans de Goede [Sat, 20 Feb 2010 14:26:07 +0000 (11:26 -0300)]
V4L/DVB: gspca_stv06xx: Add support for camera button

Only tested with an stv6422 based cam, as that is the only stv06xx cam
I have with a button.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB: gspca_ov519: add support for the button on ov511 based cams
Hans de Goede [Sat, 20 Feb 2010 07:45:49 +0000 (04:45 -0300)]
V4L/DVB: gspca_ov519: add support for the button on ov511 based cams

Due to hardware limitations this only works while the camera is
streaming.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB: gspca_ov519: Add support for the button on ov518 based cams
Hans de Goede [Sat, 20 Feb 2010 07:30:45 +0000 (04:30 -0300)]
V4L/DVB: gspca_ov519: Add support for the button on ov518 based cams

Due to hardware limitations this only works while the camera is
streaming.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB: gspca_ov519: add support for the button on ov519 based cams
Hans de Goede [Fri, 19 Feb 2010 10:37:08 +0000 (07:37 -0300)]
V4L/DVB: gspca_ov519: add support for the button on ov519 based cams

Note due to hardware limitiations (no interrupt endpoint), this only works
when the camera is streaming.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB: gspca_main: Fix a compile error when CONFIG_INPUT is not set
Hans de Goede [Fri, 19 Feb 2010 08:11:09 +0000 (05:11 -0300)]
V4L/DVB: gspca_main: Fix a compile error when CONFIG_INPUT is not set

gspca_main: Fix a compile error when CONFIG_INPUT is not set.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB: gspca_main: some input error handling fixes
Hans de Goede [Fri, 19 Feb 2010 07:41:40 +0000 (04:41 -0300)]
V4L/DVB: gspca_main: some input error handling fixes

2 small changes to input device error handling:
1) Make it fatal when we fail to create an input device (it is either this
   or add checks for gspca_dev->input_dev being NULL in a lot of places)
2) Since we allow gspca_input_create_urb() to fail everywhere we call it,
   and thus never check its return value, make it void.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB: gspca_main: Allow use of input device creation code for non int. inputs
Hans de Goede [Fri, 19 Feb 2010 07:28:39 +0000 (04:28 -0300)]
V4L/DVB: gspca_main: Allow use of input device creation code for non int. inputs

Allow use of the gspca core input device creation code by subdrivers which
have non interrupt driven camera buttons.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB: gspca_pac7302: much improved exposure control
Hans de Goede [Wed, 17 Feb 2010 14:59:19 +0000 (11:59 -0300)]
V4L/DVB: gspca_pac7302: much improved exposure control

My experience with fixing up the controls for the PAS sensors in
sonixb, has lead me to re-investigate the exposure control for the
pac7302. I've now found a regular exposure register in register bank 3
(which seems to be the sensor registers bank), and with this added a proper
fine grained exposure control. This patch also updates the do_autogain
function to work properly with this new finer grained control.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB: gspca_sonixb: Make sonixb driver handle pas106 and pas202 cameras
Hans de Goede [Wed, 10 Feb 2010 23:29:43 +0000 (20:29 -0300)]
V4L/DVB: gspca_sonixb: Make sonixb driver handle pas106 and pas202 cameras

Make the sonixb driver handle pas106 and pas202 cameras, when both it
and the sn9c102 driver are enabled in the kernel configuration.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB: gspca_sonixb: pas106: fixup bright ctrl and add gain and exposure ctrls
Hans de Goede [Wed, 10 Feb 2010 21:57:40 +0000 (18:57 -0300)]
V4L/DVB: gspca_sonixb: pas106: fixup bright ctrl and add gain and exposure ctrls

Fixup brightness ctrl and add gain and exposure ctrls for PAS106B sensors,
this allows enabling autogain (done), and makes the cam usable in low light
conditions.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB: Documentation: gspca.txt: update known mr97310a cams
Hans de Goede [Wed, 10 Feb 2010 09:49:23 +0000 (06:49 -0300)]
V4L/DVB: Documentation: gspca.txt: update known mr97310a cams

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB: gspca_mr97310a: add support for the Sakar 1638x CyberPix
Theodore Kilgore [Tue, 9 Feb 2010 21:05:25 +0000 (18:05 -0300)]
V4L/DVB: gspca_mr97310a: add support for the Sakar 1638x CyberPix

This camera has a sensor type we did not support sofar, this patch adds
support for the new sensor type found in the Sakar 1638x CyberPix.

Signed-off-by: Theodore Kilgore <kilgota@banach.math.auburn.edu>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB: gscpa_sonixb: limit ov7630 max framerate at 640x480
Hans de Goede [Thu, 4 Feb 2010 09:10:55 +0000 (06:10 -0300)]
V4L/DVB: gscpa_sonixb: limit ov7630 max framerate at 640x480

In 640x480, if the reg11 has less than 4, the image is
unstable (the bridge goes into a higher compression mode
which we have not reverse engineered yet).

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB: gspca_sonixb: pas202: fixup brightness ctrl and add gain and exposure ctrls
Hans de Goede [Wed, 3 Feb 2010 17:37:30 +0000 (14:37 -0300)]
V4L/DVB: gspca_sonixb: pas202: fixup brightness ctrl and add gain and exposure ctrls

Fixup brightness ctrl and add gain and exposure ctrls for PAS202BCB sensors,
this allows enabling autogain (done), and makes the cam usable in low light
conditions.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB: gscpa_sonixb: Differentiate between sensors with a coarse and fine expo...
Hans de Goede [Mon, 1 Feb 2010 16:18:37 +0000 (13:18 -0300)]
V4L/DVB: gscpa_sonixb: Differentiate between sensors with a coarse and fine expo ctrl

Some sensors only allow controlling the exposure by changing the clockdiv,
which means that exposure takes pretty large jumps (for example when going
from a div of 1 to 2, the exposure doubles). Use 2 different entries in
the controls array for these 2 different types of exposure (always
disabling one), and;

Add a new autogain algorithm for the coarse exposure case, which normally
changes the gain setting, only touching the exposure setting if the desired
luminance cannot be reached with gain, and after an exposure change once more
first tries gain, etc. Thus avoiding exposure changes, and the resulting
oscilation because of the huge steps these exposure controls take.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB: gspca_sonixb: leave bridge gain at 1.0 when we have a sensor gain
Hans de Goede [Mon, 1 Feb 2010 10:48:17 +0000 (07:48 -0300)]
V4L/DVB: gspca_sonixb: leave bridge gain at 1.0 when we have a sensor gain

Leave bridge gain at 1.0 when we have a sensor gain, while at it also
change the bridge gain setting code to write both registers in one go
saving us a usb transaction.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB: gspca_sonixj: Add camera button support
Hans de Goede [Sun, 31 Jan 2010 15:54:29 +0000 (12:54 -0300)]
V4L/DVB: gspca_sonixj: Add camera button support

gspca_sonixj: Add camera button support

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB: gspca_sonixb: Add support for camera button
Hans de Goede [Sun, 31 Jan 2010 13:35:15 +0000 (10:35 -0300)]
V4L/DVB: gspca_sonixb: Add support for camera button

gspca_sonixb: Add support for camera button

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB: gscpa_zc3xx: Add support for camera button
Hans de Goede [Fri, 29 Jan 2010 14:05:25 +0000 (11:05 -0300)]
V4L/DVB: gscpa_zc3xx: Add support for camera button

gscpa_zc3xx: Add support for camera button

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB: gscpa_pac7311: Add support for camera button
Hans de Goede [Fri, 29 Jan 2010 14:04:19 +0000 (11:04 -0300)]
V4L/DVB: gscpa_pac7311: Add support for camera button

gscpa_pac7311: Add support for camera button

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB: gscpa_pac207: Add support for camera button
Hans de Goede [Fri, 29 Jan 2010 14:02:10 +0000 (11:02 -0300)]
V4L/DVB: gscpa_pac207: Add support for camera button

gscpa_pac207: Add support for camera button

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB: gscpa Documentation: add cpia1 cameras
Hans de Goede [Sun, 17 Jan 2010 13:45:13 +0000 (10:45 -0300)]
V4L/DVB: gscpa Documentation: add cpia1 cameras

gscpa Documentation: add cpia1 cameras

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB: gspca_sq905c: Add an additional USB-ID
Hans de Goede [Sun, 17 Jan 2010 13:42:55 +0000 (10:42 -0300)]
V4L/DVB: gspca_sq905c: Add an additional USB-ID

gspca_sq905c: Add an additional USB-ID

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB: gspca_mr97310a: Simplify sensor detection
Theodore Kilgore [Fri, 15 Jan 2010 08:54:36 +0000 (05:54 -0300)]
V4L/DVB: gspca_mr97310a: Simplify sensor detection

Simplify sensor detection a bit (share more of the code between cif and vga
cameras). Also remove an unnecessary write from zero_the_pointer().

Signed-off-by: Theodore Kilgore <kilgota@banach.math.auburn.edu>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB: ivtv: Tweak Sony GigaPocket Kikyou card entry based on experiments
Andy Walls [Sun, 21 Feb 2010 00:28:39 +0000 (21:28 -0300)]
V4L/DVB: ivtv: Tweak Sony GigaPocket Kikyou card entry based on experiments

Based on experiments by Eric Wescott, edit the Sony GigaPocket (Kikyou)
card entry video and audio mux settings.

Signed-off-by: Andy Walls <awalls@radix.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB: ivtv: Add initial entry for Sony VAIO Giga Pocket (Kikyou) cards
Eric Anderson [Thu, 11 Feb 2010 01:14:54 +0000 (22:14 -0300)]
V4L/DVB: ivtv: Add initial entry for Sony VAIO Giga Pocket (Kikyou) cards

This is a slightly modified version of Eric Anderson's original patch
for the Sony Giga Pocket board.  It has been updated to apply to the
latest ivtv driver version by Hans Verkuil <hverkuil@xs4all.nl> and
Andy Walls <awalls@radix.net>.  Also Andy Walls modified the patch to
use a new Sony BTF-Pnx01Z tuner entry based on Eric Anderson's experimental
findings for the bandswitch.

>From Eric Anderson's original email:

1. The tuner on the card doesn't seem to match any standard
ones. I modified an existing tuner entry. Ideally a new tuner
entry should be created. (The only difference from the one I
modified is that the low-to-mid range frequency cut-off is
slightly different, as are the bit config settings.)

2. It wasn't obvious how to choose a second audio input other
than using "radio" as an option. Basically there's two GPIO
audio inputs. Using radio allowed me to avoid major restructuring
to the code. (perhaps other cards don't have this often...)

3. It's not clear that there's a mute setting that works. Not
sure why.

4. I haven't had a chance to test the two Svideo inputs. I set
them to COMPOSITE1 and SVIDEO2, but I'm not sure those are the
correct settings. The standard composite video inputs seem to work.

Signed-off-by: Andy Walls <awalls@radix.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB: tuner-types: Add Sony BTF-Pxn01Z tuner type used on GigaPocket cards
Andy Walls [Wed, 10 Feb 2010 22:02:58 +0000 (19:02 -0300)]
V4L/DVB: tuner-types: Add Sony BTF-Pxn01Z tuner type used on GigaPocket cards

Sony makes custome tuners for its GigaPocket line of ivtv based capture
cards.  This adds an entry to the tuner-types list for such tuners.
Parameters are based on experiments by Eric Anderson <rico99@sbcglobal.net>.

Signed-off-by: Andy Walls <awalls@radix.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB: ivtv: Fix ivtv_api_get_data() to avoid unneeded IO during IRQ handling
Andy Walls [Wed, 10 Feb 2010 18:34:46 +0000 (15:34 -0300)]
V4L/DVB: ivtv: Fix ivtv_api_get_data() to avoid unneeded IO during IRQ handling

ivtv_api_get_data() was performing more PCI MMIO than needed, resulting
often in it accounting for more than half the total time spent in
ivtv_irq_handler().  Now it only reads at most 7 of the 16 mailbox data words
over the PCI bus, and in some instances only 2 or 3 data words as needed.

Signed-off-by: Andy Walls <awalls@radix.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB: V4L - vpfe capture - build environment for isif driver
Murali Karicheri [Sun, 21 Feb 2010 18:52:45 +0000 (15:52 -0300)]
V4L/DVB: V4L - vpfe capture - build environment for isif driver

Adding Makefile and Kconfig for ISIF driver

Reviewed-by: Hans Verkuil <hverkuil@xs4all.nl>
Reviewed-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Murali Karicheri <mkaricheri@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB: V4L - vpfe capture - vpss driver enhancements for DM365
Murali Karicheri [Sun, 21 Feb 2010 18:51:14 +0000 (15:51 -0300)]
V4L/DVB: V4L - vpfe capture - vpss driver enhancements for DM365

Enhancements to support DM365 ISP5 and VPSS module configuration.
Also cleaned up the driver by removing redundant variables.

Reviewed-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Murali Karicheri <mkaricheri@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB: V4L - vpfe capture - source for ISIF driver on DM365
Murali Karicheri [Sun, 21 Feb 2010 18:48:27 +0000 (15:48 -0300)]
V4L/DVB: V4L - vpfe capture - source for ISIF driver on DM365

This is the source file for ISIF driver on DM365.  ISIF driver is equivalent
to CCDC driver on DM355 and DM644x. This driver is tested for YUV capture from
TVP514x driver. This patch contains the header files required for this driver.

Reviewed-by: Nori, Sekhar <nsekhar@ti.com>
Reviewed-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Murali Karicheri <mkaricheri@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB: V4L - vpfe capture - header files for ISIF driver
Murali Karicheri [Sun, 21 Feb 2010 18:46:01 +0000 (15:46 -0300)]
V4L/DVB: V4L - vpfe capture - header files for ISIF driver

This is the header file for ISIF driver on DM365.  ISIF driver is equivalent
to CCDC driver on DM355 and DM644x. This driver is tested for
YUV capture from TVP514x driver. This patch contains the header files required
for this driver.

Reviewed-by: Nori, Sekhar <nsekhar@ti.com>
Reviewed-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Murali Karicheri <mkaricheri@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB: DaVinci - Adding platform & board changes for vpfe capture on DM365
Murali Karicheri [Mon, 1 Feb 2010 22:36:19 +0000 (19:36 -0300)]
V4L/DVB: DaVinci - Adding platform & board changes for vpfe capture on DM365

This patch adds following changes:-
1) add sub device configuration data for TVP5146 used by vpfe capture
2) registers platform devices for vpfe_capture, isif and vpss
3) defines hardware resources for the devices listed under 2)
4) defines clock aliase for isif driver
5) adding setup_pinmux() for isif

Reviewed-by: Kevin Hilman <khilman@deeprootsystems.com>
Signed-off-by: Murali Karicheri <mkaricheri@gmail.com>
Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB: pvrusb2: Adjust 300msec digitizer wait to be more selective
Mike Isely [Sat, 6 Feb 2010 05:17:17 +0000 (02:17 -0300)]
V4L/DVB: pvrusb2: Adjust 300msec digitizer wait to be more selective

We know that the 300msec settling time after starting the digitizer is
only really needed when the digitizer is a SAA7115.  So if we're not
using a SAA7115, skip the delay.

Signed-off-by: Mike Isely <isely@pobox.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB: pvrusb2: Reduce encoder quiet period
Mike Isely [Sat, 6 Feb 2010 05:12:33 +0000 (02:12 -0300)]
V4L/DVB: pvrusb2: Reduce encoder quiet period

After implementing a 300msec wait between digitizer start and encoder
start, it has been determined that we don't need to wait quite as long
before configuring the encoder.  This reduces the wait period from
100msec back to 50msec.

Signed-off-by: Mike Isely <isely@pobox.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB: pvrusb2: Enforce a 300msec stabilization interval during stream strart
Mike Isely [Sat, 6 Feb 2010 05:10:38 +0000 (02:10 -0300)]
V4L/DVB: pvrusb2: Enforce a 300msec stabilization interval during stream strart

Martin Dauskardt <martin.dauskardt@gmx.de> has determined that the
encoder has a much better chance of starting cleanly if we
deliberately hold off starting it util the video digitizer has had a
chance to run for at least 300msec first.  These changes implement an
enforced 300msec wait in the state machine that orchestrates streaming
start / stop.

Signed-off-by: Mike Isely <isely@pobox.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB: V4L2 docs: replace spaces by tabs
Mauro Carvalho Chehab [Mon, 22 Feb 2010 21:55:00 +0000 (18:55 -0300)]
V4L/DVB: V4L2 docs: replace spaces by tabs

CC: Jonathan Corbet <corbet@lwn.net>
CC: Reviewed-by: Randy Dunlap <rdunlap@xenotime.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB: V4L2: Add a document describing the videobuf layer
Jonathan Corbet [Mon, 22 Feb 2010 20:47:46 +0000 (17:47 -0300)]
V4L/DVB: V4L2: Add a document describing the videobuf layer

Videobuf is a moderately complex API which most V4L2 drivers should use,
but its documentation is...sparse.  This document attempts to improve the
situation.

Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Reviewed-by: Randy Dunlap <rdunlap@xenotime.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB: media-spec: Fix documentation mistakes regarding I/O streaming
Hans Verkuil [Sat, 20 Feb 2010 12:41:03 +0000 (09:41 -0300)]
V4L/DVB: media-spec: Fix documentation mistakes regarding I/O streaming

The media spec contains several errors in the description of the
I/O streaming ioctls, in particular with respect to the userptr
I/O method.

The most important change is that you really need to set count
and index in v4l2_requestbuffer and v4l2_buffer when dealing with
user pointer streaming.

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB: saa7115: fix saa7111a support
Hans Verkuil [Sat, 20 Feb 2010 11:07:51 +0000 (08:07 -0300)]
V4L/DVB: saa7115: fix saa7111a support

When the saa7111 driver was merged into saa7115 several bugs were introduced,
in particular with the saa7111a support as is used in the mxb.c driver.
This patch fixes the saa7111a support. This was tested with the mxb driver.

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB: saa7146_vv: fix regression where v4l2_device was registered too late
Hans Verkuil [Sat, 20 Feb 2010 10:56:25 +0000 (07:56 -0300)]
V4L/DVB: saa7146_vv: fix regression where v4l2_device was registered too late

v4l2_device_register needs to be called before the i2c subdevs are loaded.
However, it was called afterwards in the saa7146 driver. This caused an oops
when loading the mxb and hexium drivers. The vv_init function is now split
into two: one registers the v4l2_device, the other does the rest of the
initialization. The three drivers that depend on this have been updated to
call the new vv_devinit function.

Thanks to Michael Hunold for reporting this.

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB: uvcvideo: Check uvc_ctrl_begin return value in VIDIOC_S_CTRL
Laurent Pinchart [Fri, 5 Feb 2010 00:43:37 +0000 (21:43 -0300)]
V4L/DVB: uvcvideo: Check uvc_ctrl_begin return value in VIDIOC_S_CTRL

The function return value wasn't checked due to a missing variable
assignment.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>