pandora-kernel.git
12 years agodrm/nouveau: Fix bandwidth calculation for DisplayPort
Adam Jackson [Tue, 25 Oct 2011 17:09:43 +0000 (13:09 -0400)]
drm/nouveau: Fix bandwidth calculation for DisplayPort

Ported from the equivalent fix in drm-intel-next:

http://cgit.freedesktop.org/~keithp/linux/commit/?h=drm-intel-next&id=cd9dde44f47501394b9f0715b6a36a92aa74c0d0

Signed-off-by: Adam Jackson <ajax@redhat.com>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
12 years agodrm/nouveau: by default use low bpp framebuffer on low memory cards
Marcin Slusarz [Sun, 6 Nov 2011 19:32:04 +0000 (20:32 +0100)]
drm/nouveau: by default use low bpp framebuffer on low memory cards

Framebuffer's BPP is not that important but can waste significant part
of memory on low-VRAM cards. Lower it to 8bpp on < 32MB cards and to
16bpp on 64MB cards. It can still be overridden by video= option.

Signed-off-by: Marcin Slusarz <marcin.slusarz@gmail.com>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
12 years agodrm/nv10: Change the BO size threshold determining the memory placement range.
Francisco Jerez [Sun, 6 Nov 2011 20:21:28 +0000 (21:21 +0100)]
drm/nv10: Change the BO size threshold determining the memory placement range.

Fixes the framebuffer memory allocation failure seen on some
low-memory cards, followed by X refusing to start.

https://bugs.freedesktop.org/show_bug.cgi?id=42384

Reported-by: Chris Paulson-Ellis <chris@edesix.com>
Signed-off-by: Francisco Jerez <currojerez@riseup.net>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
12 years agodrm/nvc0: enable acceleration for nvc1 by default
Ben Skeggs [Fri, 28 Oct 2011 01:00:39 +0000 (11:00 +1000)]
drm/nvc0: enable acceleration for nvc1 by default

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
12 years agodrm/nvc0/gr: fixup the mmio list register writes for 0xc1
Ben Skeggs [Fri, 28 Oct 2011 01:43:04 +0000 (11:43 +1000)]
drm/nvc0/gr: fixup the mmio list register writes for 0xc1

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
12 years agodrm/nvc1: hacky workaround to fix accel issues
Ben Skeggs [Fri, 28 Oct 2011 00:59:45 +0000 (10:59 +1000)]
drm/nvc1: hacky workaround to fix accel issues

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
12 years agodrm/nvc0/gr: fix some bugs in grctx generation
Ben Skeggs [Mon, 11 Jul 2011 05:40:43 +0000 (15:40 +1000)]
drm/nvc0/gr: fix some bugs in grctx generation

Most serious is for chips with only 1 TPC, we'd get stuck in an infinite
loop.  The fix here will slightly change the setup for all other chipsets
too, but, it shouldn't matter too much, and this all needs figuring out
and likely redone anyway.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
12 years agodrm/nvc0: enable acceleration on 0xc8 by default
Ben Skeggs [Thu, 27 Oct 2011 01:31:49 +0000 (11:31 +1000)]
drm/nvc0: enable acceleration on 0xc8 by default

Worked well enough for glxgears and gnome-shell at least, no reason to
have this off anymore.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
12 years agodrm/nvc0/vram: skip disabled PBFB subunits
Ben Skeggs [Thu, 27 Oct 2011 01:26:17 +0000 (11:26 +1000)]
drm/nvc0/vram: skip disabled PBFB subunits

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
12 years agodrm/nv40/pm: fix issues on igp chipsets, which don't have memory
Ben Skeggs [Wed, 19 Oct 2011 04:06:59 +0000 (14:06 +1000)]
drm/nv40/pm: fix issues on igp chipsets, which don't have memory

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
12 years agodrm/nouveau: testing the wrong variable
Dan Carpenter [Tue, 18 Oct 2011 06:07:51 +0000 (09:07 +0300)]
drm/nouveau: testing the wrong variable

memtimings is a valid pointer here, the intent was to test for
kcalloc() failure.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
12 years agodrm/nvc0/vram: storage type 0xc3 is not compressed
Christoph Bumiller [Fri, 7 Oct 2011 16:10:45 +0000 (18:10 +0200)]
drm/nvc0/vram: storage type 0xc3 is not compressed

Signed-off-by: Christoph Bumiller <e0425955@student.tuwien.ac.at>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
12 years agodrm/nv50: fix stability issue on NV86.
Maxim Levitsky [Sun, 9 Oct 2011 20:58:31 +0000 (22:58 +0200)]
drm/nv50: fix stability issue on NV86.

Confirmed to fix random hangs while running all Unegine demos on NV86.

Signed-off-by: Maxim Levitsky <maximlevitsky@gmail.com>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
12 years agodrm/nouveau: initialize chan->fence.lock before use
Marcin Slusarz [Fri, 9 Sep 2011 12:16:42 +0000 (14:16 +0200)]
drm/nouveau: initialize chan->fence.lock before use

Fence lock needs to be initialized before any call to nouveau_channel_put
because it calls nouveau_channel_idle->nouveau_fence_update which uses
fence lock.

BUG: spinlock bad magic on CPU#0, test/24134
 lock: ffff88019f90dba8, .magic: 00000000, .owner: <none>/-1, .owner_cpu: 0
Pid: 24134, comm: test Not tainted 3.0.0-nv+ #800
Call Trace:
 spin_bug+0x9c/0xa3
 do_raw_spin_lock+0x29/0x13c
 _raw_spin_lock+0x1e/0x22
 nouveau_fence_update+0x2d/0xf1
 nouveau_channel_idle+0x22/0xa0
 nouveau_channel_put_unlocked+0x84/0x1bd
 nouveau_channel_put+0x20/0x24
 nouveau_channel_alloc+0x4ec/0x585
 nouveau_ioctl_fifo_alloc+0x50/0x130
 drm_ioctl+0x289/0x361
 do_vfs_ioctl+0x4dd/0x52c
 sys_ioctl+0x42/0x65
 system_call_fastpath+0x16/0x1b

It's easily triggerable from userspace.

