pandora-kernel.git
15 years agoclockevents: prevent endless loop lockup
Thomas Gleixner [Wed, 3 Sep 2008 21:37:14 +0000 (21:37 +0000)]
clockevents: prevent endless loop lockup

The C1E/HPET bug reports on AMDX2/RS690 systems where tracked down to a
too small value of the HPET minumum delta for programming an event.

The clockevents code needs to enforce an interrupt event on the clock event
device in some cases. The enforcement code was stupid and naive, as it just
added the minimum delta to the current time and tried to reprogram the device.
When the minimum delta is too small, then this loops forever.

Add a sanity check. Allow reprogramming to fail 3 times, then print a warning
and double the minimum delta value to make sure, that this does not happen again.
Use the same function for both tick-oneshot and tick-broadcast code.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
15 years agoclockevents: prevent multiple init/shutdown
Thomas Gleixner [Wed, 3 Sep 2008 21:37:08 +0000 (21:37 +0000)]
clockevents: prevent multiple init/shutdown

While chasing the C1E/HPET bugreports I went through the clock events
code inch by inch and found that the broadcast device can be initialized
and shutdown multiple times. Multiple shutdowns are not critical, but
useless waste of time. Multiple initializations are simply broken. Another
CPU might have the device in use already after the first initialization and
the second init could just render it unusable again.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
15 years agoclockevents: enforce reprogram in oneshot setup
Thomas Gleixner [Wed, 3 Sep 2008 21:37:03 +0000 (21:37 +0000)]
clockevents: enforce reprogram in oneshot setup

In tick_oneshot_setup we program the device to the given next_event,
but we do not check the return value. We need to make sure that the
device is programmed enforced so the interrupt handler engine starts
working. Split out the reprogramming function from tick_program_event()
and call it with the device, which was handed in to tick_setup_oneshot().
Set the force argument, so the devices is firing an interrupt.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
15 years agoclockevents: prevent endless loop in periodic broadcast handler
Thomas Gleixner [Wed, 3 Sep 2008 21:36:57 +0000 (21:36 +0000)]
clockevents: prevent endless loop in periodic broadcast handler

The reprogramming of the periodic broadcast handler was broken,
when the first programming returned -ETIME. The clockevents code
stores the new expiry value in the clock events device next_event field
only when the programming time has not been elapsed yet. The loop in
question calculates the new expiry value from the next_event value
and therefor never increases.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
15 years agoclockevents: prevent clockevent event_handler ending up handler_noop
Venkatesh Pallipadi [Wed, 3 Sep 2008 21:36:50 +0000 (21:36 +0000)]
clockevents: prevent clockevent event_handler ending up handler_noop

There is a ordering related problem with clockevents code, due to which
clockevents_register_device() called after tickless/highres switch
will not work. The new clockevent ends up with clockevents_handle_noop as
event handler, resulting in no timer activity.

The problematic path seems to be

* old device already has hrtimer_interrupt as the event_handler
* new clockevent device registers with a higher rating
* tick_check_new_device() is called
  * clockevents_exchange_device() gets called
    * old->event_handler is set to clockevents_handle_noop
  * tick_setup_device() is called for the new device
    * which sets new->event_handler using the old->event_handler which is noop.

Change the ordering so that new device inherits the proper handler.

This does not have any issue in normal case as most likely all the clockevent
devices are setup before the highres switch. But, can potentially be affecting
some corner case where HPET force detect happens after the highres switch.
This was a problem with HPET in MSI mode code that we have been experimenting
with.

Signed-off-by: Venkatesh Pallipadi <venkatesh.pallipadi@intel.com>
Signed-off-by: Shaohua Li <shaohua.li@intel.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
15 years agoi2c: fix i2c-sh_mobile timing issues
Magnus Damm [Wed, 27 Aug 2008 09:33:56 +0000 (18:33 +0900)]
i2c: fix i2c-sh_mobile timing issues

This patch teaches the i2c-sh_mobile driver to make use of wait irqs.
Without this patch only dte irqs are used which may lead to overruns
and cases of missing stop and extra bytes being read on the i2c bus.

Use of wait irqs forces the hardware to pause and wait until the cpu
is ready. Polling is also reworked in this patch to fix ms delay issues.

Verified with bus analyzer and tested on MigoR and AP325RXA boards.

Signed-off-by: Magnus Damm <damm@igel.co.jp>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
15 years agosh64: resume_kernel fix for kernel oops built with CONFIG_BKL_PREEMPT=y.
Paul Mundt [Fri, 5 Sep 2008 05:51:28 +0000 (14:51 +0900)]
sh64: resume_kernel fix for kernel oops built with CONFIG_BKL_PREEMPT=y.

Follows the SH change.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
15 years agosh: resume_kernel fix for kernel oops built with CONFIG_BKL_PREEMPT=y.
Carmelo Amoroso [Fri, 5 Sep 2008 05:42:16 +0000 (14:42 +0900)]
sh: resume_kernel fix for kernel oops built with CONFIG_BKL_PREEMPT=y.

This patch fixes a problem within the SH implementation of resume_kernel code,
that implements in assembly the bulk of preempt_schedule_irq function without
taking care of the extra code needed to handle the BKL preemptible.

The patch basically consists of removing this asm code and calling the common
C implementation (see kernel/sched.c) as other archs do.

Another change is the missing 'cli' macro invocation at the beginning of
the resume_kernel.

Signed-off-by: Giuseppe Cavallaro <peppe.cavallaro@st.com>
Signed-off-by: Carmelo Amoroso <carmelo.amoroso@st.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
15 years agoInput: i8042 - make Lenovo 3000 N100 blacklist entry more specific
Jiri Kosina [Fri, 5 Sep 2008 02:28:48 +0000 (22:28 -0400)]
Input: i8042 - make Lenovo 3000 N100 blacklist entry more specific

Apparently, there are more different versions of Lenovo 3000 N100, some
of them working properly with active mux, and some of them requiring it
being switched off.

This patch applies 'nomux' only to the specific product name that is
reported to behave badly unless 'nomux' is specified.

Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
15 years agoInput: bcm5974 - add BTN_TOUCH event for mousedev benefit
Henrik Rydberg [Fri, 5 Sep 2008 02:28:31 +0000 (22:28 -0400)]
Input: bcm5974 - add BTN_TOUCH event for mousedev benefit

The mousedev driver requires the use of BTN_TOUCH events to process
ABS_X and ABS_Y events properly, which is what is needed for the
bcm5974-based apple computers to have a functional pointer out-of-the-box.

Signed-off-by: Henrik Rydberg <rydberg@euromail.se>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
15 years agoInput: bcm5974 - improve finger tracking and counting
Henrik Rydberg [Fri, 5 Sep 2008 02:28:23 +0000 (22:28 -0400)]
Input: bcm5974 - improve finger tracking and counting

