pandora-kernel.git
12 years agogpio/mxc: get rid of the uses of cpu_is_mx()
Shawn Guo [Wed, 6 Jul 2011 16:37:41 +0000 (00:37 +0800)]
gpio/mxc: get rid of the uses of cpu_is_mx()

The patch removes all the uses of cpu_is_mx().  Instead, it utilizes
platform_device_id to distinguish the different gpio types, IMX1_GPIO
on i.mx1, IMX21_GPIO on i.mx21 and i.mx27, IMX31_GPIO on all other
i.mx SoCs.

Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
12 years agogpio/mxc: add missing initialization of basic_mmio_gpio shadow variables
Lothar Waßmann [Thu, 7 Jul 2011 12:50:16 +0000 (14:50 +0200)]
gpio/mxc: add missing initialization of basic_mmio_gpio shadow variables

The bgpio_init() function does not initialise the shadow register for
the GPIO direction register. Thus, when configuring the first GPIO with
gpio_set_direction() all other GPIOs of the same bank will be
configured as inputs. Since the bgpio layer cannot know whether the
register is readable, the initialisation should be done by the caller
of bgpio_init().

Also, the 'data' shadow variable that is used inside basic_mmio_gpio
to cache the current value of the GPIO_DR register is initialised from
the GPIO_PSR register within bgpio_init(). Thus when setting the
output value of a certain GPIO, the other GPIO outputs of the same
bank will be set or cleared depending on the pin state of the GPIO
inputs during bgpio_init().

Signed-off-by: Lothar Waßmann <LW@KARO-electronics.de>
Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
12 years agogpio: Move mpc5200 gpio driver to drivers/gpio
Grant Likely [Wed, 6 Jul 2011 17:54:19 +0000 (11:54 -0600)]
gpio: Move mpc5200 gpio driver to drivers/gpio

GPIO drivers are getting consolidated into drivers/gpio.  While at it,
change the driver name to mpc5200-gpio* to avoid collisions.

Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
12 years agoGPIO: DA9052 GPIO module v3
ashishj3 [Wed, 6 Jul 2011 10:32:13 +0000 (16:02 +0530)]
GPIO: DA9052 GPIO module v3

DA9052 PMIC has 16 bit GPIO bus for peripheral control.

This patch add support for the GPIO pins on the DA9052.

Signed-off-by: David Dajun Chen <dchen@diasemi.com>
Signed-off-by: Ashish Jangam <ashish.jangam@kpitcummins.com>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
12 years agogpio/tegra: Use engineering names in DT compatible property
Stephen Warren [Tue, 5 Jul 2011 20:15:18 +0000 (14:15 -0600)]
gpio/tegra: Use engineering names in DT compatible property

Engineering names are more stable than marketing names. Hence, use them
for Device Tree compatible properties instead.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
12 years agoof/gpio: Add new method for getting gpios under different property names
John Bonesio [Mon, 27 Jun 2011 23:49:57 +0000 (16:49 -0700)]
of/gpio: Add new method for getting gpios under different property names

This patch adds a new routine, of_get_named_gpio_flags(), which takes the
property name as a parameter rather than assuming "gpios".

of_get_gpio_flags() is modified to call of_get_named_gpio_flags() with "gpios"
as the property parameter.

Signed-off-by: John Bonesio <bones@secretlab.ca>
[grant.likely: Tidied up whitespace and tweaked kerneldoc comments.]
Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
12 years agogpio/dt: Refine GPIO device tree binding
Grant Likely [Fri, 3 Jun 2011 17:07:16 +0000 (11:07 -0600)]
gpio/dt: Refine GPIO device tree binding

Allow for multiple named gpio properties

Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
12 years agogpio/ml-ioh: fix off-by-one for displaying variable i in dev_err
Axel Lin [Tue, 14 Jun 2011 11:12:57 +0000 (19:12 +0800)]
gpio/ml-ioh: fix off-by-one for displaying variable i in dev_err

with the "for (; i != 0; i--)" sytax, i-- will be executed after the iteration.
thus dev_err shows wrong i value.
Switch to "while(--i >= 0)" which is better in readability.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
12 years agogpio/pca953x: Deprecate meaningless device-tree bindings
David Jander [Tue, 14 Jun 2011 09:00:56 +0000 (11:00 +0200)]
gpio/pca953x: Deprecate meaningless device-tree bindings

The property 'polarity' is handled by the GPIO core, and the 'gpio-base'
should be assigned automatically. It is meaningless in the device-tree,
since GPIO's are identified by the "chip-name"/offset pair.
This way, the whole pca953x_get_alt_pdata() can hopefully soon go away.
We still need to check whether we really want GPIO-interrupt functionality
by simply looking if the I2C node has an interrupts property defined, since
this property is not used for anything else.

Signed-off-by: David Jander <david@protonic.nl>
Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
12 years agogpio/pca953x: Remove dynamic platform data pointer
David Jander [Tue, 14 Jun 2011 09:00:55 +0000 (11:00 +0200)]
gpio/pca953x: Remove dynamic platform data pointer

In the case that we obtain device-tree data to fill in platform_data, the new
platform data struct was dynamically allocated, but the pointer to it was not
used everywhere it should. It seems easier to fix this issue by removing the
dynamic allocation altogether since its data is only used during driver
probing.

Signed-off-by: David Jander <david@protonic.nl>
Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
12 years agogpio/pca953x: Fix IRQ support.
David Jander [Tue, 14 Jun 2011 09:00:54 +0000 (11:00 +0200)]
gpio/pca953x: Fix IRQ support.

It seems that in the normal case, IRQ_NOREQUEST needs to be explicitly
cleared, otherwise claiming the interrupt fails.
In the case of sparse interrupts, the descriptor needs to be allocated
first.

Signed-off-by: David Jander <david@protonic.nl>
Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
12 years agoMerge branch 'for_3.1/gpio-cleanup' of git://git.kernel.org/pub/scm/linux/kernel...
Grant Likely [Thu, 16 Jun 2011 19:31:42 +0000 (13:31 -0600)]
Merge branch 'for_3.1/gpio-cleanup' of git://git./linux/kernel/git/khilman/linux-omap-pm into gpio/next

12 years agogpio/omap: cleanup show revision, remove cpu_is checks, display only once
Kevin Hilman [Fri, 22 Apr 2011 21:37:16 +0000 (14:37 -0700)]
gpio/omap: cleanup show revision, remove cpu_is checks, display only once

Remove cpu_is_* checks from gpio_show_revision() by passing in the
revision address offset from platform data.  SoCs with no revision
register (15xx, 7xx, and all MPUIOs) use -1 (actually, USHRT_MAX) to
signify no register.

While here, all GPIO banks are assumed to be the same revision, so fix
show_revision() to only show the revision for the first bank it finds.
This removes duplicate GPIO revision prints during boot.

Thanks to Charulatha V <charu@ti.com> for finding/fixing a few -1s
that were missed in the original patch.

Signed-off-by: Kevin Hilman <khilman@ti.com>
12 years agogpio/omap: debounce remove SoC specific registers, use pdata
Kevin Hilman [Fri, 22 Apr 2011 19:02:05 +0000 (12:02 -0700)]
gpio/omap: debounce remove SoC specific registers, use pdata

Use register offsets passed in from pdata for accessing debounce registers.

Signed-off-by: Kevin Hilman <khilman@ti.com>
12 years agogpio/omap: cleanup _set_gpio_wakeup(), remove ifdefs
Kevin Hilman [Fri, 22 Apr 2011 16:45:27 +0000 (09:45 -0700)]
gpio/omap: cleanup _set_gpio_wakeup(), remove ifdefs