Additionally remove double initialization of chan->fence.pending.

Signed-off-by: Marcin Slusarz <marcin.slusarz@gmail.com>
Cc: stable@kernel.org
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
12 years agodrm/nv50/vram: fix incorrect detection of bank count on newer chipsets
Ben Skeggs [Fri, 7 Oct 2011 06:00:31 +0000 (16:00 +1000)]
drm/nv50/vram: fix incorrect detection of bank count on newer chipsets

NVA3+ has an extra bit here compared to NV50:NVA3 chipsets.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
12 years agodrm/nv50/gr: typo fix, how about we not reset fifo during graph init?
Ben Skeggs [Thu, 29 Sep 2011 03:15:17 +0000 (13:15 +1000)]
drm/nv50/gr: typo fix, how about we not reset fifo during graph init?

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
12 years agodrm/nv50/bios: fixup mpll programming from the init table parser
Ben Skeggs [Fri, 23 Sep 2011 05:37:38 +0000 (15:37 +1000)]
drm/nv50/bios: fixup mpll programming from the init table parser

Reportedly this has been causing stability and corruption issues after
resuming from suspend for a few people.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
12 years agodrm/nouveau: fix oops if i2c bus not found in nouveau_i2c_identify()
Ben Skeggs [Thu, 22 Sep 2011 02:51:31 +0000 (12:51 +1000)]
drm/nouveau: fix oops if i2c bus not found in nouveau_i2c_identify()

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
12 years agodrm: make sure drm_vblank_init() has been called before touching vbl_lock
Ben Skeggs [Mon, 4 Jul 2011 02:52:27 +0000 (12:52 +1000)]
drm: make sure drm_vblank_init() has been called before touching vbl_lock

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
12 years agoMerge branch 'for-3.2/fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/olof...
Olof Johansson [Wed, 9 Nov 2011 21:38:52 +0000 (13:38 -0800)]
Merge branch 'for-3.2/fixes' of git://git./linux/kernel/git/olof/tegra into fixes

12 years agoBtrfs: rework error handling in btrfs_mount()
Ilya Dryomov [Wed, 9 Nov 2011 12:41:22 +0000 (14:41 +0200)]
Btrfs: rework error handling in btrfs_mount()

Commits 6c41761f and 45ea6095 introduced the possibility of NULL pointer
dereference on error paths, also we would leave all devices busy and
leak fs_info with all sub-structures on error when trying to mount an
already mounted fs to a different directory.

Fix this by doing all allocations before trying to open any of the
devices, adjust error path for mount-already-mounted-fs case.

Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
12 years agoBtrfs: close devices on all error paths in open_ctree()
Ilya Dryomov [Wed, 9 Nov 2011 11:26:37 +0000 (13:26 +0200)]
Btrfs: close devices on all error paths in open_ctree()

Fix a bug introduced by 7e662854 where we would leave devices busy on
certain error paths in open_ctree().  fs_info is guaranteed to be
non-NULL now so it's safe to dereference it on all error paths.

Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
12 years agoBtrfs: avoid null dereference and leaks when bailing from open_ctree()
Ilya Dryomov [Tue, 8 Nov 2011 22:08:15 +0000 (00:08 +0200)]
Btrfs: avoid null dereference and leaks when bailing from open_ctree()

Fix bugs introduced by 6c41761f.  Firstly, after failing to allocate any
of the tree roots (first 'goto fail' in open_ctree()) we would
dereference a NULL fs_info pointer in free_fs_info().  Secondly, after
failures from init_srcu_struct(), setup_bdi() and new_inode() we would
leak all earlier allocated roots: fs_info fields haven't been
initialized yet so free_fs_info() is rendered useless.

Fix this by initializing fs_info pointer and fs_info fields before any
allocations happen.

Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
12 years agoBtrfs: fix subvol_name leak on error in btrfs_mount()
Ilya Dryomov [Tue, 8 Nov 2011 17:15:05 +0000 (19:15 +0200)]
Btrfs: fix subvol_name leak on error in btrfs_mount()

btrfs_parse_early_options() can fail due to error while scanning devices
(-o device= option), but still strdup() subvol_name string:

mount -o subvol=SUBV,device=BAD_DEVICE <dev> <mnt>

So free subvol_name string on error.

Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
12 years agoBtrfs: fix memory leak in btrfs_parse_early_options()
Ilya Dryomov [Tue, 8 Nov 2011 14:47:55 +0000 (16:47 +0200)]
Btrfs: fix memory leak in btrfs_parse_early_options()

Don't leak subvol_name string in case multiple subvol= options are
given.  "The lastest option is effective" behavior (consistent with
subvolid= and subvolrootid= options) is preserved.

Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
12 years agoarm/tegra: enable headphone detection gpio on seaboard
Yufeng Shen [Fri, 28 Oct 2011 06:27:06 +0000 (06:27 +0000)]
arm/tegra: enable headphone detection gpio on seaboard

Enable the headphone detection gpio on tegra platform.

Signed-off-by: Yufeng Shen <miletus@chromium.org>
Acked-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Olof Johansson <olof@lixom.net>
12 years agoarm/dt: Fix ventana SDHCI power-gpios
Stephen Warren [Wed, 19 Oct 2011 06:53:57 +0000 (06:53 +0000)]
arm/dt: Fix ventana SDHCI power-gpios

Ventana uses the same SDHCI GPIOs as Seaboard; PI6 (70) is the power GPIO
for the SD port, and there is no power GPIO for the MMC chip.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Olof Johansson <olof@lixom.net>
12 years agoarm/tegra: Don't create duplicate gpio and pinmux devices
Stephen Warren [Tue, 25 Oct 2011 02:01:27 +0000 (02:01 +0000)]
arm/tegra: Don't create duplicate gpio and pinmux devices

*_pinmux_init() register the GPIO and pinmux devices so that they're ready
before any other device needs them.

*_pinmux_init() are also called by board-dt.c in order to set up the GPIO
and pinmux configurations. In this case, if we register the devices, they
end up being probed once due to this registration, and a second time due
to a device-tree node (or vice-versa). The second probe fails since the
memory regions are already requested. Besides, we don't actually want the
duplicated devices.

