pandora-kernel.git
13 years agoxen: x86/32: perform initial startup on initial_page_table
Ian Campbell [Wed, 24 Nov 2010 12:09:41 +0000 (12:09 +0000)]
xen: x86/32: perform initial startup on initial_page_table

Only make swapper_pg_dir readonly and pinned when generic x86 architecture code
(which also starts on initial_page_table) switches to it.  This helps ensure
that the generic setup paths work on Xen unmodified. In particular
clone_pgd_range writes directly to the destination pgd entries and is used to
initialise swapper_pg_dir so we need to ensure that it remains writeable until
the last possible moment during bring up.

This is complicated slightly by the need to avoid sharing kernel PMD entries
when running under Xen, therefore the Xen implementation must make a copy of
the kernel PMD (which is otherwise referred to by both intial_page_table and
swapper_pg_dir) before switching to swapper_pg_dir.

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Tested-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Cc: Borislav Petkov <bp@alien8.de>
Cc: H. Peter Anvin <hpa@linux.intel.com>
Cc: Jeremy Fitzhardinge <jeremy@goop.org>
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
13 years agoALSA: HDA: Add an extra DAC for Realtek ALC887-VD
David Henningsson [Wed, 24 Nov 2010 13:17:47 +0000 (14:17 +0100)]
ALSA: HDA: Add an extra DAC for Realtek ALC887-VD

The patch enables ALC887-VD to use the DAC at nid 0x26,
which makes it possible to use this DAC for e g Headphone
volume.

Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
13 years agoASoC: nuc900-ac97: fix a memory leak
Axel Lin [Wed, 24 Nov 2010 08:44:23 +0000 (16:44 +0800)]
ASoC: nuc900-ac97: fix a memory leak

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Acked-by: Wan ZongShun <mcuos.com@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
13 years agoMerge branch 'fix/asoc' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound...
Mark Brown [Wed, 24 Nov 2010 11:22:55 +0000 (11:22 +0000)]
Merge branch 'fix/asoc' of git://git./linux/kernel/git/tiwai/sound-2.6 into for-2.6.37

13 years agoASoC: Return proper error for omap3pandora_soc_init
Axel Lin [Wed, 24 Nov 2010 07:20:48 +0000 (15:20 +0800)]
ASoC: Return proper error for omap3pandora_soc_init

Return PTR_ERR(omap3pandora_dac_reg) instead of 0 if regulator_get failed.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
13 years agoASoC: wm8961 - clear WM8961_MCLKDIV bit for freq <= 16500000
Axel Lin [Wed, 24 Nov 2010 02:21:54 +0000 (10:21 +0800)]
ASoC: wm8961 - clear WM8961_MCLKDIV bit for freq <= 16500000

MCLKDIV bit of Register 04h Clocking1:
0 : Divide by 1
1 : Divide by 2

Thus in the case of freq <= 16500000, we should clear MCLKDIV bit.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: stable@kernel.org
13 years agoASoC: wm8961 - clear WM8961_DACSLOPE bit for normal mode
Axel Lin [Wed, 24 Nov 2010 02:20:33 +0000 (10:20 +0800)]
ASoC: wm8961 - clear WM8961_DACSLOPE bit for normal mode

DACSLOPE bit of Register 06h ADC and DAC Control 2:
        0: Normal mode
        1: Sloping stop-band mode

Thus in the case of normal mode, we should clear DACSLOPE bit.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: stable@kernel.org
13 years agoMerge branch 'rmobile/fsi-despair' into rmobile-fixes-for-linus
Paul Mundt [Wed, 24 Nov 2010 07:21:08 +0000 (16:21 +0900)]
Merge branch 'rmobile/fsi-despair' into rmobile-fixes-for-linus

13 years agosisfb: delete osdef.h
Aaro Koskinen [Fri, 19 Nov 2010 21:58:51 +0000 (21:58 +0000)]
sisfb: delete osdef.h

The file is not needed.

Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Cc: Thomas Winischhofer <thomas@winischhofer.net>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
13 years agosisfb: move the CONFIG warning to sis_main.c
Aaro Koskinen [Fri, 19 Nov 2010 21:58:50 +0000 (21:58 +0000)]
sisfb: move the CONFIG warning to sis_main.c

sis_main.c is always compiled, so we can check Kconfig options there.

Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Cc: Thomas Winischhofer <thomas@winischhofer.net>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
13 years agosisfb: replace SiS_SetMemory with memset_io
Aaro Koskinen [Fri, 19 Nov 2010 21:58:49 +0000 (21:58 +0000)]
sisfb: replace SiS_SetMemory with memset_io

Get rid of one more wrapper.

Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Cc: Thomas Winischhofer <thomas@winischhofer.net>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
13 years agosisfb: remove InPort/OutPort wrappers
Aaro Koskinen [Fri, 19 Nov 2010 21:58:48 +0000 (21:58 +0000)]
sisfb: remove InPort/OutPort wrappers

Remove register IO wrappers.

Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Cc: Thomas Winischhofer <thomas@winischhofer.net>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
13 years agosisfb: use CONFIG_FB_SIS_301/315 instead of SIS301/315H
Aaro Koskinen [Fri, 19 Nov 2010 21:58:47 +0000 (21:58 +0000)]
sisfb: use CONFIG_FB_SIS_301/315 instead of SIS301/315H

There is no need to alias CONFIG #defines.

Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Cc: Thomas Winischhofer <thomas@winischhofer.net>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
13 years agosisfb: delete redudant #define SIS_LINUX_KERNEL
Aaro Koskinen [Fri, 19 Nov 2010 21:58:46 +0000 (21:58 +0000)]
sisfb: delete redudant #define SIS_LINUX_KERNEL

It's not needed anymore with SIS_XORG_XF86 gone.

Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Cc: Thomas Winischhofer <thomas@winischhofer.net>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
13 years agosisfb: delete dead SIS_XORG_XF86 code
Aaro Koskinen [Fri, 19 Nov 2010 21:58:45 +0000 (21:58 +0000)]
sisfb: delete dead SIS_XORG_XF86 code

Delete code for compiling the driver for X.org/XFree86. The development
has forked, so there is no point keeping this code in the tree.

Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Cc: Thomas Winischhofer <thomas@winischhofer.net>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
13 years agosisfb: delete fallback code for pci_map_rom()
Aaro Koskinen [Fri, 19 Nov 2010 21:58:44 +0000 (21:58 +0000)]
sisfb: delete fallback code for pci_map_rom()

If pci_map_rom() fails, there is some fallback code that basically
duplicates pci_map_rom() on non-x86 platforms. No point in that.

Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Cc: Thomas Winischhofer <thomas@winischhofer.net>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
13 years agosisfb: delete obsolete PCI ROM bug workaround
Aaro Koskinen [Fri, 19 Nov 2010 21:58:43 +0000 (21:58 +0000)]
sisfb: delete obsolete PCI ROM bug workaround

Delete a workaround for a PCI ROM bug that has been fixed ages ago by
the commit 761a3ac08c63718dacde12aaf0ec6d6760e8c2b7.

Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Cc: Thomas Winischhofer <thomas@winischhofer.net>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
13 years agoARM: mach-shmobile: clock-sh7372: remove bogus pllc2 clock toggling.
Kuninori Morimoto [Fri, 19 Nov 2010 07:23:52 +0000 (07:23 +0000)]
ARM: mach-shmobile: clock-sh7372: remove bogus pllc2 clock toggling.

