pandora-kernel.git
15 years agoV4L/DVB (8048): saa7134: Fix entries for Avermedia A16d and Avermedia E506
Tim Farrington [Sun, 15 Jun 2008 16:33:42 +0000 (13:33 -0300)]
V4L/DVB (8048): saa7134: Fix entries for Avermedia A16d and Avermedia E506

Also, adds IR table for Avermedia A16d

Signed-off-by: Tim Farrington <timf@iinet.net.au>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
15 years agoV4L/DVB (8044): au8522: tuning optimizations
Michael Krufky [Fri, 13 Jun 2008 23:33:23 +0000 (20:33 -0300)]
V4L/DVB (8044): au8522: tuning optimizations

If the current modulation and frequency is already set to
the desired parameters, then don't re-tune.

Don't store current frequency until after we've tuned successfully.

Force a re-tune after resume from standby.

Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
15 years agoV4L/DVB (8043): au0828: add support for additional USB device id's
Michael Krufky [Fri, 13 Jun 2008 06:29:43 +0000 (03:29 -0300)]
V4L/DVB (8043): au0828: add support for additional USB device id's

Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
15 years agoV4L/DVB (8042): DVB-USB UMT-010 channel scan oops
Austin Lund [Fri, 13 Jun 2008 14:02:43 +0000 (11:02 -0300)]
V4L/DVB (8042): DVB-USB UMT-010 channel scan oops

In the umt-010 driver the struct umt_properties sets the number of URBs for
transfer to 20.  But in dvb-usb.h MAX_NO_URBS_FOR_DATA_STREAM is set to 10.

Not surprisingly this causes an oops for all devices which use the umt-010
chipset when they are inserted.

fix on Kaffeine channel scan for

Initialize stream count using MAX_NO_URBS_FOR_DATA_STREAM.

Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
Signed-off-by: maximilian attems <max@stro.at>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
15 years agoV4L/DVB (8040): soc-camera: remove soc_camera_host_class class
Guennadi Liakhovetski [Fri, 13 Jun 2008 12:11:01 +0000 (09:11 -0300)]
V4L/DVB (8040): soc-camera: remove soc_camera_host_class class

Devices can either be class devices or bus devices, not both at the
same time. Soc-camera host devices usually have a platform device as
their parent. Trying to also register them with a class crashes the
kernel, when linked statically. Interestingly, it works when built
as a module. Thanks to Paulius Zaleckas for reporting.

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@pengutronix.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
15 years agoV4L/DVB (8039): pxa-camera: fix platform_get_irq() error handling.
Guennadi Liakhovetski [Fri, 13 Jun 2008 12:03:45 +0000 (09:03 -0300)]
V4L/DVB (8039): pxa-camera: fix platform_get_irq() error handling.

platform_get_irq() returns a negative value on error, not 0.

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@pengutronix.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
15 years agoV4L/DVB (8037): tda18271: ensure that the thermometer is off during channel configuration
Michael Krufky [Wed, 11 Jun 2008 16:52:49 +0000 (13:52 -0300)]
V4L/DVB (8037): tda18271: ensure that the thermometer is off during channel configuration

Having the thermometer on during channel configuration
could cause tuning instability.

Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
15 years agoV4L/DVB (8036): tda18271: toggle rf agc speed mode on TDA18271HD/C2 only
Michael Krufky [Mon, 9 Jun 2008 05:03:31 +0000 (02:03 -0300)]
V4L/DVB (8036): tda18271: toggle rf agc speed mode on TDA18271HD/C2 only

Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
15 years agoV4L/DVB (8035): tda18271: dont touch EB14 if rf_cal lookup is out of range
Michael Krufky [Mon, 9 Jun 2008 01:12:37 +0000 (22:12 -0300)]
V4L/DVB (8035): tda18271: dont touch EB14 if rf_cal lookup is out of range

The TDA18271HD/C1 rf_cal map lookup is expected to go out of range outside
of the frequency window 41 MHz - 61.1 MHz.  In these cases, the internal
RF tracking filters calibration mechanism is used.

Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
15 years agoV4L/DVB (8034): tda18271: fix IF notch frequency handling
Michael Krufky [Sun, 8 Jun 2008 23:10:29 +0000 (20:10 -0300)]
V4L/DVB (8034): tda18271: fix IF notch frequency handling

The IF notch bit gets unset when we update the Main Post Div register
value, before we have a chance to write the desired IF notch setting
to the tuner.  Move the IF notch configuration to after we update MPD.

Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
15 years agoV4L/DVB (8029): Improve error message at tda1004x_attach
Mauro Carvalho Chehab [Sat, 14 Jun 2008 14:27:34 +0000 (11:27 -0300)]
V4L/DVB (8029): Improve error message at tda1004x_attach

When an error occurs at firmware loading, sometimes, tda1004x stops answering.
Instead of reporting such error, attach code were assuming that the device were
answering an invalid ID (0xff). This can be seen when enabling debug options:

tda1004x: tda1004x_read_byte: reg=0x0
tda1004x: tda1004x_read_byte: error reg=0x0, ret=-5

Now, instead of reporting an invalid ID, it will report the correct error:

tda10046: chip is not answering. Giving up.
saa7133[0]/dvb: failed to attach tda10046
saa7133[0]/dvb: frontend initialization failed

A possible improvement would be trying to reset the device.

Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
15 years agoV4L/DVB (8028): Improve error messages for tda1004x attach
Mauro Carvalho Chehab [Sat, 14 Jun 2008 13:44:04 +0000 (10:44 -0300)]
V4L/DVB (8028): Improve error messages for tda1004x attach

A fresh copy of v.29 firmware, using get_firmware, is leading to an invalid
firmware:

DVB: registering new adapter (saa7133[0])
DVB: registering frontend 0 (Philips TDA10046H DVB-T)...
tda1004x: setting up plls for 48MHz sampling clock
tda1004x: found firmware revision ff -- invalid
tda1004x: trying to boot from eeprom
tda1004x: found firmware revision ff -- invalid
tda1004x: waiting for firmware upload...
tda1004x: Error during firmware upload
tda1004x: found firmware revision ff -- invalid
tda1004x: firmware upload failed

Sometimes, loading/unloading this firmware makes tda1004x to return an invalid
ID. However, there were no printk messages to help to identify what were the
cause for the error.

With this patch, it will now print:

Invalid tda1004x ID = 0xff. Can't proceed
saa7133[0]/dvb: failed to attach tda10046
saa7133[0]/dvb: frontend initialization failed

Tested with LifeView FlyDVB-T Hybrid Cardbus/MSI TV @nywhere A/D NB

Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
15 years agoV4L/DVB (8027): saa7134: Avermedia A700: only s-video and composite input are working
Matthias Schwarzott [Fri, 13 Jun 2008 22:28:17 +0000 (19:28 -0300)]
V4L/DVB (8027): saa7134: Avermedia A700: only s-video and composite input are working

Describe exactly that only s-video and composite input are working on Avermedia
A700

Signed-off-by: Matthias Schwarzott <zzam@gentoo.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
15 years agoV4L/DVB (8026): Avoids an OOPS if dev struct can't be successfully recovered
Mauro Carvalho Chehab [Sat, 14 Jun 2008 12:41:18 +0000 (09:41 -0300)]
V4L/DVB (8026): Avoids an OOPS if dev struct can't be successfully recovered

On some alsa versions, it seems that snd_pcm_substream_chip(substream)
is returning a NULL pointer. This causes an OOPS, as reported by:

https://bugs.launchpad.net/ubuntu/+source/linux-ubuntu-modules-2.6.24/+bug/212271
https://bugs.launchpad.net/ubuntu/+source/alsa-driver/+bug/212960

