sfrench/cifs-2.6.git
14 years agoanonfd: Allow making anon files read-only
Roland Dreier [Fri, 18 Dec 2009 17:41:24 +0000 (09:41 -0800)]
anonfd: Allow making anon files read-only

It seems a couple places such as arch/ia64/kernel/perfmon.c and
drivers/infiniband/core/uverbs_main.c could use anon_inode_getfile()
instead of a private pseudo-fs + alloc_file(), if only there were a way
to get a read-only file.  So provide this by having anon_inode_getfile()
create a read-only file if we pass O_RDONLY in flags.

Signed-off-by: Roland Dreier <rolandd@cisco.com>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
14 years agofs/compat_ioctl.c: fix build error when !BLOCK
Arnd Bergmann [Mon, 21 Dec 2009 16:53:53 +0000 (17:53 +0100)]
fs/compat_ioctl.c: fix build error when !BLOCK

No driver uses SG_SET_TRANSFORM any more in Linux, since the ide-scsi
driver was removed in 2.6.29. The compat-ioctl cleanup series moved
the handling for this around, which broke building without CONFIG_BLOCK.

Just remove the code handling it for compat mode.

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
14 years agopohmelfs needs I_LOCK
Evgeniy Polyakov [Fri, 18 Dec 2009 12:40:44 +0000 (15:40 +0300)]
pohmelfs needs I_LOCK

Kill debugging printk in question

Signed-off-by: Evgeniy Polyakov <zbr@ioremap.net>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
14 years agoalloc_file(): simplify handling of mnt_clone_write() errors
Roland Dreier [Wed, 16 Dec 2009 20:48:44 +0000 (12:48 -0800)]
alloc_file(): simplify handling of mnt_clone_write() errors

When alloc_file() and init_file() were combined, the error handling of
mnt_clone_write() was taken into alloc_file() in a somewhat obfuscated
way.  Since we don't use the error code for anything except warning,
we might as well warn directly without an extra variable.

Signed-off-by: Roland Dreier <rolandd@cisco.com>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
14 years agoARM: 5857/1: ARM: dmabounce: fix build
Mike Rapoport [Tue, 22 Dec 2009 06:31:04 +0000 (07:31 +0100)]
ARM: 5857/1: ARM: dmabounce: fix build

Commit f74f7e57ae9fa12b2951ae62ce3557799b318399 (ARM: use
flush_kernel_dcache_area() for dmabounce) has broken dmabounce build:

  CC      arch/arm/common/dmabounce.o
arch/arm/common/dmabounce.c: In function 'unmap_single':
arch/arm/common/dmabounce.c:315: error: implicit declaration of function '__cpuc_flush_kernel_dcache_area'
make[2]: *** [arch/arm/common/dmabounce.o] Error 1

Fix it.

Signed-off-by: Mike Rapoport <mike@compulab.co.il>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
14 years agoARM: 5856/1: Fix bug of uart0 platfrom data for nuc900
wanzongshun [Fri, 18 Dec 2009 17:02:46 +0000 (18:02 +0100)]
ARM: 5856/1: Fix bug of uart0 platfrom data for nuc900

Fix bug of uart0 platfrom data for nuc900

Signed-off-by: lijie <eltshanli@gmail.com>
Signed-off-by: Wan ZongShun <mcuos.com@gmail.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
14 years agoARM: 5855/1: putc support for nuc900
wanzongshun [Fri, 18 Dec 2009 17:00:37 +0000 (18:00 +0100)]
ARM: 5855/1: putc support for nuc900

putc support for nuc900

Signed-off-by: lijie <eltshanli@gmail.com>
Signed-off-by: Wan ZongShun <mcuos.com@gmail.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
14 years agoARM: 5854/1: fix compiling error for NUC900
wanzongshun [Fri, 18 Dec 2009 16:58:58 +0000 (17:58 +0100)]
ARM: 5854/1: fix compiling error for NUC900

fix compiling error for NUC900

Signed-off-by: lijie <eltshanli@gmail.com>
Signed-off-by: Wan ZongShun <mcuos.com@gmail.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
14 years agoARM: 5849/1: ARMv7: fix Oprofile events count
Jean PIHET [Tue, 15 Dec 2009 11:36:10 +0000 (12:36 +0100)]
ARM: 5849/1: ARMv7: fix Oprofile events count

On Oprofile ARMv7 the PMNC_D bit was set to lower the PMU IRQs
and so to decrease the risk of errata #628216 from appearing.
The effect of setting the PMNC_D bit is that the CCNT counter
is divided by 64, making the program counter events count
inaccurate.
The new OMAP3 r4 cores should have that errata fixed.

The PMNC_D bit should not be set, this patch fixes it.

Signed-off-by: Jean Pihet <jpihet@mvista.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
14 years agoMAINTAINERS: update entries for WUSB, UWB and WLP subsystems
David Vrabel [Tue, 22 Dec 2009 13:13:28 +0000 (13:13 +0000)]
MAINTAINERS: update entries for WUSB, UWB and WLP subsystems

Update the file patterns for the WUSB, UWB and WLP subsystems and add
netdev@vger as the list for the WLP subsystem.

Signed-off-by: David Vrabel <david.vrabel@csr.com>
14 years agoASoC: add missing parameter to mx27vis_hifi_hw_free()
Guennadi Liakhovetski [Tue, 22 Dec 2009 08:26:10 +0000 (09:26 +0100)]
ASoC: add missing parameter to mx27vis_hifi_hw_free()

Commit 2ccafed4 added an extra parameter to the DAI .set_pll() method, but
it missed this call in sound/soc/imx/mx27vis_wm8974.c.

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
14 years agoASoC: sh: FSI:: don't check platform_get_irq's return value against zero
Uwe Kleine-König [Wed, 16 Dec 2009 16:10:09 +0000 (17:10 +0100)]
ASoC: sh: FSI:: don't check platform_get_irq's return value against zero

platform_get_irq returns -ENXIO on failure, so !irq was probably
always true.  Better use (int)irq <= 0.  Note that a return value of
zero is still handled as error even though this could mean irq0.

This is a followup to 305b3228f9ff4d59f49e6d34a7034d44ee8ce2f0 that
changed the return value of platform_get_irq from 0 to -ENXIO on error.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
14 years agoALSA: hda - Add Bass Speaker switch for HP dv7
Takashi Iwai [Tue, 22 Dec 2009 10:56:32 +0000 (11:56 +0100)]
ALSA: hda - Add Bass Speaker switch for HP dv7

The bass speaker is controlled via GPIO5.

Tested-by: Wael Nasreddine <mla@nasreddine.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
14 years agoACPI: processor: remove _PDC object list from struct acpi_processor
Alex Chiang [Sun, 20 Dec 2009 19:23:21 +0000 (12:23 -0700)]
ACPI: processor: remove _PDC object list from struct acpi_processor

When we call _PDC, we get a handle to the processor, allocate the
object list buffer as needed, and free it immediately after calling
_PDC.

There's no need to drag around this object list with us everywhere
else, so let's just get rid of it.

Signed-off-by: Alex Chiang <achiang@hp.com>
Signed-off-by: Len Brown <len.brown@intel.com>
14 years agoACPI: processor: change acpi_processor_set_pdc() interface
Alex Chiang [Sun, 20 Dec 2009 19:23:16 +0000 (12:23 -0700)]
ACPI: processor: change acpi_processor_set_pdc() interface

When calling _PDC, we really only need the handle to the processor
to call the method; we don't look at any other parts of the
struct acpi_processor * given to us.