Make _set_gpio_wakeup() generic by removing ifdefs.  Code for the
various SoCs/bank-methods was already the same, except for the
non-wakeup GPIO checking.  But that flag is set on a per-SoC basis, so
can be used for all SoCs.

While here, use dev_err() and remove GPIO bank calculation assumption
based on subtracting bank pointers.

Signed-off-by: Kevin Hilman <khilman@ti.com>
12 years agogpio/omap: remove useless gpio_valid() & check_gpio() checks
Kevin Hilman [Fri, 22 Apr 2011 15:15:46 +0000 (08:15 -0700)]
gpio/omap: remove useless gpio_valid() & check_gpio() checks

These functions are useless.  They are only called in a few places,
and where they are called, the GPIO has already been converted from an
IRQ or masked, so these functions will never fail.

Signed-off-by: Kevin Hilman <khilman@ti.com>
12 years agogpio/omap: convert MPUIO IRQ over to generic irq_chip
Kevin Hilman [Thu, 21 Apr 2011 20:23:34 +0000 (13:23 -0700)]
gpio/omap: convert MPUIO IRQ over to generic irq_chip

MPUIO banks have their own dedicated IRQ chip interface, separate from
the "normal" GPIO banks.   Convert the MPUIO IRQ chip over to using
the new generic IRQ chip interface.

Signed-off-by: Kevin Hilman <khilman@ti.com>
12 years agogpio/omap: conslidate enable/disable of GPIO IRQs, remove ifdefs
Kevin Hilman [Thu, 21 Apr 2011 16:53:06 +0000 (09:53 -0700)]
gpio/omap: conslidate enable/disable of GPIO IRQs, remove ifdefs

Cleanup GPIO IRQ enable/disable handling by removing SoC-specific

Also split enable/disable IRQ into separate functions for better
readability and also facilitate potentially moving to generic irq_chip
in the future.

Signed-off-by: Kevin Hilman <khilman@ti.com>
12 years agogpio/omap: consolidate IRQ status handling, remove #ifdefs
Kevin Hilman [Thu, 21 Apr 2011 16:17:35 +0000 (09:17 -0700)]
gpio/omap: consolidate IRQ status handling, remove #ifdefs

Cleanup IRQ status handling by passing IRQ status register offsets
via platform data.

Cleans up clearing of GPIO IRQ status and GPIO ISR handler.

Signed-off-by: Kevin Hilman <khilman@ti.com>
12 years agogpio/omap: consolidate direction, input, output, remove #ifdefs
Kevin Hilman [Wed, 20 Apr 2011 23:31:23 +0000 (16:31 -0700)]
gpio/omap: consolidate direction, input, output, remove #ifdefs

Add register offset fields to GPIO platform_data for registers.

This patch adds registers that control direction, input and output
data.  Using these register offsets in the common driver allows
removal of #ifdefs and greatly improves readability.

Also create dedicated data out functions: one for banks with dedicated
set/clear registers, and another for banks with a single mask
register.

Signed-off-by: Kevin Hilman <khilman@ti.com>
12 years agogpio/omap: remove get_gpio_bank()
Charulatha V [Fri, 22 Apr 2011 11:08:16 +0000 (16:38 +0530)]
gpio/omap: remove get_gpio_bank()

use chip info to get the pointer to the struct gpio_bank for a
given GPIO bank and remove get_gpio_bank().

Signed-off-by: Charulatha V <charu@ti.com>
12 years agogpio/omap: replace get_gpio_index() by using bank width
Kevin Hilman [Fri, 22 Apr 2011 14:59:07 +0000 (07:59 -0700)]
gpio/omap: replace get_gpio_index() by using bank width

The get_gpio_index() function, littered with cpu_is_* checks can be easily
replaced by using bitops based on the GPIO bank width.  Do so.

Signed-off-by: Kevin Hilman <khilman@ti.com>
12 years agogpio/omap: _get_gpio_irqbank_mask: replace hard-coded mask with bank->width
Kevin Hilman [Thu, 21 Apr 2011 16:33:36 +0000 (09:33 -0700)]
gpio/omap: _get_gpio_irqbank_mask: replace hard-coded mask with bank->width

Replace hard-coded mask values with bank->width which is already coming
from platform_data.

Signed-off-by: Kevin Hilman <khilman@ti.com>
12 years agogpio/omap: move bank width into struct gpio_bank
Kevin Hilman [Thu, 21 Apr 2011 16:23:00 +0000 (09:23 -0700)]
gpio/omap: move bank width into struct gpio_bank

Rather than having a file-global bank_width variable, move it into
struct gpio_bank so it can be bank-specific.   Note the bank width
is already passed per-bank via platform_data, so current code would
be incorrect if any banks had different width.

Signed-off-by: Kevin Hilman <khilman@ti.com>
12 years agogpio/omap: remove MPUIO handling from _clear_gpio_irqbank()
Kevin Hilman [Thu, 21 Apr 2011 15:44:45 +0000 (08:44 -0700)]
gpio/omap: remove MPUIO handling from _clear_gpio_irqbank()

Remove the OMAP1 #ifdef and MPUIO special case for _clear_gpio_irqbank()

The MPUIOs do not need a register access to ack/clear the IRQ status,
since reading the IRQ status clears it.  In addition, the MPUIO
irq_chip has an empty ack method, so _clear_gpio_irqbank() is never
used for MPUIOs.

Signed-off-by: Kevin Hilman <khilman@ti.com>
12 years agogpio/omap: _clear_gpio_irqbank: fix flushing of posted write
Kevin Hilman [Thu, 21 Apr 2011 16:08:15 +0000 (09:08 -0700)]
gpio/omap: _clear_gpio_irqbank: fix flushing of posted write

In commit 78a1a6d3411de1a8b0dc1cb92754b5f12f251912 (ARM: OMAP4: Update
the GPIO support) braces were mistakenly added to included the
register read-back inside the cpu_is_* checking.

Remove the braces, ensuring that a register read-back is done, even
when the IRQSTATUS2 register is not written.

Note that the register read-back might be IRQSTATUS1 or IRQSTATUS2
depending on the CPU, but a read-back of any register in that region
will cause a flush of the posted writes.

Signed-off-by: Kevin Hilman <khilman@ti.com>
12 years agoMerge branch 'gpio/next-tegra' into gpio/next
Grant Likely [Wed, 15 Jun 2011 20:57:39 +0000 (14:57 -0600)]
Merge branch 'gpio/next-tegra' into gpio/next

Conflicts:
drivers/gpio/Kconfig
drivers/gpio/Makefile

12 years agogpio/tegra: add devicetree support
Grant Likely [Wed, 15 Jun 2011 20:54:14 +0000 (14:54 -0600)]
gpio/tegra: add devicetree support

Add support for decoding gpios from the device tree

Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
Acked-by: Olof Johansson <olof@lixom.net>
12 years agogpio/tegra: Move Tegra gpio driver to drivers/gpio
Grant Likely [Wed, 15 Jun 2011 20:52:43 +0000 (14:52 -0600)]
gpio/tegra: Move Tegra gpio driver to drivers/gpio

As part of the gpio driver consolidation, this patch moves the Tegra driver
into drivers/gpio

Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
Acked-by: Olof Johansson <olof@lixom.net>
Acked-by: Colin Cross <ccross@android.com>
12 years agoLinux 3.0-rc3 v3.0-rc3
Linus Torvalds [Mon, 13 Jun 2011 22:29:59 +0000 (15:29 -0700)]
Linux 3.0-rc3