This patch avoids the OOPS by not letting and open() succeed.

Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
15 years agoV4L/DVB (8022): saa7134: fix race between opening and closing the device
Marcin Slusarz [Tue, 10 Jun 2008 18:18:16 +0000 (15:18 -0300)]
V4L/DVB (8022): saa7134: fix race between opening and closing the device

decrementing dev->empress_users should be done as last action of ts_release,
because it sleeps and write access to dev->empress_started is not protected
in any way
(additionally closing thread could mute audio after opening thread unmuted it)

Signed-off-by: Marcin Slusarz <marcin.slusarz@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
15 years agoV4L/DVB (8020): Fix callbacks functions of saa7134_empress
Dmitri Belimov [Tue, 10 Jun 2008 17:19:31 +0000 (14:19 -0300)]
V4L/DVB (8020): Fix callbacks functions of saa7134_empress

If I try v4l2-ctl --all -d /dev/video1 or v4l2-ctl --streamon -d /dev/video1
modules crashed:

*pde = 00000000
Modules linked in: ac battery loop saa7134_empress(F) saa6752hs(F) tuner_simple(F) tuner_types(F) tea5767(F) tda9887(F) tda8290(F) tea5761(F) tuner(F) snd_cmipci snd_pcm snd_page_alloc snd_opl3_lib saa7134(F) snd_mpu401 parport_pc parport snd_timer snd_hwdep snd_mpu401_uart floppy rtc psmouse videodev(F) v4l1_compat(F) compat_ioctl32(F) v4l2_common(F) videobuf_dma_sg(F) videobuf_core(F) snd_rawmidi snd_seq_device via_ircc pcspkr snd ir_kbd_i2c(F) irda soundcore ir_common(F) crc_ccitt tveeprom(F) i2c_viapro i2c_core button via_agp agpgart evdev ext3 jbd mbcache ide_cd_mod cdrom ide_disk 8139cp via82cxxx ide_core 8139too mii ehci_hcd uhci_hcd usbcore thermal processor fan

EIP is at __mutex_lock_slowpath+0x29/0x7b
 DS: 007b ES: 007b FS: 00d8 GS: 0033 SS: 0068
Process v4l2-ctl (pid: 2742, ti=ced7e000 task=cf325260 task.ti=ced7e000)
       d08e5411 00000000 ced7fed4 00000000 d0975acb 40045612 cfa86ee0 ffffffcd
       cf2b7000 ced7febc c03858d6 00000019 00000292 d089e4ec cf37b2a0 d089e4a0
Call Trace:
 [<c028b52b>] mutex_lock+0xa/0xb
 [<d08e5411>] videobuf_streamon+0xf/0x9a [videobuf_core]
 [<d0975acb>] __video_do_ioctl+0x136a/0x2d68 [videodev]
 [<d088f789>] task_end_request+0x40/0x51 [ide_core]
 [<d088c4aa>] ide_intr+0x187/0x192 [ide_core]
 [<c016a551>] mntput_no_expire+0x11/0x64
 [<c0160b1c>] path_walk+0x90/0x98
 [<d0977738>] video_ioctl2+0x173/0x239 [videodev]
 [<c0140936>] filemap_fault+0x202/0x370
 [<c014930a>] __do_fault+0x2c3/0x2fe
 [<c014ab03>] handle_mm_fault+0x22a/0x49f
 [<c0162737>] vfs_ioctl+0x47/0x5d
 [<c0162992>] do_vfs_ioctl+0x245/0x258
 [<c01629e6>] sys_ioctl+0x41/0x5b
 [<c01036a6>] sysenter_past_esp+0x5f/0x85
 =======================

After this fix all of that commands works without problem:

v4l2-ctl --all -d /dev/video1

Driver Info:
Driver name   : saa7134
Card type     : Beholder BeholdTV M6 Extra
Bus info      : PCI:0000:00:0d.0
Driver version: 526
Capabilities  : 0x05000001
Video Capture
Read/Write
Streaming
Format Video Capture:
Width/Height  : 720/576
Pixel Format  : MPEG
Field         : Any
Bytes per Line: 0
Size Image    : 58656
Colorspace    : Unknown (00000000)
Video input : 0 (CCIR656)
Video Standard = 0x000000ff
PAL-B/B1/G/H/I/D/D1/K