In the early path, when we walk the namespace, we are given the
handle directly, so just pass it through to acpi_processor_set_pdc()
without stuffing it into a wasteful struct acpi_processor allocated
on the stack each time

This saves 2834 bytes of stack.

Update the interface accordingly.

Signed-off-by: Alex Chiang <achiang@hp.com>
Signed-off-by: Len Brown <len.brown@intel.com>
14 years agoACPI: processor: open code acpi_processor_cleanup_pdc
Alex Chiang [Sun, 20 Dec 2009 19:23:11 +0000 (12:23 -0700)]
ACPI: processor: open code acpi_processor_cleanup_pdc

We have the acpi_object_list * right there in acpi_processor_set_pdc()
so it doesn't seem necessary for an entire helper function just to
free it.

Signed-off-by: Alex Chiang <achiang@hp.com>
Signed-off-by: Len Brown <len.brown@intel.com>
14 years agoACPI: processor: change acpi_processor_eval_pdc interface
Alex Chiang [Sun, 20 Dec 2009 19:19:45 +0000 (12:19 -0700)]
ACPI: processor: change acpi_processor_eval_pdc interface

acpi_processor_eval_pdc() really only needs a handle and an
acpi_object_list * to do its work.

No need to pass in a struct acpi_processor *, so let's be more specific
about what we want.

Signed-off-by: Alex Chiang <achiang@hp.com>
Signed-off-by: Len Brown <len.brown@intel.com>
14 years agoACPI: processor: introduce acpi_processor_alloc_pdc()
Alex Chiang [Sun, 20 Dec 2009 19:19:39 +0000 (12:19 -0700)]
ACPI: processor: introduce acpi_processor_alloc_pdc()

acpi_processor_init_pdc() isn't really doing anything interesting
with the struct acpi_processor * parameter. Its real job is to allocate
the buffer for the _PDC bits.

So rename the function to acpi_processor_alloc_pdc(), and just return
the struct acpi_object_list * it's supposed to allocate.

Signed-off-by: Alex Chiang <achiang@hp.com>
Signed-off-by: Len Brown <len.brown@intel.com>
14 years agoACPI: processor: unify arch_acpi_processor_cleanup_pdc
Alex Chiang [Sun, 20 Dec 2009 19:19:34 +0000 (12:19 -0700)]
ACPI: processor: unify arch_acpi_processor_cleanup_pdc

The x86 and ia64 implementations of the function in $subject are
exactly the same.

Also, since the arch-specific implementations of setting _PDC have
been completely hollowed out, remove the empty shells.

Cc: Tony Luck <tony.luck@intel.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: "H. Peter Anvin" <hpa@zytor.com>
Signed-off-by: Alex Chiang <achiang@hp.com>
Signed-off-by: Len Brown <len.brown@intel.com>
14 years agoACPI: processor: finish unifying arch_acpi_processor_init_pdc()
Alex Chiang [Sun, 20 Dec 2009 19:19:29 +0000 (12:19 -0700)]
ACPI: processor: finish unifying arch_acpi_processor_init_pdc()

The only thing arch-specific about calling _PDC is what bits get
set in the input obj_list buffer.

There's no need for several levels of indirection to twiddle those
bits. Additionally, since we're just messing around with a buffer,
we can simplify the interface; no need to pass around the entire
struct acpi_processor * just to get at the buffer.

Cc: Tony Luck <tony.luck@intel.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: "H. Peter Anvin" <hpa@zytor.com>
Signed-off-by: Alex Chiang <achiang@hp.com>
Signed-off-by: Len Brown <len.brown@intel.com>
14 years agoACPI: processor: factor out common _PDC settings
Alex Chiang [Sun, 20 Dec 2009 19:19:24 +0000 (12:19 -0700)]
ACPI: processor: factor out common _PDC settings

Both x86 and ia64 initialize _PDC with mostly common bit settings.

Factor out the common settings and leave the arch-specific ones alone.

Cc: Tony Luck <tony.luck@intel.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: "H. Peter Anvin" <hpa@zytor.com>
Signed-off-by: Alex Chiang <achiang@hp.com>
Signed-off-by: Len Brown <len.brown@intel.com>
14 years agoACPI: processor: unify arch_acpi_processor_init_pdc
Alex Chiang [Sun, 20 Dec 2009 19:19:19 +0000 (12:19 -0700)]
ACPI: processor: unify arch_acpi_processor_init_pdc

The x86 and ia64 implementations of arch_acpi_processor_init_pdc()
are almost exactly the same. The only difference is in what bits
they set in obj_list buffer.

Combine the boilerplate memory management code, and leave the
arch-specific bit twiddling in separate implementations.

Cc: Tony Luck <tony.luck@intel.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: "H. Peter Anvin" <hpa@zytor.com>
Signed-off-by: Alex Chiang <achiang@hp.com>
Signed-off-by: Len Brown <len.brown@intel.com>
14 years agoACPI: processor: introduce arch_has_acpi_pdc
Alex Chiang [Sun, 20 Dec 2009 19:19:14 +0000 (12:19 -0700)]
ACPI: processor: introduce arch_has_acpi_pdc

arch dependent helper function that tells us if we should attempt to
evaluate _PDC on this machine or not.

The x86 implementation assumes that the CPUs in the machine must be
homogeneous, and that you cannot mix CPUs of different vendors.

Cc: Tony Luck <tony.luck@intel.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: "H. Peter Anvin" <hpa@zytor.com>
Signed-off-by: Alex Chiang <achiang@hp.com>
Signed-off-by: Len Brown <len.brown@intel.com>
14 years agoACPI: processor: call _PDC early
Alex Chiang [Sun, 20 Dec 2009 19:19:09 +0000 (12:19 -0700)]
ACPI: processor: call _PDC early

We discovered that at least one machine (HP Envy), methods in the DSDT
attempt to call external methods defined in a dynamically loaded SSDT.

Unfortunately, the DSDT methods we are trying to call are part of the
EC initialization, which happens very early, and the the dynamic SSDT
is only loaded when a processor _PDC method runs much later.

This results in namespace lookup errors for the (as of yet) undefined
methods.

Since Windows doesn't have any issues with this machine, we take it
as a hint that they must be evaluating _PDC much earlier than we are.

Thus, the proper thing for Linux to do should be to match the Windows
implementation more closely.

Provide a mechanism to call _PDC before we enable the EC. Doing so loads
the dynamic tables, and allows the EC to be enabled correctly.

The ACPI processor driver will still evaluate _PDC in its .add() method
to cover the hotplug case.

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

Cc: ming.m.lin@intel.com
Signed-off-by: Alex Chiang <achiang@hp.com>
Signed-off-by: Len Brown <len.brown@intel.com>
14 years agoACPI: EC: Fix MSI DMI detection
Alexey Starikovskiy [Tue, 22 Dec 2009 07:42:52 +0000 (02:42 -0500)]
ACPI: EC: Fix MSI DMI detection

MSI strings should be ORed, not ANDed.

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

cc: stable@kernel.org
Signed-off-by: Alexey Starikovskiy <astarikovskiy@suse.de>
Signed-off-by: Len Brown <len.brown@intel.com>
14 years agoACPI: disable _OSI(Windows 2009) on Asus K50IJ
Zhang Rui [Mon, 21 Dec 2009 08:13:15 +0000 (16:13 +0800)]
ACPI: disable _OSI(Windows 2009) on Asus K50IJ

Fix a win7 compability issue on Asus K50IJ.