The PLLC2 clock was utilizing the same sort of enable/disable without
regard to usecount approach that the FSIDIV clock was when being used as
a PLL pass-through. This forces the enable/disable through the clock
framework, which now prevents the clock from being ripped out or modified
underneath users that have an existing handle on it.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
13 years agoARM: mach-shmobile: clock-sh7372: remove unnecessary fsi clocks
Kuninori Morimoto [Fri, 19 Nov 2010 07:23:32 +0000 (07:23 +0000)]
ARM: mach-shmobile: clock-sh7372: remove unnecessary fsi clocks

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
13 years agoARM: mach-shmobile: clock-sh7372: modify error code
Kuninori Morimoto [Fri, 19 Nov 2010 07:23:26 +0000 (07:23 +0000)]
ARM: mach-shmobile: clock-sh7372: modify error code

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
13 years agoARM: mach-shmobile: ap4evb: FSI clock use proper process for ak4642
Kuninori Morimoto [Fri, 19 Nov 2010 07:23:17 +0000 (07:23 +0000)]
ARM: mach-shmobile: ap4evb: FSI clock use proper process for ak4642

Current AP4 FSI didn't use set_rate for ak4642,
and used dummy rate when init.
And FSI driver was modified to always call set_rate.

The user which are using FSI set_rate is only AP4 now.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
13 years agoARM: mach-shmobile: ap4evb: FSI clock use proper process for HDMI
Kuninori Morimoto [Wed, 24 Nov 2010 02:44:06 +0000 (02:44 +0000)]
ARM: mach-shmobile: ap4evb: FSI clock use proper process for HDMI

Current AP4 FSI set_rate function used bogus clock process
which didn't care enable/disable and clk->usecound.
To solve this issue, this patch also modify FSI driver to call
set_rate with enough options.
This patch modify it.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
13 years agoARM: mach-shmobile: clock-sh7372: remove fsidiv bogus disable
Kuninori Morimoto [Fri, 19 Nov 2010 07:22:58 +0000 (07:22 +0000)]
ARM: mach-shmobile: clock-sh7372: remove fsidiv bogus disable

Current FSIDIV clock framework had bogus disable.
This patch remove it.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
13 years agomd: Call blk_queue_flush() to establish flush/fua support
Darrick J. Wong [Wed, 24 Nov 2010 05:40:33 +0000 (16:40 +1100)]
md: Call blk_queue_flush() to establish flush/fua support

Before 2.6.37, the md layer had a mechanism for catching I/Os with the
barrier flag set, and translating the barrier into barriers for all
the underlying devices.  With 2.6.37, I/O barriers have become plain
old flushes, and the md code was updated to reflect this.  However,
one piece was left out -- the md layer does not tell the block layer
that it supports flushes or FUA access at all, which results in md
silently dropping flush requests.

Since the support already seems there, just add this one piece of
bookkeeping.

Signed-off-by: Darrick J. Wong <djwong@us.ibm.com>
Signed-off-by: NeilBrown <neilb@suse.de>
13 years agomd/raid1: really fix recovery looping when single good device fails.
NeilBrown [Wed, 24 Nov 2010 05:39:46 +0000 (16:39 +1100)]
md/raid1: really fix recovery looping when single good device fails.

Commit 4044ba58dd15cb01797c4fd034f39ef4a75f7cc3 supposedly fixed a
problem where if a raid1 with just one good device gets a read-error
during recovery, the recovery would abort and immediately restart in
an infinite loop.

However it depended on raid1_remove_disk removing the spare device
from the array.  But that does not happen in this case.  So add a test
so that in the 'recovery_disabled' case, the device will be removed.

This suitable for any kernel since 2.6.29 which is when
recovery_disabled was introduced.

Cc: stable@kernel.org
Reported-by: Sebastian Färber <faerber@gmail.com>
Signed-off-by: NeilBrown <neilb@suse.de>
13 years agomd: fix return value of rdev_size_change()
Justin Maggard [Wed, 24 Nov 2010 05:36:17 +0000 (16:36 +1100)]
md: fix return value of rdev_size_change()

When trying to grow an array by enlarging component devices,
rdev_size_store() expects the return value of rdev_size_change() to be
in sectors, but the actual value is returned in KBs.

This functionality was broken by commit
     dd8ac336c13fd8afdb082ebacb1cddd5cf727889
so this patch is suitable for any kernel since 2.6.30.

Cc: stable@kernel.org
Signed-off-by: Justin Maggard <jmaggard10@gmail.com>
Signed-off-by: NeilBrown <neilb@suse.de>
13 years agoALSA: hda - Fix Acer 7730G support
Denis Kuplyakov [Wed, 24 Nov 2010 05:01:09 +0000 (06:01 +0100)]
ALSA: hda - Fix Acer 7730G support

Fixes automatic EAPD configuration on Acer 7730G laptop.

Signed-off-by: Denis Kuplyakov <dener.kup@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
13 years agovirtio: fix format of sysfs driver/vendor files
Stephen Hemminger [Wed, 10 Nov 2010 06:20:29 +0000 (22:20 -0800)]
virtio: fix format of sysfs driver/vendor files

The sysfs files for virtio produce the wrong format and are missing
the required newline. The output for virtio bus vendor/device should
have the same format as the corresponding entries for PCI devices.

Although this technically changes the ABI for sysfs, these files were
broken to start with!

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
13 years agoChar: virtio_console, fix memory leak
Jiri Slaby [Sat, 6 Nov 2010 09:06:50 +0000 (10:06 +0100)]
Char: virtio_console, fix memory leak

Stanse found that in init_vqs, memory is leaked under certain
circumstanses (the fail path order is incorrect). Fix that by checking
allocations in one turn and free all of them at once if some fails
(some may be NULL, but this is OK).

Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Cc: Amit Shah <amit.shah@redhat.com>
Cc: virtualization@lists.linux-foundation.org
Cc: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
13 years agovirtio: return correct capacity to users
Michael S. Tsirkin [Thu, 4 Nov 2010 12:24:24 +0000 (14:24 +0200)]
virtio: return correct capacity to users

We can't rely on indirect buffers for capacity
calculations because they need a memory allocation
which might fail.  In particular, virtio_net can get
into this situation under stress, and it drops packets
and performs badly.

So return the number of buffers we can guarantee users.

Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Reported-By: Krishna Kumar2 <krkumar2@in.ibm.com>
13 years agomodule: Update prototype for ref_module (formerly use_module)
Anders Kaseorg [Wed, 24 Nov 2010 21:21:10 +0000 (15:21 -0600)]
module: Update prototype for ref_module (formerly use_module)

Commit 9bea7f23952d5948f8e5dfdff4de09bb9981fb5f renamed use_module to
ref_module (and changed its return value), but forgot to update this
prototype in module.h.

Signed-off-by: Anders Kaseorg <andersk@ksplice.com>
Acked-by: WANG Cong <xiyou.wangcong@gmail.com>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
13 years agonilfs2: fix typo in comment of nilfs_dat_move function
Ryusuke Konishi [Tue, 23 Nov 2010 17:18:59 +0000 (02:18 +0900)]
nilfs2: fix typo in comment of nilfs_dat_move function

Fixes a typo: "uncommited" -> "uncommitted".

Signed-off-by: Ryusuke Konishi <konishi.ryusuke@lab.ntt.co.jp>
13 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6
Linus Torvalds [Tue, 23 Nov 2010 23:23:56 +0000 (08:23 +0900)]
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: (41 commits)
  ALSA: hda - Identify more variants for ALC269
  ALSA: hda - Fix wrong ALC269 variant check
  ALSA: hda - Enable jack sense for Thinkpad Edge 11
  ALSA: Revert "ALSA: hda - Fix switching between dmic and mic using the same mux on IDT/STAC"
  ALSA: hda - Fixed ALC887-VD initial error
  ALSA: atmel - Fix the return value in error path
  ALSA: hda: Use hp-laptop quirk to enable headphones automute for Asus A52J
  ALSA: snd-atmel-abdac: test wrong variable
  ALSA: azt3328: period bug fix (for PA), add missing ACK on stop timer
  ALSA: hda: Add Samsung R720 SSID for subwoofer pin fixup
  ALSA: sound/pci/asihpi/hpioctl.c: Remove unnecessary casts of pci_get_drvdata
  ALSA: sound/core/pcm_lib.c: Remove unnecessary semicolons
  ALSA: sound/ppc: Use printf extension %pR for struct resource
  ALSA: ac97: Apply quirk for Dell Latitude D610 binding Master and Headphone controls
  ASoC: uda134x - set reg_cache_default to uda134x_reg
  ASoC: Add support for MAX98089 CODEC
  ASoC: davinci: fixes for multi-component
  ASoC: Fix register cache setup WM8994 for multi-component
  ASoC: Fix dapm_seq_compare() for multi-component
  ASoC: RX1950: Fix hw_params function
  ...