The problem of finger tracking, i.e., when to switch focus from one
finger to another on the trackpad, has been improved by utilizing more
information from the bcm5974 chip output. This results in less pointer
hopping when many fingers are on the trackpad. In addition, a finger
counting method based on pressure information from all fingers is
introduced. Together with a pressure hysteresis window, this yields a
more stable counting of the number of fingers on the trackpad.

Signed-off-by: Henrik Rydberg <rydberg@euromail.se>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
15 years agoInput: bcm5974 - small formatting cleanup
Henrik Rydberg [Fri, 5 Sep 2008 02:20:10 +0000 (22:20 -0400)]
Input: bcm5974 - small formatting cleanup

Signed-off-by: Henrik Rydberg <rydberg@euromail.se>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
15 years agopowerpc/spufs: Fix race for a free SPU
Jeremy Kerr [Thu, 4 Sep 2008 05:02:47 +0000 (15:02 +1000)]
powerpc/spufs: Fix race for a free SPU

We currently have a race for a free SPE. With one thread doing a
spu_yield(), and another doing a spu_activate():

thread 1 thread 2
spu_yield(oldctx) spu_activate(ctx)
  __spu_deactivate(oldctx)
  spu_unschedule(oldctx, spu)
  spu->alloc_state = SPU_FREE
spu = spu_get_idle(ctx)
    - searches for a SPE in
      state SPU_FREE, gets
      the context just
      freed by thread 1
spu_schedule(ctx, spu)
  spu->alloc_state = SPU_USED
spu_schedule(newctx, spu)
  - assumes spu is still free
  - tries to schedule context on
    already-used spu

This change introduces a 'free_spu' flag to spu_unschedule, to indicate
whether or not the function should free the spu after descheduling the
context. We only set this flag if we're not going to re-schedule
another context on this SPU.

Add a comment to document this behaviour.

Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
15 years agopowerpc/spufs: Fix multiple get_spu_context()
Jeremy Kerr [Tue, 2 Sep 2008 01:57:09 +0000 (11:57 +1000)]
powerpc/spufs: Fix multiple get_spu_context()

Commit 8d5636fbca202f61fdb808fc9e20c0142291d802 introduced a reference
count on SPU contexts during find_victim, but this may cause a leak in
the reference count if we later find a better contender for a context to
unschedule.

Change the reference to after we've found our victim context, so we
don't do the extra get_spu_context().

Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
15 years agoV4L/DVB (8881): gspca: After 'while (retry--) {...}', retry will be -1 but not 0.
Li Zefan [Tue, 2 Sep 2008 10:02:50 +0000 (07:02 -0300)]
V4L/DVB (8881): gspca: After 'while (retry--) {...}', retry will be -1 but not 0.

Signed-off-by: Li Zefan <lizf@cn.fujitsu.com>
Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
15 years agoV4L/DVB (8880): PATCH: Fix parents on some webcam drivers
Hans de Goede [Mon, 1 Sep 2008 18:28:23 +0000 (15:28 -0300)]
V4L/DVB (8880): PATCH: Fix parents on some webcam drivers

While doing some testing using Luca Risolia's sonix driver I noticed that
the video device did not get ACL's set to allow access by locally logged in
users, nor does it show up as a video device in lshal, causing cheese to not
see it.

This turns out to be caused by all of Luca Risolia's drivers not setting
the parent member of the video_device struct. This patch fixes this.

Cc: Luca Risolia <luca.risolia@studio.unibo.it>
Signed-off-by: Hans de Goede <j.w.r.degoede@hhs.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
15 years agoV4L/DVB (8877): b2c2 and bt8xx: udelay to mdelay
Thierry MERLE [Mon, 1 Sep 2008 20:32:10 +0000 (17:32 -0300)]
V4L/DVB (8877): b2c2 and bt8xx: udelay to mdelay

b2c2-flexcop, dvb/bt8xx and video/bt8xx fails to build on ARM with:

__bad_udelay is specifically designed on ARM to fail when udelay is
called in a bad way.  arch/arm/include/asm/delay.h has this to say
about __bad_udelay:

/*
 * This function intentionally does not exist; if you see references to
 * it, it means that you're calling udelay() with an out of range value.
 *
 * With currently imposed limits, this means that we support a max delay
 * of 2000us. Further limits: HZ<=1000 and bogomips<=3355
 */
extern void __bad_udelay(void);

Solution is to replace udelay by a mdelay and udelay with value less than 2000

Signed-off-by: Thierry MERLE <thierry.merle@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
15 years agoV4L/DVB (8876): budget: udelay changed to mdelay
Thierry MERLE [Mon, 1 Sep 2008 20:28:57 +0000 (17:28 -0300)]
V4L/DVB (8876): budget: udelay changed to mdelay

budget.ko fails to build on ARM with:

ERROR: "__bad_udelay" [drivers/media/dvb/ttpci/budget.ko] undefined!
make[1]: *** [__modpost] Error 1

__bad_udelay is specifically designed on ARM to fail when udelay is
called in a bad way.  arch/arm/include/asm/delay.h has this to say
about __bad_udelay:

/*
 * This function intentionally does not exist; if you see references to
 * it, it means that you're calling udelay() with an out of range value.
 *
 * With currently imposed limits, this means that we support a max delay
 * of 2000us. Further limits: HZ<=1000 and bogomips<=3355
 */
extern void __bad_udelay(void);

Solution is to replace udelay by a mdelay and udelay with value less than 2000

Acked-by: Oliver Endriss <o.endriss@gmx.de>
Signed-off-by: Thierry MERLE <thierry.merle@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
15 years ago[ARM] omap: fix virtual vs physical address space confusions
Russell King [Wed, 3 Sep 2008 22:46:18 +0000 (23:46 +0100)]
[ARM] omap: fix virtual vs physical address space confusions

mcbsp is confused as to what takes a physical or virtual address.
Fix the two instances where it gets it wrong.

Acked-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
15 years agoMerge branch 'fixes_stg' of ../git_old into fixes
Mauro Carvalho Chehab [Thu, 4 Sep 2008 19:24:02 +0000 (16:24 -0300)]
Merge branch 'fixes_stg' of ../git_old into fixes

15 years agoV4L/DVB (8874): gspca: Adjust hstart for sn9c103/ov7630 and update usb-id's.
Hans de Goede [Thu, 4 Sep 2008 19:22:57 +0000 (16:22 -0300)]
V4L/DVB (8874): gspca: Adjust hstart for sn9c103/ov7630 and update usb-id's.

- Adjust hstart in ov7630 on sn9c103 initdata to shift bayer pattern, this is
 the same change as done for the other initdata tables in a previous patch.