P.S. data from /dev/video1 is not correct :(( .

Signed-off-by: Beholder Intl. Ltd. Dmitry Belimov <d.belimov@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
15 years agoV4L/DVB (8018): Add em2860 chip ID
Devin Heitmueller [Tue, 10 Jun 2008 15:35:42 +0000 (12:35 -0300)]
V4L/DVB (8018): Add em2860 chip ID

em28xx-cards.c
em28xx-reg.h
 - Add em2860 chip ID (seen on Pointnix Intra-Oral Camera)
   http://www.pointnix.com/ENG/dental/product_02.asp

Signed-off-by: Devin Heitmueller <devin.heitmueller@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
15 years agoV4L/DVB (8017): Ensure em28xx extensions only get run against devs that support them
Devin Heitmueller [Tue, 10 Jun 2008 15:34:35 +0000 (12:34 -0300)]
V4L/DVB (8017): Ensure em28xx extensions only get run against devs that support them

em28xx-audio.c
em28xx-dvb.c
 - Em28xx extensions should ensure they are being only loaded against devices
   that support them.  Deals with case where there are multiple em28xx
   devices, some of which have DVB (or ALSA) support and some do not.

Signed-off-by: Devin Heitmueller <devin.heitmueller@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
15 years agoV4L/DVB (8015): gl861: replace non critical msleep(0) with msleep(1) to be on the...
Antti Palosaari [Tue, 10 Jun 2008 14:41:58 +0000 (11:41 -0300)]
V4L/DVB (8015): gl861: replace non critical msleep(0) with msleep(1) to be on the safe side

- change msleep(0) to msleep(1)

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
15 years agoV4L/DVB (8013): gl861: remove useless identify_state
Antti Palosaari [Thu, 29 May 2008 01:04:12 +0000 (22:04 -0300)]
V4L/DVB (8013): gl861: remove useless identify_state

- remove useless identify_state - device is always warm

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
15 years agoV4L/DVB (8012): gl861: sleep a little to avoid I2C errors
Antti Palosaari [Thu, 29 May 2008 00:55:06 +0000 (21:55 -0300)]
V4L/DVB (8012): gl861: sleep a little to avoid I2C errors

- add little sleep to avoid I2C errors arising on faster CPUs

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
15 years agoV4L/DVB (8011): em28xx: enable DVB for HVR-900
Devin Heitmueller [Mon, 9 Jun 2008 17:59:05 +0000 (14:59 -0300)]
V4L/DVB (8011): em28xx: enable DVB for HVR-900

em28xx-cards.c
 - DVB support is supposed to be enabled for the first generation HVR-900.
   This device was confirmed with DVB by mkrufky when we did the original work
   in April, but I guess we forgot to set the flag.

Signed-off-by: Devin Heitmueller <devin.heitmueller@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
15 years agoV4L/DVB (8010): em28xx: Properly register extensions for already attached devices
Devin Heitmueller [Mon, 9 Jun 2008 17:58:04 +0000 (14:58 -0300)]
V4L/DVB (8010): em28xx: Properly register extensions for already attached devices

em28xx-video.c
 - Properly handle loading of the module when multiple devices are already
   connected (such as at bootup).  Before we were only calling dvb_init()
   against the last device in the list, so while we were handling subsequent
   adds properly, if there were multiple devices present on driver load,
   everybody except the last device would not get initialized.

Signed-off-by: Devin Heitmueller <devin.heitmueller@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
15 years agoV4L/DVB (8008): cx18: remove duplicate audio and video input enums
Hans Verkuil [Sun, 8 Jun 2008 09:05:18 +0000 (06:05 -0300)]
V4L/DVB (8008): cx18: remove duplicate audio and video input enums

cx18-cards.h had a copy of the audio and video input enums
from cx18-av-core.h, but with different prefixes. Removed
that copy and used the ones from cx18-av-core.h.

Thanks to Andy Walls <awalls@radix.net> for the report.

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
15 years agoV4L/DVB (8007): cx18/cx25840: the S-Video LUMA input can use all In1-In8 inputs
Hans Verkuil [Sat, 7 Jun 2008 14:18:17 +0000 (11:18 -0300)]
V4L/DVB (8007): cx18/cx25840: the S-Video LUMA input can use all In1-In8 inputs

The S-Video LUMA input was restricted to the In1-In4 inputs, but it
turns out that it can use the full range of In1-In8.

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
15 years agoV4L/DVB (8005): Fix OOPS if frontend is null
Mauro Carvalho Chehab [Sat, 7 Jun 2008 18:54:10 +0000 (15:54 -0300)]
V4L/DVB (8005): Fix OOPS if frontend is null

Thanks to timf <timf@iinet.net.au> and Mike Galbraith <efault@gmx.de> to report
this issue.

Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
15 years agoV4L/DVB (8004): Fix INPUT dependency at budget-ci
Mauro Carvalho Chehab [Thu, 5 Jun 2008 21:59:08 +0000 (18:59 -0300)]
V4L/DVB (8004): Fix INPUT dependency at budget-ci

As reported by Ingo Molnar:
MODPOST 346 modules
ERROR: "input_free_device" [drivers/media/dvb/ttpci/budget-ci.ko] undefined!
ERROR: "input_register_device" [drivers/media/dvb/ttpci/budget-ci.ko] undefined!
ERROR: "input_allocate_device" [drivers/media/dvb/ttpci/budget-ci.ko] undefined!
ERROR: "input_unregister_device" [drivers/media/dvb/ttpci/budget-ci.ko] undefined!
ERROR: "input_event" [drivers/media/common/ir-common.ko] undefined!

This occurs when:

CONFIG_INPUT=n
CONFIG_VIDEO_IR=m
CONFIG_DVB_BUDGET_CI=m

Thanks-to: Ingo Molnar <mingo@elte.hu>

Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
15 years agox86: section/warning fixes
Daniel J Blueman [Sun, 15 Jun 2008 11:32:15 +0000 (12:32 +0100)]
x86: section/warning fixes

WARNING: arch/x86/mm/built-in.o(.text+0x3a1): Section mismatch in
reference from the function set_pte_phys() to the function
.init.text:spp_getpage()
The function set_pte_phys() references
the function __init spp_getpage().
This is often because set_pte_phys lacks a __init
annotation or the annotation of spp_getpage is wrong.

arch/x86/mm/init_64.c: In function 'early_memtest':
arch/x86/mm/init_64.c:520: warning: passing argument 2 of
'find_e820_area_size' from incompatible pointer type

Signed-off-by: Daniel J Blueman <daniel.blueman@gmail.com>
Cc: "Linus Torvalds" <torvalds@linux-foundation.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
15 years agox86: shift bits the right way in native_read_tscp
Max Asbock [Wed, 25 Jun 2008 21:45:28 +0000 (14:45 -0700)]
x86: shift bits the right way in native_read_tscp

native_read_tscp shifts the bits in the high order value in the
wrong direction, the attached patch fixes that.

Signed-off-by: Max Asbock <masbock@linux.vnet.ibm.com>
Acked-by: Glauber Costa <gcosta@redhat.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
15 years agoMerge branches 'release', 'acpi_disabled' and 'bugzilla-10958' into release
Len Brown [Thu, 26 Jun 2008 05:56:35 +0000 (01:56 -0400)]
Merge branches 'release', 'acpi_disabled' and 'bugzilla-10958' into release

15 years agodock: bay: Don't call acpi_walk_namespace() when ACPI is disabled.
Len Brown [Wed, 25 Jun 2008 02:57:12 +0000 (22:57 -0400)]
dock: bay: Don't call acpi_walk_namespace() when ACPI is disabled.

Signed-off-by: Len Brown <len.brown@intel.com>
15 years agoACPI: don't walk tables if ACPI was disabled
Vegard Nossum [Fri, 20 Jun 2008 13:39:09 +0000 (15:39 +0200)]
ACPI: don't walk tables if ACPI was disabled

Ingo Molnar wrote:
> -tip auto-testing started triggering this spinlock corruption message
> yesterday:
>
> [    3.976213] calling  acpi_rtc_init+0x0/0xd3
> [    3.980213] ACPI Exception (utmutex-0263): AE_BAD_PARAMETER, Thread F7C50000 could not acquire Mutex [3] [20080321]
> [    3.992213] BUG: spinlock bad magic on CPU#0, swapper/1
> [    3.992213]  lock: c2508dc4, .magic: 00000000, .owner: swapper/1, .owner_cpu: 0

This is apparently because some parts of ACPI, including mutexes, are not
initialized when acpi=off is passed to the kernel.

Reported-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Vegard Nossum <vegard.nossum@gmail.com>
Signed-off-by: Len Brown <len.brown@intel.com>
15 years agothermal: Create CONFIG_THERMAL_HWMON=n
Rene Herman [Tue, 24 Jun 2008 17:38:56 +0000 (19:38 +0200)]
thermal: Create CONFIG_THERMAL_HWMON=n

A bug in libsensors <= 2.10.6 is exposed
when this new hwmon I/F is enabled.
Create CONFIG_THERMAL_HWMON=n
until some time after libsensors 2.10.7 ships
so those users can run the latest kernel.

libsensors 3.x is already fixed -- those users
can use CONFIG_THERMAL_HWMON=y now.

Signed-off-by: Rene Herman <rene.herman@gmail.com>
Acked-by: Mark M. Hoffman <mhoffman@lightlink.com>
Signed-off-by: Len Brown <len.brown@intel.com>
15 years ago[SCSI] esp: tidy up target reference counting
James Bottomley [Mon, 23 Jun 2008 19:52:09 +0000 (14:52 -0500)]
[SCSI] esp: tidy up target reference counting

The esp driver currently does hand rolled reference counting of its
target.  It's much easier to do what it needs to do if it's plugged into
the mid-layer callbacks (target_alloc and target_destroy) which were
designed for this case, so do it this way and get rid of the internal
target reference count.

Acked-by: David S. Miller <davem@davemloft.net>
Cc: Stable Tree <stable@kernel.org>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
15 years agoiwlwifi: improve scanning band selection management
Ron Rindjunsky [Wed, 25 Jun 2008 08:46:31 +0000 (16:46 +0800)]
iwlwifi: improve scanning band selection management

This patch modifies the band selection management when scanning, so
bands are now scanned according to HW band support.

Signed-off-by: Ron Rindjunsky <ron.rindjunsky@intel.com>
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agort2x00: Fix unbalanced mutex locking
Ivo van Doorn [Fri, 20 Jun 2008 20:11:00 +0000 (22:11 +0200)]
rt2x00: Fix unbalanced mutex locking

The usb_cache_mutex was not correctly released
under all circumstances. Both rt73usb as rt2500usb
didn't release the mutex under certain conditions
when the register access failed. Obviously such
failure would lead to deadlocks.

In addition under similar circumstances when the
bbp register couldn't be read the value must be
set to 0xff to indicate that the value is wrong.
This too didn't happen under all circumstances.

Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agob43legacy: Fix possible NULL pointer dereference in DMA code
Michael Buesch [Fri, 20 Jun 2008 09:40:46 +0000 (11:40 +0200)]
b43legacy: Fix possible NULL pointer dereference in DMA code

This fixes a possible NULL pointer dereference in an error path of the
DMA allocation error checking code. This is also necessary for a future
DMA API change that is on its way into the mainline kernel that adds
an additional dev parameter to dma_mapping_error().

Signed-off-by: Michael Buesch <mb@bu3sch.de>
Cc: stable <stable@kernel.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agob43: Fix possible MMIO access while device is down
Michael Buesch [Sun, 15 Jun 2008 14:01:24 +0000 (16:01 +0200)]
b43: Fix possible MMIO access while device is down

This fixes a possible MMIO access while the device is still down
from a suspend cycle. MMIO accesses with the device powered down
may cause crashes on certain devices.

Signed-off-by: Michael Buesch <mb@bu3sch.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agob43legacy: Do not return TX_BUSY from op_tx
Michael Buesch [Sun, 15 Jun 2008 13:27:49 +0000 (15:27 +0200)]
b43legacy: Do not return TX_BUSY from op_tx

Never return TX_BUSY from op_tx. It doesn't make sense to return
TX_BUSY, if we can not transmit the packet.
Drop the packet and return TX_OK.

Signed-off-by: Michael Buesch <mb@bu3sch.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agob43: Do not return TX_BUSY from op_tx
Michael Buesch [Sun, 15 Jun 2008 13:17:29 +0000 (15:17 +0200)]
b43: Do not return TX_BUSY from op_tx

Never return TX_BUSY from op_tx. It doesn't make sense to return
TX_BUSY, if we can not transmit the packet.
Drop the packet and return TX_OK.
This will fix the resume hang.

Signed-off-by: Michael Buesch <mb@bu3sch.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agomac80211: implement EU regulatory domain
Tony Vroon [Wed, 11 Jun 2008 20:23:56 +0000 (16:23 -0400)]
mac80211: implement EU regulatory domain

Implement missing EU regulatory domain for mac80211. Based on the
information in IEEE 802.11-2007 (specifically pages 1142, 1143 & 1148)
and ETSI 301 893 (V1.4.1).
With thanks to Johannes Berg.

Signed-off-by: Tony Vroon <tony@linx.net>
Acked-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
15 years agoBlackfin arch: fix up section mismatch warning
Bryan Wu [Wed, 25 Jun 2008 04:41:51 +0000 (12:41 +0800)]
Blackfin arch: fix up section mismatch warning

--
WARNING: vmlinux.o(.text+0x721a): Section mismatch in reference from the function ___fill_code_cplbtab() to the function .init.text:_fill_cplbtab()
The function ___fill_code_cplbtab() references
the function __init _fill_cplbtab().
This is often because ___fill_code_cplbtab lacks a __init
annotation or the annotation of _fill_cplbtab is wrong.

WARNING: vmlinux.o(.text+0x7238): Section mismatch in reference from the function ___fill_code_cplbtab() to the function .init.text:_fill_cplbtab()
The function ___fill_code_cplbtab() references
the function __init _fill_cplbtab().
This is often because ___fill_code_cplbtab lacks a __init
annotation or the annotation of _fill_cplbtab is wrong.

WARNING: vmlinux.o(.text+0x7250): Section mismatch in reference from the function ___fill_code_cplbtab() to the function .init.text:_fill_cplbtab()
The function ___fill_code_cplbtab() references
the function __init _fill_cplbtab().
This is often because ___fill_code_cplbtab lacks a __init
annotation or the annotation of _fill_cplbtab is wrong.

WARNING: vmlinux.o(.text+0x7264): Section mismatch in reference from the function ___fill_code_cplbtab() to the function .init.text:_fill_cplbtab()
The function ___fill_code_cplbtab() references
the function __init _fill_cplbtab().
This is often because ___fill_code_cplbtab lacks a __init
annotation or the annotation of _fill_cplbtab is wrong.

WARNING: vmlinux.o(.text+0x72a2): Section mismatch in reference from the function ___fill_data_cplbtab() to the function .init.text:_fill_cplbtab()
The function ___fill_data_cplbtab() references
the function __init _fill_cplbtab().
This is often because ___fill_data_cplbtab lacks a __init
annotation or the annotation of _fill_cplbtab is wrong.

WARNING: vmlinux.o(.text+0x72bc): Section mismatch in reference from the function ___fill_data_cplbtab() to the function .init.text:_fill_cplbtab()
The function ___fill_data_cplbtab() references
the function __init _fill_cplbtab().
This is often because ___fill_data_cplbtab lacks a __init
annotation or the annotation of _fill_cplbtab is wrong.

WARNING: vmlinux.o(.text+0x72d4): Section mismatch in reference from the function ___fill_data_cplbtab() to the function .init.text:_fill_cplbtab()
The function ___fill_data_cplbtab() references
the function __init _fill_cplbtab().
This is often because ___fill_data_cplbtab lacks a __init
annotation or the annotation of _fill_cplbtab is wrong.

WARNING: vmlinux.o(.text+0x72e8): Section mismatch in reference from the function ___fill_data_cplbtab() to the function .init.text:_fill_cplbtab()
The function ___fill_data_cplbtab() references
the function __init _fill_cplbtab().
This is often because ___fill_data_cplbtab lacks a __init
annotation or the annotation of _fill_cplbtab is wrong.
--

Signed-off-by: Bryan Wu <cooloney@kernel.org>
15 years agoBlackfin arch: fix bug - kernel boot fails when Spinlock and rw-lock debugging enabled
Sonic Zhang [Wed, 25 Jun 2008 04:02:07 +0000 (12:02 +0800)]
Blackfin arch: fix bug - kernel boot fails when Spinlock and rw-lock debugging enabled

Initialize the lock of bad_irq_desc properly.
The content of irq_desc array is replaced by bad_irq_desc in blackfin
arch irqchip init code. So, do it properly as common irq init code.

Signed-off-by: Sonic Zhang <sonic.zhang@analog.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
15 years ago[PATCH] remove useless argument type in audit_filter_user()
Peng Haitao [Tue, 20 May 2008 01:13:02 +0000 (09:13 +0800)]
[PATCH] remove useless argument type in audit_filter_user()

The second argument "type" is not used in audit_filter_user(), so I think that type can be removed. If I'm wrong, please tell me.

Signed-off-by: Peng Haitao <penght@cn.fujitsu.com>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
15 years ago[PATCH] audit: fix kernel-doc parameter notation
Randy Dunlap [Mon, 19 May 2008 22:09:21 +0000 (15:09 -0700)]
[PATCH] audit: fix kernel-doc parameter notation

Fix auditfilter kernel-doc misssing parameter description:

Warning(lin2626-rc3//kernel/auditfilter.c:1551): No description found for parameter 'sessionid'

Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
15 years ago[PATCH] kernel/audit.c: nlh->nlmsg_type is gotten more than once
Peng Haitao [Fri, 16 May 2008 02:15:04 +0000 (10:15 +0800)]
[PATCH] kernel/audit.c: nlh->nlmsg_type is gotten more than once

The first argument "nlh->nlmsg_type" of audit_receive_filter() should be modified to "msg_type" in audit_receive_msg().

Signed-off-by: Peng Haitao <penght@cn.fujitsu.com>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
15 years agoLinux 2.6.26-rc8 v2.6.26-rc8
Linus Torvalds [Wed, 25 Jun 2008 01:58:20 +0000 (18:58 -0700)]
Linux 2.6.26-rc8

15 years agoMerge branch 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/aegl/linux-2.6
Linus Torvalds [Wed, 25 Jun 2008 01:12:33 +0000 (18:12 -0700)]
Merge branch 'release' of git://git./linux/kernel/git/aegl/linux-2.6

* 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/aegl/linux-2.6:
  [IA64] Eliminate NULL test after alloc_bootmem in iosapic_alloc_rte()
  [IA64] Handle count==0 in sn2_ptc_proc_write()
  [IA64] Fix boot failure on ia64/sn2

15 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/steve/gfs2-2.6-fixes
Linus Torvalds [Wed, 25 Jun 2008 01:09:47 +0000 (18:09 -0700)]
Merge git://git./linux/kernel/git/steve/gfs2-2.6-fixes

* git://git.kernel.org/pub/scm/linux/kernel/git/steve/gfs2-2.6-fixes:
  [GFS2] fix gfs2 block allocation (cleaned up)
  [GFS2] BUG: unable to handle kernel paging request at ffff81002690e000

15 years agoMerge branch 'kvm-updates-2.6.26' of git://git.kernel.org/pub/scm/linux/kernel/git...
Linus Torvalds [Wed, 25 Jun 2008 01:09:06 +0000 (18:09 -0700)]
Merge branch 'kvm-updates-2.6.26' of git://git./linux/kernel/git/avi/kvm

* 'kvm-updates-2.6.26' of git://git.kernel.org/pub/scm/linux/kernel/git/avi/kvm:
  KVM: Remove now unused structs from kvm_para.h
  x86: KVM guest: Use the paravirt clocksource structs and functions
  KVM: Make kvm host use the paravirt clocksource structs
  x86: Make xen use the paravirt clocksource structs and functions
  x86: Add structs and functions for paravirt clocksource
  KVM: VMX: Fix host msr corruption with preemption enabled
  KVM: ioapic: fix lost interrupt when changing a device's irq
  KVM: MMU: Fix oops on guest userspace access to guest pagetable
  KVM: MMU: large page update_pte issue with non-PAE 32-bit guests (resend)
  KVM: MMU: Fix rmap_write_protect() hugepage iteration bug
  KVM: close timer injection race window in __vcpu_run
  KVM: Fix race between timer migration and vcpu migration

15 years ago[SCSI] esp: Fix OOPS in esp_reset_cleanup().
David S. Miller [Wed, 18 Jun 2008 06:53:22 +0000 (23:53 -0700)]
[SCSI] esp: Fix OOPS in esp_reset_cleanup().

OOPS reported by Friedrich Oslage <bluebird@porno-bullen.de>

The problem here is that tp->starget is set every time a lun
is allocated for a particular target so we can catch the
sdev_target parent value.

The reset handler uses the NULL'ness of this value to determine
which targets are active.

But esp_slave_destroy() does not NULL out this value when appropriate.

So for every target that doesn't respond, the SCSI bus scan causes
a stale pointer to be left here, with ensuing crashes like you're
seeing.

Signed-off-by: David S. Miller <davem@davemloft.net>
Cc: Stable Tree <stable@kernel.org>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
15 years agonetfilter: ip6table_mangle: don't reroute in LOCAL_IN
Patrick McHardy [Tue, 24 Jun 2008 20:30:45 +0000 (13:30 -0700)]
netfilter: ip6table_mangle: don't reroute in LOCAL_IN

Rerouting should only happen in LOCAL_OUT, in INPUT its useless
since the packet has already chosen its final destination.

Noticed by Alexey Dobriyan <adobriyan@gmail.com>.

Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/wim/linux-2.6-watchdog
Linus Torvalds [Tue, 24 Jun 2008 18:23:35 +0000 (11:23 -0700)]
Merge git://git./linux/kernel/git/wim/linux-2.6-watchdog

* git://git.kernel.org/pub/scm/linux/kernel/git/wim/linux-2.6-watchdog:
  Revert "[WATCHDOG] hpwdt: Add CFLAGS to get driver working"

15 years agoMerge branch 'x86-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git...
Linus Torvalds [Tue, 24 Jun 2008 18:21:47 +0000 (11:21 -0700)]
Merge branch 'x86-fixes-for-linus' of git://git./linux/kernel/git/tip/linux-2.6-tip

* 'x86-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
  xen: remove support for non-PAE 32-bit

15 years agoMerge branch 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jwessel...
Linus Torvalds [Tue, 24 Jun 2008 18:20:59 +0000 (11:20 -0700)]
Merge branch 'for_linus' of git://git./linux/kernel/git/jwessel/linux-2.6-kgdb

* 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jwessel/linux-2.6-kgdb:
  kgdb: sparse fix
  kgdb: documentation update - remove kgdboe

15 years agoenable bus mastering on i915 at resume time
Jie Luo [Tue, 24 Jun 2008 17:38:31 +0000 (10:38 -0700)]
enable bus mastering on i915 at resume time

On 9xx chips, bus mastering needs to be enabled at resume time for much of the
chip to function.  With this patch, vblank interrupts will work as expected
on resume, along with other chip functions.   Fixes kernel bugzilla #10844.

Signed-off-by: Jie Luo <clotho67@gmail.com>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agoKVM: Remove now unused structs from kvm_para.h
Gerd Hoffmann [Tue, 3 Jun 2008 14:17:33 +0000 (16:17 +0200)]
KVM: Remove now unused structs from kvm_para.h

The kvm_* structs are obsoleted by the pvclock_* ones.
Now all users have been switched over and the old structs
can be dropped.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Signed-off-by: Avi Kivity <avi@qumranet.com>
15 years agox86: KVM guest: Use the paravirt clocksource structs and functions
Gerd Hoffmann [Tue, 3 Jun 2008 14:17:32 +0000 (16:17 +0200)]
x86: KVM guest: Use the paravirt clocksource structs and functions

This patch updates the kvm host code to use the pvclock structs
and functions, thereby making it compatible with Xen.

The patch also fixes an initialization bug: on SMP systems the
per-cpu has two different locations early at boot and after CPU
bringup.  kvmclock must take that in account when registering the
physical address within the host.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Signed-off-by: Avi Kivity <avi@qumranet.com>
15 years agoKVM: Make kvm host use the paravirt clocksource structs
Gerd Hoffmann [Tue, 3 Jun 2008 14:17:31 +0000 (16:17 +0200)]
KVM: Make kvm host use the paravirt clocksource structs

This patch updates the kvm host code to use the pvclock structs.
It also makes the paravirt clock compatible with Xen.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Signed-off-by: Avi Kivity <avi@qumranet.com>
15 years agox86: Make xen use the paravirt clocksource structs and functions
Gerd Hoffmann [Tue, 3 Jun 2008 14:17:30 +0000 (16:17 +0200)]
x86: Make xen use the paravirt clocksource structs and functions

This patch updates the xen guest to use the pvclock structs
and helper functions.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Acked-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
Signed-off-by: Avi Kivity <avi@qumranet.com>
15 years agox86: Add structs and functions for paravirt clocksource
Gerd Hoffmann [Tue, 3 Jun 2008 14:17:29 +0000 (16:17 +0200)]
x86: Add structs and functions for paravirt clocksource

This patch adds structs for the paravirt clocksource ABI
used by both xen and kvm (pvclock-abi.h).

It also adds some helper functions to read system time and
wall clock time from a paravirtual clocksource (pvclock.[ch]).
They are based on the xen code.  They are enabled using
CONFIG_PARAVIRT_CLOCK.

Subsequent patches of this series will put the code in use.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Acked-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
Signed-off-by: Avi Kivity <avi@qumranet.com>
15 years ago[GFS2] fix gfs2 block allocation (cleaned up)
Benjamin Marzinski [Tue, 24 Jun 2008 17:53:38 +0000 (12:53 -0500)]
[GFS2] fix gfs2 block allocation (cleaned up)

This patch fixes bz 450641.

This patch changes the computation for zero_metapath_length(), which it
renames to metapath_branch_start(). When you are extending the metadata
tree, The indirect blocks that point to the new data block must either
diverge from the existing tree either at the inode, or at the first
indirect block. They can diverge at the first indirect block because the
inode has room for 483 pointers while the indirect blocks have room for
509 pointers, so when the tree is grown, there is some free space in the
first indirect block. What metapath_branch_start() now computes is the
height where the first indirect block for the new data block is located.
It can either be 1 (if the indirect block diverges from the inode) or 2
(if it diverges from the first indirect block).

Signed-off-by: Benjamin Marzinski <bmarzins@redhat.com>
Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
15 years ago[IA64] Eliminate NULL test after alloc_bootmem in iosapic_alloc_rte()
Julia Lawall [Tue, 24 Jun 2008 08:22:05 +0000 (10:22 +0200)]
[IA64] Eliminate NULL test after alloc_bootmem in iosapic_alloc_rte()

As noted by Akinobu Mita alloc_bootmem and related functions never return
NULL and always return a zeroed region of memory.  Thus a NULL test or
memset after calls to these functions is unnecessary.

Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: Tony Luck <tony.luck@intel.com>
15 years ago[IA64] Handle count==0 in sn2_ptc_proc_write()
Cliff Wickman [Tue, 24 Jun 2008 17:20:06 +0000 (10:20 -0700)]
[IA64] Handle count==0 in sn2_ptc_proc_write()

The fix applied in e0c6d97c65e0784aade7e97b9411f245a6c543e7
"security hole in sn2_ptc_proc_write" didn't take into account
the case where count==0 (which results in a buffer underrun
when adding the trailing '\0').  Thanks to Andi Kleen for
pointing this out.

Signed-off-by: Cliff Wickman <cpw@sgi.com>
Signed-off-by: Tony Luck <tony.luck@intel.com>
15 years ago[IA64] Fix boot failure on ia64/sn2
Jes Sorensen [Tue, 24 Jun 2008 15:30:09 +0000 (11:30 -0400)]
[IA64] Fix boot failure on ia64/sn2

Call check_sal_cache_flush() after platform_setup() as
check_sal_cache_flush() now relies on being able to call platform
vector code.

Problem was introduced by: 3463a93def55c309f3c0d0a8aaf216be3be42d64
"Update check_sal_cache_flush to use platform_send_ipi()"

Signed-off-by: Jes Sorensen <jes@sgi.com>
Tested-by: Alex Chiang: <achiang@hp.com>
Signed-off-by: Tony Luck <tony.luck@intel.com>
15 years ago[SCSI] ses: Fix timeout
Matthew Wilcox [Mon, 23 Jun 2008 15:14:31 +0000 (09:14 -0600)]
[SCSI] ses: Fix timeout

Timeouts are measured in jiffies, not in seconds.

Signed-off-by: Matthew Wilcox <willy@linux.intel.com>
Cc: Stable Tree <stable@kernel.org>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
15 years agokgdb: sparse fix
Jason Wessel [Tue, 24 Jun 2008 15:52:55 +0000 (10:52 -0500)]
kgdb: sparse fix

- Fix warning reported by sparse
kernel/kgdb.c:1502:6: warning: symbol 'kgdb_console_write' was not declared.
Should it be static?

Signed-off-by: Jason Wessel <jason.wessel@windriver.com>
15 years agokgdb: documentation update - remove kgdboe
Jason Wessel [Tue, 24 Jun 2008 15:52:55 +0000 (10:52 -0500)]
kgdb: documentation update - remove kgdboe

kgdboe is not presently included kgdb, and there should be no
references to it.

Also fix the tcp port terminal connection example.

Signed-off-by: Jason Wessel <jason.wessel@windriver.com>
15 years agoxen: remove support for non-PAE 32-bit
Jeremy Fitzhardinge [Fri, 9 May 2008 11:05:57 +0000 (12:05 +0100)]
xen: remove support for non-PAE 32-bit

Non-PAE operation has been deprecated in Xen for a while, and is
rarely tested or used.  xen-unstable has now officially dropped
non-PAE support.  Since Xen/pvops' non-PAE support has also been
broken for a while, we may as well completely drop it altogether.

Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
15 years ago[GFS2] BUG: unable to handle kernel paging request at ffff81002690e000
Bob Peterson [Wed, 18 Jun 2008 16:30:40 +0000 (11:30 -0500)]
[GFS2] BUG: unable to handle kernel paging request at ffff81002690e000

This patch fixes bugzilla bug bz448866: gfs2: BUG: unable to
handle kernel paging request at ffff81002690e000.

Signed-off-by: Bob Peterson <rpeterso@redhat.com>
Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
15 years agoRevert "[WATCHDOG] hpwdt: Add CFLAGS to get driver working"
Wim Van Sebroeck [Tue, 24 Jun 2008 13:09:26 +0000 (13:09 +0000)]
Revert "[WATCHDOG] hpwdt: Add CFLAGS to get driver working"

After Linus fixed the inline assembly, the CFLAGS option is not
needed anymore.

Signed-off-by: Thomas Mingarelli <Thomas.Mingarelli@hp.com>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
15 years agoMerge branch 'master' into for_mm
Jan Kara [Tue, 24 Jun 2008 09:43:00 +0000 (11:43 +0200)]
Merge branch 'master' into for_mm

15 years agoudf: Fix regression in UDF anchor block detection
Tomas Janousek [Mon, 23 Jun 2008 13:12:35 +0000 (15:12 +0200)]
udf: Fix regression in UDF anchor block detection

In some cases it could happen that some block passed test in
udf_check_anchor_block() even though udf_read_tagged() refused to read it later
(e.g. because checksum was not correct).  This patch makes
udf_check_anchor_block() use udf_read_tagged() so that the checking is
stricter.

This fixes the regression (certain disks unmountable) caused by commit
423cf6dc04eb79d441bfda2b127bc4b57134b41d.

Signed-off-by: Tomas Janousek <tomi@nomi.cz>
Signed-off-by: Jan Kara <jack@suse.cz>
15 years agoKVM: VMX: Fix host msr corruption with preemption enabled
Avi Kivity [Tue, 24 Jun 2008 08:48:49 +0000 (11:48 +0300)]
KVM: VMX: Fix host msr corruption with preemption enabled

Switching msrs can occur either synchronously as a result of calls to
the msr management functions (usually in response to the guest touching
virtualized msrs), or asynchronously when preempting a kvm thread that has
guest state loaded.  If we're unlucky enough to have the two at the same
time, host msrs are corrupted and the machine goes kaput on the next syscall.

Most easily triggered by Windows Server 2008, as it does a lot of msr
switching during bootup.

Signed-off-by: Avi Kivity <avi@qumranet.com>
15 years agoKVM: ioapic: fix lost interrupt when changing a device's irq
Avi Kivity [Tue, 17 Jun 2008 22:36:36 +0000 (15:36 -0700)]
KVM: ioapic: fix lost interrupt when changing a device's irq

The ioapic acknowledge path translates interrupt vectors to irqs.  It
currently uses a first match algorithm, stopping when it finds the first
redirection table entry containing the vector.  That fails however if the
guest changes the irq to a different line, leaving the old redirection table
entry in place (though masked).  Result is interrupts not making it to the
guest.

Fix by always scanning the entire redirection table.

Signed-off-by: Avi Kivity <avi@qumranet.com>
15 years agoKVM: MMU: Fix oops on guest userspace access to guest pagetable
Avi Kivity [Thu, 12 Jun 2008 13:54:41 +0000 (16:54 +0300)]
KVM: MMU: Fix oops on guest userspace access to guest pagetable

KVM has a heuristic to unshadow guest pagetables when userspace accesses
them, on the assumption that most guests do not allow userspace to access
pagetables directly. Unfortunately, in addition to unshadowing the pagetables,
it also oopses.

This never triggers on ordinary guests since sane OSes will clear the
pagetables before assigning them to userspace, which will trigger the flood
heuristic, unshadowing the pagetables before the first userspace access. One
particular guest, though (Xenner) will run the kernel in userspace, triggering
the oops.  Since the heuristic is incorrect in this case, we can simply
remove it.

Signed-off-by: Avi Kivity <avi@qumranet.com>
15 years agoKVM: MMU: large page update_pte issue with non-PAE 32-bit guests (resend)
Marcelo Tosatti [Wed, 11 Jun 2008 23:32:40 +0000 (20:32 -0300)]
KVM: MMU: large page update_pte issue with non-PAE 32-bit guests (resend)

kvm_mmu_pte_write() does not handle 32-bit non-PAE large page backed
guests properly. It will instantiate two 2MB sptes pointing to the same
physical 2MB page when a guest large pte update is trapped.

Instead of duplicating code to handle this, disallow directory level
updates to happen through kvm_mmu_pte_write(), so the two 2MB sptes
emulating one guest 4MB pte can be correctly created by the page fault
handling path.

Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
Signed-off-by: Avi Kivity <avi@qumranet.com>
15 years agoKVM: MMU: Fix rmap_write_protect() hugepage iteration bug
Marcelo Tosatti [Sun, 8 Jun 2008 04:48:53 +0000 (01:48 -0300)]
KVM: MMU: Fix rmap_write_protect() hugepage iteration bug

rmap_next() does not work correctly after rmap_remove(), as it expects
the rmap chains not to change during iteration.  Fix (for now) by restarting
iteration from the beginning.

Signed-off-by: Avi Kivity <avi@qumranet.com>
15 years agoKVM: close timer injection race window in __vcpu_run
Marcelo Tosatti [Fri, 6 Jun 2008 19:37:36 +0000 (16:37 -0300)]
KVM: close timer injection race window in __vcpu_run

If a timer fires after kvm_inject_pending_timer_irqs() but before
local_irq_disable() the code will enter guest mode and only inject such
timer interrupt the next time an unrelated event causes an exit.

It would be simpler if the timer->pending irq conversion could be done
with IRQ's disabled, so that the above problem cannot happen.

For now introduce a new vcpu requests bit to cancel guest entry.

Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
Signed-off-by: Avi Kivity <avi@qumranet.com>
15 years agoKVM: Fix race between timer migration and vcpu migration
Marcelo Tosatti [Fri, 6 Jun 2008 19:37:35 +0000 (16:37 -0300)]
KVM: Fix race between timer migration and vcpu migration

A guest vcpu instance can be scheduled to a different physical CPU
between the test for KVM_REQ_MIGRATE_TIMER and local_irq_disable().

If that happens, the timer will only be migrated to the current pCPU on
the next exit, meaning that guest LAPIC timer event can be delayed until
a host interrupt is triggered.

Fix it by cancelling guest entry if any vcpu request is pending.  This
has the side effect of nicely consolidating vcpu->requests checks.

Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
Signed-off-by: Avi Kivity <avi@qumranet.com>
15 years agoalpha: fix compile error in arch/alpha/mm/init.c
Thorsten Kranzkowski [Mon, 23 Jun 2008 20:57:22 +0000 (20:57 +0000)]
alpha: fix compile error in arch/alpha/mm/init.c

Commit 9267b4b3880d00dc2dab90f1d817c856939114f7 ("alpha: fix module load
failures on smp (bug #10926)") causes a regression for my ev4
uniprocessor build:

  CC      arch/alpha/mm/init.o
/export/data/repositories/linux-2.6/arch/alpha/mm/init.c:34: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘typeof’
make[2]: *** [arch/alpha/mm/init.o] Error 1
make[1]: *** [arch/alpha/mm] Error 2
make: *** [sub-make] Error 2

This fixes it for me (compile and boot tested):

Signed-off-by: Thorsten Kranzkowski <dl8bcu@dl8bcu.de>
Acked-by: Ivan Kokshaysky <ink@jurassic.park.msu.ru>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agoMerge branch 'hotfixes' of git://git.linux-nfs.org/projects/trondmy/nfs-2.6
Linus Torvalds [Mon, 23 Jun 2008 23:25:11 +0000 (16:25 -0700)]
Merge branch 'hotfixes' of git://git.linux-nfs.org/projects/trondmy/nfs-2.6

* 'hotfixes' of git://git.linux-nfs.org/projects/trondmy/nfs-2.6:
  NFS: nfs_updatepage(): don't mark page as dirty if an error occurred
  NFS: Fix filehandle size comparisons in the mount code
  NFS: Reduce the NFS mount code stack usage.

15 years agoNFS: nfs_updatepage(): don't mark page as dirty if an error occurred
Trond Myklebust [Thu, 5 Jun 2008 20:02:35 +0000 (16:02 -0400)]
NFS: nfs_updatepage(): don't mark page as dirty if an error occurred

Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
15 years agoNFS: Fix filehandle size comparisons in the mount code
Trond Myklebust [Thu, 19 Jun 2008 19:21:11 +0000 (15:21 -0400)]
NFS: Fix filehandle size comparisons in the mount code

Fix a sign issue in xdr_decode_fhstatus3()
Fix incorrect comparison in nfs_validate_mount_data()

Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
15 years agoNFS: Reduce the NFS mount code stack usage.
Trond Myklebust [Thu, 19 Jun 2008 18:20:11 +0000 (14:20 -0400)]
NFS: Reduce the NFS mount code stack usage.

This appears to fix the Oops reported in
  http://bugzilla.kernel.org/show_bug.cgi?id=10826

Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
15 years agoMerge branch 'core-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel...
Linus Torvalds [Mon, 23 Jun 2008 19:49:22 +0000 (12:49 -0700)]
Merge branch 'core-fixes-for-linus' of git://git./linux/kernel/git/tip/linux-2.6-tip

* 'core-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
  futexes: fix fault handling in futex_lock_pi

15 years agoMerge branch 'sched-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel...
Linus Torvalds [Mon, 23 Jun 2008 19:48:50 +0000 (12:48 -0700)]
Merge branch 'sched-fixes-for-linus' of git://git./linux/kernel/git/tip/linux-2.6-tip

* 'sched-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
  sched: refactor wait_for_completion_timeout()
  sched: fix wait_for_completion_timeout() spurious failure under heavy load
  sched: rt: dont stop the period timer when there are tasks wanting to run

15 years agoMerge branch 'x86-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git...
Linus Torvalds [Mon, 23 Jun 2008 19:48:17 +0000 (12:48 -0700)]
Merge branch 'x86-fixes-for-linus' of git://git./linux/kernel/git/tip/linux-2.6-tip

* 'x86-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
  xen: don't drop NX bit
  xen: mask unwanted pte bits in __supported_pte_mask
  xen: Use wmb instead of rmb in xen_evtchn_do_upcall().
  x86: fix NULL pointer deref in __switch_to

15 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/roland...
Linus Torvalds [Mon, 23 Jun 2008 19:45:49 +0000 (12:45 -0700)]
Merge branch 'for-linus' of git://git./linux/kernel/git/roland/infiniband

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/roland/infiniband:
  IB/mthca: Clear ICM pages before handing to FW

15 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6
Linus Torvalds [Mon, 23 Jun 2008 19:18:06 +0000 (12:18 -0700)]
Merge branch 'for-linus' of git://git./linux/kernel/git/tiwai/sound-2.6

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6:
  ALSA: sb - Fix wrong assertions
  ALSA: aw2 - Fix Oops at initialization

15 years agomm: fix race in COW logic
Nick Piggin [Mon, 23 Jun 2008 12:30:30 +0000 (14:30 +0200)]
mm: fix race in COW logic

There is a race in the COW logic.  It contains a shortcut to avoid the
COW and reuse the page if we have the sole reference on the page,
however it is possible to have two racing do_wp_page()ers with one
causing the other to mistakenly believe it is safe to take the shortcut
when it is not.  This could lead to data corruption.

Process 1 and process2 each have a wp pte of the same anon page (ie.
one forked the other).  The page's mapcount is 2.  Then they both
attempt to write to it around the same time...

  proc1 proc2 thr1 proc2 thr2
  CPU0 CPU1 CPU3
  do_wp_page() do_wp_page()
 trylock_page()
  can_share_swap_page()
   load page mapcount (==2)
  reuse = 0
 pte unlock
 copy page to new_page
 pte lock
 page_remove_rmap(page);
   trylock_page()
    can_share_swap_page()
     load page mapcount (==1)
    reuse = 1
   ptep_set_access_flags (allow W)

  write private key into page
read from page
ptep_clear_flush()
set_pte_at(pte of new_page)

Fix this by moving the page_remove_rmap of the old page after the pte
clear and flush.  Potentially the entire branch could be moved down
here, but in order to stay consistent, I won't (should probably move all
the *_mm_counter stuff with one patch).

Signed-off-by: Nick Piggin <npiggin@suse.de>
Acked-by: Hugh Dickins <hugh@veritas.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agoFix ZERO_PAGE breakage with vmware
Linus Torvalds [Mon, 23 Jun 2008 18:21:37 +0000 (11:21 -0700)]
Fix ZERO_PAGE breakage with vmware

Commit 89f5b7da2a6bad2e84670422ab8192382a5aeb9f ("Reinstate ZERO_PAGE
optimization in 'get_user_pages()' and fix XIP") broke vmware, as
reported by Jeff Chua:

  "This broke vmware 6.0.4.
   Jun 22 14:53:03.845: vmx| NOT_IMPLEMENTED
   /build/mts/release/bora-93057/bora/vmx/main/vmmonPosix.c:774"

and the reason seems to be that there's an old bug in how we handle do
FOLL_ANON on VM_SHARED areas in get_user_pages(), but since it only
triggered if the whole page table was missing, nobody had apparently hit
it before.

The recent changes to 'follow_page()' made the FOLL_ANON logic trigger
not just for whole missing page tables, but for individual pages as
well, and exposed this problem.

This fixes it by making the test for when FOLL_ANON is used more
careful, and also makes the code easier to read and understand by moving
the logic to a separate inline function.

Reported-and-tested-by: Jeff Chua <jeff.chua.linux@gmail.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agoremoved unused var real_tty on n_tty_ioctl()
Gustavo Fernando Padovan [Mon, 23 Jun 2008 11:07:06 +0000 (12:07 +0100)]
removed unused var real_tty on n_tty_ioctl()

I noted that the 'struct tty_struct *real_tty' is not used in this
function, so I removed the code about 'real_tty'.

Signed-off-by: Gustavo Fernando Padovan <gustavo@las.ic.unicamp.br>
Acked-by: Alan Cox <alan@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agotty_driver: Update required method documentation
Alan Cox [Mon, 23 Jun 2008 11:06:52 +0000 (12:06 +0100)]
tty_driver: Update required method documentation

Some of the requirement rules are now more relaxed. Also correct a
contradiction in the previous update

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years ago[patch 2/3] vfs: dcache cleanups
Miklos Szeredi [Mon, 23 Jun 2008 16:11:53 +0000 (18:11 +0200)]
[patch 2/3] vfs: dcache cleanups

Comment from Al Viro: add prepend_name() wrapper.

Signed-off-by: Miklos Szeredi <mszeredi@suse.cz>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
15 years ago[patch 1/3] vfs: dcache sparse fixes
Miklos Szeredi [Mon, 23 Jun 2008 16:11:52 +0000 (18:11 +0200)]
[patch 1/3] vfs: dcache sparse fixes

Fix the following sparse warnings:

fs/dcache.c:2183:19: warning: symbol 'filp_cachep' was not declared. Should it be static?
fs/dcache.c:115:3: warning: context imbalance in 'dentry_iput' - unexpected unlock
fs/dcache.c:188:2: warning: context imbalance in 'dput' - different lock contexts for basic block
fs/dcache.c:400:2: warning: context imbalance in 'prune_one_dentry' - different lock contexts for basic block
fs/dcache.c:431:22: warning: context imbalance in 'prune_dcache' - different lock contexts for basic block
fs/dcache.c:563:2: warning: context imbalance in 'shrink_dcache_sb' - different lock contexts for basic block
fs/dcache.c:1385:6: warning: context imbalance in 'd_delete' - wrong count at exit
fs/dcache.c:1636:2: warning: context imbalance in '__d_unalias' - unexpected unlock
fs/dcache.c:1735:2: warning: context imbalance in 'd_materialise_unique' - different lock contexts for basic block

Signed-off-by: Miklos Szeredi <mszeredi@suse.cz>
Reviewed-by: Matthew Wilcox <willy@linux.intel.com>
Acked-by: Christoph Hellwig <hch@infradead.org>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
15 years ago[patch 3/3] vfs: make d_path() consistent across mount operations
Andreas Gruenbacher [Mon, 16 Jun 2008 11:28:07 +0000 (13:28 +0200)]
[patch 3/3] vfs: make d_path() consistent across mount operations

The path that __d_path() computes can become slightly inconsistent when it
races with mount operations: it grabs the vfsmount_lock when traversing mount
points but immediately drops it again, only to re-grab it when it reaches the
next mount point.  The result is that the filename computed is not always
consisent, and the file may never have had that name. (This is unlikely, but
still possible.)

Fix this by grabbing the vfsmount_lock for the whole duration of
__d_path().

Signed-off-by: Andreas Gruenbacher <agruen@suse.de>
Signed-off-by: John Johansen <jjohansen@suse.de>
Signed-off-by: Miklos Szeredi <mszeredi@suse.cz>
Acked-by: Christoph Hellwig <hch@infradead.org>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
15 years agoIB/mthca: Clear ICM pages before handing to FW
Eli Cohen [Mon, 23 Jun 2008 16:29:58 +0000 (09:29 -0700)]
IB/mthca: Clear ICM pages before handing to FW

Current memfree FW has a bug which in some cases, assumes that ICM
pages passed to it are cleared.  This patch uses __GFP_ZERO to
allocate all ICM pages passed to the FW.  Once firmware with a fix is
released, we can make the workaround conditional on firmware version.

This fixes the bug reported by Arthur Kepner <akepner@sgi.com> here:
http://lists.openfabrics.org/pipermail/general/2008-May/050026.html

Cc: <stable@kernel.org>
Signed-off-by: Eli Cohen <eli@mellanox.co.il>
[ Rewritten to be a one-liner using __GFP_ZERO instead of vmap()ing
  ICM memory and memset()ing it to 0. - Roland ]

Signed-off-by: Roland Dreier <rolandd@cisco.com>
15 years ago[patch 4/4] flock: remove unused fields from file_lock_operations
Denis V. Lunev [Mon, 9 Jun 2008 23:40:38 +0000 (16:40 -0700)]
[patch 4/4] flock: remove unused fields from file_lock_operations

fl_insert and fl_remove are not used right now in the kernel. Remove them.

Signed-off-by: Denis V. Lunev <den@openvz.org>
Cc: Matthew Wilcox <matthew@wil.cx>
Cc: Alexander Viro <viro@zeniv.linux.org.uk>
Cc: "J. Bruce Fields" <bfields@fieldses.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
15 years ago[patch 3/4] vfs: fix ERR_PTR abuse in generic_readlink
Marcin Slusarz [Mon, 9 Jun 2008 23:40:37 +0000 (16:40 -0700)]
[patch 3/4] vfs: fix ERR_PTR abuse in generic_readlink

generic_readlink calls ERR_PTR for negative and positive values
(vfs_readlink returns length of "link"), but it should not
(not an errno) and does not need to.

Signed-off-by: Marcin Slusarz <marcin.slusarz@gmail.com>
Cc: Al Viro <viro@ZenIV.linux.org.uk>
Cc: Christoph Hellwig <hch@lst.de>
Acked-by: Miklos Szeredi <miklos@szeredi.hu>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>