13 years agoMerge branch 'upstream/for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git...
Linus Torvalds [Tue, 23 Nov 2010 23:23:18 +0000 (08:23 +0900)]
Merge branch 'upstream/for-linus' of git://git./linux/kernel/git/jeremy/xen

* 'upstream/for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jeremy/xen: (23 commits)
  xen/events: Use PIRQ instead of GSI value when unmapping MSI/MSI-X irqs.
  xen: set IO permission early (before early_cpu_init())
  xen: re-enable boot-time ballooning
  xen/balloon: make sure we only include remaining extra ram
  xen/balloon: the balloon_lock is useless
  xen: add extra pages to balloon
  xen: make evtchn's name less generic
  xen/evtchn: the evtchn device is non-seekable
  Revert "xen/privcmd: create address space to allow writable mmaps"
  xen/events: use locked set|clear_bit() for cpu_evtchn_mask
  xen/evtchn: clear secondary CPUs' cpu_evtchn_mask[] after restore
  xen/xenfs: update xenfs_mount for new prototype
  xen: fix header export to userspace
  xen: implement XENMEM_machphys_mapping
  xen: set vma flag VM_PFNMAP in the privcmd mmap file_op
  xen: xenfs: privcmd: check put_user() return code
  xen/evtchn: add missing static
  xen/evtchn: Fix name of Xen event-channel device
  xen/evtchn: don't do unbind_from_irqhandler under spinlock
  xen/evtchn: remove spurious barrier
  ...

13 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6
Linus Torvalds [Tue, 23 Nov 2010 23:22:34 +0000 (08:22 +0900)]
Merge git://git./linux/kernel/git/davem/net-2.6

* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6:
  of/phylib: Use device tree properties to initialize Marvell PHYs.
  phylib: Add support for Marvell 88E1149R devices.
  phylib: Use common page register definition for Marvell PHYs.
  qlge: Fix incorrect usage of module parameters and netdev msg level
  ipv6: fix missing in6_ifa_put in addrconf
  SuperH IrDA: correct Baud rate error correction
  atl1c: Fix hardware type check for enabling OTP CLK
  net: allow GFP_HIGHMEM in __vmalloc()
  bonding: change list contact to netdev@vger.kernel.org
  e1000: fix screaming IRQ

13 years agoMerge branch 'usb-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh...
Linus Torvalds [Tue, 23 Nov 2010 23:21:43 +0000 (08:21 +0900)]
Merge branch 'usb-linus' of git://git./linux/kernel/git/gregkh/usb-2.6

* 'usb-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb-2.6:
  USB: EHCI: fix obscure race in ehci_endpoint_disable
  USB: gadget: AT91: fix typo in atmel_usba_udc driver
  USB: isp1362-hcd - fix section mismatch warning
  USB: EHCI: AMD periodic frame list table quirk
  USB: OTG: langwell_otg: fix up some sysfs attribute permissions
  USB: misc: usbsevseg: fix up some sysfs attribute permissions
  USB: misc: usbled: fix up some sysfs attribute permissions
  USB: misc: trancevibrator: fix up a sysfs attribute permission
  USB: misc: cypress_cy7c63: fix up some sysfs attribute permissions
  USB: storage: sierra_ms: fix sysfs file attribute
  USB: ehci: fix debugfs 'lpm' permissions
  USB: atm: ueagle-atm: fix up some permissions on the sysfs files
  xhci: Fix command ring replay after resume.
  xHCI: fix wMaxPacketSize mask
  xHCI: release spinlock when setup interrupt
  xhci: Remove excessive printks with shared IRQs.

13 years agoARM: 6490/1: MM: bugfix: initialize spinlock for init_mm.context
MyungJoo Ham [Tue, 23 Nov 2010 10:39:23 +0000 (11:39 +0100)]
ARM: 6490/1: MM: bugfix: initialize spinlock for init_mm.context

init_mm used at kernel/sched.c:idle_task_exit() has spin_lock
(init_mm.context.id_lock) that is not initialized when spin_lock/unlock
is called at an ARM machine. Note that mm_struct.context.id_lock is
usually initialized except for the instance of init_mm at
linux/arch/arm/mm/context.c

Not initializing this spinlock incurs "BUG: pinlock bad magic"
warning when spinlock debug is enabled. We have observed such
instances when testing PM in S5PC210 machines.

Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
13 years agoARM: avoid annoying <4>'s in printk output
Russell King [Tue, 23 Nov 2010 22:27:55 +0000 (22:27 +0000)]
ARM: avoid annoying <4>'s in printk output

Adding KERN_WARNING in the middle of strings now produces those tokens
in the output, rather than accepting the level as was once the case.
Fix this in the one reported case.  There might be more...

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
13 years agoSCSI: arm fas216: fix missing ';'
Russell King [Tue, 23 Nov 2010 22:19:08 +0000 (22:19 +0000)]
SCSI: arm fas216: fix missing ';'

f281233 (SCSI host lock push-down) broke the fas216 build:

drivers/scsi/arm/fas216.h: In function 'fas216_noqueue_command':
drivers/scsi/arm/fas216.h:354: error: storage class specified for parameter 'fas216_intr'
drivers/scsi/arm/fas216.h:356: error: storage class specified for parameter 'fas216_remove'
...

Fix it.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
13 years agoperf symbols: Remove incorrect open-coded container_of()
Rabin Vincent [Tue, 23 Nov 2010 16:38:18 +0000 (22:08 +0530)]
perf symbols: Remove incorrect open-coded container_of()

At least on ARM, padding is inserted between rb_node and sym in struct
symbol_name_rb_node, causing "((void *)sym) - sizeof(struct rb_node)" to
point inside rb_node rather than to the symbol_name_rb_node.  Fix this
by converting the code to use container_of().

Cc: Ian Munsie <imunsie@au1.ibm.com>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Ming Lei <tom.leiming@gmail.com>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Tom Zanussi <tzanussi@gmail.com>
LKML-Reference: <20101123163106.GA25677@debian>
Signed-off-by: Rabin Vincent <rabin@rab.in>
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
13 years agoASoC: wm8994 - fix memory leaks
Axel Lin [Tue, 23 Nov 2010 07:58:39 +0000 (15:58 +0800)]
ASoC: wm8994 - fix memory leaks

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
13 years agoASoC: wm8904 - fix memory leaks
Axel Lin [Tue, 23 Nov 2010 07:57:49 +0000 (15:57 +0800)]
ASoC: wm8904 - fix memory leaks

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
13 years agoASoC: max98088 - fix a memory leak
Axel Lin [Tue, 23 Nov 2010 07:56:21 +0000 (15:56 +0800)]
ASoC: max98088 - fix a memory leak

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
13 years agoASoC: Do not update the cache if write to hardware failed
Axel Lin [Tue, 23 Nov 2010 06:14:07 +0000 (14:14 +0800)]
ASoC: Do not update the cache if write to hardware failed

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Acked-by: Peter Ujfalusi <peter.ujfalusi@nokia.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
13 years agoASoC: MPC5200: Eliminate duplicate include of of_device.h
Jesper Juhl [Mon, 22 Nov 2010 21:54:03 +0000 (22:54 +0100)]
ASoC: MPC5200: Eliminate duplicate include of of_device.h