Here is the _BCM method of this laptop:
                    Method (_BCM, 1, NotSerialized)
                    {
                        If (LGreaterEqual (OSFG, OSVT))
                        {
                            If (LNotEqual (OSFG, OSW7))
                            {
                                Store (One, BCMD)
                                Store (GCBL (Arg0), Local0)
                                Subtract (0x0F, Local0, LBTN)
                                ^^^SBRG.EC0.STBR ()
                                ...
                            }
                            Else
                            {
                                DBGR (0x0B, Zero, Zero, Arg0)
                                Store (Arg0, LBTN)
                                ^^^SBRG.EC0.STBR ()
                                ...
                            }
                        }
                    }
LBTN is used to store the index of the brightness level in the _BCL.
GCBL is a method that convert the percentage value to the index value.
If _OSI(Windows 2009) is not disabled, LBTN is stored a percentage
value which is surely beyond the end of _BCL package.

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

Signed-off-by: Zhang Rui <rui.zhang@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
14 years agoALSA: sound/core/pcm_timer.c: use lib/gcd.c
Florian Fainelli [Tue, 22 Dec 2009 00:36:10 +0000 (16:36 -0800)]
ALSA: sound/core/pcm_timer.c: use lib/gcd.c

Make sound/core/pcm_timer.c use lib/gcd.c

Signed-off-by: Florian Fainelli <florian@openwrt.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
14 years agoALSA: hda - Add MSI blacklist
Takashi Iwai [Tue, 22 Dec 2009 07:15:01 +0000 (08:15 +0100)]
ALSA: hda - Add MSI blacklist

A machine with AMD CPU with Nvidia board doesn't work with MSI.

Reported-by: Robert J. King <peritus@gurunetwork.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
14 years agoALSA: hda - Add support for the new 27 inch IMacs
Rafael Avila de Espindola [Tue, 22 Dec 2009 06:59:37 +0000 (07:59 +0100)]
ALSA: hda - Add support for the new 27 inch IMacs

With the attached patch I am able to use the sound on a new IMac 27.
What works:

*) Internal speakers
*) Internal microphone
*) Headphone

I don't have an external mic or a SPDIF device to test the rest.

Signed-off-by: Rafael Avila de Espindola <rafael.espindola@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
14 years agoALSA: hda - Fix NULL dereference with enable_beep=0 option
Takashi Iwai [Tue, 22 Dec 2009 06:52:49 +0000 (07:52 +0100)]
ALSA: hda - Fix NULL dereference with enable_beep=0 option

Signed-off-by: Takashi Iwai <tiwai@suse.de>
14 years agoHWPOISON: Add PROC_FS dependency to hwpoison injector v2
Andi Kleen [Mon, 21 Dec 2009 18:56:42 +0000 (19:56 +0100)]
HWPOISON: Add PROC_FS dependency to hwpoison injector v2

The injector filter requires stable_page_flags() which is supplied
by procfs. So make it dependent on that.

Also add ifdefs around the filter code in memory-failure.c so that
when the filter is disabled due to missing dependencies the whole
code still builds.

Reported-by: Ingo Molnar
Signed-off-by: Andi Kleen <ak@linux.intel.com>
14 years agopata_bf54x: handle portmuxing of pins through GPIO PORTs
Sonic Zhang [Tue, 14 Jul 2009 17:39:47 +0000 (13:39 -0400)]
pata_bf54x: handle portmuxing of pins through GPIO PORTs

By default, the PATA pins are routed to the async address lines in which
case, no peripheral muxing needs to be done.  However, if the pins get
routed through the GPIO PORTs pins, we need to make sure to request them
so that the muxing is properly set up.

Signed-off-by: Sonic Zhang <sonic.zhang@analog.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
14 years agoresources: fix call to alignf() in allocate_resource()
Dominik Brodowski [Sun, 20 Dec 2009 09:50:02 +0000 (10:50 +0100)]
resources: fix call to alignf() in allocate_resource()

The second parameter to alignf() in allocate_resource() must
reflect what new resource is attempted to be allocated, else
functions like pcibios_align_resource() (at least on x86) or
pcmcia_align() can't work correctly.

Commit 1e5ad9679016275d422e36b12a98b0927d76f556 broke this by
setting the "new" resource until we're about to return success.
To keep the resource untouched when allocate_resource() fails,
a "tmp" resource is introduced.

Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
Acked-by: Bjorn Helgaas <bjorn.helgaas@hp.com>
Cc: Yinghai Lu <yhlu.kernel@gmail.com>
Cc: Jesse Barnes <jbarnes@virtuousgeek.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
14 years agoMerge branch 'upstream-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jgarzi...
Linus Torvalds [Mon, 21 Dec 2009 18:13:37 +0000 (10:13 -0800)]
Merge branch 'upstream-linus' of git://git./linux/kernel/git/jgarzik/libata-dev

* 'upstream-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jgarzik/libata-dev:
  pata_cmd64x: fix overclocking of UDMA0-2 modes
  Revert "pata_cmd64x: implement serialization as per notes"

14 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6
Linus Torvalds [Mon, 21 Dec 2009 18:12:25 +0000 (10:12 -0800)]
Merge git://git./linux/kernel/git/davem/net-2.6

* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6:
  bnx2: Fix bnx2_netif_stop() merge error.
  gianfar: Fix bit definitions of IMASK_GRSC and IMASK_GTSC
  gianfar: Fix stats support
  gianfar: Fix a filer bug
  bnx2: fixing a timout error due not refreshing TX timers correctly
  can/at91: don't check platform_get_irq's return value against zero
  mISDN: use DECLARE_COMPLETION_ONSTACK for non-constant completion
  bnx2: reset_task is crashing the kernel. Fixing it.
  ipv6: fix an oops when force unload ipv6 module
  TI DaVinci EMAC: Fix MDIO bus frequency configuration
  e100: Fix broken cbs accounting due to missing memset.
  broadcom: bcm54xx_shadow_read() errors ignored in bcm54xx_adjust_rxrefclk()
  e1000e: LED settings in EEPROM ignored on 82571 and 82572
  netxen: use module parameter correctly
  netns: fix net.ipv6.route.gc_min_interval_ms in netns
  Bluetooth: Prevent ill-timed autosuspend in USB driver
  Bluetooth: Fix L2CAP locking scheme regression
  Bluetooth: Ack L2CAP I-frames before retransmit missing packet
  Bluetooth: Fix unset of RemoteBusy flag for L2CAP
  Bluetooth: Fix PTR_ERR return of wrong pointer in hidp_setup_hid()

14 years agoMerge branch 'sched-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel...
Linus Torvalds [Mon, 21 Dec 2009 18:12:00 +0000 (10:12 -0800)]
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: Fix hotplug hang
  sched: Restore printk sanity

14 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6
Linus Torvalds [Mon, 21 Dec 2009 18:10:23 +0000 (10:10 -0800)]
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: (24 commits)
  ALSA: sbawe: fix memory detection
  ALSA: fix incorrect rounding direction in snd_interval_ratnum()
  ALSA: HDA: add powersaving hook for Realtek
  ALSA: HDA: remove useless mixers on Aspire 8930G
  ALSA: HDA: simplify Aspire 8930G verb array
  ALSA: hda: Set Front Mic to input vref 50% for Lenovo 3000 Y410
  ALSA: hda/realtek: Remove extra .capsrc_nids initialization for ALC889_INTEL
  ALSA: Use kzalloc for allocating only one thing
  ALSA: AACI: switch to per-pcm locking
  ALSA: AACI: add double-rate support
  ALSA: AACI: factor common hw_params logic into aaci_pcm_hw_params
  ALSA: AACI: cleanup aaci_pcm_hw_params
  ALSA: AACI: simplify codec rate information
  ALSA: aaci - Fix a typo
  ASoC: wm8974: fix a wrong bit definition
  sound: sgio2audio/pdaudiocf/usb-audio: initialize PCM buffer
  ALSA: hda - Fix quirk for Maxdata obook4-1
  ALSA: hda - Fix missing capsrc_nids for ALC88x
  ALSA: hda - Make use of beep device found in Dell Vostro 1015n
  ALSA: hda - Fixed internal mic initialization for Dell Vostro 1015
  ...