12 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/penberg...
Linus Torvalds [Mon, 13 Jun 2011 20:00:53 +0000 (13:00 -0700)]
Merge branch 'for-linus' of git://git./linux/kernel/git/penberg/slab-2.6

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/penberg/slab-2.6:
  SLAB: Record actual last user of freed objects.
  slub: always align cpu_slab to honor cmpxchg_double requirement

12 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/sage/ceph...
Linus Torvalds [Mon, 13 Jun 2011 18:21:50 +0000 (11:21 -0700)]
Merge branch 'for-linus' of git://git./linux/kernel/git/sage/ceph-client

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/sage/ceph-client:
  ceph: unwind canceled flock state
  ceph: fix ENOENT logic in striped_read
  ceph: fix short sync reads from the OSD
  ceph: fix sync vs canceled write
  ceph: use ihold when we already have an inode ref

12 years agoMerge branch 'timers-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel...
Linus Torvalds [Mon, 13 Jun 2011 17:47:04 +0000 (10:47 -0700)]
Merge branch 'timers-urgent-for-linus' of git://git./linux/kernel/git/tip/linux-2.6-tip

* 'timers-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
  rtc: Staticize non-exported __rtc_set_alarm()
  rtc: Fix ioctl error path return
  ptp: Fix some locking bugs in ptp_read()
  ptp: Return -EFAULT on copy_to_user() errors

12 years agoMerge branch 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel...
Linus Torvalds [Mon, 13 Jun 2011 17:45:49 +0000 (10:45 -0700)]
Merge branch 'perf-urgent-for-linus' of git://git./linux/kernel/git/tip/linux-2.6-tip

* 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
  ftrace: Revert 8ab2b7efd ftrace: Remove unnecessary disabling of irqs
  kprobes/trace: Fix kprobe selftest for gcc 4.6
  ftrace: Fix possible undefined return code
  oprofile, dcookies: Fix possible circular locking dependency
  oprofile: Fix locking dependency in sync_start()
  oprofile: Free potentially owned tasks in case of errors
  oprofile, x86: Add comments to IBS LVT offset initialization

12 years agoMerge branches 'x86-urgent-for-linus' and 'irq-urgent-for-linus' of git://git.kernel...
Linus Torvalds [Mon, 13 Jun 2011 17:45:10 +0000 (10:45 -0700)]
Merge branches 'x86-urgent-for-linus' and 'irq-urgent-for-linus' of git://git./linux/kernel/git/tip/linux-2.6-tip

* 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
  x86: devicetree: Add missing early_init_dt_setup_initrd_arch stub
  x86: cpu-hotplug: Prevent softirq wakeup on wrong CPU

* 'irq-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
  genirq: Prevent potential NULL dereference in irq_set_irq_wake()

12 years agoMerge branch 'spi/merge' of git://git.secretlab.ca/git/linux-2.6
Linus Torvalds [Mon, 13 Jun 2011 17:33:31 +0000 (10:33 -0700)]
Merge branch 'spi/merge' of git://git.secretlab.ca/git/linux-2.6

* 'spi/merge' of git://git.secretlab.ca/git/linux-2.6:
  spi-pl022: Add missing return value update

12 years agoMerge branch 's5p-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git...
Linus Torvalds [Mon, 13 Jun 2011 17:32:53 +0000 (10:32 -0700)]
Merge branch 's5p-fixes-for-linus' of git://git./linux/kernel/git/kgene/linux-samsung

* 's5p-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/kgene/linux-samsung:
  ARM: S3C2410: remove the now empty mach-s3c2410/irq.c
  ARM: S3C24XX: Move s3c24xx_irq_syscore_ops to plat-s3c24xx/irq.c
  ARM: S3C24xx: Fix missing struct for s3c2410_dma_chan
  ARM: SAMSUNG: Remove unused onenand plat functions
  ARM: EXYNOS4: Remove compiler warning on exynos4_pwm4_resume
  ARM: S5P: Fix compilation error for exynos4_defconfig
  ARM: S5P: Should be S3C_VA_USB_HSPHY instead of S5P_VA_XX
  ARM: S5P64X0: Fix SPI platform device name
  ARM: S5PV210: Fix possible null pointer dereference

12 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ryusuke...
Linus Torvalds [Mon, 13 Jun 2011 17:32:24 +0000 (10:32 -0700)]
Merge branch 'for-linus' of git://git./linux/kernel/git/ryusuke/nilfs2

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ryusuke/nilfs2:
  nilfs2: fix problem in setting checkpoint interval
  nilfs2: fix missing block address termination in btree node shrinking
  nilfs2: fix incorrect block address termination in node concatenation

12 years agospi-pl022: Add missing return value update
Virupax Sadashivpetimath [Mon, 13 Jun 2011 10:53:46 +0000 (16:23 +0530)]
spi-pl022: Add missing return value update

Return error on out of range cpsdvsr value.

Acked-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Virupax Sadashivpetimath <virupax.sadashivpetimath@stericsson.com>
Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
12 years agogpio/74x164: fix clash with gpiolib namespace
Linus Walleij [Mon, 13 Jun 2011 08:47:15 +0000 (10:47 +0200)]
gpio/74x164: fix clash with gpiolib namespace

The 74x164 GPIO driver has a static inline helper called
gpio_to_chip which clashes with the gpiolib namespace if we
try to expose the function with the same name from gpiolib,
and it's still confusing even if we don't do that. So rename
it to gpio_to_74x164_chip().

Reported-by: H Hartley Sweeten <hartleys@visionengravers.com>
Signed-off-by: Linus Walleij <linus.walleij@stericsson.com>
Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
12 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mason/btrfs...
Linus Torvalds [Sun, 12 Jun 2011 18:06:36 +0000 (11:06 -0700)]
Merge branch 'for-linus' of git://git./linux/kernel/git/mason/btrfs-unstable

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mason/btrfs-unstable:
  Btrfs: use join_transaction in btrfs_evict_inode()
  Btrfs - use %pU to print fsid
  Btrfs: fix extent state leak on failed nodatasum reads
  btrfs: fix unlocked access of delalloc_inodes
  Btrfs: avoid stack bloat in btrfs_ioctl_fs_info()
  btrfs: remove 64bit alignment padding to allow extent_buffer to fit into one fewer cacheline
  Btrfs: clear current->journal_info on async transaction commit
  Btrfs: make sure to recheck for bitmaps in clusters
  btrfs: remove unneeded includes from scrub.c
  btrfs: reinitialize scrub workers
  btrfs: scrub: errors in tree enumeration
  Btrfs: don't map extent buffer if path->skip_locking is set
  Btrfs: unlock the trans lock properly
  Btrfs: don't map extent buffer if path->skip_locking is set
  Btrfs: fix duplicate checking logic
  Btrfs: fix the allocator loop logic
  Btrfs: fix bitmap regression
  Btrfs: don't commit the transaction if we dont have enough pinned bytes
  Btrfs: noinline the cluster searching functions
  Btrfs: cache bitmaps when searching for a cluster

12 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6
Linus Torvalds [Sun, 12 Jun 2011 18:04:25 +0000 (11:04 -0700)]
Merge branch 'for-linus' of git://git./linux/kernel/git/tiwai/sound-2.6

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6:
  ALSA: hda: Fix inaudible internal speakers on CyberpowerPC Gamer Xplorer N57001 laptop
  ALSA: Use %pV for snd_printk()
  ALSA: hda - Fix initialization of hp pins with master_mute in Realtek
  ALSA: hda - Fix invalid unsol tag for some alc262 model quirks
  ASoC: SAMSUNG: Fix the incorrect referencing of I2SCON register
  ASoC: snd_soc_new_{mixer,mux,pga} make sure to use right DAPM context
  ASoC: fsl: fix initialization of DMA buffers
  ASoC: WM8804 does not support sample rates below 32kHz
  ASoC: Fix WM8962 headphone volume update for use of advanced caches
  ASoC: Blackfin: bf5xx-ad1836: Fix codec device name
  ALSA: hda: Fix quirk for Dell Inspiron 910
  ASoC: AD1836: Fix setting the PCM format
  ASoC: Check for NULL register bank in snd_soc_get_cache_val()
  ASoC: Add missing break in WM8915 FLL source selection
  ASoC: Only update SYSCLK_ENA when pausing WM8915 SYSCLK
  ASoC: atmel_ssc: Don't try to free ssc if request failed