- Assign usb-id's for the ov7630 + sn9c103 to gspca if gspca and sn9c102
  drivers are both enabled.

Signed-off-by: Hans de Goede <j.w.r.degoede@hhs.nl>
Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
15 years agoV4L/DVB (8873): gspca: Bad image offset with rev012a of spca561 and adjust exposure.
Hans de Goede [Thu, 4 Sep 2008 19:22:57 +0000 (16:22 -0300)]
V4L/DVB (8873): gspca: Bad image offset with rev012a of spca561 and adjust exposure.

-Make raw bayer header size change from 20 to 16 affect rev072a only, my 2
 rev012a cams both have a header size of 20
-While testing this I also tested the new exposure setting (good work on
 finding the register JF), and after quite a bit of testing have found out the
 exact meaning of the register, this patch modifies setexposure to control
 the exposure over a much wider range.

Signed-off-by: Hans de Goede <j.w.r.degoede@hhs.nl>
Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
15 years agoV4L/DVB (8872): gspca: Bad image format and offset with rev072a of spca561.
Jean-Francois Moine [Thu, 4 Sep 2008 19:22:56 +0000 (16:22 -0300)]
V4L/DVB (8872): gspca: Bad image format and offset with rev072a of spca561.

- have 2 pixfmt tables
- offset of Bayer frames at 16 instead of 20.

Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
15 years agoV4L/DVB (8870): gspca: Fix dark room problem with sonixb.
Hans de Goede [Thu, 4 Sep 2008 19:22:56 +0000 (16:22 -0300)]
V4L/DVB (8870): gspca: Fix dark room problem with sonixb.

When using the sonixb driver in a dark room and given that the autoexposure
algorithm starts with a setting most suitable for daylight, the picture
produced by the cam may actually be 100% black leading to a avg_lum value of 0,
so an avg_lum value of 0 does not always signal an exposure settings change
(which it normally does). This patch adds a check for the really black image
case and stops dropping all frames as invalid in this case.

Signed-off-by: Hans de Goede <j.w.r.degoede@hhs.nl>
Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
15 years agoV4L/DVB (8869): gspca: Move the Sonix webcams with TAS5110C1B from sn9c102 to gspca.
Hans de Goede [Thu, 4 Sep 2008 19:22:55 +0000 (16:22 -0300)]
V4L/DVB (8869): gspca: Move the Sonix webcams with TAS5110C1B from sn9c102 to gspca.

This patch makes gspca claim the USB-ID for sn9c101/2 cams with a TAS5110C1B
sensor even if both gspca and sn9c102 are enabled, as these cams are much
better supported under gspca (and extensively tested with gspca).
It also removes an usb-id from sn9c102 for one more unsupported bridge
sensor combo.

Signed-off-by: Hans de Goede <j.w.r.degoede@hhs.nl>
Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
15 years agoV4L/DVB (8868): gspca: Support for vga modes with sif sensors in sonixb.
Hans de Goede [Thu, 4 Sep 2008 19:20:12 +0000 (16:20 -0300)]
V4L/DVB (8868): gspca: Support for vga modes with sif sensors in sonixb.

- Add documentation for some known registers
- Add support for vga modes (320x240, 160x120) for sif sensors
- Remove F_RAW sensor flag raw mode should work on any sensor as its a bridge
   only thing and keeping the flag was becoming awkward.
- Fixup ov6650 and pas106 auto exposure window settings

Signed-off-by: Hans de Goede <j.w.r.degoede@hhs.nl>
Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
15 years agoforgotten refcount on sysctl root table
Al Viro [Thu, 4 Sep 2008 16:05:57 +0000 (17:05 +0100)]
forgotten refcount on sysctl root table

We should've set refcount on the root sysctl table; otherwise we'll blow
up the first time we get down to zero dynamically registered sysctl
tables.

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Tested-by: James Bottomley <James.Bottomley@HansenPartnership.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agoMerge branch 'wmi-fix' into release-2.6.27
Andi Kleen [Thu, 4 Sep 2008 12:41:02 +0000 (14:41 +0200)]
Merge branch 'wmi-fix' into release-2.6.27

15 years agoacer-wmi: remove debugfs entries upon unloading
Russ Dill [Tue, 2 Sep 2008 21:35:40 +0000 (14:35 -0700)]
acer-wmi: remove debugfs entries upon unloading

The exit function neglects to remove debugfs entries, leading to a BUG
on reload.

[akpm@linux-foundation.org: cleanups]
Signed-off-by: Russ Dill <Russ.Dill@gmail.com>
Acked-by: Carlos Corbacho <carlos@strangeworlds.co.uk>
Cc: Andi Kleen <ak@linux.intel.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Andi Kleen <ak@linux.intel.com>
15 years agoMerge branches 'smbus' and 'fujitsu-fix' into release-2.6.27
Andi Kleen [Thu, 4 Sep 2008 12:33:03 +0000 (14:33 +0200)]
Merge branches 'smbus' and 'fujitsu-fix' into release-2.6.27

15 years agoACPI: Avoid bogus timeout about SMbus check
Zhao Yakui [Tue, 26 Aug 2008 05:57:34 +0000 (13:57 +0800)]
ACPI: Avoid bogus timeout about SMbus check

In the function of wait_transaction_complete when the timeout happens,
OS will try to check the status of SMbus again. If the status is what OS
expected, it will be regarded as the bogus timeout. Otherwise it will be
treated as ETIME.

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

Signed-off-by: Zhao Yakui <yakui.zhao@intel.com>
tested-by    : Oldřich Jedlička < <oldium.pro@seznam.cz>
Signed-off-by: Andi Kleen <ak@linux.intel.com>
15 years agofujitsu-laptop: fix regression for P8010 in 2.6.27-rc
Jonathan Woithe [Fri, 29 Aug 2008 01:36:21 +0000 (11:06 +0930)]
fujitsu-laptop: fix regression for P8010 in 2.6.27-rc

The following patch (based on a patch from Stephen Gildea) fixes a
regression with the LCD brightness keys on Fujitsu P8010 laptops which was
observed with the 2.6.27-rc series (basically they stopped working due to
changes within the fujitsu-laptop and video modules).  Please apply to
2.6.27-rc and acpi git.

A more complete solution for this laptop will be included in an upcoming
patch, hopefully for 2.6.28.  In the meantime this restores most
functionality for P8010 users.

Signed-off-by: Stephen Gildea <stepheng+fujitsu-laptop@gildea.com>
Signed-off-by: Jonathan Woithe <jwoithe@physics.adelaide.edu.au>
Signed-off-by: Andi Kleen <ak@linux.intel.com>
15 years agoACPI: Make Len Brown the ACPI maintainer again
Andi Kleen [Thu, 4 Sep 2008 11:30:07 +0000 (13:30 +0200)]
ACPI: Make Len Brown the ACPI maintainer again