Eliminate duplicate  #include <linux/of_device.h>  from
sound/soc/fsl/mpc5200_dma.c

Signed-off-by: Jesper Juhl <jj@chaosbits.net>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
13 years agoMerge branch 'fix/asoc' into for-linus
Takashi Iwai [Tue, 23 Nov 2010 11:41:17 +0000 (12:41 +0100)]
Merge branch 'fix/asoc' into for-linus

13 years agoMerge branch 'for-2.6.37' of git://git.kernel.org/pub/scm/linux/kernel/git/lrg/asoc...
Takashi Iwai [Tue, 23 Nov 2010 11:40:15 +0000 (12:40 +0100)]
Merge branch 'for-2.6.37' of git://git./linux/kernel/git/lrg/asoc-2.6 into fix/asoc

13 years agoMerge branch 'for-rmk' of git://git.pengutronix.de/git/imx/linux-2.6
Russell King [Tue, 23 Nov 2010 09:37:25 +0000 (09:37 +0000)]
Merge branch 'for-rmk' of git://git.pengutronix.de/git/imx/linux-2.6

13 years agoALSA: hda - Identify more variants for ALC269
Kailang Yang [Tue, 23 Nov 2010 07:56:16 +0000 (08:56 +0100)]
ALSA: hda - Identify more variants for ALC269

Give more correct chip names for ALC269-variant codecs.

Signed-off-by: Kailang Yang <kailang@realtek.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
13 years agoALSA: hda - Fix wrong ALC269 variant check
Kailang Yang [Tue, 23 Nov 2010 07:53:32 +0000 (08:53 +0100)]
ALSA: hda - Fix wrong ALC269 variant check

The refactoring commit d433a67831ab2c470cc53a3ff9b60f656767be15
    ALSA: hda - Optimize the check of ALC269 codec variants
introduced a wrong check for ALC269-vb type.  This patch corrects it.

Signed-off-by: Kailang Yang <kailang@realtek.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
13 years agonilfs2: nilfs_iget_for_gc() returns ERR_PTR
Dan Carpenter [Tue, 23 Nov 2010 06:26:02 +0000 (09:26 +0300)]
nilfs2: nilfs_iget_for_gc() returns ERR_PTR

nilfs_iget_for_gc() returns an ERR_PTR() on failure and doesn't return
NULL.

Signed-off-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: Ryusuke Konishi <konishi.ryusuke@lab.ntt.co.jp>
13 years agoALSA: hda - Enable jack sense for Thinkpad Edge 11
Manoj Iyer [Tue, 23 Nov 2010 06:43:44 +0000 (07:43 +0100)]
ALSA: hda - Enable jack sense for Thinkpad Edge 11

Add a quirk entry for Thinkpad Edge 11 as well as other TP Edge models.

Signed-off-by: Manoj Iyer <manoj.iyer@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
13 years agoALSA: Revert "ALSA: hda - Fix switching between dmic and mic using the same mux on...
Takashi Iwai [Tue, 23 Nov 2010 06:39:58 +0000 (07:39 +0100)]
ALSA: Revert "ALSA: hda - Fix switching between dmic and mic using the same mux on IDT/STAC"

This reverts commit f41cc2a85d52ac6971299922084ac5ac59dc339d.

The patch broke the digital mic pin handling wrongly.
Reference: bko#23162
https://bugzilla.kernel.org/show_bug.cgi?id=23162

Signed-off-by: Takashi Iwai <tiwai@suse.de>
13 years agoASoC: Restore WM8994 volatile and readable register operations
Mark Brown [Fri, 19 Nov 2010 16:09:15 +0000 (16:09 +0000)]
ASoC: Restore WM8994 volatile and readable register operations

They went AWOL during the multi-component merge.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
13 years agoASoC: Fix multi-component mismerge in WM8523
Mark Brown [Mon, 22 Nov 2010 19:11:48 +0000 (19:11 +0000)]
ASoC: Fix multi-component mismerge in WM8523

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
13 years agoASoC: atmel: test wrong variable
Vasiliy Kulikov [Mon, 22 Nov 2010 15:59:13 +0000 (18:59 +0300)]
ASoC: atmel: test wrong variable

After clk_get() mclk is checked second time instead of pllb check.
In patch v1 Jarkko Nikula noticed that PTR_ERR() is also has wrong argument.

Signed-off-by: Vasiliy Kulikov <segoon@openwall.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
13 years agohwmon: (lis3lv02d_i2c) Fix compile warnings
Guenter Roeck [Fri, 19 Nov 2010 05:06:45 +0000 (21:06 -0800)]
hwmon: (lis3lv02d_i2c) Fix compile warnings

This commit fixes the following compile warnings.

From v2.6.37-rc2/m68k/m68k-allmodconfig, v2.6.37-rc2/powerpc/powerpc-randconfig:
drivers/hwmon/lis3lv02d_i2c.c:222: warning: 'lis3_i2c_runtime_suspend' defined but not used
drivers/hwmon/lis3lv02d_i2c.c:231: warning: 'lis3_i2c_runtime_resume' defined but not used

Seen if CONFIG_PM_RUNTIME is not set.

From v2.6.37-rc2/sh4/sh-allyesconfig:
drivers/hwmon/lis3lv02d_i2c.c:191: warning: 'lis3lv02d_i2c_suspend' defined but not used
drivers/hwmon/lis3lv02d_i2c.c:201: warning: 'lis3lv02d_i2c_resume' defined but not used

Seen if CONFIG_PM is set but CONFIG_PM_SLEEP is not.

Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com>
Acked-by: Jean Delvare <khali@linux-fr.org>
13 years agohwmon: (i5k_amb) Fix compile warning
Guenter Roeck [Fri, 19 Nov 2010 17:39:11 +0000 (09:39 -0800)]
hwmon: (i5k_amb) Fix compile warning

This patch fixes the following compile warning.

drivers/hwmon/i5k_amb.c:500: warning: 'i5k_amb_ids' defined but not used

The warning is seen if the driver is built into the kernel (not as module).

Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com>
Acked-by: Jean Delvare <khali@linux-fr.org>
13 years agoMerge branches 'upstream/core', 'upstream/xenfs' and 'upstream/evtchn' into upstream...
Jeremy Fitzhardinge [Mon, 22 Nov 2010 20:22:42 +0000 (12:22 -0800)]
Merge branches 'upstream/core', 'upstream/xenfs' and 'upstream/evtchn' into upstream/for-linus

* upstream/core:
  xen/events: Use PIRQ instead of GSI value when unmapping MSI/MSI-X irqs.
  xen: set IO permission early (before early_cpu_init())
  xen: re-enable boot-time ballooning
  xen/balloon: make sure we only include remaining extra ram
  xen/balloon: the balloon_lock is useless
  xen: add extra pages to balloon
  xen/events: use locked set|clear_bit() for cpu_evtchn_mask
  xen/evtchn: clear secondary CPUs' cpu_evtchn_mask[] after restore
  xen: implement XENMEM_machphys_mapping

* upstream/xenfs:
  Revert "xen/privcmd: create address space to allow writable mmaps"
  xen/xenfs: update xenfs_mount for new prototype
  xen: fix header export to userspace
  xen: set vma flag VM_PFNMAP in the privcmd mmap file_op
  xen: xenfs: privcmd: check put_user() return code