To avoid this duplicate registration, modify *_pinmux_init() to check
whether it's running on a DT machine. If not, register the pinmux devices.
If so, don't register them.

Finally, modify board-dt.c to call the *_pinmux_init() after all devices have
been instantiated from device-tree. This allows the GPIO and pinmux devices
to be instantiated and initialized before calling functions to configure the
hardware.

This has one disadvantage: The pinmux and GPIO initialization now happens
after /all/ devices are instantiated, rather than after just gpio and
pinmux but before anything else. So the correct HW configuration is not
in place when e.g. the SD/MMC device is probed. Long-term, this should be
solved by doing both:

a) Initializing the HW state from DT nodes during GPIO and pinmux device
   probe.
b) Using the deferred driver probe mechanism, so that drivers can defer
   their probe until after the gpio and pinmux drivers have probed.

v2: s/int is_dt/bool is_dt/
v3: Use of_machine_is_compatible inside *_pinmux_init() rather than passing
an explicit parameter into the function from outside.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Olof Johansson <olof@lixom.net>
12 years agoALSA: intel8x0: improve virtual environment detection
Konstantin Ozerkov [Wed, 9 Nov 2011 15:28:55 +0000 (19:28 +0400)]
ALSA: intel8x0: improve virtual environment detection

Detection code improved by PCI SSID usage. VM optimization
now enabled only for known devcices (skip host devices forwarded
to VM by VT-d or same kind of technology).
For debug/troubleshooting purposes optimization can be
forced (on/off) by module parameter: "inside_vm" (boolean).

Known devices (PCI SSID):
1af4:1100: Reserved for KVM devices. Note this is not yet
           implemented for KVM's ICH/AC'97 emulation.
1ab8:xxxx: Parallels ICH/AC'97 emulated sound.

[ fixed a minor coding-style issue by tiwai]

Signed-off-by: Konstantin Ozerkov <kozerkov@parallels.com>
Signed-off-by: Denis V. Lunev <den@openvz.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
12 years agoALSA: intel8x0: move virtual environment detection code into one place
Konstantin Ozerkov [Wed, 9 Nov 2011 15:28:54 +0000 (19:28 +0400)]
ALSA: intel8x0: move virtual environment detection code into one place

This is refactoring patch: preparation for add improved detection code.
Now all detection code placed in one place.

Signed-off-by: Konstantin Ozerkov <kozerkov@parallels.com>
Signed-off-by: Denis V. Lunev <den@openvz.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
12 years agoMerge branch 'at91-fixes' of git://github.com/at91linux/linux-at91 into fixes
Olof Johansson [Wed, 9 Nov 2011 16:59:35 +0000 (08:59 -0800)]
Merge branch 'at91-fixes' of git://github.com/at91linux/linux-at91 into fixes

12 years agoMerge branch 'imx/compile-fixes' of git://git.linaro.org/people/shawnguo/linux-2...
Olof Johansson [Wed, 9 Nov 2011 16:59:30 +0000 (08:59 -0800)]
Merge branch 'imx/compile-fixes' of git://git.linaro.org/people/shawnguo/linux-2.6 into fixes

12 years agoMerge branch 'mxs/fixes' of git://git.linaro.org/people/shawnguo/linux-2.6 into fixes
Olof Johansson [Wed, 9 Nov 2011 16:59:26 +0000 (08:59 -0800)]
Merge branch 'mxs/fixes' of git://git.linaro.org/people/shawnguo/linux-2.6 into fixes

12 years agoARM: at91: Fix USBA gadget registration
Jochen Friedrich [Tue, 25 Oct 2011 18:51:06 +0000 (20:51 +0200)]
ARM: at91: Fix USBA gadget registration

Since 193ab2a6070039e7ee2b9b9bebea754a7c52fd1b, various AT91 boards don't
register USBA adapters anymore due to depending on a now non-existing
symbol. Fix the symbol name.

Signed-off-by: Jochen Friedrich <jochen@scram.de>
Acked-by: Nicolas Ferre <nicolas.ferre@atmel.com>
CC: stable@kernel.org
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
12 years agoatmel/spi: fix missing probe
Jean-Christophe PLAGNIOL-VILLARD [Thu, 3 Nov 2011 17:20:21 +0000 (01:20 +0800)]
atmel/spi: fix missing probe

Commit 940ab889 "drivercore: Add helper macro for platform_driver boilerplate"
converted this driver to use module_platform_driver, but due to the use
of platform_driver_probe(), this resulted in the call to atmel_spi_probe being
lost. Place the call to this function into the driver structure.

fix section missmatch

atmel_spi_probe is marked __init where it's supposed to be __devinit
atmel_spi_remove is marked __exit where it's supposed to be __devexit

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Cc: Greg Kroah-Hartman <gregkh@suse.de>
Cc: Grant Likely <grant.likely@secretlab.ca>
Cc: Russell King - ARM Linux <linux@arm.linux.org.uk>
Acked-by: Nicolas Ferre <nicolas.ferre@atmel.com>
12 years agoat91/yl-9200: Fix section mismatch
Jean-Christophe PLAGNIOL-VILLARD [Mon, 19 Sep 2011 11:26:52 +0000 (19:26 +0800)]
at91/yl-9200: Fix section mismatch

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
12 years agoat91: vmalloc fix missing AT91_VIRT_BASE define
Jean-Christophe PLAGNIOL-VILLARD [Wed, 2 Nov 2011 07:02:43 +0000 (15:02 +0800)]
at91: vmalloc fix missing AT91_VIRT_BASE define

VMALLOC_END is defined in terms of AT91_VIRT_BASE but this needs
mach/hardware.h for it's definition.

In file included from arch/arm/mach-at91/board-usb-a926x.c:26:0:
include/linux/mm.h: In function 'is_vmalloc_addr':
include/linux/mm.h:305:41: error: 'AT91_VIRT_BASE' undeclared (first use in this function)
include/linux/mm.h:305:41: note: each undeclared identifier is reported only once for each function it appears in

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Cc: Nicolas Ferre <nicolas.ferre@atmel.com>
Signed-off-by: Jamie Iles <jamie@jamieiles.com>
12 years agoARM: at91: usart: drop static map regs for dbgu
Jean-Christophe PLAGNIOL-VILLARD [Sun, 18 Sep 2011 01:56:35 +0000 (09:56 +0800)]
ARM: at91: usart: drop static map regs for dbgu