Len is back!

Signed-off-by: Andi Kleen <ak@linux.intel.com>
15 years ago[ARM] remove unused #include <version.h>
Huang Weiyi [Sat, 23 Aug 2008 05:56:02 +0000 (13:56 +0800)]
[ARM] remove unused #include <version.h>

The driver(s) below do not use LINUX_VERSION_CODE nor KERNEL_VERSION.
  arch/arm/plat-mxc/clock.c

This patch removes the said #include <version.h>.

Signed-off-by: Huang Weiyi <weiyi.huang@gmail.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
15 years ago[ARM] omap: fix build error in ohci-omap.c
Russell King [Wed, 3 Sep 2008 22:59:23 +0000 (23:59 +0100)]
[ARM] omap: fix build error in ohci-omap.c

drivers/usb/host/ohci-omap.c: In function 'ohci_omap_init':
drivers/usb/host/ohci-omap.c:228: error: 'start_hnp' undeclared (first use in this function)

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
15 years agoPCI: fix pbus_size_mem() resource alignment for CardBus controllers
Linus Torvalds [Thu, 4 Sep 2008 08:33:59 +0000 (01:33 -0700)]
PCI: fix pbus_size_mem() resource alignment for CardBus controllers

Commit 884525655d07fdee9245716b998ecdc45cdd8007 ("PCI: clean up resource
alignment management") changed the resource handling to mark how a
resource was aligned on a per-resource basis.

Thus, instead of looking at the resource number to determine whether it
was a bridge resource or a regular resource (they have different
alignment rules), we should just ask the resource for its alignment
directly.

The reason this broke only cardbus resources was that for the other
types of resources, the old way of deciding alignment actually still
happened to work.  But CardBus bridge resources had been changed by
commit 934b7024f0ed29003c95cef447d92737ab86dc4f ("Fix cardbus resource
allocation") to look more like regular resources than PCI bridge
resources from an alignment handling standpoint.

Reported-and-tested-by: Andrew Morton <akpm@linux-foundation.org>
Cc: Ivan Kokshaysky <ink@jurassic.park.msu.ru>
Cc: Jesse Barnes <jbarnes@virtuousgeek.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agox86: Change warning message in TSC calibration.
Alok N Kataria [Thu, 4 Sep 2008 01:18:01 +0000 (18:18 -0700)]
x86: Change warning message in TSC calibration.

When calibration against PIT fails, the warning that we print is misleading.
In a virtualized environment the VM may get descheduled while calibration
or, the check in PIT calibration may fail due to other virtualization
overheads.

The warning message explicitly assumes that calibration failed due to SMI's
which may not be the case. Change that to something proper.

Signed-off-by: Alok N Kataria <akataria@vmware.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agommap: fix petty bug in anonymous shared mmap offset handling
Tejun Heo [Wed, 3 Sep 2008 14:09:47 +0000 (16:09 +0200)]
mmap: fix petty bug in anonymous shared mmap offset handling

Anonymous mappings should ignore offset but shared anonymous mapping
forgot to clear it and makes the following legit test program trigger
SIGBUS.

 #include <sys/mman.h>
 #include <stdio.h>
 #include <errno.h>

 #define PAGE_SIZE 4096

 int main(void)
 {
 char *p;
 int i;

 p = mmap(NULL, 2 * PAGE_SIZE, PROT_READ|PROT_WRITE,
  MAP_SHARED|MAP_ANONYMOUS, -1, PAGE_SIZE);
 if (p == MAP_FAILED) {
 perror("mmap");
 return 1;
 }

 for (i = 0; i < 2; i++) {
 printf("page %d\n", i);
 p[i * 4096] = i;
 }
 return 0;
 }

Fix it.

Signed-off-by: Tejun Heo <tj@kernel.org>
Acked-by: Hugh Dickins <hugh@veritas.com>
Acked-by: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris...
Linus Torvalds [Thu, 4 Sep 2008 00:57:55 +0000 (17:57 -0700)]
Merge branch 'for-linus' of git://git./linux/kernel/git/jmorris/security-testing-2.6

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/security-testing-2.6:
  SELinux: memory leak in security_context_to_sid_core

15 years agoMerge branch 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc
Linus Torvalds [Thu, 4 Sep 2008 00:36:37 +0000 (17:36 -0700)]
Merge branch 'merge' of git://git./linux/kernel/git/paulus/powerpc

* 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc:
  powerpc: Fix for getting CPU number in power_save_ppc32_restore()
  powerpc: Fix build error with 64K pages and !hugetlbfs
  powerpc: Work around gcc's -fno-omit-frame-pointer bug
  powerpc: Make sure _etext is after all kernel text
  powerpc: Only make kernel text pages of linear mapping executable
  powerpc: Fix uninitialised variable in VSX alignment code

15 years agox86: add io delay quirk for Presario F700
Chuck Ebbert [Wed, 3 Sep 2008 23:33:14 +0000 (19:33 -0400)]
x86: add io delay quirk for Presario F700

Manually adding "io_delay=0xed" fixes system lockups in ioapic
mode on this machine.

System Information
Manufacturer: Hewlett-Packard
Product Name: Presario F700 (KA695EA#ABF)

Base Board Information
Manufacturer: Quanta
Product Name: 30D3

Reference:
https://bugzilla.redhat.com/show_bug.cgi?id=459546

Signed-off-by: Chuck Ebbert <cebbert@redhat.com>
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
15 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6
Linus Torvalds [Wed, 3 Sep 2008 23:21:02 +0000 (16:21 -0700)]
Merge git://git./linux/kernel/git/davem/net-2.6

* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6:
  bnx2x: Accessing un-mapped page
  ath9k: Fix TX control flag use for no ACK and RTS/CTS
  ath9k: Fix TX status reporting
  iwlwifi: fix STATUS_EXIT_PENDING is not set on pci_remove
  iwlwifi: call apm stop on exit
  iwlwifi: fix Tx cmd memory allocation failure handling
  iwlwifi: fix rx_chain computation
  iwlwifi: fix station mimo power save values
  iwlwifi: remove false rxon if rx chain changes
  iwlwifi: fix hidden ssid discovery in passive channels
  iwlwifi: W/A for the TSF correction in IBSS
  netxen: Remove workaround for chipset quirk
  pcnet-cs, axnet_cs: add new IDs, remove dup ID with less info
  ixgbe: initialize interrupt throttle rate
  net/usb/pegasus: avoid hundreds of diagnostics
  tipc: Don't use structure names which easily globally conflict.

15 years agoSELinux: memory leak in security_context_to_sid_core
Eric Paris [Wed, 3 Sep 2008 15:49:47 +0000 (11:49 -0400)]
SELinux: memory leak in security_context_to_sid_core

Fix a bug and a philosophical decision about who handles errors.

security_context_to_sid_core() was leaking a context in the common case.
This was causing problems on fedora systems which recently have started
making extensive use of this function.

In discussion it was decided that if string_to_context_struct() had an
error it was its own responsibility to clean up any mess it created
along the way.

Signed-off-by: Eric Paris <eparis@redhat.com>
Acked-by: Stephen Smalley <sds@tycho.nsa.gov>
Signed-off-by: James Morris <jmorris@namei.org>
15 years agoMerge branch 'davem-fixes' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik...
David S. Miller [Wed, 3 Sep 2008 21:43:30 +0000 (14:43 -0700)]
Merge branch 'davem-fixes' of /linux/kernel/git/jgarzik/netdev-2.6

15 years agobnx2x: Accessing un-mapped page
Eilon Greenstein [Wed, 3 Sep 2008 21:38:00 +0000 (14:38 -0700)]
bnx2x: Accessing un-mapped page

The allocated RX buffer size was 64 bytes bigger than the PCI mapped
size with no good reason. If the packet was actually using the buffer up
to its limit and if the last 64 bytes of the buffer crossed 4KB boundary
then an unmapped PCI page was accessed. The fix is to use only one
parameter for the buffer size - there is no need to differentiate
between the buffer size and the PCI mapping size since the extra 64
bytes can actually be used by the FW to align the Ethernet payload to
64 bytes.

Also updating the driver version and date

Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agoV4L/DVB (8844): dabusb_fpga_download(): fix a memory leak
Adrian Bunk [Wed, 3 Sep 2008 20:12:25 +0000 (17:12 -0300)]
V4L/DVB (8844): dabusb_fpga_download(): fix a memory leak

This patch fixes a memory leak in an error path.

Reported-by: Adrian Bunk <bunk@kernel.org>
Signed-off-by: Adrian Bunk <bunk@kernel.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
15 years agoV4L/DVB (8843): tda10048_firmware_upload(): fix a memory leak
Adrian Bunk [Wed, 3 Sep 2008 20:12:25 +0000 (17:12 -0300)]
V4L/DVB (8843): tda10048_firmware_upload(): fix a memory leak

This patch fixes a memory leak ("fw" wasn't freed).

Reported-by: Adrian Bunk <bunk@kernel.org>
Signed-off-by: Adrian Bunk <bunk@kernel.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
15 years agoV4L/DVB (8842): vivi_release(): fix use-after-free
Adrian Bunk [Wed, 3 Sep 2008 20:12:25 +0000 (17:12 -0300)]
V4L/DVB (8842): vivi_release(): fix use-after-free

video_device_release() does kfree(), which made the following printk()
doing a use-after-free.

printk() first and release then.

Reported-by: Adrian Bunk <bunk@kernel.org>
Signed-off-by: Adrian Bunk <bunk@kernel.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
15 years agoV4L/DVB (8840): dib0700: add basic support for Hauppauge Nova-TD-500 (84xxx)
Michael Krufky [Wed, 3 Sep 2008 20:12:24 +0000 (17:12 -0300)]
V4L/DVB (8840): dib0700: add basic support for Hauppauge Nova-TD-500 (84xxx)

This adds basic support for the Hauppauge Nova-TD-500 84xxx series.

A future patch will allow for one aerial input to supply both tuners.

With the current code, an aerial must be plugged into each antannae input
in order for both tuners to function.

Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
15 years agoV4L/DVB (8839): dib0700: add comment to identify 35th USB id pair
Michael Krufky [Wed, 3 Sep 2008 20:12:24 +0000 (17:12 -0300)]
V4L/DVB (8839): dib0700: add comment to identify 35th USB id pair

This comment helps to make the code more readable.

Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
15 years agoV4L/DVB (8837): dvb: fix I2C adapters name size
Jean Delvare [Wed, 3 Sep 2008 20:12:23 +0000 (17:12 -0300)]
V4L/DVB (8837): dvb: fix I2C adapters name size

Some DVB drivers are incorrectly assuming that the size of
i2c_adapter.name is I2C_NAME_SIZE.  Here's a fix.

Also change strncpy to strlcpy, as the former is error-prone (and was
indeed incorrectly used.)

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Acked-by: Uwe Bugla <uwe.bugla@gmx.de>
Reviewed-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Steven Toth <stoth@hauppauge.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
15 years agoV4L/DVB (8835): gspca: Same pixfmt as the sn9c102 driver and raw Bayer added in sonixb.
Hans de Goede [Wed, 3 Sep 2008 20:12:22 +0000 (17:12 -0300)]
V4L/DVB (8835): gspca: Same pixfmt as the sn9c102 driver and raw Bayer added in sonixb.

1) Lower the hstart setting for all sensor by 1 so that we generate
   (compressed) BGGR data just like sn9c102 does (instead of GBRG data)
2) Add support for raw bayer output in the lowest resolutions (not enough
   bandwidth for higher resolutions), this should work with all sensors but
   to be sure only enable it for sensors where it has been tested.

Signed-off-by: Hans de Goede <j.w.r.degoede@hhs.nl>
Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
15 years agoV4L/DVB (8834): gspca: Have a bigger buffer for sn9c10x compressed images.
Hans de Goede [Wed, 3 Sep 2008 20:12:22 +0000 (17:12 -0300)]
V4L/DVB (8834): gspca: Have a bigger buffer for sn9c10x compressed images.

Under certain conditions sonixb compressed frame size can get bigger then
the uncompressed size (seen with 0c45:6028), so make the buffers slightly
bigger.

Signed-off-by: Hans de Goede <j.w.r.degoede@hhs.nl>
Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
15 years agoV4L/DVB (8833): gspca: Cleanup the sonixb code.
Hans de Goede [Wed, 3 Sep 2008 20:12:21 +0000 (17:12 -0300)]
V4L/DVB (8833): gspca: Cleanup the sonixb code.

-the usb-id table caried several flags which were not usb-id specific but
 sensor specific, add a sensor_data array and move these flag there
-fr_h_sz was being abused to store and check which bridge was being used
 instead add a bridge member to the sd struct
-now that we have a sensor_data table use that to store pointers to
 init_sequences instead of using switch cases on sd->sensor

Signed-off-by: Hans de Goede <j.w.r.degoede@hhs.nl>
Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
15 years agoV4L/DVB (8832): gspca: Bad pixelformat of vc0321 webcams.
Jean-Francois Moine [Wed, 3 Sep 2008 20:12:20 +0000 (17:12 -0300)]
V4L/DVB (8832): gspca: Bad pixelformat of vc0321 webcams.

Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
15 years agoV4L/DVB (8831): gspca: Resolve webcam conflicts between some drivers.
Hans de Goede [Wed, 3 Sep 2008 20:12:20 +0000 (17:12 -0300)]
V4L/DVB (8831): gspca: Resolve webcam conflicts between some drivers.

-remove USB-id's from zc0301 for cams for which zc0301.c does not support
  the sensor
-remove USB-id's from sn9c102 for cams where sn9c102 does not support the
  bridge sensor combination
-no longer make inclusion of usb id's removed from zc0301 and sn9c102
  conditional in gspca
-fix conditional inclusion of USB-id's in gspca to also work when the
  conflicting drivers are build as a module
-add a number of USB-id's to gspca from various windows .inf files:
0c45:608f from generic sonix sn9c103 inf file (+ ov7630 which we support)
041e:4022 from creative webcam nx pro, same as already supported 041e:401e
0ac8:0301 from generic zc0301 driver which supports many sensors
10fd:804d from typhoon webshot driver (also FlyCAM-USB 300 plus)

Signed-off-by: Hans de Goede <j.w.r.degoede@hhs.nl>
Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
15 years agoV4L/DVB (8830): gspca: Move some probe code to the new init function.
Hans de Goede [Wed, 3 Sep 2008 20:12:19 +0000 (17:12 -0300)]
V4L/DVB (8830): gspca: Move some probe code to the new init function.

Signed-off-by: Hans de Goede <j.w.r.degoede@hhs.nl>
Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
15 years agoV4L/DVB (8829): gspca: Have a clean kmalloc-ated buffer for USB exchanges.
Jean-Francois Moine [Wed, 3 Sep 2008 20:12:19 +0000 (17:12 -0300)]
V4L/DVB (8829): gspca: Have a clean kmalloc-ated buffer for USB exchanges.

The USB buffer may be used for DMA and there may be a caching problem
if the buffer is part of the device structure.
Thanks to Alan Stern.

Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
15 years agoV4L/DVB (8828): gspca: Set the clock at the end of initialization in sonixj.
Jean-Francois Moine [Wed, 3 Sep 2008 20:12:18 +0000 (17:12 -0300)]
V4L/DVB (8828): gspca: Set the clock at the end of initialization in sonixj.

Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
15 years agoV4L/DVB (8827): gspca: Stop pac7302 autogain oscillation.
Hans de Goede [Wed, 3 Sep 2008 20:12:18 +0000 (17:12 -0300)]
V4L/DVB (8827): gspca: Stop pac7302 autogain oscillation.

Signed-off-by: Hans de Goede <j.w.r.degoede@hhs.nl>
Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
15 years agoV4L/DVB (8826): gspca: Webcam Labtec 2200 (093a:2626) added in pac7311.
Jean-Francois Moine [Wed, 3 Sep 2008 20:12:17 +0000 (17:12 -0300)]
V4L/DVB (8826): gspca: Webcam Labtec 2200 (093a:2626) added in pac7311.

Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
15 years agoV4L/DVB (8825): gspca: More controls for pac73xx and new webcam 093a:2624.
Hans de Goede [Wed, 3 Sep 2008 20:12:17 +0000 (17:12 -0300)]
V4L/DVB (8825): gspca: More controls for pac73xx and new webcam 093a:2624.

-Add usb id for 093a:2624 (pac7302)
-Report some controls to userspace with 7302 only, as they are 7302 only
-Add gain and exposure controls
-Add autogain
-Fix 7302 imaged being mirrored by default

Signed-off-by: Hans de Goede <j.w.r.degoede@hhs.nl>
Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
15 years agoV4L/DVB (8824): gspca: Too much code removed in the suspend/resume changeset.
Jean-Francois Moine [Wed, 3 Sep 2008 20:12:17 +0000 (17:12 -0300)]
V4L/DVB (8824): gspca: Too much code removed in the suspend/resume changeset.

- the stream must stop when the main application closes the device.

Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
15 years agoV4L/DVB (8823): gspca: H and V flips work for ov7670 only in ov519.
Jean-Francois Moine [Wed, 3 Sep 2008 20:12:16 +0000 (17:12 -0300)]
V4L/DVB (8823): gspca: H and V flips work for ov7670 only in ov519.

Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
15 years agoV4L/DVB (8822): gspca: Change some subdriver functions for suspend/resume.
Jean-Francois Moine [Wed, 3 Sep 2008 20:12:16 +0000 (17:12 -0300)]
V4L/DVB (8822): gspca: Change some subdriver functions for suspend/resume.

- new function 'init' called on probe and resume
- remove the functions 'open' and 'closed'
- 'stopN' and 'stop0' are optional

Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
15 years agoV4L/DVB (8820): gspca: Change initialization and gamma of zc3xx - pas106.
Jean-Francois Moine [Wed, 3 Sep 2008 20:12:16 +0000 (17:12 -0300)]
V4L/DVB (8820): gspca: Change initialization and gamma of zc3xx - pas106.

Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
15 years agoV4L/DVB (8819): gspca: Initialize the ov519 at open time and source cleanup.
Jean-Francois Moine [Wed, 3 Sep 2008 20:12:15 +0000 (17:12 -0300)]
V4L/DVB (8819): gspca: Initialize the ov519 at open time and source cleanup.

Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
15 years agoV4L/DVB (8818): gspca: Reinitialize the device on resume.
Jean-Francois Moine [Wed, 3 Sep 2008 20:12:15 +0000 (17:12 -0300)]
V4L/DVB (8818): gspca: Reinitialize the device on resume.

Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
15 years agoV4L/DVB (8817): gspca: LED and proble changes in sonixb.
Hans de Goede [Wed, 3 Sep 2008 20:12:15 +0000 (17:12 -0300)]
V4L/DVB (8817): gspca: LED and proble changes in sonixb.

- turn the led of the cam off after plugging in the cam
- move the probe code from open to config, so that if the probe fails
  we never register

Signed-off-by: Hans de Goede <j.w.r.degoede@hhs.nl>
Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
15 years agoV4L/DVB (8816): gspca: Set disabled ctrls and fix a register pb with ovxxxx in sonixb.
Hans de Goede [Wed, 3 Sep 2008 20:12:15 +0000 (17:12 -0300)]
V4L/DVB (8816): gspca: Set disabled ctrls and fix a register pb with ovxxxx in sonixb.

- set some controls as disabled instead of copying the device descr.
- in the ov6650 / 7650 exposure code clamp reg 11 before (instead of after)
  using it to calculate reg 10.
- disable brightness (instead of ignoring it) for the TAS5110.

Signed-off-by: Hans de Goede <j.w.r.degoede@hhs.nl>
Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
15 years agoV4L/DVB (8815): gspca: Fix problems with disabled controls.
Hans de Goede [Wed, 3 Sep 2008 20:12:14 +0000 (17:12 -0300)]
V4L/DVB (8815): gspca: Fix problems with disabled controls.

Signed-off-by: Hans de Goede <j.w.r.degoede@hhs.nl>
Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
15 years agoV4L/DVB (8814): gspca: Set DISABLED the disabled controls at query control time.
Jean-Francois Moine [Wed, 3 Sep 2008 20:12:14 +0000 (17:12 -0300)]
V4L/DVB (8814): gspca: Set DISABLED the disabled controls at query control time.

Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
15 years agoV4L/DVB (8813): gspca: Adjust SOF detection for pac73xx.
Hans de Goede [Wed, 3 Sep 2008 20:12:14 +0000 (17:12 -0300)]
V4L/DVB (8813): gspca: Adjust SOF detection for pac73xx.

Signed-off-by: Hans de Goede <j.w.r.degoede@hhs.nl>
Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
15 years agoV4L/DVB (8812): gspca: Do pac73xx webcams work.
Hans de Goede [Wed, 3 Sep 2008 20:12:14 +0000 (17:12 -0300)]
V4L/DVB (8812): gspca: Do pac73xx webcams work.

- documentation for some registers
- some preparations for adding autogain_n_exposure functionality
- various pac7311 fixes
- disable brightness and colors controls for 7311
- fix contrast control for 7311
- add hflip and vflip controls for 7311
- minimal jpeg header
- proper SOF detection

Signed-off-by: Hans de Goede <j.w.r.degoede@hhs.nl>
Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
15 years agoV4L/DVB (8810): gspca: Compile error when CONFIG_PM not defined.
Jean-Francois Moine [Wed, 3 Sep 2008 20:12:13 +0000 (17:12 -0300)]
V4L/DVB (8810): gspca: Compile error when CONFIG_PM not defined.

Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
15 years agoV4L/DVB (8809): gspca: Revert commit 9a9335776548d01525141c6e8f0c12e86bbde982
Hans de Goede [Wed, 3 Sep 2008 20:12:13 +0000 (17:12 -0300)]
V4L/DVB (8809): gspca: Revert commit 9a9335776548d01525141c6e8f0c12e86bbde982

the previous patch (sensor upside down).

Signed-off-by: Hans de Goede <j.w.r.degoede@hhs.nl>
Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
15 years agoV4L/DVB (8805): Steven Toth email address change
Steven Toth [Wed, 3 Sep 2008 20:12:12 +0000 (17:12 -0300)]
V4L/DVB (8805): Steven Toth email address change

I need this so I can better isolate my linux email from my
corporate email.

Signed-off-by: Steven Toth <stoth@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
15 years agoV4L/DVB (8804): s5h1411: Enable QAM_AUTO mode
Steven Toth [Wed, 3 Sep 2008 20:12:12 +0000 (17:12 -0300)]
V4L/DVB (8804): s5h1411: Enable QAM_AUTO mode

If apps pass QAM_AUTO then we need to obey it.

Signed-off-by: Steven Toth <stoth@hauppauge.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
15 years agoV4L/DVB (8803): s5h1409: Enable QAM_AUTO mode
Steven Toth [Wed, 3 Sep 2008 20:12:12 +0000 (17:12 -0300)]
V4L/DVB (8803): s5h1409: Enable QAM_AUTO mode

If apps pass QAM_AUTO then we need to obey it.

Signed-off-by: Steven Toth <stoth@hauppauge.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
15 years agoV4L/DVB (8790): saa7115: call i2c_set_clientdata only when state != NULL
Hans Verkuil [Wed, 3 Sep 2008 20:12:09 +0000 (17:12 -0300)]
V4L/DVB (8790): saa7115: call i2c_set_clientdata only when state != NULL

Not a bug as such, but it looks really strange doing this before
checking whether the state structure could be allocated.

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
15 years agoV4L/DVB (8779): v4l: fix more incorrect video_register_device result checks
Hans Verkuil [Wed, 3 Sep 2008 20:11:58 +0000 (17:11 -0300)]
V4L/DVB (8779): v4l: fix more incorrect video_register_device result checks

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
15 years agoV4L/DVB (8778): radio: fix incorrect video_register_device result check
Hans Verkuil [Wed, 3 Sep 2008 20:11:58 +0000 (17:11 -0300)]
V4L/DVB (8778): radio: fix incorrect video_register_device result check

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
15 years agoV4L/DVB (8769): cx18: Simplify queue flush logic to prevent oops in cx18_flush_queues()
Andy Walls [Wed, 3 Sep 2008 20:11:54 +0000 (17:11 -0300)]
V4L/DVB (8769): cx18: Simplify queue flush logic to prevent oops in cx18_flush_queues()

cx18: Simplify queue flush logic to prevent oops in cx18_flush_queues().
If accounting of a queue is in error, logic borrowed from ivtv will cause
an oops when flushing the queues for a stream.  This change greatly
simplifies the queue flush logic, and sets the queue back to sane
defaults on a flush.

Signed-off-by: Andy Walls <awalls@radix.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
15 years agoV4L/DVB (8757): v4l-dvb: fix a bunch of sparse warnings
Hans Verkuil [Wed, 3 Sep 2008 20:11:54 +0000 (17:11 -0300)]
V4L/DVB (8757): v4l-dvb: fix a bunch of sparse warnings

Fixed a lot of sparse warnings: mostly warnings about shadowed variables
and signed/unsigned mismatches.

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
15 years agoV4L/DVB (8751): vivi: Fix some issues at vivi register routine
Mauro Carvalho Chehab [Wed, 3 Sep 2008 20:11:53 +0000 (17:11 -0300)]
V4L/DVB (8751): vivi: Fix some issues at vivi register routine

This patch fixes several small issues at vivi register routines:

1) minor and n_devs should be unsigned;
2) n_devs = 0 were not properly handled;
3) if n_devs specify a high number, the driver would just roll back and
won't register any device. The proper behaviour is to keep all succeded
devices registered;
4) both n_devs and minor were using 0 as permissions. Better to have
them with 0444.