12 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/davem/ide-2.6
Linus Torvalds [Sun, 12 Jun 2011 18:04:11 +0000 (11:04 -0700)]
Merge git://git./linux/kernel/git/davem/ide-2.6

* git://git.kernel.org/pub/scm/linux/kernel/git/davem/ide-2.6:
  ide-cd: signedness warning fix again

12 years agoMerge branch 'gpio/merge' of git://git.secretlab.ca/git/linux-2.6
Linus Torvalds [Sun, 12 Jun 2011 18:03:29 +0000 (11:03 -0700)]
Merge branch 'gpio/merge' of git://git.secretlab.ca/git/linux-2.6

* 'gpio/merge' of git://git.secretlab.ca/git/linux-2.6:
  gpio/basic_mmio: add missing include of spinlock_types.h
  gpio/nomadik: fix sleepmode for elder Nomadik

12 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6
Linus Torvalds [Sun, 12 Jun 2011 18:03:08 +0000 (11:03 -0700)]
Merge git://git./linux/kernel/git/davem/net-2.6

* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6: (55 commits)
  ISDN, hfcsusb: Don't leak in hfcsusb_ph_info()
  netpoll: call dev_put() on error in netpoll_setup()
  net: ep93xx_eth: fix DMA API violations
  net: ep93xx_eth: drop GFP_DMA from call to dma_alloc_coherent()
  net: ep93xx_eth: allocate buffers using kmalloc()
  net: ep93xx_eth: pass struct device to DMA API functions
  ep93xx: set DMA masks for the ep93xx_eth
  vlan: Fix the ingress VLAN_FLAG_REORDER_HDR check
  dl2k: EEPROM CRC calculation wrong endianess on bigendian machine
  NET: am79c961: fix assembler warnings
  NET: am79c961: ensure multicast filter is correctly set at open
  NET: am79c961: ensure asm() statements are marked volatile
  ethtool.h: fix typos
  ep93xx_eth: Update MAINTAINERS
  ipv4: Fix packet size calculation for raw IPsec packets in __ip_append_data
  netpoll: prevent netpoll setup on slave devices
  net: pmtu_expires fixes
  gianfar:localized filer table
  iwlegacy: fix channel switch locking
  mac80211: fix IBSS teardown race
  ...

12 years agogpio/mxc: fix a bug with gpio_get_value calling
Shawn Guo [Sat, 11 Jun 2011 17:33:29 +0000 (01:33 +0800)]
gpio/mxc: fix a bug with gpio_get_value calling

When calling gpio_get_value, the gpio number other than bit offset
should be passed as the argument.

Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
12 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris...
Linus Torvalds [Sun, 12 Jun 2011 02:56:25 +0000 (19:56 -0700)]
Merge branch 'for-linus' of git://git./linux/kernel/git/jmorris/security-testing-2.6

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/security-testing-2.6:
  AppArmor: Fix sleep in invalid context from task_setrlimit

12 years agoISDN, hfcsusb: Don't leak in hfcsusb_ph_info()
Jesper Juhl [Sat, 11 Jun 2011 06:36:42 +0000 (06:36 +0000)]
ISDN, hfcsusb: Don't leak in hfcsusb_ph_info()

We leak the memory allocated to 'phi' when the variable goes out of scope
in hfcsusb_ph_info().

Signed-off-by: Jesper Juhl <jj@chaosbits.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agonetpoll: call dev_put() on error in netpoll_setup()
Dan Carpenter [Sun, 12 Jun 2011 01:55:22 +0000 (18:55 -0700)]
netpoll: call dev_put() on error in netpoll_setup()

There is a dev_put(ndev) missing on an error path.  This was
introduced in 0c1ad04aecb "netpoll: prevent netpoll setup on slave
devices".

Signed-off-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agonet: ep93xx_eth: fix DMA API violations
Mika Westerberg [Sat, 11 Jun 2011 08:39:58 +0000 (08:39 +0000)]
net: ep93xx_eth: fix DMA API violations

Russell King said:
>
> So, to summarize what its doing:
>
> 1. It allocates buffers for rx and tx.
> 2. It maps them with dma_map_single().
>       This transfers ownership of the buffer to the DMA device.
> 3. In ep93xx_xmit,
> 3a. It copies the data into the buffer with skb_copy_and_csum_dev()
>       This violates the DMA buffer ownership rules - the CPU should
>       not be writing to this buffer while it is (in principle) owned
>       by the DMA device.
> 3b. It then calls dma_sync_single_for_cpu() for the buffer.
>       This transfers ownership of the buffer to the CPU, which surely
>       is the wrong direction.
> 4. In ep93xx_rx,
> 4a. It calls dma_sync_single_for_cpu() for the buffer.
>       This at least transfers the DMA buffer ownership to the CPU
>       before the CPU reads the buffer
> 4b. It then uses skb_copy_to_linear_data() to copy the data out.
>       At no point does it transfer ownership back to the DMA device.
> 5. When the driver is removed, it dma_unmap_single()'s the buffer.
>       This transfers ownership of the buffer to the CPU.
> 6. It frees the buffer.
>
> While it may work on ep93xx, it's not respecting the DMA API rules,
> and with DMA debugging enabled it will probably encounter quite a few
> warnings.

This patch fixes these violations.

Signed-off-by: Mika Westerberg <mika.westerberg@iki.fi>
Acked-by: Russell King <rmk+kernel@arm.linux.org.uk>
Acked-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Tested-by: Petr Stetiar <ynezz@true.cz>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agonet: ep93xx_eth: drop GFP_DMA from call to dma_alloc_coherent()
Mika Westerberg [Sat, 11 Jun 2011 08:39:57 +0000 (08:39 +0000)]
net: ep93xx_eth: drop GFP_DMA from call to dma_alloc_coherent()

Commit a197b59ae6e8 (mm: fail GFP_DMA allocations when ZONE_DMA is not
configured) made page allocator to return NULL if GFP_DMA is set but
CONFIG_ZONE_DMA is disabled.