14 years agoMerge branch 'fix/misc' into for-linus
Takashi Iwai [Mon, 21 Dec 2009 11:05:40 +0000 (12:05 +0100)]
Merge branch 'fix/misc' into for-linus

14 years agoMerge branch 'fix/asoc' into for-linus
Takashi Iwai [Mon, 21 Dec 2009 11:05:37 +0000 (12:05 +0100)]
Merge branch 'fix/asoc' into for-linus

14 years agoMerge branch 'fix/hda' into for-linus
Takashi Iwai [Mon, 21 Dec 2009 11:05:31 +0000 (12:05 +0100)]
Merge branch 'fix/hda' into for-linus

14 years agoALSA: sbawe: fix memory detection
Krzysztof Helt [Sun, 20 Dec 2009 19:15:19 +0000 (20:15 +0100)]
ALSA: sbawe: fix memory detection

Memory amount is increased before a successful write-read
sequence is done. Thus, 512 kB of onboard memory is detected
on memoryless cards like SB32.

Move the increasing of memory counter after successful read
is done.

Signed-off-by: Krzysztof Helt <krzysztof.h1@wp.pl>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
14 years agoALSA: fix incorrect rounding direction in snd_interval_ratnum()
Krzysztof Helt [Sat, 19 Dec 2009 17:31:04 +0000 (18:31 +0100)]
ALSA: fix incorrect rounding direction in snd_interval_ratnum()

The direction of rounding is incorrect in the snd_interval_ratnum()
It was detected with following parameters (sb8 driver playing
8kHz stereo file):
 - num is always 1000000
 - requested frequency rate is from 7999 to 7999 (single frequency)

The first loop calculates div_down(num, freq->min) which is 125.
Thus, a frequency range's minimum value is 1000000 / 125 = 8000 Hz.
The second loop calculates div_up(num, freq->max) which is 126
The frequency range's maximum value is 1000000 / 126 = 7936 Hz.
The range maximum is lower than the range minimum so the function
fails due to empty result range.

Signed-off-by: Krzysztof Helt <krzysztof.h1@wp.pl>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
14 years agoMerge remote branch 'alsa/fixes' into fix/hda
Takashi Iwai [Mon, 21 Dec 2009 10:21:15 +0000 (11:21 +0100)]
Merge remote branch 'alsa/fixes' into fix/hda

14 years agoALSA: HDA: add powersaving hook for Realtek
Hector Martin [Sun, 20 Dec 2009 21:51:31 +0000 (22:51 +0100)]
ALSA: HDA: add powersaving hook for Realtek

The current Realtek code makes no specific provision for turning stuff
off. The codec chip is placed into low-power mode generically, but this
doesn't turn off any external hardware connected to it, in particular
external amplifiers.

This patch creates a hook function that is called by the codec
suspend/resume functions. It ought to disable any external hardware in a
device-specific way. I've implemented a generic ALC889 function that
sets the EAPD pin properly, and used it for the Acer Aspire 8930G which
can benefit from this feature.

On my laptop, this results in ~0.5W extra savings.

Signed-off-by: Hector Martin <hector@marcansoft.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
14 years agoALSA: HDA: remove useless mixers on Aspire 8930G
Hector Martin [Sun, 20 Dec 2009 21:51:23 +0000 (22:51 +0100)]
ALSA: HDA: remove useless mixers on Aspire 8930G

This patch removes some extra mixers that do nothing on the Acer Aspire
8930G.

The CD mixer is useless because the SATA DVD/Blu-Ray drive has no analog
audio output, and the Side mixer is useless because we max out at 6ch
anyway.

Signed-off-by: Hector Martin <hector@marcansoft.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
14 years agoALSA: HDA: simplify Aspire 8930G verb array
Hector Martin [Sun, 20 Dec 2009 21:51:18 +0000 (22:51 +0100)]
ALSA: HDA: simplify Aspire 8930G verb array

This patch just simplifies the 8930G verb array a bit. Just use the
common ALC889 EAPD verb array to make things more consistent. The file
is already huge enough already.

Signed-off-by: Hector Martin <hector@marcansoft.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
14 years agoALSA: hda: Set Front Mic to input vref 50% for Lenovo 3000 Y410
Daniel T Chen [Sat, 19 Dec 2009 23:19:02 +0000 (18:19 -0500)]
ALSA: hda: Set Front Mic to input vref 50% for Lenovo 3000 Y410

BugLink: https://bugs.launchpad.net/bugs/479373
The OR has verified with hda-verb that the internal microphone needs
VREF50 set for audible capture.

Signed-off-by: Daniel T Chen <crimsun@ubuntu.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
14 years agonfsd: fix "insecure" export option
J. Bruce Fields [Sun, 20 Dec 2009 15:43:35 +0000 (10:43 -0500)]
nfsd: fix "insecure" export option

A typo in 12045a6ee9908b "nfsd: let "insecure" flag vary by
pseudoflavor" reversed the sense of the "insecure" flag.

Reported-by: Michael Guntsche <mike@it-loops.com>
Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
14 years agosh: Only use bl bit toggling for sleeping idle.
Paul Mundt [Fri, 18 Dec 2009 05:40:56 +0000 (14:40 +0900)]
sh: Only use bl bit toggling for sleeping idle.

We don't actually require this in the cpu_relax() polling case, so just
cuddle these around the sleeping version.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
14 years agosh: Restore bl bit toggling in idle loop.
Paul Mundt [Fri, 18 Dec 2009 05:19:27 +0000 (14:19 +0900)]
sh: Restore bl bit toggling in idle loop.

This fixes up some crashes with IRQs racing the need_resched() test under
QEMU.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
14 years agobnx2: Fix bnx2_netif_stop() merge error.
Michael Chan [Mon, 21 Dec 2009 02:40:18 +0000 (18:40 -0800)]
bnx2: Fix bnx2_netif_stop() merge error.

The error was introduced while merging:

commit 4529819c45161e4a119134f56ef504e69420bc98
bnx2: reset_task is crashing the kernel. Fixing it.

Signed-off-by: Michael Chan <mchan@broadcom.com>k
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoPM: Use pm_runtime_put_sync in system resume
Alan Stern [Mon, 21 Dec 2009 01:46:11 +0000 (02:46 +0100)]
PM: Use pm_runtime_put_sync in system resume

This patch (as1317) fixes a bug in the PM core.  When a device is
resumed following a system sleep, the core decrements the device's
runtime PM usage counter but doesn't issue an idle notification if the
counter reaches 0.  This could prevent an otherwise unused device from
being runtime-suspended again after the system sleep.

The fix is to call pm_runtime_put_sync() instead of
pm_runtime_put_noidle().

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
14 years agopowerpc/gc/wii: Remove get_irq_desc()
Albert Herranz [Fri, 18 Dec 2009 10:04:05 +0000 (10:04 +0000)]
powerpc/gc/wii: Remove get_irq_desc()

Fix the following build failures:

arch/powerpc/platforms/embedded6xx/flipper-pic.c: In function 'flipper_pic_map':
arch/powerpc/platforms/embedded6xx/flipper-pic.c:105: error: implicit declaration of function 'get_irq_desc'