With the current patch, if n_devs specify a very large value, it will
register all possible devices. For example, on a machine without any
other V4L drivers loaded, with this patch, we will have something like:

vivi: V4L2 device registered as /dev/video0
vivi: V4L2 device registered as /dev/video1
vivi: V4L2 device registered as /dev/video2
...
vivi: V4L2 device registered as /dev/video31
video_register_device_index: get_index failed
Video Technology Magazine Virtual Video Capture Board ver 0.5.0 successfully loaded.

5) The number of allocated devices on success is now kept at n_devs:

$ cat /sys/module/vivi/parameters/n_devs
32

Thanks to Henne <henne@nachtwindheim.de> for pointing that there were
some issues at vivi.

Cc: Henne <henne@nachtwindheim.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
15 years agoV4L/DVB (8750): V4L: check inval in video_register_device_index()
Henrik Kretzschmar [Wed, 3 Sep 2008 20:11:53 +0000 (17:11 -0300)]
V4L/DVB (8750): V4L: check inval in video_register_device_index()

Better check the video_device pointer before using it.

Signed-off-by: Henrik Kretzschmar <henne@nachtwindheim.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
15 years agoV4L/DVB (8749): Fix error code, when camera is not turned on by sonypi
Mauro Carvalho Chehab [Wed, 3 Sep 2008 20:11:52 +0000 (17:11 -0300)]
V4L/DVB (8749): Fix error code, when camera is not turned on by sonypi

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
15 years agoV4L/DVB (8728): 1-make-pms-not-autoprobe-when-builtin update
Rene Herman [Wed, 3 Sep 2008 19:48:23 +0000 (16:48 -0300)]
V4L/DVB (8728): 1-make-pms-not-autoprobe-when-builtin update