This causes ep93xx_eth to fail:

 WARNING: at mm/page_alloc.c:2251 __alloc_pages_nodemask+0x11c/0x638()
 Modules linked in:
 [<c0035498>] (unwind_backtrace+0x0/0xf4) from [<c0043da4>] (warn_slowpath_common+0x48/0x60)
 [<c0043da4>] (warn_slowpath_common+0x48/0x60) from [<c0043dd8>] (warn_slowpath_null+0x1c/0x24)
 [<c0043dd8>] (warn_slowpath_null+0x1c/0x24) from [<c0083b6c>] (__alloc_pages_nodemask+0x11c/0x638)
 [<c0083b6c>] (__alloc_pages_nodemask+0x11c/0x638) from [<c00366fc>] (__dma_alloc+0x8c/0x3ec)
 [<c00366fc>] (__dma_alloc+0x8c/0x3ec) from [<c0036adc>] (dma_alloc_coherent+0x54/0x60)
 [<c0036adc>] (dma_alloc_coherent+0x54/0x60) from [<c0227808>] (ep93xx_open+0x20/0x864)
 [<c0227808>] (ep93xx_open+0x20/0x864) from [<c0283144>] (__dev_open+0xb8/0x108)
 [<c0283144>] (__dev_open+0xb8/0x108) from [<c0280528>] (__dev_change_flags+0x70/0x128)
 [<c0280528>] (__dev_change_flags+0x70/0x128) from [<c0283054>] (dev_change_flags+0x10/0x48)
 [<c0283054>] (dev_change_flags+0x10/0x48) from [<c001a720>] (ip_auto_config+0x190/0xf68)
 [<c001a720>] (ip_auto_config+0x190/0xf68) from [<c00233b0>] (do_one_initcall+0x34/0x18c)
 [<c00233b0>] (do_one_initcall+0x34/0x18c) from [<c0008400>] (kernel_init+0x94/0x134)
 [<c0008400>] (kernel_init+0x94/0x134) from [<c0030858>] (kernel_thread_exit+0x0/0x8)

Since there is no restrictions for DMA on ep93xx, we can fix this by just
removing the GFP_DMA flag from the call.

Signed-off-by: Mika Westerberg <mika.westerberg@iki.fi>
Acked-by: Russell King <rmk+kernel@arm.linux.org.uk>
Acked-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Tested-by: Petr Stetiar <ynezz@true.cz>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agonet: ep93xx_eth: allocate buffers using kmalloc()
Mika Westerberg [Sat, 11 Jun 2011 08:39:56 +0000 (08:39 +0000)]
net: ep93xx_eth: allocate buffers using kmalloc()

We can use simply kmalloc() to allocate the buffers. This also simplifies the
code and allows us to perform DMA sync operations more easily.

Memory is allocated with only GFP_KERNEL since there are no DMA allocation
restrictions on this platform.

Signed-off-by: Mika Westerberg <mika.westerberg@iki.fi>
Acked-by: Russell King <rmk+kernel@arm.linux.org.uk>
Acked-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Tested-by: Petr Stetiar <ynezz@true.cz>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agonet: ep93xx_eth: pass struct device to DMA API functions
Mika Westerberg [Sat, 11 Jun 2011 08:39:55 +0000 (08:39 +0000)]
net: ep93xx_eth: pass struct device to DMA API functions

We shouldn't use NULL for any DMA API functions, unless we are dealing with
ISA or EISA device. So pass correct struct dev pointer to these functions.

Signed-off-by: Mika Westerberg <mika.westerberg@iki.fi>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agoep93xx: set DMA masks for the ep93xx_eth
Mika Westerberg [Sat, 11 Jun 2011 08:39:54 +0000 (08:39 +0000)]
ep93xx: set DMA masks for the ep93xx_eth

Since the driver uses the DMA API, we should pass it valid DMA masks.

Signed-off-by: Mika Westerberg <mika.westerberg@iki.fi>
Acked-by: Russell King <rmk+kernel@arm.linux.org.uk>
Acked-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Tested-by: Petr Stetiar <ynezz@true.cz>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agovlan: Fix the ingress VLAN_FLAG_REORDER_HDR check
Jiri Pirko [Fri, 10 Jun 2011 06:56:58 +0000 (06:56 +0000)]
vlan: Fix the ingress VLAN_FLAG_REORDER_HDR check

Testing of VLAN_FLAG_REORDER_HDR does not belong in vlan_untag
but rather in vlan_do_receive.  Otherwise the vlan header
will not be properly put on the packet in the case of
vlan header accelleration.

As we remove the check from vlan_check_reorder_header
rename it vlan_reorder_header to keep the naming clean.

Fix up the skb->pkt_type early so we don't look at the packet
after adding the vlan tag, which guarantees we don't goof
and look at the wrong field.

Use a simple if statement instead of a complicated switch
statement to decided that we need to increment rx_stats
for a multicast packet.

Hopefully at somepoint we will just declare the case where
VLAN_FLAG_REORDER_HDR is cleared as unsupported and remove
the code.  Until then this keeps it working correctly.

Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
Signed-off-by: Jiri Pirko <jpirko@redhat.com>
Acked-by: Changli Gao <xiaosuo@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agodl2k: EEPROM CRC calculation wrong endianess on bigendian machine
Daniel Hellstrom [Fri, 10 Jun 2011 04:55:16 +0000 (04:55 +0000)]
dl2k: EEPROM CRC calculation wrong endianess on bigendian machine

Signed-off-by: Daniel Hellstrom <daniel@gaisler.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agoNET: am79c961: fix assembler warnings
Russell King - ARM Linux [Fri, 10 Jun 2011 00:52:35 +0000 (00:52 +0000)]
NET: am79c961: fix assembler warnings

Fix:
/tmp/ccvoZ6h8.s: Assembler messages:
/tmp/ccvoZ6h8.s:284: Warning: register range not in ascending order
/tmp/ccvoZ6h8.s:881: Warning: register range not in ascending order
/tmp/ccvoZ6h8.s:1087: Warning: register range not in ascending order

by ensuring that we have temporary variables placed into specific
registers.  Reorder the code a bit to allow the resulting assembly
to be slightly more optimal.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agoNET: am79c961: ensure multicast filter is correctly set at open
Russell King - ARM Linux [Fri, 10 Jun 2011 00:52:14 +0000 (00:52 +0000)]
NET: am79c961: ensure multicast filter is correctly set at open

We were clearing out the multicast filter whenever the interface was
upped, and not setting the mode bits correctly.  This can cause
problems if there are any multicast addresses already set at this
point, or if ALLMULTI was set.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agoNET: am79c961: ensure asm() statements are marked volatile
Russell King - ARM Linux [Fri, 10 Jun 2011 00:51:54 +0000 (00:51 +0000)]
NET: am79c961: ensure asm() statements are marked volatile

Without this the compiler can (and does) optimize register reads away
from within loops, and other such optimizations.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agoide-cd: signedness warning fix again
Connor Hansen [Sat, 11 Jun 2011 22:06:48 +0000 (15:06 -0700)]
ide-cd: signedness warning fix again

One of the legit warnings 'make W=3 drivers/ide/ide-cd.c'
generates is:
drivers/ide/ide-cd.c: In function ide_cd_do_request
drivers/ide/ide-cd.c:828:2: warning: conversion to int from \
unsigned int may change the sign of the result
drivers/ide/ide-cd.c:833:2: warning: conversion to int from \
unsigned int may change the sign of the result

nsectors is declared int, should be unsigned int.

blk_rq_sectors() returns unsigned int, and ide_complete_rq
expects unsigned int as well.  Fixes both warnings.

Signed-off-by: Connor Hansen <cmdkhh@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agolinux/seqlock.h should #include asm/processor.h for cpu_relax()
David Howells [Sat, 11 Jun 2011 11:29:58 +0000 (12:29 +0100)]
linux/seqlock.h should #include asm/processor.h for cpu_relax()

It uses cpu_relax(), and so needs <asm/processor.h>

Without this patch, I see:

   CC      arch/mn10300/kernel/asm-offsets.s
  In file included from include/linux/time.h:8,
                   from include/linux/timex.h:56,
                   from include/linux/sched.h:57,
                   from arch/mn10300/kernel/asm-offsets.c:7:
  include/linux/seqlock.h: In function 'read_seqbegin':
  include/linux/seqlock.h:91: error: implicit declaration of function 'cpu_relax'

whilst building asb2364_defconfig on MN10300.