arch/powerpc/platforms/embedded6xx/hlwd-pic.c: In function 'hlwd_pic_map':
arch/powerpc/platforms/embedded6xx/hlwd-pic.c:98: error: implicit declaration of function 'get_irq_desc'

These failures are caused by the changes introduced in commit
"powerpc: Remove get_irq_desc()". The reason these drivers were not
updated is that they weren't merged yet.

Signed-off-by: Albert Herranz <albert_herranz@yahoo.es>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
14 years agopowerpc/gc/wii: hlwd-pic: convert irq_desc.lock to raw_spinlock
Albert Herranz [Fri, 18 Dec 2009 10:04:42 +0000 (10:04 +0000)]
powerpc/gc/wii: hlwd-pic: convert irq_desc.lock to raw_spinlock

Fix the following build failures:

arch/powerpc/platforms/embedded6xx/hlwd-pic.c: In function 'hlwd_pic_irq_cascade':
arch/powerpc/platforms/embedded6xx/hlwd-pic.c:135: error: passing argument 1 of 'spin_lock' from incompatible pointer type
arch/powerpc/platforms/embedded6xx/hlwd-pic.c:137: error: passing argument 1 of 'spin_unlock' from incompatible pointer type
arch/powerpc/platforms/embedded6xx/hlwd-pic.c:145: error: passing argument 1 of 'spin_lock' from incompatible pointer type
arch/powerpc/platforms/embedded6xx/hlwd-pic.c:149: error: passing argument 1 of 'spin_unlock' from incompatible pointer type

These failures are caused by the changes introduced in commit
"genirq: Convert irq_desc.lock to raw_spinlock". The reason this driver
was not updated is that it wasn't merged yet.

Signed-off-by: Albert Herranz <albert_herranz@yahoo.es>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
14 years agosched: Fix hotplug hang
Peter Zijlstra [Sun, 20 Dec 2009 16:36:27 +0000 (17:36 +0100)]
sched: Fix hotplug hang

The hot-unplug kstopmachine usage does a wakeup after
deactivating the cpu, hence we cannot use cpu_active()
here but must rely on the good olde online.

Reported-by: Sachin Sant <sachinp@in.ibm.com>
Reported-by: Jens Axboe <jens.axboe@oracle.com>
Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Tested-by: Jens Axboe <jens.axboe@oracle.com>
Cc: Heiko Carstens <heiko.carstens@de.ibm.com>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
LKML-Reference: <1261326987.4314.24.camel@laptop>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
14 years agoMerge commit 'jwb/next' into merge
Benjamin Herrenschmidt [Sun, 20 Dec 2009 22:30:45 +0000 (09:30 +1100)]
Merge commit 'jwb/next' into merge

14 years agoMerge commit 'kumar/next' into merge
Benjamin Herrenschmidt [Sun, 20 Dec 2009 22:30:42 +0000 (09:30 +1100)]
Merge commit 'kumar/next' into merge

14 years agopata_cmd64x: fix overclocking of UDMA0-2 modes
Bartlomiej Zolnierkiewicz [Sun, 20 Dec 2009 18:22:33 +0000 (19:22 +0100)]
pata_cmd64x: fix overclocking of UDMA0-2 modes

adev->dma_mode stores the transfer mode value not UDMA mode number
so the condition in cmd64x_set_dmamode() is always true and the higher
UDMA clock is always selected.  This can potentially result in data
corruption when UDMA33 device is used, when 40-wire cable is used or
when the error recovery code decides to lower the device speed down.