On 10-08-08 23:37, Alan Cox wrote:
>
> Would probably make the printk "pms: not enabled, use pms.enable=1 to
> probe"
>
> So you know
> a) What is wittering about not being probed
> b) How to undo it.
>
> But thats trivia really.

Signed-off-by: Rene Herman <rene.herman@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
15 years agoV4L/DVB (8727): V4L1: make PMS not autoprobe when builtin.
Rene Herman [Wed, 3 Sep 2008 19:48:21 +0000 (16:48 -0300)]
V4L/DVB (8727): V4L1: make PMS not autoprobe when builtin.

The old Mediavision Pro Movie Studio legacy ISA V4L1 driver was found to
hang the boot during Ingo Molnar's testing of randconfig kernels.  Have it
require a "pms.enable=1" kernel parameter to enable the driver when
builtin which avoids such problems.

This is a deprecated and, very likely, unused driver.  Nothing changes
modular behaviour moreover.

Signed-off-by: Rene Herman <rene.herman@gmail.com>
Acked-by: Alan Cox <alan@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
15 years agoV4L/DVB (8726): link tuner before saa7134
Simon Arlott [Wed, 3 Sep 2008 19:48:20 +0000 (16:48 -0300)]
V4L/DVB (8726): link tuner before saa7134

If saa7134_init is run before v4l2_i2c_drv_init (tuner), then
saa7134_board_init2 will try to set the tuner type for devices that don't
exist yet.  This moves tuner to before all of the device-specific drivers
so that it's loaded early enough on boot.