Signed-off-by: David Howells <dhowells@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
12 years agoBtrfs: use join_transaction in btrfs_evict_inode()
Li Zefan [Wed, 8 Jun 2011 03:56:44 +0000 (03:56 +0000)]
Btrfs: use join_transaction in btrfs_evict_inode()

The WARN_ON() in start_transaction() was triggered while balancing.

The cause is btrfs_relocate_chunk() started a transaction and
then called iput() on the inode that stores free space cache,
and iput() called btrfs_start_transaction() again.

Reported-by: Tsutomu Itoh <t-itoh@jp.fujitsu.com>
Signed-off-by: Li Zefan <lizf@cn.fujitsu.com>
Reviewed-by: Josef Bacik <josef@redhat.com>
Signed-off-by: Chris Mason <chris.mason@oracle.com>
12 years agonilfs2: fix problem in setting checkpoint interval
Ryusuke Konishi [Thu, 9 Jun 2011 15:33:06 +0000 (00:33 +0900)]
nilfs2: fix problem in setting checkpoint interval

Checkpoint generation interval of nilfs goes wrong after user has
changed the interval parameter with nilfs-tune tool.

 segctord starting. Construction interval = 5 seconds,
 CP frequency < 30 seconds
 segctord starting. Construction interval = 0 seconds,
 CP frequency < 30 seconds

This turned out to be caused by a trivial bug in initialization code
of log writer.  This will fix it.

Reported-by: Andrea Gelmini <andrea.gelmini@gmail.com>
Signed-off-by: Ryusuke Konishi <konishi.ryusuke@lab.ntt.co.jp>
12 years agonilfs2: fix missing block address termination in btree node shrinking
Ryusuke Konishi [Wed, 25 May 2011 14:00:27 +0000 (23:00 +0900)]
nilfs2: fix missing block address termination in btree node shrinking

nilfs_btree_delete function does not terminate part of virtual block
addresses when shrinking the last remaining child node into the root
node.  The missing address termination causes that dead btree node
blocks persist and chip away free disk space.

This fixes the leak bug on the btree node deletion.

Signed-off-by: Ryusuke Konishi <konishi.ryusuke@lab.ntt.co.jp>
12 years agonilfs2: fix incorrect block address termination in node concatenation
Ryusuke Konishi [Wed, 25 May 2011 14:00:27 +0000 (23:00 +0900)]
nilfs2: fix incorrect block address termination in node concatenation

nilfs_btree_delete function wrongly terminates virtual block address
of the btree node held by its parent at index 0.  When concatenating
the index-0 node with its right sibling node, nilfs_btree_delete
terminates the block address of index-0 node instead of the right
sibling node which should be deleted.

This bug not only wears disk space in the long run, but also causes
file system corruption.  This will fix it.

Signed-off-by: Ryusuke Konishi <konishi.ryusuke@lab.ntt.co.jp>
12 years agogpio/vr41xx: Convert use of struct resource to resource_size(ptr)
Joe Perches [Sat, 11 Jun 2011 01:16:15 +0000 (18:16 -0700)]
gpio/vr41xx: Convert use of struct resource to resource_size(ptr)

Remove miscellaneous use of direct calculation by using resource_size().

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
12 years agogpio/ep93xx: Add missing EP93XX_GPIO_PHYS_BASE define
H Hartley Sweeten [Fri, 10 Jun 2011 16:08:17 +0000 (09:08 -0700)]
gpio/ep93xx: Add missing EP93XX_GPIO_PHYS_BASE define

The patch to convert of the ep93xx gpio driver to a platform_driver is
missing the define for the memory resource that is passed to the driver.

This is needed to prevent a build error.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
12 years agoBtrfs - use %pU to print fsid
Ilya Dryomov [Wed, 9 Feb 2011 14:05:31 +0000 (16:05 +0200)]
Btrfs - use %pU to print fsid

Get rid of FIXME comment.  Uuids from dmesg are now the same as uuids
given by btrfs-progs.

Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
Signed-off-by: Chris Mason <chris.mason@oracle.com>
12 years agoBtrfs: fix extent state leak on failed nodatasum reads
Jan Schmidt [Wed, 4 May 2011 14:18:50 +0000 (16:18 +0200)]
Btrfs: fix extent state leak on failed nodatasum reads

When encountering an EIO while reading from a nodatasum extent, we
insert an error record into the inode's failure tree.
btrfs_readpage_end_io_hook returns early for nodatasum inodes. We'd
better clear the failure tree in that case, otherwise the kernel
complains about

BUG extent_state: Objects remaining on kmem_cache_close()

on rmmod.

Signed-off-by: Jan Schmidt <list.btrfs@jan-o-sch.net>
Signed-off-by: Chris Mason <chris.mason@oracle.com>
12 years agoMerge branch 'for-chris' of git://git.kernel.org/pub/scm/linux/kernel/git/arne/btrfs...
Chris Mason [Fri, 10 Jun 2011 22:58:08 +0000 (18:58 -0400)]
Merge branch 'for-chris' of git://git./linux/kernel/git/arne/btrfs-unstable-arne into for-linus

12 years agobtrfs: fix unlocked access of delalloc_inodes
David Sterba [Thu, 9 Jun 2011 10:02:51 +0000 (10:02 +0000)]
btrfs: fix unlocked access of delalloc_inodes

list_splice_init will make delalloc_inodes empty, but without a spinlock
around, this may produce corrupted list head, accessed in many placess,
The race window is very tight and nobody seems to have hit it so far.

Signed-off-by: David Sterba <dsterba@suse.cz>
Signed-off-by: Chris Mason <chris.mason@oracle.com>
12 years agoBtrfs: avoid stack bloat in btrfs_ioctl_fs_info()
Li Zefan [Wed, 8 Jun 2011 08:27:56 +0000 (08:27 +0000)]
Btrfs: avoid stack bloat in btrfs_ioctl_fs_info()

The size of struct btrfs_ioctl_fs_info_args is as big as 1KB, so
don't declare the variable on stack.

Signed-off-by: Li Zefan <lizf@cn.fujitsu.com>
Reviewed-by: Josef Bacik <josef@redhat.com>
Signed-off-by: Chris Mason <chris.mason@oracle.com>
12 years agobtrfs: remove 64bit alignment padding to allow extent_buffer to fit into one fewer...
richard kennedy [Tue, 7 Jun 2011 10:46:32 +0000 (10:46 +0000)]
btrfs: remove 64bit alignment padding to allow extent_buffer to fit into one fewer cacheline

Reorder extent_buffer to remove 8 bytes of alignment padding on 64 bit
builds. This shrinks its size to 128 bytes allowing it to fit into one
fewer cache lines and allows more objects per slab in its kmem_cache.

slabinfo extent_buffer reports :-

 before:-
    Sizes (bytes)     Slabs
    ----------------------------------
    Object :     136  Total  :     123
    SlabObj:     136  Full   :     121
    SlabSiz:    4096  Partial:       0
    Loss   :       0  CpuSlab:       2
    Align  :       8  Objects:      30

 after :-
    Object :     128  Total  :       4
    SlabObj:     128  Full   :       2
    SlabSiz:    4096  Partial:       0
    Loss   :       0  CpuSlab:       2
    Align  :       8  Objects:      32

Signed-off-by: Richard Kennedy <richard@rsk.demon.co.uk>
Signed-off-by: Chris Mason <chris.mason@oracle.com>
12 years agoBtrfs: clear current->journal_info on async transaction commit
Sage Weil [Fri, 10 Jun 2011 18:43:13 +0000 (18:43 +0000)]
Btrfs: clear current->journal_info on async transaction commit