In commit fb149f9e28354 we introduce ioremap support for static map_io, we do
not need this register entry anymore.

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com>
12 years agopinctrl: fix "warning: 'struct pinctrl_dev' declared inside parameter list"
Barry Song [Fri, 28 Oct 2011 03:38:24 +0000 (20:38 -0700)]
pinctrl: fix "warning: 'struct pinctrl_dev' declared inside parameter list"

when pinctl subsystem is not selected, when compiling drivers including
the include/linux/pinctrl/pinctrl.h, we will get the warning as below:
In file included from include/linux/pinctrl/pinmux.h:17,
                 from drivers/tty/serial/sirfsoc_uart.c:25:
include/linux/pinctrl/pinctrl.h:126: warning: 'struct pinctrl_dev'
declared inside parameter list
include/linux/pinctrl/pinctrl.h:126: warning: its scope is only this
      definition or declaration, which is probably not what you want

Signed-off-by: Barry Song <Baohua.Song@csr.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
12 years agokbuild: Fix missing system calls check on mips.
David Daney [Tue, 8 Nov 2011 18:20:10 +0000 (10:20 -0800)]
kbuild: Fix missing system calls check on mips.

Commit 5f7efb4 (Kbuild: append missing-syscalls to the default target
list) broke MIPS build.

Reported-tested-and-acked-by: Ralf Baechle <ralf@linux-mips.org>
Signed-off-by: David Daney <david.daney@cavium.com>
Signed-off-by: Michal Marek <mmarek@suse.cz>
12 years agoALSA: snd_usb_audio: add Logitech HD Webcam c510 to quirk-384
Alexey Fisher [Wed, 9 Nov 2011 10:39:24 +0000 (11:39 +0100)]
ALSA: snd_usb_audio: add Logitech HD Webcam c510 to quirk-384

Logitech HD Webcam c510 provide wrong mixer resolution.
Add it to "res = 384" quirk.

Signed-off-by: Alexey Fisher <bug-track@fisher-privat.net>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
12 years agoALSA: hda - fix internal mic on Dell Vostro 3500 laptop
Julian Wollrath [Wed, 9 Nov 2011 09:02:40 +0000 (10:02 +0100)]
ALSA: hda - fix internal mic on Dell Vostro 3500 laptop

Fix the not working internal mic on Dell Vostro 3500 laptop by introducing the
new model dell-vostro-3500.

Signed-off-by: Julian Wollrath <jwollrath@web.de>
Cc: <stable@kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
12 years agoARM: picoxcell: add extra temp register to addruart
Jamie Iles [Fri, 4 Nov 2011 01:13:20 +0000 (01:13 +0000)]
ARM: picoxcell: add extra temp register to addruart

639da5ee3 (ARM: add an extra temp register to the low level debugging
addruart macro) didn't include picoxcell as it hadn't been merged at the
time.  Fix up the compile breakage by adding the extra temp parameter.

Signed-off-by: Jamie Iles <jamie@jamieiles.com>
12 years agoMerge branch 'fix/asoc' into for-linus
Takashi Iwai [Wed, 9 Nov 2011 07:52:22 +0000 (08:52 +0100)]
Merge branch 'fix/asoc' into for-linus

12 years agoALSA: HDA: Remove quirk for Toshiba T110
David Henningsson [Tue, 8 Nov 2011 19:37:26 +0000 (20:37 +0100)]
ALSA: HDA: Remove quirk for Toshiba T110

According to the bug reporter, model=auto is needed to make the
internal microphone work.

BugLink: https://bugs.launchpad.net/bugs/819699
Reported-by: Andrej (agno01)
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
12 years ago[libata] ahci: Add ASMedia ASM1061 support
Keng-Yu Lin [Wed, 9 Nov 2011 06:47:36 +0000 (01:47 -0500)]
[libata] ahci: Add ASMedia ASM1061 support

Signed-off-by: Keng-Yu Lin <kengyu@canonical.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
12 years ago[libata] Issue SRST to Sil3726 PMP
Gwendal Grignou [Thu, 20 Oct 2011 00:17:02 +0000 (17:17 -0700)]
[libata] Issue SRST to Sil3726 PMP

Reenable sending SRST to devices connected behind a Sil3726 PMP.
This allow staggered spinups and handles drives that spins up slowly.

While the drives spin up, the PMP will not accept SRST.
Most controller reissues the reset until the drive is ready, while
some [Sil3124] returns an error.
In ata_eh_error, wait 10s before reset the ATA port and try again.

Signed-off-by: Gwendal Grignou <gwendal@google.com>
Acked-by: Tejun Heo <tj@kernel.org>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
12 years agosata_sis.c: trivial spelling fix
Chris Dunlop [Sun, 23 Oct 2011 23:38:18 +0000 (10:38 +1100)]
sata_sis.c: trivial spelling fix

Trivial spelling fix.

Signed-off-by: Chris Dunlop <chris@onthe.net.au>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
12 years agoahci_platform: use dev_get_platdata()
JiSheng Zhang [Mon, 31 Oct 2011 13:20:10 +0000 (21:20 +0800)]
ahci_platform: use dev_get_platdata()

Use dev_get_platdata() to retrieve the struct ahci_platform_data data
from the platform.

Signed-off-by: JiSheng Zhang <jszhang3@gmail.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
12 years ago[libata] libata-scsi.c: Add function parameter documentation
Marcos Paulo de Souza [Tue, 1 Nov 2011 01:50:16 +0000 (23:50 -0200)]
[libata] libata-scsi.c: Add function parameter documentation

Add the documentation of parameters of ata_change_queue_depth to silence the warning of make xmldocs