Signed-off-by: Simon Arlott <simon@fire.lp0.eu>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
15 years agoV4L/DVB (8722): sms1xxx: fix typo in license header
Michael Krufky [Wed, 3 Sep 2008 19:48:17 +0000 (16:48 -0300)]
V4L/DVB (8722): sms1xxx: fix typo in license header

This should have read, "GNU General Public License version 2"
rather than, "GNU General Public License version 3"

This was actually a typo mass-blunder -- this is not a change in licence,
as the code was always GPLv2.

Signed-off-by: Uri Shkolnik <uris@siano-ms.com>
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
15 years agoV4L/DVB (8720): gspca: V4L2_CAP_SENSOR_UPSIDE_DOWN added as a cap for some webcams.
Hans de Goede [Wed, 3 Sep 2008 19:48:16 +0000 (16:48 -0300)]
V4L/DVB (8720): gspca: V4L2_CAP_SENSOR_UPSIDE_DOWN added as a cap for some webcams.

This patch adds a V4L2_CAP_SENSOR_UPSIDE_DOWN flag to the capabilities flags,
and sets this flag for the Philips SPC200NC cam (which has its sensor installed
upside down). The same flag is also needed and added for the Philips SPC300NC.

Together with a patch to libv4l which adds flipping the image in software this
fixes the upside down display with the SPC200NC cam.