* upstream/evtchn:
  xen: make evtchn's name less generic
  xen/evtchn: the evtchn device is non-seekable
  xen/evtchn: add missing static
  xen/evtchn: Fix name of Xen event-channel device
  xen/evtchn: don't do unbind_from_irqhandler under spinlock
  xen/evtchn: remove spurious barrier
  xen/evtchn: ports start enabled
  xen/evtchn: dynamically allocate port_user array
  xen/evtchn: track enabled state for each port

13 years agommc: sdhci: 8-bit bus width changes
Philip Rakity [Fri, 19 Nov 2010 21:48:39 +0000 (16:48 -0500)]
mmc: sdhci: 8-bit bus width changes

We now:
 * check for a v3 controller before setting 8-bit bus width
 * offer a callback for platform code to switch to 8-bit mode, which
   allows non-v3 controllers to support it
 * rely on mmc->caps |= MMC_CAP_8_BIT_DATA; in platform code to specify
   that the board designers have indeed brought out all the pins for
   8-bit to the slot.

We were previously relying only on whether the *controller* supported
8-bit, which doesn't tell us anything about the pin configuration in
the board design.

This fixes the MMC card regression reported by Maxim Levitsky here:
   http://thread.gmane.org/gmane.linux.kernel.mmc/4336
by no longer assuming that 8-bit works by default.

Signed-off-by: Philip Rakity <prakity@marvell.com>
Tested-by: Giuseppe Cavallaro <peppe.cavallaro@st.com>
Signed-off-by: Chris Ball <cjb@laptop.org>
13 years agoxen/events: Use PIRQ instead of GSI value when unmapping MSI/MSI-X irqs.
Konrad Rzeszutek Wilk [Fri, 19 Nov 2010 16:27:09 +0000 (11:27 -0500)]
xen/events: Use PIRQ instead of GSI value when unmapping MSI/MSI-X irqs.

When we allocate a vector for MSI/MSI-X we save away the PIRQ, and the
vector value. When we unmap (de-allocate) the MSI/MSI-X vector(s) we
need to provide the PIRQ and the vector value. What we did instead
was to provide the GSI (which was zero) and the vector value, and we
got these unhappy error messages:

(XEN) irq.c:1575: dom0: pirq 0 not mapped
[    7.733415] unmap irq failed -22

This patches fixes this and we use the PIRQ value instead of the GSI
value.

CC: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
13 years agoxen: set IO permission early (before early_cpu_init())
Konrad Rzeszutek Wilk [Tue, 16 Nov 2010 17:09:59 +0000 (12:09 -0500)]
xen: set IO permission early (before early_cpu_init())

This patch is based off "xen dom0: Set up basic IO permissions for dom0."
by Juan Quintela <quintela@redhat.com>.

On AMD machines when we boot the kernel as Domain 0 we get this nasty:

mapping kernel into physical memory
Xen: setup ISA identity maps
about to get started...
(XEN) traps.c:475:d0 Unhandled general protection fault fault/trap [#13] on VCPU 0 [ec=0000]
(XEN) domain_crash_sync called from entry.S
(XEN) Domain 0 (vcpu#0) crashed on cpu#0:
(XEN) ----[ Xen-4.1-101116  x86_64  debug=y  Not tainted ]----
(XEN) CPU:    0
(XEN) RIP:    e033:[<ffffffff8130271b>]
(XEN) RFLAGS: 0000000000000282   EM: 1   CONTEXT: pv guest
(XEN) rax: 000000008000c068   rbx: ffffffff8186c680   rcx: 0000000000000068
(XEN) rdx: 0000000000000cf8   rsi: 000000000000c000   rdi: 0000000000000000
(XEN) rbp: ffffffff81801e98   rsp: ffffffff81801e50   r8:  ffffffff81801eac
(XEN) r9:  ffffffff81801ea8   r10: ffffffff81801eb4   r11: 00000000ffffffff
(XEN) r12: ffffffff8186c694   r13: ffffffff81801f90   r14: ffffffffffffffff
(XEN) r15: 0000000000000000   cr0: 000000008005003b   cr4: 00000000000006f0
(XEN) cr3: 0000000221803000   cr2: 0000000000000000
(XEN) ds: 0000   es: 0000   fs: 0000   gs: 0000   ss: e02b   cs: e033
(XEN) Guest stack trace from rsp=ffffffff81801e50:

RIP points to read_pci_config() function.

The issue is that we don't set IO permissions for the Linux kernel early enough.

The call sequence used to be:

    xen_start_kernel()
x86_init.oem.arch_setup = xen_setup_arch;
        setup_arch:
           - early_cpu_init
               - early_init_amd
                  - read_pci_config
           - x86_init.oem.arch_setup [ xen_arch_setup ]
               - set IO permissions.

We need to set the IO permissions earlier on, which this patch does.

Acked-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
13 years agoNFS: Ensure we return the dirent->d_type when it is known
Trond Myklebust [Sat, 20 Nov 2010 19:26:44 +0000 (14:26 -0500)]
NFS: Ensure we return the dirent->d_type when it is known

Store the dirent->d_type in the struct nfs_cache_array_entry so that we
can use it in getdents() calls.

This fixes a regression with the new readdir code.

Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
13 years agoNFS: Correct the array bound calculation in nfs_readdir_add_to_array
Trond Myklebust [Sat, 20 Nov 2010 20:18:22 +0000 (15:18 -0500)]
NFS: Correct the array bound calculation in nfs_readdir_add_to_array

It looks as if the array size calculation in MAX_READDIR_ARRAY does not
take the alignment of struct nfs_cache_array_entry into account.

Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
13 years agoNFS: Don't ignore errors from nfs_do_filldir()
Trond Myklebust [Sat, 20 Nov 2010 18:55:33 +0000 (13:55 -0500)]
NFS: Don't ignore errors from nfs_do_filldir()

We should ignore the errors from the filldir callback, and just interpret
them as meaning we should exit, however we should definitely pass back
ENOMEM errors.

Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
13 years agoNFS: Fix the error handling in "uncached_readdir()"
Trond Myklebust [Sat, 20 Nov 2010 18:24:49 +0000 (13:24 -0500)]
NFS: Fix the error handling in "uncached_readdir()"

Currently, uncached_readdir() is broken because if fails to handle
the results from nfs_readdir_xdr_to_array() correctly.

Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
13 years agoNFS: Fix a page leak in uncached_readdir()
Trond Myklebust [Sat, 20 Nov 2010 18:24:46 +0000 (13:24 -0500)]
NFS: Fix a page leak in uncached_readdir()

Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
13 years agoNFS: Fix a page leak in nfs_do_filldir()
Trond Myklebust [Sat, 20 Nov 2010 18:22:24 +0000 (13:22 -0500)]
NFS: Fix a page leak in nfs_do_filldir()

nfs_do_filldir() must always free desc->page when it is done, otherwise
we end up leaking the page.

Also remove unused variable 'dentry'.

Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
13 years agoNFS: Assume eof if the server returns no readdir records
Trond Myklebust [Sat, 20 Nov 2010 17:43:45 +0000 (12:43 -0500)]
NFS: Assume eof if the server returns no readdir records

Some servers are known to be buggy w.r.t. this. Deal with them...

Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
13 years agoNFS: Buffer overflow in ->decode_dirent() should not be fatal
Trond Myklebust [Sat, 20 Nov 2010 17:22:20 +0000 (12:22 -0500)]
NFS: Buffer overflow in ->decode_dirent() should not be fatal

Overflowing the buffer in the readdir ->decode_dirent() should not lead to
a fatal error, but rather to an attempt to reread the record in question.

Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
13 years agoPure nfs client performance using odirect.
Arun Bharadwaj [Thu, 18 Nov 2010 10:36:43 +0000 (10:36 +0000)]
Pure nfs client performance using odirect.

When an application opens a file with O_DIRECT flag, if the size of
the data that is written is equal to wsize, the client sends a
WRITE RPC with stable flag set to UNSTABLE followed by a single
COMMIT RPC rather than sending a single WRITE RPC with the stable
flag set to FILE_SYNC. This a bug.

Patch to fix this.

Signed-off-by: Arun R Bharadwaj <arun@linux.vnet.ibm.com>
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
13 years agoSUNRPC: Fix an infinite loop in call_refresh/call_refreshresult
Trond Myklebust [Sat, 20 Nov 2010 16:13:31 +0000 (11:13 -0500)]
SUNRPC: Fix an infinite loop in call_refresh/call_refreshresult

If the rpcauth_refreshcred() call returns an error other than
EACCES, ENOMEM or ETIMEDOUT, we currently end up looping forever
between call_refresh and call_refreshresult.

The correct thing to do here is to exit on all errors except
EAGAIN and ETIMEDOUT, for which case we retry 3 times, then
return EACCES.

Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
13 years agoof/phylib: Use device tree properties to initialize Marvell PHYs.
David Daney [Fri, 19 Nov 2010 12:13:18 +0000 (12:13 +0000)]
of/phylib: Use device tree properties to initialize Marvell PHYs.

Some aspects of PHY initialization are board dependent, things like
indicator LED connections and some clocking modes cannot be determined
by probing.  The dev_flags element of struct phy_device can be used to
control these things if an appropriate value can be passed from the
Ethernet driver.  We run into problems however if the PHY connections
are specified by the device tree.  There is no way for the Ethernet
driver to know what flags it should pass.

If we are using the device tree, the struct phy_device will be
populated with the device tree node corresponding to the PHY, and we
can extract extra configuration information from there.

The next question is what should the format of that information be?
It is highly device specific, and the device tree representation
should not be tied to any arbitrary kernel defined constants.  A
straight forward representation is just to specify the exact bits that
should be set using the "marvell,reg-init" property:

      phy5: ethernet-phy@5 {
        reg = <5>;
        compatible = "marvell,88e1149r";
        marvell,reg-init =
                /* led[0]:1000, led[1]:100, led[2]:10, led[3]:tx */
                <3 0x10 0 0x5777>, /* Reg 3,16 <- 0x5777 */
                /* mix %:0, led[0123]:drive low off hiZ */
                <3 0x11 0 0x00aa>, /* Reg 3,17 <- 0x00aa */
                /* default blink periods. */
                <3 0x12 0 0x4105>, /* Reg 3,18 <- 0x4105 */
                /* led[4]:rx, led[5]:dplx, led[45]:drive low off hiZ */
                <3 0x13 0 0x0a60>; /* Reg 3,19 <- 0x0a60 */
      };

      phy6: ethernet-phy@6 {
        reg = <6>;
        compatible = "marvell,88e1118";
        marvell,reg-init =
                /* Fix rx and tx clock transition timing */
                <2 0x15 0xffcf 0>, /* Reg 2,21 Clear bits 4, 5 */
                /* Adjust LED drive. */
                <3 0x11 0 0x442a>, /* Reg 3,17 <- 0442a */
                /* irq, blink-activity, blink-link */
                <3 0x10 0 0x0242>; /* Reg 3,16 <- 0x0242 */
      };

The Marvell PHYs have a page select register at register 22 (0x16), we
can specify any register by its page and register number.  These are
the first and second word.  The third word contains a mask to be ANDed
with the existing register value, and the fourth word is ORed with the
result to yield the new register value.  The new marvell_of_reg_init
function leaves the page select register unchanged, so a call to it
can be dropped into the .config_init functions without unduly
affecting the state of the PHY.

If CONFIG_OF_MDIO is not set, there is no of_node, or no
"marvell,reg-init" property, the PHY initialization is unchanged.

Signed-off-by: David Daney <ddaney@caviumnetworks.com>
Cc: Grant Likely <grant.likely@secretlab.ca>
Cc: Cyril Chemparathy <cyril@ti.com>
Cc: David Daney <ddaney@caviumnetworks.com>
Cc: Arnaud Patard <arnaud.patard@rtp-net.org>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Reviewed-by: Grant Likely <grant.likely@secretlab.ca>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agophylib: Add support for Marvell 88E1149R devices.
David Daney [Fri, 19 Nov 2010 11:58:53 +0000 (11:58 +0000)]
phylib: Add support for Marvell 88E1149R devices.

The 88E1149R is 10/100/1000 quad-gigabit Ethernet PHY.  The
.config_aneg function can be shared with 88E1118, but it needs its own
.config_init.

Signed-off-by: David Daney <ddaney@caviumnetworks.com>
Cc: Cyril Chemparathy <cyril@ti.com>
Cc: Arnaud Patard <arnaud.patard@rtp-net.org>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Wolfram Sang <w.sang@pengutronix.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agophylib: Use common page register definition for Marvell PHYs.
David Daney [Fri, 19 Nov 2010 11:58:52 +0000 (11:58 +0000)]
phylib: Use common page register definition for Marvell PHYs.

The definition of the Marvell PHY page register is not specific to
88E1121, so rename the macro to MII_MARVELL_PHY_PAGE, and use it
throughout.

Suggested-by: Cyril Chemparathy <cyril@ti.com>
Signed-off-by: David Daney <ddaney@caviumnetworks.com>
Cc: Cyril Chemparathy <cyril@ti.com>
Cc: Arnaud Patard <arnaud.patard@rtp-net.org>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoqlge: Fix incorrect usage of module parameters and netdev msg level
Sonny Rao [Thu, 18 Nov 2010 11:50:02 +0000 (11:50 +0000)]
qlge: Fix incorrect usage of module parameters and netdev msg level

Driver appears to be mistaking the permission field with default value
in the case of debug and qlge_irq_type.

Driver is also passing debug as a bitmask into netif_msg_init()
which wants a number of bits.  Ron Mercer suggests we should
change this to pass in -1 so the defaults get used instead,
which makes the default much less verbose.

Signed-off-by: Milton Miller <miltonm@bga.com>
Signed-off-by: Sonny Rao <sonnyrao@linux.vnet.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoperf record: Handle restrictive permissions in /proc/{kallsyms,modules}
Arnaldo Carvalho de Melo [Mon, 22 Nov 2010 16:01:55 +0000 (14:01 -0200)]
perf record: Handle restrictive permissions in /proc/{kallsyms,modules}

The 59365d1 commit, even being reverted by 33e0d57, showed a non robust
behavior in 'perf record': it really should just warn the user that some
functionality will not be available.

The new behavior then becomes:

[acme@felicio linux]$ ls -la /proc/{kallsyms,modules}
-r-------- 1 root root 0 Nov 22 12:19 /proc/kallsyms
-r-------- 1 root root 0 Nov 22 12:19 /proc/modules
[acme@felicio linux]$ perf record ls -R > /dev/null
Couldn't record kernel reference relocation symbol
Symbol resolution may be skewed if relocation was used (e.g. kexec).
Check /proc/kallsyms permission or run as root.
[ perf record: Woken up 1 times to write data ]
[ perf record: Captured and wrote 0.004 MB perf.data (~161 samples) ]
[acme@felicio linux]$ perf report --stdio
[kernel.kallsyms] with build id 77b05e00e64e4de1c9347d83879779b540d69f00 not found, continuing without symbols
# Events: 98  cycles
#
# Overhead  Command    Shared Object                Symbol
# ........  .......  ...............  ....................
#
    48.26%       ls  [kernel]         [k] ffffffff8102b92b
    22.49%       ls  libc-2.12.90.so  [.] __strlen_sse2
     8.35%       ls  libc-2.12.90.so  [.] __GI___strcoll_l
     8.17%       ls  ls               [.]            11580
     3.35%       ls  libc-2.12.90.so  [.] _IO_new_file_xsputn
     3.33%       ls  libc-2.12.90.so  [.] _int_malloc
     1.88%       ls  libc-2.12.90.so  [.] _int_free
     0.84%       ls  libc-2.12.90.so  [.] malloc_consolidate
     0.84%       ls  libc-2.12.90.so  [.] __readdir64
     0.83%       ls  ls               [.] strlen@plt
     0.83%       ls  libc-2.12.90.so  [.] __GI_fwrite_unlocked
     0.83%       ls  libc-2.12.90.so  [.] __memcpy_sse2

#
# (For a higher level overview, try: perf report --sort comm,dso)
#
[acme@felicio linux]$

It still has the build-ids for DSOs in the maps with hits:

[acme@felicio linux]$ perf buildid-list
77b05e00e64e4de1c9347d83879779b540d69f00 [kernel.kallsyms]
09c4a431a4a8b648fcfc2c2bdda70f56050ddff1 /bin/ls
af75ea9ad951d25e0f038901a11b3846dccb29a4 /lib64/libc-2.12.90.so
[acme@felicio linux]$

That can be used in another machine to resolve kernel symbols.

Cc: Eugene Teo <eugeneteo@kernel.org>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Jesper Juhl <jj@chaosbits.net>
Cc: Marcus Meissner <meissner@suse.de>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Sarah Sharp <sarah.a.sharp@linux.intel.com>
Cc: Stephane Eranian <eranian@google.com>
Cc: Tejun Heo <tj@kernel.org>
Cc: Tom Zanussi <tzanussi@gmail.com>
LKML-Reference: <new-submission>
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
13 years agoipv6: fix missing in6_ifa_put in addrconf
John Fastabend [Mon, 15 Nov 2010 20:29:21 +0000 (20:29 +0000)]
ipv6: fix missing in6_ifa_put in addrconf

Fix ref count bug introduced by

commit 2de795707294972f6c34bae9de713e502c431296
Author: Lorenzo Colitti <lorenzo@google.com>
Date:   Wed Oct 27 18:16:49 2010 +0000

ipv6: addrconf: don't remove address state on ifdown if the address
is being kept

Fix logic so that addrconf_ifdown() decrements the inet6_ifaddr
refcnt correctly with in6_ifa_put().

Reported-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: John Fastabend <john.r.fastabend@intel.com>
Acked-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoEDAC, MCE: Fix edac_init_mce_inject error handling
Axel Lin [Fri, 19 Nov 2010 03:05:43 +0000 (22:05 -0500)]
EDAC, MCE: Fix edac_init_mce_inject error handling

Otherwise, variable i will be -1 inside the latest iteration of the
while loop.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Borislav Petkov <borislav.petkov@amd.com>
13 years agoEDAC: Remove deprecated kbuild goal definitions
Tracey Dent [Sun, 7 Nov 2010 14:43:33 +0000 (09:43 -0500)]
EDAC: Remove deprecated kbuild goal definitions

Change EDAC's Makefile to use <modules>-y instead of
<modules>-objs because -objs is deprecated and not mentioned in
Documentation/kbuild/makefiles.txt.

 [bp: Fixup commit message]
 [bp: Fixup indentation]

Signed-off-by: Tracey Dent <tdent48227@gmail.com>
Signed-off-by: Borislav Petkov <borislav.petkov@amd.com>
13 years agoASoC: stac9766 - set reg_cache_default to stac9766_reg
Axel Lin [Mon, 22 Nov 2010 00:20:54 +0000 (08:20 +0800)]
ASoC: stac9766 - set reg_cache_default to stac9766_reg

Looks like this is missing during multi-component conversion.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
13 years agoASoC: s3c24xx: test wrong variable
Vasiliy Kulikov [Sun, 21 Nov 2010 17:40:21 +0000 (20:40 +0300)]
ASoC: s3c24xx: test wrong variable

After clk_get() mclk is checked three times instead of mout_epll
and sclk_spdif checks.

Signed-off-by: Vasiliy Kulikov <segoon@openwall.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
13 years agoARM: avoid marking decompressor .stack section as having contents
Russell King [Mon, 22 Nov 2010 12:00:59 +0000 (12:00 +0000)]
ARM: avoid marking decompressor .stack section as having contents

The .stack section doesn't contain any contents, and doesn't require
initialization either.  Rather than marking the output section with
'NOLOAD' but still having it exist in the object files, mark it with
%nobits which avoids the assembler marking the section with 'CONTENTS'.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
13 years agoALSA: hda - Fixed ALC887-VD initial error
Kailang Yang [Mon, 22 Nov 2010 09:59:36 +0000 (10:59 +0100)]
ALSA: hda - Fixed ALC887-VD initial error

ALC887-VD is like ALC888-VD. It can not be initialized as ALC882.

Signed-off-by: Kailang Yang <kailang@realtek.com>
Cc: <stable@kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
13 years agoALSA: atmel - Fix the return value in error path
Takashi Iwai [Mon, 22 Nov 2010 07:58:13 +0000 (08:58 +0100)]
ALSA: atmel - Fix the return value in error path

In the commit c0763e687d0283d0db507813ca4462aa4073c5b5
    ALSA: snd-atmel-abdac: test wrong variable
the return value via PTR_ERR() had to be fixed as well.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
13 years agoALSA: hda: Use hp-laptop quirk to enable headphones automute for Asus A52J
Daniel T Chen [Sun, 21 Nov 2010 19:01:14 +0000 (14:01 -0500)]
ALSA: hda: Use hp-laptop quirk to enable headphones automute for Asus A52J

BugLink: https://launchpad.net/bugs/677652
The original reporter states that, in 2.6.35, headphones do not appear
to work, nor does inserting them mute the A52J's onboard speakers.  Upon
inspecting the codec dump, it appears that the newly committed hp-laptop
quirk will suffice to enable this basic functionality.  Testing was done
with an alsa-driver build from 2010-11-21.

Reported-and-tested-by: Joan Creus
Cc: <stable@kernel.org> [2.6.35+]
Signed-off-by: Daniel T Chen <crimsun@ubuntu.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
13 years agoALSA: snd-atmel-abdac: test wrong variable
Vasiliy Kulikov [Sun, 21 Nov 2010 17:40:07 +0000 (20:40 +0300)]
ALSA: snd-atmel-abdac: test wrong variable

After clk_get() pclk is checked second time instead of sample_clk check.

Signed-off-by: Vasiliy Kulikov <segoon@openwall.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
13 years agoALSA: azt3328: period bug fix (for PA), add missing ACK on stop timer
Andreas Mohr [Sun, 21 Nov 2010 11:09:32 +0000 (12:09 +0100)]
ALSA: azt3328: period bug fix (for PA), add missing ACK on stop timer

. Fix PulseAudio "ALSA driver bug" issue
  (if we have two alternated areas within a 64k DMA buffer, then max
  period size should obviously be 32k only).
  Back references:
   http://pulseaudio.org/wiki/AlsaIssues
   http://fedoraproject.org/wiki/Features/GlitchFreeAudio
. In stop timer function, need to supply ACK in the timer control byte.
. Minor log output correction

When I did my first PA testing recently, the period size bug resulted
in quite precisely observeable half-period-based playback distortion.

PA-based operation is quite a bit more underrun-prone (despite its
zero-copy optimizations etc.) than raw ALSA with this rather spartan
sound hardware implementation on my puny Athlon.

Note that even with this patch, azt3328 still doesn't work for both
cases yet, PA tsched=0 and tsched
(on tsched=0 it will playback tiny fragments of periods, leading to tiny
stuttering sounds with some pauses in between, whereas with
timer-scheduled operation playback works fine - minus some quite increased
underrun trouble on PA vs. ALSA, that is).

Signed-off-by: Andreas Mohr <andi@lisas.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
13 years agoALSA: hda: Add Samsung R720 SSID for subwoofer pin fixup
Daniel T Chen [Sat, 20 Nov 2010 15:20:35 +0000 (10:20 -0500)]
ALSA: hda: Add Samsung R720 SSID for subwoofer pin fixup

BugLink: https://launchpad.net/bugs/677830
The original reporter states that the subwoofer does not mute when
inserting headphones.  We need an entry for his machine's SSID in the
subwoofer pin fixup list, so add it there (verified using hda_analyzer).

Reported-and-tested-by: i-NoD
Cc: <stable@kernel.org>
Signed-off-by: Daniel T Chen <crimsun@ubuntu.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
13 years agoALSA: sound/pci/asihpi/hpioctl.c: Remove unnecessary casts of pci_get_drvdata
Joe Perches [Mon, 15 Nov 2010 20:14:02 +0000 (12:14 -0800)]
ALSA: sound/pci/asihpi/hpioctl.c: Remove unnecessary casts of pci_get_drvdata

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
13 years agoALSA: sound/core/pcm_lib.c: Remove unnecessary semicolons
Joe Perches [Mon, 15 Nov 2010 03:05:02 +0000 (19:05 -0800)]
ALSA: sound/core/pcm_lib.c: Remove unnecessary semicolons

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
13 years agoALSA: sound/ppc: Use printf extension %pR for struct resource
Joe Perches [Fri, 12 Nov 2010 21:38:04 +0000 (13:38 -0800)]
ALSA: sound/ppc: Use printf extension %pR for struct resource

Using %pR standardizes the struct resource output.

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
13 years agoALSA: ac97: Apply quirk for Dell Latitude D610 binding Master and Headphone controls
Daniel T Chen [Mon, 1 Nov 2010 05:14:51 +0000 (01:14 -0400)]
ALSA: ac97: Apply quirk for Dell Latitude D610 binding Master and Headphone controls

BugLink: https://launchpad.net/bugs/669279
The original reporter states: "The Master mixer does not change the
volume from the headphone output (which is affected by the headphone
mixer). Instead it only seems to control the on-board speaker volume.
This confuses PulseAudio greatly as the Master channel is merged into
the volume mix."

Fix this symptom by applying the hp_only quirk for the reporter's SSID.
The fix is applicable to all stable kernels.

Reported-and-tested-by: Ben Gamari <bgamari@gmail.com>
Cc: <stable@kernel.org> [2.6.32+]
Signed-off-by: Daniel T Chen <crimsun@ubuntu.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
13 years agoBtrfs: avoid NULL pointer deref in try_release_extent_buffer
Chris Mason [Mon, 22 Nov 2010 03:27:44 +0000 (22:27 -0500)]
Btrfs: avoid NULL pointer deref in try_release_extent_buffer

If we fail to find a pointer in the radix tree, don't try
to deref the NULL one we do have.

Signed-off-by: Chris Mason <chris.mason@oracle.com>
13 years agoBtrfs: make btrfs_add_nondir take parent inode as an argument
Josef Bacik [Fri, 19 Nov 2010 20:36:11 +0000 (20:36 +0000)]
Btrfs: make btrfs_add_nondir take parent inode as an argument

Everybody who calls btrfs_add_nondir just passes in the dentry of the new file
and then dereference dentry->d_parent->d_inode, but everybody who calls
btrfs_add_nondir() are already passed the parent's inode.  So instead of
dereferencing dentry->d_parent, just make btrfs_add_nondir take the dir inode as
an argument and pass that along so we don't have to worry about d_parent.
Thanks,

Signed-off-by: Josef Bacik <josef@redhat.com>
Signed-off-by: Chris Mason <chris.mason@oracle.com>
13 years agoBtrfs: hold i_mutex when calling btrfs_log_dentry_safe
Josef Bacik [Fri, 19 Nov 2010 20:36:10 +0000 (20:36 +0000)]
Btrfs: hold i_mutex when calling btrfs_log_dentry_safe

Since we walk up the path logging all of the parts of the inode's path, we need
to hold i_mutex to make sure that the inode is not renamed while we're logging
everything.  btrfs_log_dentry_safe does dget_parent and all of that jazz, but we
may get unexpected results if the rename changes the inode's location while
we're higher up the path logging those dentries, so do this for safety reasons.
Thanks,

Signed-off-by: Josef Bacik <josef@redhat.com>
Signed-off-by: Chris Mason <chris.mason@oracle.com>
13 years agoBtrfs: use dget_parent where we can UPDATED
Josef Bacik [Sat, 20 Nov 2010 09:48:00 +0000 (09:48 +0000)]
Btrfs: use dget_parent where we can UPDATED

There are lots of places where we do dentry->d_parent->d_inode without holding
the dentry->d_lock.  This could cause problems with rename.  So instead we need
to use dget_parent() and hold the reference to the parent as long as we are
going to use it's inode and then dput it at the end.

Signed-off-by: Josef Bacik <josef@redhat.com>
Cc: raven@themaw.net
Signed-off-by: Chris Mason <chris.mason@oracle.com>
13 years agoBtrfs: fix more ESTALE problems with NFS
Josef Bacik [Fri, 19 Nov 2010 02:18:02 +0000 (02:18 +0000)]
Btrfs: fix more ESTALE problems with NFS

When creating new inodes we don't setup inode->i_generation.  So if we generate
an fh with a newly created inode we save the generation of 0, but if we flush
the inode to disk and have to read it back when getting the inode on the server
we'll have the right i_generation, so gens wont match and we get ESTALE.  This
patch properly sets inode->i_generation when we create the new inode and now I'm
no longer getting ESTALE.  Thanks,

Signed-off-by: Josef Bacik <josef@redhat.com>
Signed-off-by: Chris Mason <chris.mason@oracle.com>
13 years agoBtrfs: handle NFS lookups properly
Josef Bacik [Wed, 17 Nov 2010 18:54:54 +0000 (18:54 +0000)]
Btrfs: handle NFS lookups properly

People kept reporting NFS issues, specifically getting ESTALE alot.  I figured
out how to reproduce the problem

SERVER
mkfs.btrfs /dev/sda1
mount /dev/sda1 /mnt/btrfs-test
<add /mnt/btrfs-test to /etc/exports>
btrfs subvol create /mnt/btrfs-test/foo
service nfs start

CLIENT
mount server:/mnt/btrfs /mnt/test
cd /mnt/test/foo
ls

SERVER
echo 3 > /proc/sys/vm/drop_caches

CLIENT
ls <-- get an ESTALE here

This is because the standard way to lookup a name in nfsd is to use readdir, and
what it does is do a readdir on the parent directory looking for the inode of
the child.  So in this case the parent being / and the child being foo.  Well
subvols all have the same inode number, so doing a readdir of / looking for
inode 256 will return '.', which obviously doesn't match foo.  So instead we
need to have our own .get_name so that we can find the right name.

Our .get_name will either lookup the inode backref or the root backref,
whichever we're looking for, and return the name we find.  Running the above
reproducer with this patch results in everything acting the way its supposed to.
Thanks,

Signed-off-by: Josef Bacik <josef@redhat.com>
Signed-off-by: Chris Mason <chris.mason@oracle.com>
13 years agobtrfs: make 1-bit signed fileds unsigned
Mariusz Kozlowski [Sat, 20 Nov 2010 12:03:07 +0000 (12:03 +0000)]
btrfs: make 1-bit signed fileds unsigned

Fixes these sparse warnings:
fs/btrfs/ctree.h:811:17: error: dubious one-bit signed bitfield
fs/btrfs/ctree.h:812:20: error: dubious one-bit signed bitfield
fs/btrfs/ctree.h:813:19: error: dubious one-bit signed bitfield

Signed-off-by: Mariusz Kozlowski <mk@lab.zgora.pl>
Signed-off-by: Chris Mason <chris.mason@oracle.com>