Signed-off-by: Marcos paulo de Souza <marcos.mage@gmail.com>
Acked-by: Randy Dunlap <rdunlap@xenotime.net>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
12 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/paulg/linux
Linus Torvalds [Wed, 9 Nov 2011 02:34:16 +0000 (18:34 -0800)]
Merge branch 'for-linus' of git://git./linux/kernel/git/paulg/linux

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/paulg/linux:
  drivers/media: video/a5k6aa is a module and so needs module.h
  mfd: fix build failures in recently added ab5500 code
  hwspinlock/u8500: include linux/module.h
  MTD: MAPS: bcm963xx-flash.c: explicitly include module.h

12 years agoMerge branch 'for-linus' of git://neil.brown.name/md
Linus Torvalds [Wed, 9 Nov 2011 02:33:53 +0000 (18:33 -0800)]
Merge branch 'for-linus' of git://neil.brown.name/md

* 'for-linus' of git://neil.brown.name/md:
  md/raid5: STRIPE_ACTIVE has lock semantics, add barriers
  md/raid5: abort any pending parity operations when array fails.

12 years agoMerge branch 'docs-move' of git://git.kernel.org/pub/scm/linux/kernel/git/rdunlap...
Linus Torvalds [Wed, 9 Nov 2011 02:33:11 +0000 (18:33 -0800)]
Merge branch 'docs-move' of git://git./linux/kernel/git/rdunlap/linux-docs