The issue was introduced in the commit 6a40da0 ("libata cmd64x: whack
into a shape that looks like the documentation") which goes back to
kernel 2.6.20.

Cc: stable@kernel.org
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
14 years agoRevert "pata_cmd64x: implement serialization as per notes"
Jeff Garzik [Sun, 20 Dec 2009 20:39:55 +0000 (15:39 -0500)]
Revert "pata_cmd64x: implement serialization as per notes"

This reverts commit d43744390e460dce6626fb8de2c02a24ff650005, because
it breaks the boot on several machines (mostly sparc64, at present).

Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
14 years agosched: Restore printk sanity
Peter Zijlstra [Sun, 20 Dec 2009 13:23:57 +0000 (14:23 +0100)]
sched: Restore printk sanity

Revert the braindead pr_* crap. (Commit 663997d "sched: Use
pr_fmt() and pr_<level>()")

It's dumb and causes stupid "sched: " strings all over the place.

Signed-off-by: Peter Zijlstra <peterz@infradead.org>
Acked-by: Mike Galbraith <efault@gmx.de>
Cc: Joe Perches <joe@perches.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Andrew Morton <akpm@linux-foundation.org>
LKML-Reference: <1261315437.4314.6.camel@laptop>
[ i dont mind the pr_*() patterns that much - but Peter dislikes them with a vengence. ]
[ - v2: remove spurious diffstat from changelog :-/ ]
Signed-off-by: Ingo Molnar <mingo@elte.hu>
14 years agoALSA: hda/realtek: Remove extra .capsrc_nids initialization for ALC889_INTEL
Jaroslav Kysela [Sun, 20 Dec 2009 11:04:08 +0000 (12:04 +0100)]
ALSA: hda/realtek: Remove extra .capsrc_nids initialization for ALC889_INTEL

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
14 years agoMerge branch 'fix/hda' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound...
Jaroslav Kysela [Sun, 20 Dec 2009 11:00:30 +0000 (12:00 +0100)]
Merge branch 'fix/hda' of git://git./linux/kernel/git/tiwai/sound-2.6 into fixes

14 years agoARM: add missing include to nwflash.c
Russell King [Sat, 19 Dec 2009 23:36:00 +0000 (23:36 +0000)]
ARM: add missing include to nwflash.c

nwflash needs jiffie definitions.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
14 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mattst88...
Linus Torvalds [Sat, 19 Dec 2009 20:38:55 +0000 (12:38 -0800)]
Merge branch 'for-linus' of git://git./linux/kernel/git/mattst88/alpha-2.6

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mattst88/alpha-2.6:
  alpha: Convert BUG() to use unreachable()
  alpha: Add minimal support for software performance events
  alpha: Wire up missing/new syscalls

14 years agoMerge branch 'upstream-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jgarzi...
Linus Torvalds [Sat, 19 Dec 2009 19:04:29 +0000 (11:04 -0800)]
Merge branch 'upstream-linus' of git://git./linux/kernel/git/jgarzik/libata-dev

* 'upstream-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jgarzik/libata-dev:
  sata_mv: remove pointless NULL test
  pata_hpt3x2n: fix clock turnaround
  libata: fix reporting of drained bytes when clearing DRQ
  sata_mv: add power management support for the PCI controllers.
  sata_mv: store the board_idx into the host private data
  pata_octeon_cf: use resource_size(), to fix resource sizing bug
  libata: use the WRITE_SAME_16 define
  sata_mv: move the PCI bar description initialization code
  sata_mv: add power management support for the platform driver
  sata_mv: support clkdev framework
  sata_mv: increase PIO IORDY timeout

Fixed crazy mode-change in merge.

14 years agoMerge branch 'perf-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel...
Linus Torvalds [Sat, 19 Dec 2009 17:48:42 +0000 (09:48 -0800)]
Merge branch 'perf-fixes-for-linus' of git://git./linux/kernel/git/tip/linux-2.6-tip

* 'perf-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
  perf session: Make events_stats u64 to avoid overflow on 32-bit arches
  hw-breakpoints: Fix hardware breakpoints -> perf events dependency
  perf events: Dont report side-band events on each cpu for per-task-per-cpu events
  perf events, x86/stacktrace: Fix performance/softlockup by providing a special frame pointer-only stack walker
  perf events, x86/stacktrace: Make stack walking optional
  perf events: Remove unused perf_counter.h header file
  perf probe: Check new event name
  kprobe-tracer: Check new event/group name
  perf probe: Check whether debugfs path is correct
  perf probe: Fix libdwarf include path for Debian

14 years agoMerge branch 'x86-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git...
Linus Torvalds [Sat, 19 Dec 2009 17:48:14 +0000 (09:48 -0800)]
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:
  x86, irq: Allow 0xff for /proc/irq/[n]/smp_affinity on an 8-cpu system
  Makefile: Unexport LC_ALL instead of clearing it
  x86: Fix objdump version check in arch/x86/tools/chkobjdump.awk
  x86: Reenable TSC sync check at boot, even with NONSTOP_TSC
  x86: Don't use POSIX character classes in gen-insn-attr-x86.awk
  Makefile: set LC_CTYPE, LC_COLLATE, LC_NUMERIC to C
  x86: Increase MAX_EARLY_RES; insufficient on 32-bit NUMA
  x86: Fix checking of SRAT when node 0 ram is not from 0
  x86, cpuid: Add "volatile" to asm in native_cpuid()
  x86, msr: msrs_alloc/free for CONFIG_SMP=n
  x86, amd: Get multi-node CPU info from NodeId MSR instead of PCI config space
  x86: Add IA32_TSC_AUX MSR and use it
  x86, msr/cpuid: Register enough minors for the MSR and CPUID drivers
  initramfs: add missing decompressor error check
  bzip2: Add missing checks for malloc returning NULL
  bzip2/lzma/gzip: pre-boot malloc doesn't return NULL on failure

14 years agoMerge branch 'sched-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel...
Linus Torvalds [Sat, 19 Dec 2009 17:47:49 +0000 (09:47 -0800)]
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: (25 commits)
  sched: Fix broken assertion
  sched: Assert task state bits at build time
  sched: Update task_state_arraypwith new states
  sched: Add missing state chars to TASK_STATE_TO_CHAR_STR
  sched: Move TASK_STATE_TO_CHAR_STR near the TASK_state bits
  sched: Teach might_sleep() about preemptible RCU
  sched: Make warning less noisy
  sched: Simplify set_task_cpu()
  sched: Remove the cfs_rq dependency from set_task_cpu()
  sched: Add pre and post wakeup hooks
  sched: Move kthread_bind() back to kthread.c
  sched: Fix select_task_rq() vs hotplug issues
  sched: Fix sched_exec() balancing
  sched: Ensure set_task_cpu() is never called on blocked tasks
  sched: Use TASK_WAKING for fork wakups
  sched: Select_task_rq_fair() must honour SD_LOAD_BALANCE
  sched: Fix task_hot() test order
  sched: Fix set_cpu_active() in cpu_down()
  sched: Mark boot-cpu active before smp_init()
  sched: Fix cpu_clock() in NMIs, on !CONFIG_HAVE_UNSTABLE_SCHED_CLOCK
  ...

14 years agoMerge branch 'core-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel...
Linus Torvalds [Sat, 19 Dec 2009 17:47:34 +0000 (09:47 -0800)]
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:
  sys: Fix missing rcu protection for __task_cred() access
  signals: Fix more rcu assumptions
  signal: Fix racy access to __task_cred in kill_pid_info_as_uid()

14 years agoMerge branch 'timers-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel...
Linus Torvalds [Sat, 19 Dec 2009 17:47:18 +0000 (09:47 -0800)]
Merge branch 'timers-fixes-for-linus' of git://git./linux/kernel/git/tip/linux-2.6-tip

* 'timers-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
  timers: Remove duplicate setting of new_base in __mod_timer()
  clockevents: Prevent clockevent_devices list corruption on cpu hotplug

14 years agoMerge branch 'for-linus' of git://git390.marist.edu/pub/scm/linux-2.6
Linus Torvalds [Sat, 19 Dec 2009 17:46:46 +0000 (09:46 -0800)]
Merge branch 'for-linus' of git://git390.marist.edu/linux-2.6

* 'for-linus' of git://git390.marist.edu/pub/scm/linux-2.6:
  [S390] Use strim instead of strstrip to avoid false warnings.
  [S390] qdio: add counter for input queue full condition
  [S390] qdio: remove superfluous log entries and WARN_ONs.
  [S390] ptrace: dont abuse PT_PTRACED
  [S390] cio: fix channel path vary
  [S390] drivers: Correct size given to memset
  [S390] tape: Add pr_fmt() macro to all tape source files
  [S390] rename NT_PRXSTATUS to NT_S390_HIGHREGS
  [S390] tty: PTR_ERR return of wrong pointer in fs3270_open()
  [S390] s390: PTR_ERR return of wrong pointer in fallback_init_cip()
  [S390] dasd: PTR_ERR return of wrong pointer in
  [S390] dasd: move dasd-diag kmsg to dasd
  [S390] cio: fix drvdata usage for the console subchannel
  [S390] wire up sys_recvmmsg

14 years agofix more leaks in audit_tree.c tag_chunk()
Al Viro [Sat, 19 Dec 2009 16:03:30 +0000 (16:03 +0000)]
fix more leaks in audit_tree.c tag_chunk()

Several leaks in audit_tree didn't get caught by commit
318b6d3d7ddbcad3d6867e630711b8a705d873d7, including the leak on normal
exit in case of multiple rules refering to the same chunk.

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
14 years agofix braindamage in audit_tree.c untag_chunk()
Al Viro [Sat, 19 Dec 2009 15:59:45 +0000 (15:59 +0000)]
fix braindamage in audit_tree.c untag_chunk()

... aka "Al had badly fscked up when writing that thing and nobody
noticed until Eric had fixed leaks that used to mask the breakage".

The function essentially creates a copy of old array sans one element
and replaces the references to elements of original (they are on cyclic
lists) with those to corresponding elements of new one.  After that the
old one is fair game for freeing.

First of all, there's a dumb braino: when we get to list_replace_init we
use indices for wrong arrays - position in new one with the old array
and vice versa.

Another bug is more subtle - termination condition is wrong if the
element to be excluded happens to be the last one.  We shouldn't go
until we fill the new array, we should go until we'd finished the old
one.  Otherwise the element we are trying to kill will remain on the
cyclic lists...

That crap used to be masked by several leaks, so it was not quite
trivial to hit.  Eric had fixed some of those leaks a while ago and the
shit had hit the fan...

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
14 years agoALSA: Use kzalloc for allocating only one thing
Julia Lawall [Sat, 19 Dec 2009 07:18:03 +0000 (08:18 +0100)]
ALSA: Use kzalloc for allocating only one thing

Use kzalloc rather than kcalloc(1,...)

The semantic patch that makes this change is as follows:
(http://coccinelle.lip6.fr/)

// <smpl>
@@
@@

- kcalloc(1,
+ kzalloc(
          ...)
// </smpl>

Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
14 years agogianfar: Fix bit definitions of IMASK_GRSC and IMASK_GTSC
Sandeep Gopalpet [Wed, 16 Dec 2009 01:15:17 +0000 (01:15 +0000)]
gianfar: Fix bit definitions of IMASK_GRSC and IMASK_GTSC

Signed-off-by: Sandeep Gopalpet <Sandeep.Kumar@freescale.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agogianfar: Fix stats support
Sandeep Gopalpet [Wed, 16 Dec 2009 01:15:07 +0000 (01:15 +0000)]
gianfar: Fix stats support

This patch updates the per rx/tx queue stats.
To update the per rx queue stats a new structure has been
introduced rx_q_stats.
The per tx queue stats are updated via the netdev_queue
structure itself.

Note that we update only the tx_packtes, tx_bytes, rx_packets,
rx_bytes and rx_dropped stats on a per queue basis.

Signed-off-by: Sandeep Gopalpet <Sandeep.Kumar@freescale.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agogianfar: Fix a filer bug
Sandeep Gopalpet [Wed, 16 Dec 2009 01:14:58 +0000 (01:14 +0000)]
gianfar: Fix a filer bug

We need to enable filer whenever we need to use multiple RX
queues. Also, need to program RIR0 register with the required
distribution we require, if using RX filer hashing support for
packet distribution to multiple queues.

Signed-off-by: Sandeep Gopalpet <Sandeep.Kumar@freescale.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agobnx2: fixing a timout error due not refreshing TX timers correctly
Breno Leitao [Sat, 19 Dec 2009 04:35:34 +0000 (20:35 -0800)]
bnx2: fixing a timout error due not refreshing TX timers correctly

When running the following script on an active bnx2 interface:

while(true); do ifconfig ethX mtu 9000; ifconfig ethX mtu 1500; done

A timeout error appears and dumps the following stack:

NETDEV WATCHDOG: eth4 (bnx2): transmit queue 0 timed out
------------[ cut here ]------------
Badness at net/sched/sch_generic.c:261
<snip>

This patch just fixes the way that ->trans_start is refreshed.

Signed-off-by: Breno Leitao <leitao@linux.vnet.ibm.com>
Acked-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agocan/at91: don't check platform_get_irq's return value against zero
Uwe Kleine-König [Sat, 19 Dec 2009 04:31:56 +0000 (20:31 -0800)]
can/at91: don't check platform_get_irq's return value against zero

platform_get_irq returns -ENXIO on failure, so !irq was probably
always true.  Better use (int)irq <= 0.  Note that a return value of
zero is still handled as error even though this could mean irq0.

This is a followup to 305b3228f9ff4d59f49e6d34a7034d44ee8ce2f0 that
changed the return value of platform_get_irq from 0 to -ENXIO on error.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Wolfgang Grandegger <wg@grandegger.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agomISDN: use DECLARE_COMPLETION_ONSTACK for non-constant completion
Yong Zhang [Sat, 19 Dec 2009 04:30:11 +0000 (20:30 -0800)]
mISDN: use DECLARE_COMPLETION_ONSTACK for non-constant completion

The _ONSTACK variant should be used for on-stack completion,
otherwise it will break lockdep.

Signed-off-by: Yong Zhang <yong.zhang0@gmail.com>
Acked-by: Karsten Keil <keil@b1-systems.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agobnx2: reset_task is crashing the kernel. Fixing it.
Breno Leitao [Sat, 19 Dec 2009 04:29:04 +0000 (20:29 -0800)]
bnx2: reset_task is crashing the kernel. Fixing it.

If bnx2 schedules a reset via the reset_task, e.g., due to a TX
timeout, it's possible for the NIC to be disabled with packets
pending for transmit.  In this case, napi_disable will loop forever,
eventually crashing the kernel.  This patch moves the disable of
the device to after the napi_disable call.

Signed-off-by: Breno Leitao <leitao@linux.vnet.ibm.com>
Acked-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoipv6: fix an oops when force unload ipv6 module
Yang Hongyang [Sat, 19 Dec 2009 04:25:13 +0000 (20:25 -0800)]
ipv6: fix an oops when force unload ipv6 module

When I do an ipv6 module force unload,I got the following oops:
#rmmod -f ipv6
------------[ cut here ]------------
kernel BUG at mm/slub.c:2969!
invalid opcode: 0000 [#1] SMP
last sysfs file: /sys/devices/pci0000:00/0000:00:11.0/0000:02:03.0/net/eth2/ifindex
Modules linked in: ipv6(-) dm_multipath uinput ppdev tpm_tis tpm tpm_bios pcspkr pcnet32 mii parport_pc i2c_piix4 parport i2c_core floppy mptspi mptscsih mptbase scsi_transport_spi

Pid: 2530, comm: rmmod Tainted: G  R        2.6.32 #2 440BX Desktop Reference Platform/VMware Virtual Platform
EIP: 0060:[<c04b73f2>] EFLAGS: 00010246 CPU: 0
EIP is at kfree+0x6a/0xdd
EAX: 00000000 EBX: c09e86bc ECX: c043e4dd EDX: c14293e0
ESI: e141f1d8 EDI: e140fc31 EBP: dec58ef0 ESP: dec58ed0
 DS: 007b ES: 007b FS: 00d8 GS: 0033 SS: 0068
Process rmmod (pid: 2530, ti=dec58000 task=decb1940 task.ti=dec58000)
Stack:
 c14293e0 00000282 df624240 c0897d08 c09e86bc c09e86bc e141f1d8 dec58f1c
<0> dec58f00 e140fc31 c09e84c4 e141f1bc dec58f14 c0689d21 dec58f1c e141f1bc
<0> 00000000 dec58f2c c0689eff c09e84d8 c09e84d8 e141f1bc bff33a90 dec58f38
Call Trace:
 [<e140fc31>] ? ipv6_frags_exit_net+0x22/0x32 [ipv6]
 [<c0689d21>] ? ops_exit_list+0x19/0x3d
 [<c0689eff>] ? unregister_pernet_operations+0x2a/0x51
 [<c0689f70>] ? unregister_pernet_subsys+0x17/0x24
 [<e140fbfe>] ? ipv6_frag_exit+0x21/0x32 [ipv6]
 [<e141a361>] ? inet6_exit+0x47/0x122 [ipv6]
 [<c045f5de>] ? sys_delete_module+0x198/0x1f6
 [<c04a8acf>] ? remove_vma+0x57/0x5d
 [<c070f63f>] ? do_page_fault+0x2e7/0x315
 [<c0403218>] ? sysenter_do_call+0x12/0x28
Code: 86 00 00 00 40 c1 e8 0c c1 e0 05 01 d0 89 45 e0 66 83 38 00 79 06 8b 40 0c 89 45 e0 8b 55 e0 8b 02 84 c0 78 14 66 a9 00 c0 75 04 <0f> 0b eb fe 8b 45 e0 e8 35 15 fe ff eb 5d 8b 45 04 8b 55 e0 89
EIP: [<c04b73f2>] kfree+0x6a/0xdd SS:ESP 0068:dec58ed0
---[ end trace 4475d1a5b0afa7e5 ]---

It's because in ip6_frags_ns_sysctl_register,
"table" only alloced when "net" is not equals
to "init_net".So when we free "table" in
ip6_frags_ns_sysctl_unregister,we should check
this first.

This patch fix the problem.

Signed-off-by: Yang Hongyang <yanghy@cn.fujitsu.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoTI DaVinci EMAC: Fix MDIO bus frequency configuration
Nageswari Srinivasan [Sat, 19 Dec 2009 04:21:21 +0000 (20:21 -0800)]
TI DaVinci EMAC: Fix MDIO bus frequency configuration

There was a typo in "if condition" checking for validity of MDIO
bus frequency passed as part of platform data. Bitwise AND was
being used instead of a Logical AND.

Tested on: DM6467 EVM

Signed-off-by: Nageswari Srinivasan <nageswari@ti.com>
Acked-by: Anant Gole <anantgole@ti.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoe100: Fix broken cbs accounting due to missing memset.
Roger Oksanen [Sat, 19 Dec 2009 04:18:21 +0000 (20:18 -0800)]
e100: Fix broken cbs accounting due to missing memset.

Alan Stern noticed that e100 caused slab corruption.
commit 98468efddb101f8a29af974101c17ba513b07be1 changed
the allocation of cbs to use dma pools that don't return zeroed memory,
especially the cb->status field used to track which cb to clean, causing
(the visible) double freeing of skbs and a wrong free cbs count.

Now the cbs are explicitly zeroed at allocation time.

Reported-by: Alan Stern <stern@rowland.harvard.edu>
Tested-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Roger Oksanen <roger.oksanen@cs.helsinki.fi>
Acked-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agobroadcom: bcm54xx_shadow_read() errors ignored in bcm54xx_adjust_rxrefclk()
Roel Kluin [Sat, 19 Dec 2009 04:16:10 +0000 (20:16 -0800)]
broadcom: bcm54xx_shadow_read() errors ignored in bcm54xx_adjust_rxrefclk()

If not signed read errors are ignored.

Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
Acked-by: Matt Carlson <mcarlson@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoe1000e: LED settings in EEPROM ignored on 82571 and 82572
Bruce Allan [Sat, 19 Dec 2009 04:14:59 +0000 (20:14 -0800)]
e1000e: LED settings in EEPROM ignored on 82571 and 82572

Do not override the customizable LED configuration set in the EEPROM.

Signed-off-by: Bruce Allan <bruce.w.allan@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agonetxen: use module parameter correctly
Stephen Hemminger [Sat, 19 Dec 2009 04:13:35 +0000 (20:13 -0800)]
netxen: use module parameter correctly

Netxen driver is doing this bogus thing to create a control file.
This fails if device doesn't exist, and overall is a bad way to do
the module parameter. Rather than fix borked code, just rewrite.
Just using a writeable module parameter of 0/1 is the correct way

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agonetns: fix net.ipv6.route.gc_min_interval_ms in netns
Alexey Dobriyan [Sat, 19 Dec 2009 04:11:03 +0000 (20:11 -0800)]
netns: fix net.ipv6.route.gc_min_interval_ms in netns

sysctl table was copied, all right, but ->data for net.ipv6.route.gc_min_interval_ms
was not reinitialized for "!= &init_net" case.

In init_net everthing works by accident due to correct ->data initialization
in source table.

Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoocfs2: Set i_nlink properly during reflink.
Tao Ma [Fri, 18 Dec 2009 02:24:55 +0000 (10:24 +0800)]
ocfs2: Set i_nlink properly during reflink.

We create a file in orphan dir for reflink so that if there
is any error, we don't create any wrong dentry in the dir.
But actually the file in orphan dir should be i_nlink = 0
so that it can be replayed and freed successfully.

This patch first set i_nlink to 0 when creating the file in
orphan dir and then set it to 1(reflink now only works for
regular file) when we move it to the dest dir.

Signed-off-by: Tao Ma <tao.ma@oracle.com>
Signed-off-by: Joel Becker <joel.becker@oracle.com>
14 years agoocfs2: Add reflinked file's inode to inode hash eariler.
Tao Ma [Fri, 18 Dec 2009 02:24:54 +0000 (10:24 +0800)]
ocfs2: Add reflinked file's inode to inode hash eariler.

We used to add reflinked file's inode to inode hash when
we add it to the dest dir. But actually there is a race.
Consider the following sequence.
1. reflink happens and create the inode in orphan dir.
2. reflink thread is scheduled out because of some io.
3. recovery begins to work and calls ocfs2_recover_orphans.
   It calls ocfs2_iget and get a new inode and i_count = 1.
   It calls iput then and delete inode. the buffer's
   uptodate state is cleared.

This patch move insert_inode_hash to the create function so
that it can be found by step 3 and prevented from deleting
because i_count > 1.

This resolves the bug
http://oss.oracle.com/bugzilla/show_bug.cgi?id=1183.

Signed-off-by: Tao Ma <tao.ma@oracle.com>
Signed-off-by: Joel Becker <joel.becker@oracle.com>
14 years agoALSA: AACI: switch to per-pcm locking
Russell King [Fri, 18 Dec 2009 17:48:50 +0000 (17:48 +0000)]
ALSA: AACI: switch to per-pcm locking

We can use finer-grained locking, which makes things easier when
we gain DMA support.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
14 years agoALSA: AACI: add double-rate support
Russell King [Fri, 18 Dec 2009 17:48:45 +0000 (17:48 +0000)]
ALSA: AACI: add double-rate support

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
14 years agoALSA: AACI: factor common hw_params logic into aaci_pcm_hw_params
Russell King [Fri, 18 Dec 2009 17:48:40 +0000 (17:48 +0000)]
ALSA: AACI: factor common hw_params logic into aaci_pcm_hw_params

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
14 years agoALSA: AACI: cleanup aaci_pcm_hw_params
Russell King [Fri, 18 Dec 2009 17:48:37 +0000 (17:48 +0000)]
ALSA: AACI: cleanup aaci_pcm_hw_params

Since the recording and playback paths are now the same, eliminate
the needless conditionals.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
14 years agoALSA: AACI: simplify codec rate information
Russell King [Fri, 18 Dec 2009 17:48:35 +0000 (17:48 +0000)]
ALSA: AACI: simplify codec rate information

There's no need for a specific rule; ALSA's generic AC'97 support
calculates the necessary rate constraint information itself, and
we can use this directly.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
14 years agoALSA: aaci - Fix a typo
Takashi Iwai [Fri, 18 Dec 2009 19:25:30 +0000 (20:25 +0100)]
ALSA: aaci - Fix a typo

Fixed a typo of the max buffer size specified for buffer allocation
changed in the commit d6797322231af98b9bb4afb175dd614cf511e5f7.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
14 years agowatchdog: update geodewdt for new MFGPT API
Andres Salomon [Fri, 18 Dec 2009 18:02:38 +0000 (13:02 -0500)]
watchdog: update geodewdt for new MFGPT API

Update to the new cs5535_mfgpt* API.  The geode-specific wording should
eventually be dropped from this driver...

Signed-off-by: Andres Salomon <dilinger@collabora.co.uk>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
14 years ago[S390] Use strim instead of strstrip to avoid false warnings.
Heiko Carstens [Fri, 18 Dec 2009 16:43:27 +0000 (17:43 +0100)]
[S390] Use strim instead of strstrip to avoid false warnings.

Cc: Michael Holzheu <holzheu@linux.vnet.ibm.com>
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
14 years ago[S390] qdio: add counter for input queue full condition
Jan Glauber [Fri, 18 Dec 2009 16:43:26 +0000 (17:43 +0100)]
[S390] qdio: add counter for input queue full condition

Add a counter to the qdio performance statistics that indicates that no
free buffers were left in the input queue. If the counter gets increased
it means that the qdio adapter filled all available buffers and possibly
had more buffers ready but could not transmit them.

Signed-off-by: Jan Glauber <jang@linux.vnet.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
14 years ago[S390] qdio: remove superfluous log entries and WARN_ONs.
Jan Glauber [Fri, 18 Dec 2009 16:43:25 +0000 (17:43 +0100)]
[S390] qdio: remove superfluous log entries and WARN_ONs.

* Don't write debug feature log entries for sl, slsb and sbal since these
  elements can be located from the qdio_q pointer which is also logged.
* Convert WARN_ON for wrong alignment of sbal to BUG_ON.
* Remove WARN_ON's for wrong alignment of q / qib / slib since these
  alignments should be guaranteed by kmem_cache_alloc alignment /
  struct aligned attribute / __get_free_page.

Signed-off-by: Jan Glauber <jang@linux.vnet.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>