Signed-of-by: Hans de Goede <j.w.r.degoede@hhs.nl>
Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
15 years agoV4L/DVB (8719): gspca: Have VIDIOC_QUERYCTRL more compliant to the spec.
Jean-Francois Moine [Wed, 3 Sep 2008 19:48:14 +0000 (16:48 -0300)]
V4L/DVB (8719): gspca: Have VIDIOC_QUERYCTRL more compliant to the spec.

- return -EINVAL when control not supported.
- start the private controls at V4L2_CID_PRIVATE_BASE.

Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
15 years agoV4L/DVB (8718): gspca: suspend/resume added.
Jean-Francois Moine [Wed, 3 Sep 2008 19:48:10 +0000 (16:48 -0300)]
V4L/DVB (8718): gspca: suspend/resume added.

Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
15 years agoV4L/DVB (8717): gspca: Frame buffer too small for small resolutions (sonixj and t613).
Jean-Francois Moine [Wed, 3 Sep 2008 19:48:09 +0000 (16:48 -0300)]
V4L/DVB (8717): gspca: Frame buffer too small for small resolutions (sonixj and t613).

Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
15 years agoV4L/DVB (8716): gspca: Bad start of sn9c110 and sensor ov7630.
Jean-Francois Moine [Wed, 3 Sep 2008 19:48:08 +0000 (16:48 -0300)]
V4L/DVB (8716): gspca: Bad start of sn9c110 and sensor ov7630.

Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
15 years agoV4L/DVB (8715): gspca: Change the name of some webcam in the gspca doc.
Jean-Francois Moine [Wed, 3 Sep 2008 19:48:07 +0000 (16:48 -0300)]
V4L/DVB (8715): gspca: Change the name of some webcam in the gspca doc.

Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
15 years agoV4L/DVB (8714): gspca: Bad start of sn9c110 and sensor om6802.
Jean-Francois Moine [Wed, 3 Sep 2008 19:48:05 +0000 (16:48 -0300)]
V4L/DVB (8714): gspca: Bad start of sn9c110 and sensor om6802.

Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
15 years agoV4L/DVB (8713): gspca: Bad color control again in sonixj.
Jean-Francois Moine [Wed, 3 Sep 2008 19:48:04 +0000 (16:48 -0300)]
V4L/DVB (8713): gspca: Bad color control again in sonixj.

Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
15 years agoV4L/DVB (8712): gspca: Bad start of sonixj webcams since changeset a8779025e7e8.
Jean-Francois Moine [Wed, 3 Sep 2008 19:48:03 +0000 (16:48 -0300)]
V4L/DVB (8712): gspca: Bad start of sonixj webcams since changeset a8779025e7e8.

Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>