* 'docs-move' of git://git.kernel.org/pub/scm/linux/kernel/git/rdunlap/linux-docs: (45 commits)
  DocBook/drm: Clean up a todo-note
  DocBook/drm: `device aware' -> `device-aware'
  DocBook/drm: `(device|driver) specific' -> `(device|driver)-specific'
  DocBook/drm: Clean up the paragraph on framebuffer objects
  DocBook/drm: Use `; otherwise,'
  DocBook/drm: Better flow with `, and then'
  DocBook/drm: Refer to the domain-setting function as a device-specific ioctl
  DocBook/drm: Improve flow of GPU/CPU coherence sentence
  DocBook/drm: Use an <itemizelist> for fundamental GEM operations
  DocBook/drm: Insert a comma
  DocBook/drm: Use a <variablelist> for vblank ioctls
  DocBook/drm: Use an itemizedlist for what an encoder needs to provide
  DocBook/drm: Insert `the' for readability, and change `set' to `setting'
  DocBook/drm: Remove extraneous commas
  DocBook/drm: Use a colon
  DocBook/drm: Clarify `final initialization' via better formatting
  DocBook/drm: Remove redundancy
  DocBook/drm: Insert `it' for smooth reading
  DocBook/drm: The word `so-called'; I do not think it connotes what you think it connotes
  DocBook/drm: Use a singular subject for grammatical cleanliness
  ...

12 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt...
Linus Torvalds [Tue, 8 Nov 2011 23:41:10 +0000 (15:41 -0800)]
Merge branch 'for-linus' of git://git./linux/kernel/git/rostedt/linux-ktest

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-ktest: (21 commits)
  ktest: Evaluate variables entered on the command line
  ktest: Add variable ${PWD}
  ktest: Add another monitor flush before installing kernel
  ktest: Do not opencode reboot in grub setting
  ktest: Add processing of complex conditionals
  ktest: Fix parsing of config section lines
  ktest: Sort make_min_config configs by dependecies
  ktest: Add DEFINED keyword for IF statements
  ktest: Add OVERRIDE keyword to DEFAULTS section
  ktest: Consolidate TEST_TYPE and DEFAULT code
  ktest: Add INCLUDE keyword to include other config files
  ktest: Let IF keyword take comparisons
  ktest: Add IF and ELSE to config sections
  ktest: Do not reboot on config or build issues
  ktest: Add option REBOOT_SUCCESS_LINE to stop waiting after a reboot
  ktest: Add NO_INSTALL option to not install for a test
  ktest: Fail when grub menu not found
  ktest: Include monitor in reboot code
  ktest: Only need to save .config when doing mrproper
  ktest: Create outputdir if it does not exist
  ...

12 years agoMerge branch 'pm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm
Linus Torvalds [Tue, 8 Nov 2011 22:24:18 +0000 (14:24 -0800)]
Merge branch 'pm-fixes' of git://git./linux/kernel/git/rafael/linux-pm

* 'pm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm:
  PM / OPP: Use ERR_CAST instead of ERR_PTR(PTR_ERR())
  PM / devfreq: fix private_data
  Documentation: Fix typo in freezer-subsystem.txt
  PM / QoS: Set cpu_dma_pm_qos->name

12 years agom68k/mac: Remove mac_irq_{en,dis}able() wrappers
Finn Thain [Sun, 11 Sep 2011 13:40:50 +0000 (23:40 +1000)]
m68k/mac: Remove mac_irq_{en,dis}able() wrappers

Signed-off-by: Finn Thain <fthain@telegraphics.com.au>
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
12 years agom68k/irq: Remove obsolete support for user vector interrupt fixups
Geert Uytterhoeven [Sun, 11 Sep 2011 09:54:50 +0000 (11:54 +0200)]
m68k/irq: Remove obsolete support for user vector interrupt fixups

It was used on Apollo only, before its conversion to genirq.

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
12 years agom68k/irq: Remove obsolete m68k irq framework
Geert Uytterhoeven [Sun, 11 Sep 2011 09:28:04 +0000 (11:28 +0200)]
m68k/irq: Remove obsolete m68k irq framework

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
12 years agom68k/q40: Convert Q40/Q60 to genirq
Geert Uytterhoeven [Thu, 18 Aug 2011 12:47:16 +0000 (14:47 +0200)]
m68k/q40: Convert Q40/Q60 to genirq

q40_irq_handler() must be kept to translate ISA IRQs to the range 1-15.
q40_probe_irq_o{ff,n}() become unused.

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Richard Zidlicky <rz@linux-m68k.org>
12 years agom68k/sun3: Convert Sun3/3x to genirq
Geert Uytterhoeven [Thu, 18 Aug 2011 12:46:46 +0000 (14:46 +0200)]
m68k/sun3: Convert Sun3/3x to genirq

Replace the custom irq handler that masks the irq and calls do_IRQ(), and
the unmasking in the individual handlers, by handle_level_irq().

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Sam Creasey <sammy@sammy.net>
12 years agom68k/sun3: Use the kstat_irqs_cpu() wrapper
Geert Uytterhoeven [Thu, 18 Aug 2011 20:46:01 +0000 (22:46 +0200)]
m68k/sun3: Use the kstat_irqs_cpu() wrapper

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Acked-by: Sam Creasey <sammy@sammy.net>
12 years agom68k/apollo: Convert Apollo to genirq
Geert Uytterhoeven [Thu, 18 Aug 2011 12:45:57 +0000 (14:45 +0200)]
m68k/apollo: Convert Apollo to genirq

Replace the custom user vector interrupt handler that calls do_IRQ() and
does an EOI by handle_fasteoi_irq().

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Peter De Schrijver <p2@debian.org>
12 years agom68k/vme: Convert VME to genirq
Geert Uytterhoeven [Sat, 13 Aug 2011 19:11:00 +0000 (21:11 +0200)]
m68k/vme: Convert VME to genirq

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Richard Hirst <rhirst@parisc-linux.org>
12 years agom68k/hp300: Convert HP9000/300 and HP9000/400 to genirq
Geert Uytterhoeven [Sat, 13 Aug 2011 19:02:22 +0000 (21:02 +0200)]
m68k/hp300: Convert HP9000/300 and HP9000/400 to genirq

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Philip Blundell <philb@gnu.org>
12 years agom68k/mac: Optimize interrupts using chain handlers
Geert Uytterhoeven [Wed, 10 Aug 2011 10:48:29 +0000 (12:48 +0200)]
m68k/mac: Optimize interrupts using chain handlers

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
12 years agom68k/mac: Convert Mac to genirq
Geert Uytterhoeven [Wed, 13 Jul 2011 19:48:30 +0000 (21:48 +0200)]
m68k/mac: Convert Mac to genirq

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
12 years agom68k/amiga: Optimize interrupts using chain handlers
Geert Uytterhoeven [Wed, 1 Jun 2011 09:49:18 +0000 (11:49 +0200)]
m68k/amiga: Optimize interrupts using chain handlers

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
12 years agom68k/amiga: Convert Amiga to genirq
Geert Uytterhoeven [Tue, 31 May 2011 20:08:28 +0000 (22:08 +0200)]
m68k/amiga: Convert Amiga to genirq

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
12 years agom68k/amiga: Refactor amiints.c
Geert Uytterhoeven [Tue, 31 May 2011 09:11:01 +0000 (11:11 +0200)]
m68k/amiga: Refactor amiints.c

  - Remove filename in comments,
  - Reorder functions so we no longer need forward declarations.

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
12 years agom68k/atari: Remove code and comments about different irq types
Geert Uytterhoeven [Thu, 18 Aug 2011 17:36:30 +0000 (19:36 +0200)]
m68k/atari: Remove code and comments about different irq types

This code was obsoleted during the irq restructuring in 2006.

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
12 years agom68k/atari: Convert Atari to genirq
Geert Uytterhoeven [Fri, 29 Apr 2011 21:35:21 +0000 (23:35 +0200)]
m68k/atari: Convert Atari to genirq

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
[v1] Acked-by: Thomas Gleixner <tglx@linutronix.de>

12 years agom68k/irq: Add genirq support
Geert Uytterhoeven [Thu, 21 Apr 2011 20:50:52 +0000 (22:50 +0200)]
m68k/irq: Add genirq support

Disabled on all platforms for now

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
[v1] Acked-by: Thomas Gleixner <tglx@linutronix.de>

12 years agom68k/irq: Remove obsolete IRQ_FLG_* users
Geert Uytterhoeven [Wed, 13 Jul 2011 20:33:13 +0000 (22:33 +0200)]
m68k/irq: Remove obsolete IRQ_FLG_* users

The m68k core irq code stopped honoring these flags during the irq
restructuring in 2006.

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
12 years agom68k/irq: Rename {,__}m68k_handle_int()
Geert Uytterhoeven [Fri, 1 Jul 2011 18:39:19 +0000 (20:39 +0200)]
m68k/irq: Rename {,__}m68k_handle_int()

  - Rename m68k_handle_int() to generic_handle_irq(), and drop the unneeded
    asmlinkage,
  - Rename __m68k_handle_int() to do_IRQ().

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
12 years agom68k/irq: Add m68k_setup_irq_controller()
Geert Uytterhoeven [Wed, 1 Jun 2011 09:15:21 +0000 (11:15 +0200)]
m68k/irq: Add m68k_setup_irq_controller()

This is a wrapper around m68k_setup_irq_chip() that discards its dummy
second parameter, to ease the future transition to genirq.

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
12 years agom68k/irq: Extract irq_set_chip()
Geert Uytterhoeven [Fri, 27 May 2011 20:33:41 +0000 (22:33 +0200)]
m68k/irq: Extract irq_set_chip()

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Acked-by: Thomas Gleixner <tglx@linutronix.de>
12 years agom68k/irq: Rename setup_irq() to m68k_setup_irq() and make it static
Geert Uytterhoeven [Tue, 19 Apr 2011 18:10:53 +0000 (20:10 +0200)]
m68k/irq: Rename setup_irq() to m68k_setup_irq() and make it static

It has nothing to do with the standard one in <linux/irq.h>

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Acked-by: Thomas Gleixner <tglx@linutronix.de>
12 years agom68k/irq: Switch irq_chip methods to "struct irq_data *data"
Geert Uytterhoeven [Sun, 17 Apr 2011 20:53:04 +0000 (22:53 +0200)]
m68k/irq: Switch irq_chip methods to "struct irq_data *data"

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Acked-by: Thomas Gleixner <tglx@linutronix.de>
12 years agom68k/irq: Rename irq_node to irq_data
Geert Uytterhoeven [Sun, 17 Apr 2011 19:59:23 +0000 (21:59 +0200)]
m68k/irq: Rename irq_node to irq_data

Make it more similar to the genirq version:
  - Add an irq field

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Acked-by: Thomas Gleixner <tglx@linutronix.de>
12 years agom68k/irq: Kill irq_node_t typedef, always use struct irq_node
Geert Uytterhoeven [Sun, 17 Apr 2011 19:39:08 +0000 (21:39 +0200)]
m68k/irq: Kill irq_node_t typedef, always use struct irq_node

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Acked-by: Thomas Gleixner <tglx@linutronix.de>
12 years agom68k/irq: Rename irq_controller to irq_chip
Geert Uytterhoeven [Wed, 13 Apr 2011 20:31:28 +0000 (22:31 +0200)]
m68k/irq: Rename irq_controller to irq_chip

Make it more similar to the genirq version:
  - Remove lock (unused as we don't do SMP anyway),
  - Prepend methods with irq_,
  - Make irq_startup() return unsigned int.

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Acked-by: Thomas Gleixner <tglx@linutronix.de>
12 years agoide-{cd,floppy,tape}: Do not include <linux/irq.h>
Geert Uytterhoeven [Wed, 25 May 2011 19:40:59 +0000 (21:40 +0200)]
ide-{cd,floppy,tape}: Do not include <linux/irq.h>

The top of <linux/irq.h> has this comment:

 * Please do not include this file in generic code.  There is currently
 * no requirement for any architecture to implement anything held
 * within this file.
 *
 * Thanks. --rmk

Remove inclusion of <linux/irq.h>, to prevent the following compile error
from happening soon:

| include/linux/irq.h:132: error: redefinition of ‘struct irq_data’
| include/linux/irq.h:286: error: redefinition of ‘struct irq_chip’

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Acked-by: Thomas Gleixner <tglx@linutronix.de>
Acked-by: Borislav Petkov <bp@alien8.de>
Cc: linux-ide@vger.kernel.org
12 years agom68k: Revive lost DIO bus config option
Geert Uytterhoeven [Fri, 28 Oct 2011 20:37:21 +0000 (22:37 +0200)]
m68k: Revive lost DIO bus config option

commit 0e152d80507b75c00aac60f2ffc586360687cd52 ("m68k: reorganize Kconfig
options to improve mmu/non-mmu selections") accidentally dropped the DIO
bus config option. Re-add it to the "Bus support" section.

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
12 years agom68k: Revive lost ARAnyM config options
Geert Uytterhoeven [Tue, 25 Oct 2011 19:14:10 +0000 (21:14 +0200)]
m68k: Revive lost ARAnyM config options

commit 0e152d80507b75c00aac60f2ffc586360687cd52 ("m68k: reorganize Kconfig
options to improve mmu/non-mmu selections") accidentally dropped the ARAnyM
config options. Re-add them to the "Platform devices" section.

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Acked-by: Greg Ungerer <gerg@uclinux.org>
12 years agoPM / OPP: Use ERR_CAST instead of ERR_PTR(PTR_ERR())
Thomas Meyer [Tue, 8 Nov 2011 21:34:00 +0000 (22:34 +0100)]
PM / OPP: Use ERR_CAST instead of ERR_PTR(PTR_ERR())

Use ERR_CAST inlined function instead of ERR_PTR(PTR_ERR(...))

[The semantic patch that makes this change is available
 in scripts/coccinelle/api/err_cast.cocci.

 More information about semantic patching is available at
 http://coccinelle.lip6.fr/]

Signed-off-by: Thomas Meyer <thomas@m3y3r.de>
Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
12 years agoMerge branch 'fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/ohad/hwspinlock
Linus Torvalds [Tue, 8 Nov 2011 20:50:54 +0000 (12:50 -0800)]
Merge branch 'fixes' of git://git./linux/kernel/git/ohad/hwspinlock

* 'fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/ohad/hwspinlock:
  hwspinlock/u8500: fix build error due to undefined label
  hwspinlock: Don't return a value in __hwspin_unlock

12 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc
Linus Torvalds [Tue, 8 Nov 2011 20:50:02 +0000 (12:50 -0800)]
Merge git://git./linux/kernel/git/davem/sparc

* git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc:
  sparc: Hook up process_vm_{readv,writev} syscalls.

12 years agox86 platform drivers: add POWER_SUPPLY to selected drivers for Dell
Linus Torvalds [Tue, 8 Nov 2011 20:49:29 +0000 (12:49 -0800)]
x86 platform drivers: add POWER_SUPPLY to selected drivers for Dell

The Kconfig loop detection goes crazy without this.

Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
12 years agoBtrfs: fix our reservations for updating an inode when completing io
Josef Bacik [Tue, 8 Nov 2011 20:47:34 +0000 (15:47 -0500)]
Btrfs: fix our reservations for updating an inode when completing io

People have been reporting ENOSPC crashes in finish_ordered_io.  This is because
we try to steal from the delalloc block rsv to satisfy a reservation to update
the inode.  The problem with this is we don't explicitly save space for updating
the inode when doing delalloc.  This is kind of a problem and we've gotten away
with this because way back when we just stole from the delalloc reserve without
any questions, and this worked out fine because generally speaking the leaf had
been modified either by the mtime update when we did the original write or
because we just updated the leaf when we inserted the file extent item, only on
rare occasions had the leaf not actually been modified, and that was still ok
because we'd just use a block or two out of the over-reservation that is
delalloc.

Then came the delayed inode stuff.  This is amazing, except it wants a full
reservation for updating the inode since it may do it at some point down the
road after we've written the blocks and we have to recow everything again.  This
worked out because the delayed inode stuff just stole from the global reserve,
that is until recently when I changed that because it caused other problems.

So here we are, we're doing everything right and being screwed for it.  So take
an extra reservation for the inode at delalloc reservation time and carry it
through the life of the delalloc reservation.  If we need it we can steal it in
the delayed inode stuff.  If we have already stolen it try and do a normal
metadata reservation.  If that fails try to steal from the delalloc reservation.
If _that_ fails we'll get a WARN_ON() so I can start thinking of a better way to
solve this and in the meantime we'll steal from the global reserve.

With this patch I ran xfstests 13 in a loop for a couple of hours and didn't see
any problems.

Signed-off-by: Josef Bacik <josef@redhat.com>
Signed-off-by: Chris Mason <chris.mason@oracle.com>
12 years agox86 platform drivers: make Dell laptop driver select needed LED support
Linus Torvalds [Tue, 8 Nov 2011 20:17:25 +0000 (12:17 -0800)]
x86 platform drivers: make Dell laptop driver select needed LED support

Otherwise we get compile errors like this:

  ERROR: "led_classdev_unregister" [drivers/platform/x86/dell-laptop.ko] undefined!
  ERROR: "led_classdev_register" [drivers/platform/x86/dell-laptop.ko] undefined!
  make[1]: *** [__modpost] Error 1
  make: *** [modules] Error 2

when the dell-laptop support is enabled without the necessary LED
support being enabled.

Reported-by: Alessandro Suardi <alessandro.suardi@gmail.com>
Acked-by: Matthew Garrett <mjg59@srcf.ucam.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
12 years agodrivers/media: video/a5k6aa is a module and so needs module.h
Paul Gortmaker [Tue, 8 Nov 2011 19:56:50 +0000 (14:56 -0500)]
drivers/media: video/a5k6aa is a module and so needs module.h

This file uses core functions like module_init() and module_exit()
and so it explicitly needs to include the module.h header.

Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
12 years agoBtrfs: fix oops on NULL trans handle in btrfs_truncate
Chris Mason [Tue, 8 Nov 2011 19:49:59 +0000 (14:49 -0500)]
Btrfs: fix oops on NULL trans handle in btrfs_truncate

If we fail to reserve space in the transaction during truncate, we can
error out with a NULL trans handle.  The cleanup code needs an extra
check to make sure we aren't trying to use the bad handle.

Signed-off-by: Chris Mason <chris.mason@oracle.com>
12 years agoMerge branch 'for_3.2/gpio-cleanup' of git://gitorious.org/khilman/linux-omap-pm...
Grant Likely [Tue, 8 Nov 2011 19:48:27 +0000 (12:48 -0700)]
Merge branch 'for_3.2/gpio-cleanup' of git://gitorious.org/khilman/linux-omap-pm into gpio/merge

12 years agon_gsm: Fix timings
Alan Cox [Tue, 8 Nov 2011 18:02:10 +0000 (18:02 +0000)]
n_gsm: Fix timings

Alek Du reported that the code erroneously applies time to jiffies
conversions twice to the t1 and t2 values. In normal use on a modem link
this cases no visible problem but on a slower link it will break as with
HZ=1000 as is typical we are running t1/t2 ten times too fast.

Alek's original patch removed the conversion from the timer setting but we
in fact have to be more careful as the contents of t1/t2 are visible via
the device API and we thus need to correct the constants.

Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
12 years agoARM: msm: fix compilation flags for MSM_SCM
Marc Zyngier [Tue, 8 Nov 2011 13:07:36 +0000 (13:07 +0000)]
ARM: msm: fix compilation flags for MSM_SCM

CONFIG_MSM_SCM uses the smc instruction, which with some
toolchains requires a ".arch_extension" directive.

Cc: David Brown <davidb@codeaurora.org>
Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
Signed-off-by: David Brown <davidb@codeaurora.org>
12 years agoALSA: usb-audio - Fix the missing volume quirks at delayed init
Takashi Iwai [Tue, 8 Nov 2011 16:50:27 +0000 (17:50 +0100)]
ALSA: usb-audio - Fix the missing volume quirks at delayed init

In the recent usb-audio driver, the initialization of volume ranges
may be delayed when the device doesn't respond well at the probing time.
But the volume quirks for certain devices are applied only in
mixer_ctl_feature_info() thus only at the very first probe and will be
missing when the volume range is initialized later.

This patch moves the volume quirk code to be always called from the
volume-range extraction (get_min_max()), so that the quirks are properly
applied in the later init time.

Reported-and-tested-by: Alexey Fisher <bug-track@fisher-privat.net>
Cc: <stable@kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
12 years agoxfs: fix force shutdown handling in xfs_end_io
Christoph Hellwig [Tue, 8 Nov 2011 08:56:15 +0000 (08:56 +0000)]
xfs: fix force shutdown handling in xfs_end_io

Ensure ioend->io_error gets propagated back to e.g. AIO completions.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Alex Elder <aelder@sgi.com>
12 years agoxfs: constify xfs_item_ops
Christoph Hellwig [Fri, 28 Oct 2011 09:54:24 +0000 (09:54 +0000)]
xfs: constify xfs_item_ops

The log item ops aren't nessecarily the biggest exploit vector, but marking
them const is easy enough.  Also remove the unused xfs_item_ops_t typedef
while we're at it.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Dave Chinner <dchinner@redhat.com>
Reviewed-by: Alex Elder <aelder@sgi.com>
12 years agoxfs: Fix possible memory corruption in xfs_readlink
Carlos Maiolino [Mon, 7 Nov 2011 16:10:24 +0000 (16:10 +0000)]
xfs: Fix possible memory corruption in xfs_readlink

Fixes a possible memory corruption when the link is larger than
MAXPATHLEN and XFS_DEBUG is not enabled. This also remove the
S_ISLNK assert, since the inode mode is checked previously in
xfs_readlink_by_handle() and via VFS.

Updated to address concerns raised by Ben Hutchings about the loose
attention paid to 32- vs 64-bit values, and the lack of handling a
potentially negative pathlen value:
 - Changed type of "pathlen" to be xfs_fsize_t, to match that of
   ip->i_d.di_size
 - Added checking for a negative pathlen to the too-long pathlen
   test, and generalized the message that gets reported in that case
   to reflect the change
As a result, if a negative pathlen were encountered, this function
would return EFSCORRUPTED (and would fail an assertion for a debug
build)--just as would a too-long pathlen.

Signed-off-by: Alex Elder <aelder@sgi.com>
Signed-off-by: Carlos Maiolino <cmaiolino@redhat.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
12 years agoiommu: omap: Fix compile failure
Ming Lei [Tue, 8 Nov 2011 10:29:15 +0000 (18:29 +0800)]
iommu: omap: Fix compile failure

Fix compile failure in drivers/iommu/omap-iommu-debug.c
because of missing module.h include.

Signed-off-by: Ming Lei <tom.leiming@gmail.com>
Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>