Normally current->jouranl_info is cleared by commit_transaction.  For an
async snap or subvol creation, though, it runs in a work queue.  Clear
it in btrfs_commit_transaction_async() to avoid leaking a non-NULL
journal_info when we return to userspace.  When the actual commit runs in
the other thread it won't care that it's current->journal_info is already
NULL.

Signed-off-by: Sage Weil <sage@newdream.net>
Tested-by: Jim Schutt <jaschut@sandia.gov>
Signed-off-by: Chris Mason <chris.mason@oracle.com>
12 years agoBtrfs: make sure to recheck for bitmaps in clusters
Chris Mason [Fri, 10 Jun 2011 20:36:57 +0000 (16:36 -0400)]
Btrfs: make sure to recheck for bitmaps in clusters

Josef recently changed the free extent cache to look in
the block group cluster for any bitmaps before trying to
add a new bitmap for the same offset.  This avoids BUG_ON()s due
covering duplicate ranges.

But it didn't go quite far enough.  A given free range might span
between one or more bitmaps or free space entries.  The code has
looping to cover this, but it doesn't check for clustered bitmaps
every time.

This shuffles our gotos to check for a bitmap in the cluster
for every new bitmap entry we try to add.

Signed-off-by: Chris Mason <chris.mason@oracle.com>
12 years agoMerge branch 'fix/asoc' into for-linus
Takashi Iwai [Fri, 10 Jun 2011 15:49:34 +0000 (17:49 +0200)]
Merge branch 'fix/asoc' into for-linus

12 years agogpio/basic_mmio: add missing include of spinlock_types.h
Jamie Iles [Fri, 10 Jun 2011 12:44:49 +0000 (13:44 +0100)]
gpio/basic_mmio: add missing include of spinlock_types.h

include/linux/basic_mmio_gpio.h uses a spinlock_t without including any
of the spinlock headers resulting in this compiler warning.

include/linux/basic_mmio_gpio.h:51:2: error: expected specifier-qualifier-list before 'spinlock_t'

Explicitly include linux/spinlock_types.h to fix it.

Signed-off-by: Jamie Iles <jamie@jamieiles.com>
Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
12 years agoALSA: hda: Fix inaudible internal speakers on CyberpowerPC Gamer Xplorer N57001 laptop
Daniel T Chen [Fri, 10 Jun 2011 14:14:01 +0000 (10:14 -0400)]
ALSA: hda: Fix inaudible internal speakers on CyberpowerPC Gamer Xplorer N57001 laptop

BugLink: https://launchpad.net/bugs/761171
The original reporter needs the model=auto quirk for his internal
speakers to be audible in the latest daily snapshot, so add an entry in
the quirk table for his PCI SSID.

A trivially different version of this patch using the model=asus quirk
should be applied to the 2.6.38 and 2.6.39 stable kernels. We don't use
the asus quirk in 3.0-rc2, because 3.0-rc2's autoparser is much
improved.

Reported-and-tested-by: tomdeering7
Signed-off-by: Daniel T Chen <crimsun@ubuntu.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
12 years agoALSA: Use %pV for snd_printk()
Takashi Iwai [Fri, 10 Jun 2011 13:32:31 +0000 (15:32 +0200)]
ALSA: Use %pV for snd_printk()

Clean up snd_printk() helper using the %pV prefix for recursive printks.
This also automagically fixes an Oops with RO/NX-enabled modules.

Tested-by: Maarten Lankhorst <m.b.lankhorst@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
12 years agoALSA: hda - Fix initialization of hp pins with master_mute in Realtek
Takashi Iwai [Fri, 10 Jun 2011 13:28:15 +0000 (15:28 +0200)]
ALSA: hda - Fix initialization of hp pins with master_mute in Realtek

Some Reatlek model quirks use master_mute bool switch for controlling
the master-mute of outputs.  For these cases, the initialization of HP
pins/amps were forgotten during the transition to the common automute
helper function in 3.0 development time, and resulted in the muted HP
output as default.

This patch fixes the issue by adjusting the HP output explicitly with
master_mute switch.

Tested-by: Michal Hocko <mhocko@suse.cz>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
12 years agoALSA: hda - Fix invalid unsol tag for some alc262 model quirks
Takashi Iwai [Fri, 10 Jun 2011 07:31:54 +0000 (09:31 +0200)]
ALSA: hda - Fix invalid unsol tag for some alc262 model quirks

The tag number was forgotten to be fixed after cleaning up the model
quirks for ALC262 fujitsu and lenovo-3000 models.

Tested-by: Michal Hocko <mhocko@suse.cz>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
12 years agobtrfs: remove unneeded includes from scrub.c
Arne Jansen [Fri, 10 Jun 2011 11:04:58 +0000 (13:04 +0200)]
btrfs: remove unneeded includes from scrub.c

Signed-off-by: Arne Jansen <sensille@gmx.net>
12 years agobtrfs: reinitialize scrub workers
Arne Jansen [Fri, 10 Jun 2011 10:07:07 +0000 (12:07 +0200)]
btrfs: reinitialize scrub workers

Scrub starts the workers each time a scrub starts and stops them after it
finished. This patch adds an initialization for the workers before each
start, otherwise the workers behave strangely.

Signed-off-by: Arne Jansen <sensille@gmx.net>
12 years agobtrfs: scrub: errors in tree enumeration
Arne Jansen [Fri, 3 Jun 2011 08:09:26 +0000 (10:09 +0200)]
btrfs: scrub: errors in tree enumeration

due to the semantics of btrfs_search_slot the path can point to an
invalid slot when ret > 0. This condition went unnoticed, which in
turn could have led to an incomplete scrubbing.

Signed-off-by: Arne Jansen <sensille@gmx.net>
12 years agoBtrfs: don't map extent buffer if path->skip_locking is set
Josef Bacik [Wed, 8 Jun 2011 18:45:50 +0000 (14:45 -0400)]
Btrfs: don't map extent buffer if path->skip_locking is set

Arne's scrub stuff exposed a problem with mapping the extent buffer in
reada_for_search.  He searches the commit root with multiple threads and with
skip_locking set, so we can race and overwrite node->map_token since node isn't
locked.  So fix this so that we only map the extent buffer if we don't already
have a map_token and skip_locking isn't set.  Without this patch scrub would
panic almost immediately, with the patch it doesn't panic anymore.  Thanks,

Reported-by: Arne Jansen <sensille@gmx.net>
Signed-off-by: Josef Bacik <josef@redhat.com>
12 years agoASoC: SAMSUNG: Fix the incorrect referencing of I2SCON register
Sangbeom Kim [Fri, 10 Jun 2011 01:36:54 +0000 (10:36 +0900)]
ASoC: SAMSUNG: Fix the incorrect referencing of I2SCON register

If DMA active status should be checked, I2SCON register should be referenced.
In this patch, Fix the incorrect referencing of I2SCON register.

Reported-by : Lakkyung Jung <lakkyung.jung@samsung.com>
Signed-off-by: Sangbeom Kim <sbkim73@samsung.com>
Acked-by: Jassi Brar <jassisinghbrar@gmail.com>
Acked-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: stable@kernel.org
12 years agogenirq: Prevent potential NULL dereference in irq_set_irq_wake()
Jesper Juhl [Thu, 9 Jun 2011 21:14:58 +0000 (23:14 +0200)]
genirq: Prevent potential NULL dereference in irq_set_irq_wake()

In kernel/irq/manage.c::irq_set_irq_wake() we call
irq_get_desc_buslock() which may return NULL, but the code
dereferences the result unconditionally.

irq_set_irq_wake() has lots of callers - I checked a few and I couldn't
find anything that guarantees that they won't call it with some input that
will cause irq_get_desc_buslock() to return NULL, so I think it's a good
thing to test and -EINVAL was the most sane error code in this situation
that I could think of.

Not all callers test the return value of irq_set_irq_wake(), but those
that do take != 0 to mean error as far as I can see, so they should be
fine. I guess those that don't test actually should, but that's a
different issue.

Signed-off-by: Jesper Juhl <jj@chaosbits.net>
Link: http://lkml.kernel.org/r/alpine.LNX.2.00.1106092300360.17868@swampdragon.chaosbits.net
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
12 years agoMerge branch 'upstream-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jgarzi...
Linus Torvalds [Fri, 10 Jun 2011 03:14:21 +0000 (20:14 -0700)]
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:
  libata: fix unexpectedly frozen port after ata_eh_reset()

12 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc-2.6
Linus Torvalds [Thu, 9 Jun 2011 23:33:01 +0000 (16:33 -0700)]
Merge git://git./linux/kernel/git/davem/sparc-2.6

* git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc-2.6:
  sparc32, leon: bugfix in LEON SMP interrupt init
  sparc32, sun4m: bugfix in SMP IPI traphandler
  sparc: Remove unnecessary semicolons
  Add support for allocating irqs for bootbus devices
  Do not skip interrupt sources in sun4d interrupt handler and acknowledge interrupts correctly
  Restructure sun4d_build_device_irq so that timer interrupts can be allocated
  sparc: PCIC_PCI needs SPARC32 dependency
  sparc: Do not select GENERIC_HARDIRQS_NO_DEPRECATED
  sparc32,leon: add GRPCI2 PCI Host driver
  sparc32,leon: added LEON-common low-level PCI routines
  sparc32: added CONFIG_PCIC_PCI Kconfig setting

12 years agoMerge branch 'rc-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuil...
Linus Torvalds [Thu, 9 Jun 2011 23:27:42 +0000 (16:27 -0700)]
Merge branch 'rc-fixes' of git://git./linux/kernel/git/mmarek/kbuild-2.6

* 'rc-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild-2.6:
  perf: Use make kernelversion instead of parsing the Makefile
  kbuild: Hack for depmod not handling X.Y versions
  kbuild: Move depmod call to a separate script
  kbuild: Fix <linux/version.h> for empty SUBLEVEL or PATCHLEVEL
  kbuild: Fix KERNELVERSION for empty SUBLEVEL or PATCHLEVEL
  kbuild: silence Nothing to be done for 'all' message

12 years agosparc32, leon: bugfix in LEON SMP interrupt init
Daniel Hellstrom [Thu, 9 Jun 2011 02:54:09 +0000 (02:54 +0000)]
sparc32, leon: bugfix in LEON SMP interrupt init

During converting per-cpu ticker to genirq layer some
IRQ initialization code was removed by commit
2cf9530420e446bb61f665d02afeb81070106900 ("sparc32,leon:
per-cpu ticker use genirq per-cpu handler").

This patch reintroduces the code at the same place it was
removed from. IRQ12 - IRQ14 will crash on LEON SMP without
this patch because it will run the SUN4M IRQ trap handler.

Reported-by: Jan Andersson <jan@gaisler.com>
Signed-off-by: Daniel Hellstrom <daniel@gaisler.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agosparc32, sun4m: bugfix in SMP IPI traphandler
Daniel Hellstrom [Thu, 9 Jun 2011 02:54:08 +0000 (02:54 +0000)]
sparc32, sun4m: bugfix in SMP IPI traphandler

Three new IPIs were introduced by commit
ecbc42b70acbc6327adefe9635db93fcf62bf59d ("sparc32, sun4m:
Implemented SMP IPIs support for SUN4M machines"), the
old handler was already prepared for IPIs but handled only
IRQ14 and IRQ13, this patch adds support for the new IPI at
IRQ12.

The IPI trap handler looks at the mask rather than the
pending IRQ/IPI, this bug may have masked the problem
above, introduced by the same commit.

Signed-off-by: Daniel Hellstrom <daniel@gaisler.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agoethtool.h: fix typos
Yegor Yefremov [Thu, 9 Jun 2011 22:05:48 +0000 (15:05 -0700)]
ethtool.h: fix typos

Signed-off-by: Yegor Yefremov <yegorslists@googlemail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agoep93xx_eth: Update MAINTAINERS
H Hartley Sweeten [Thu, 9 Jun 2011 22:00:21 +0000 (15:00 -0700)]
ep93xx_eth: Update MAINTAINERS

Lennert stated that he has been short on time lately. Since I'm maintaining
the ep93xx core stuff, I'm willing to also take over maintaining the Ethernet
driver.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Acked-by: Mika Westerberg <mika.westerberg@iki.fi>
Acked-by: Lennert Buytenhek <kernel@wantstofly.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agoipv4: Fix packet size calculation for raw IPsec packets in __ip_append_data
Steffen Klassert [Sun, 5 Jun 2011 20:48:47 +0000 (20:48 +0000)]
ipv4: Fix packet size calculation for raw IPsec packets in __ip_append_data

We assume that transhdrlen is positive on the first fragment
which is wrong for raw packets. So we don't add exthdrlen to the
packet size for raw packets. This leads to a reallocation on IPsec
because we have not enough headroom on the skb to place the IPsec
headers. This patch fixes this by adding exthdrlen to the packet
size whenever the send queue of the socket is empty. This issue was
introduced with git commit 1470ddf7 (inet: Remove explicit write
references to sk/inet in ip_append_data)

Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agoperf: Use make kernelversion instead of parsing the Makefile
Michal Marek [Mon, 30 May 2011 12:12:09 +0000 (14:12 +0200)]
perf: Use make kernelversion instead of parsing the Makefile

Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Arnaldo Carvalho de Melo <acme@ghostprotocols.net>
Signed-off-by: Michal Marek <mmarek@suse.cz>
12 years agokbuild: Hack for depmod not handling X.Y versions
Michal Marek [Thu, 9 Jun 2011 14:35:41 +0000 (16:35 +0200)]
kbuild: Hack for depmod not handling X.Y versions

depmod from module-init-tools < 3.13 and the busybox depmod check if the
kernel release starts with <num>.<num>.<num>. To support these versions,
we create a symlink with two numbers prepended.

Signed-off-by: Michal Marek <mmarek@suse.cz>
12 years agokbuild: Move depmod call to a separate script
Michal Marek [Thu, 9 Jun 2011 13:35:22 +0000 (15:35 +0200)]
kbuild: Move depmod call to a separate script

Do not bloat the Makefile with multiline shell statements. No
user-visible change intended.

Signed-off-by: Michal Marek <mmarek@suse.cz>
12 years agokbuild: Fix <linux/version.h> for empty SUBLEVEL or PATCHLEVEL
Michal Marek [Mon, 30 May 2011 11:37:20 +0000 (13:37 +0200)]
kbuild: Fix <linux/version.h> for empty SUBLEVEL or PATCHLEVEL

expr treats all numbers as decimals, so prepending a zero is safe. Note
that the KERNEL_VERSION() macro still takes three arguments, 3.0 has to be
written as KERNEL_VERSION(3,0,0).

Signed-off-by: Michal Marek <mmarek@suse.cz>
12 years agokbuild: Fix KERNELVERSION for empty SUBLEVEL or PATCHLEVEL
Michal Marek [Mon, 30 May 2011 11:36:07 +0000 (13:36 +0200)]
kbuild: Fix KERNELVERSION for empty SUBLEVEL or PATCHLEVEL

Omit the second dot for releases without SUBLEVEL. If PATCHLEVEL is also
empty, only display VERSION.

Signed-off-by: Michal Marek <mmarek@suse.cz>