pandora-kernel.git
12 years ago[SCSI] zfcp: return early from slave_destroy if slave_alloc returned early
Steffen Maier [Fri, 18 Nov 2011 19:00:40 +0000 (20:00 +0100)]
[SCSI] zfcp: return early from slave_destroy if slave_alloc returned early

zfcp_scsi_slave_destroy erroneously always tried to finish its task
even if the corresponding previous zfcp_scsi_slave_alloc returned
early. This can lead to kernel page faults on accessing uninitialized
fields of struct zfcp_scsi_dev in zfcp_erp_lun_shutdown_wait. Take the
port field of the struct to determine if slave_alloc returned early.

This zfcp bug is exposed by 4e6c82b (in turn fixing f7c9c6b to be
compatible with 21208ae) which can call slave_destroy for a
corresponding previous slave_alloc that did not finish.

This patch is based on James Bottomley's fix suggestion in
http://www.spinics.net/lists/linux-scsi/msg55449.html.

Signed-off-by: Steffen Maier <maier@linux.vnet.ibm.com>
Cc: <stable@kernel.org> #2.6.38+
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
12 years ago[SCSI] fcoe: Fix preempt count leak in fcoe_filter_frames()
Thomas Gleixner [Fri, 11 Nov 2011 19:52:01 +0000 (20:52 +0100)]
[SCSI] fcoe: Fix preempt count leak in fcoe_filter_frames()

The error exit path leaks preempt count. Add the missing put_cpu().

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Reviewed-by: Yi Zou <yi.zou@intel.com>
Cc: stable@kernel.org
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
12 years agoperf events: Fix ring_buffer_wakeup() brown paperbag bug
Will Deacon [Tue, 13 Dec 2011 19:40:45 +0000 (20:40 +0100)]
perf events: Fix ring_buffer_wakeup() brown paperbag bug

Commit 10c6db11 ("perf: Fix loss of notification with multi-event")
seems to unconditionally dereference event->rb in the wakeup handler,
this is wrong, there might not be a buffer attached.

Signed-off-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Link: http://lkml.kernel.org/r/20111213152651.GP20297@mudshark.cambridge.arm.com
[ minor edits ]
Signed-off-by: Ingo Molnar <mingo@elte.hu>
12 years agofs/ncpfs: fix error paths and goto statements in ncp_fill_super()
Djalal Harouni [Tue, 13 Dec 2011 01:47:29 +0000 (02:47 +0100)]
fs/ncpfs: fix error paths and goto statements in ncp_fill_super()

The label 'out_bdi' should be followed by bdi_destroy() instead of
fput() which should be after the 'out_fput' label.

If bdi_setup_and_register() fails then jump to the 'out_fput' label
instead of the 'out_bdi' one.

If fget(data.info_fd) fails then jump to the previously fixed 'out_bdi'
label to call bdi_destroy() otherwise the bdi object will not be
destroyed.

Compile tested only.

Signed-off-by: Djalal Harouni <tixxdz@opendz.org>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
12 years agoext4: handle EOF correctly in ext4_bio_write_page()
Yongqiang Yang [Wed, 14 Dec 2011 03:29:12 +0000 (22:29 -0500)]
ext4: handle EOF correctly in ext4_bio_write_page()

We need to zero out part of a page which beyond EOF before setting uptodate,
otherwise, mapread or write will see non-zero data beyond EOF.

Signed-off-by: Yongqiang Yang <xiaoqiangnk@gmail.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Cc: stable@kernel.org
12 years agoext4: remove a wrong BUG_ON in ext4_ext_convert_to_initialized
Yongqiang Yang [Wed, 14 Dec 2011 03:13:42 +0000 (22:13 -0500)]
ext4: remove a wrong BUG_ON in ext4_ext_convert_to_initialized

If a file is fallocated on a hole, map->m_lblk + map->m_len may be greater
than ee_block + ee_len.

Signed-off-by: Yongqiang Yang <xiaoqiangnk@gmail.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Cc: stable@kernel.org
12 years agoext4: correctly handle pages w/o buffers in ext4_discard_partial_buffers()
Yongqiang Yang [Wed, 14 Dec 2011 03:05:05 +0000 (22:05 -0500)]
ext4: correctly handle pages w/o buffers in ext4_discard_partial_buffers()

If a page has been read into memory and never been written, it has no
buffers, but we should handle the page in truncate or punch hole.

VFS code of writing operations has handled holes correctly, so this
patch removes the code handling holes in writing operations.

Signed-off-by: Yongqiang Yang <xiaoqiangnk@gmail.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Cc: stable@kernel.org
12 years agoext4: avoid potential hang in mpage_submit_io() when blocksize < pagesize
Yongqiang Yang [Wed, 14 Dec 2011 02:51:55 +0000 (21:51 -0500)]
ext4: avoid potential hang in mpage_submit_io() when blocksize < pagesize

If there is an unwritten but clean buffer in a page and there is a
dirty buffer after the buffer, then mpage_submit_io does not write the
dirty buffer out.  As a result, da_writepages loops forever.

This patch fixes the problem by checking dirty flag.

Signed-off-by: Yongqiang Yang <xiaoqiangnk@gmail.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Cc: stable@kernel.org
12 years agoext4: avoid hangs in ext4_da_should_update_i_disksize()
Andrea Arcangeli [Wed, 14 Dec 2011 02:41:15 +0000 (21:41 -0500)]
ext4: avoid hangs in ext4_da_should_update_i_disksize()

If the pte mapping in generic_perform_write() is unmapped between
iov_iter_fault_in_readable() and iov_iter_copy_from_user_atomic(), the
"copied" parameter to ->end_write can be zero. ext4 couldn't cope with
it with delayed allocations enabled. This skips the i_disksize
enlargement logic if copied is zero and no new data was appeneded to
the inode.

 gdb> bt
 #0  0xffffffff811afe80 in ext4_da_should_update_i_disksize (file=0xffff88003f606a80, mapping=0xffff88001d3824e0, pos=0x1\
 08000, len=0x1000, copied=0x0, page=0xffffea0000d792e8, fsdata=0x0) at fs/ext4/inode.c:2467
 #1  ext4_da_write_end (file=0xffff88003f606a80, mapping=0xffff88001d3824e0, pos=0x108000, len=0x1000, copied=0x0, page=0\
 xffffea0000d792e8, fsdata=0x0) at fs/ext4/inode.c:2512
 #2  0xffffffff810d97f1 in generic_perform_write (iocb=<value optimized out>, iov=<value optimized out>, nr_segs=<value o\
 ptimized out>, pos=0x108000, ppos=0xffff88001e26be40, count=<value optimized out>, written=0x0) at mm/filemap.c:2440
 #3  generic_file_buffered_write (iocb=<value optimized out>, iov=<value optimized out>, nr_segs=<value optimized out>, p\
 os=0x108000, ppos=0xffff88001e26be40, count=<value optimized out>, written=0x0) at mm/filemap.c:2482
 #4  0xffffffff810db5d1 in __generic_file_aio_write (iocb=0xffff88001e26bde8, iov=0xffff88001e26bec8, nr_segs=0x1, ppos=0\
 xffff88001e26be40) at mm/filemap.c:2600
 #5  0xffffffff810db853 in generic_file_aio_write (iocb=0xffff88001e26bde8, iov=0xffff88001e26bec8, nr_segs=<value optimi\
 zed out>, pos=<value optimized out>) at mm/filemap.c:2632
 #6  0xffffffff811a71aa in ext4_file_write (iocb=0xffff88001e26bde8, iov=0xffff88001e26bec8, nr_segs=0x1, pos=0x108000) a\
 t fs/ext4/file.c:136
 #7  0xffffffff811375aa in do_sync_write (filp=0xffff88003f606a80, buf=<value optimized out>, len=<value optimized out>, \
 ppos=0xffff88001e26bf48) at fs/read_write.c:406
 #8  0xffffffff81137e56 in vfs_write (file=0xffff88003f606a80, buf=0x1ec2960 <Address 0x1ec2960 out of bounds>, count=0x4\
 000, pos=0xffff88001e26bf48) at fs/read_write.c:435
 #9  0xffffffff8113816c in sys_write (fd=<value optimized out>, buf=0x1ec2960 <Address 0x1ec2960 out of bounds>, count=0x\
 4000) at fs/read_write.c:487
 #10 <signal handler called>
 #11 0x00007f120077a390 in __brk_reservation_fn_dmi_alloc__ ()
 #12 0x0000000000000000 in ?? ()
 gdb> print offset
 $22 = 0xffffffffffffffff
 gdb> print idx
 $23 = 0xffffffff
 gdb> print inode->i_blkbits
 $24 = 0xc
 gdb> up
 #1  ext4_da_write_end (file=0xffff88003f606a80, mapping=0xffff88001d3824e0, pos=0x108000, len=0x1000, copied=0x0, page=0\
 xffffea0000d792e8, fsdata=0x0) at fs/ext4/inode.c:2512
 2512                    if (ext4_da_should_update_i_disksize(page, end)) {
 gdb> print start
 $25 = 0x0
 gdb> print end
 $26 = 0xffffffffffffffff
 gdb> print pos
 $27 = 0x108000
 gdb> print new_i_size
 $28 = 0x108000
 gdb> print ((struct ext4_inode_info *)((char *)inode-((int)(&((struct ext4_inode_info *)0)->vfs_inode))))->i_disksize
 $29 = 0xd9000
 gdb> down
 2467            for (i = 0; i < idx; i++)
 gdb> print i
 $30 = 0xd44acbee

This is 100% reproducible with some autonuma development code tuned in
a very aggressive manner (not normal way even for knumad) which does
"exotic" changes to the ptes. It wouldn't normally trigger but I don't
see why it can't happen normally if the page is added to swap cache in
between the two faults leading to "copied" being zero (which then
hangs in ext4). So it should be fixed. Especially possible with lumpy
reclaim (albeit disabled if compaction is enabled) as that would
ignore the young bits in the ptes.

Signed-off-by: Andrea Arcangeli <aarcange@redhat.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Cc: stable@kernel.org
12 years agostaging: r8712u: Add new USB ID
Larry Finger [Sun, 11 Dec 2011 16:27:54 +0000 (10:27 -0600)]
staging: r8712u: Add new USB ID

Add USB ID for Sitecom WLA-2000 v1.001 WLAN.

Reported-and-tested-by: Roland Gruber <post@rolandgruber.de>
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Cc: Stable <stable@vger.kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
12 years agostaging: tidspbridge: request dmtimer clocks on init
Omar Ramirez Luna [Fri, 18 Nov 2011 22:18:54 +0000 (16:18 -0600)]
staging: tidspbridge: request dmtimer clocks on init

Given that dm timer framework doesn't support request of clocks
by soft | hard irqs because some recent changes, tidspbridge needs
to request its clocks on init and enable/disable them on demand.

This was first seen on 3.2-rc1.

Signed-off-by: Omar Ramirez Luna <omar.ramirez@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
12 years agostaging: tidspbridge: include module.h by default
Omar Ramirez Luna [Tue, 15 Nov 2011 02:16:57 +0000 (20:16 -0600)]
staging: tidspbridge: include module.h by default

Fixes compilation break when compiled as part of the kernel:

drivers/staging/tidspbridge/rmgr/drv_interface.c:134: error: expected declaration specifiers or '...' before string constant
drivers/staging/tidspbridge/rmgr/drv_interface.c:134: warning: data definition has no type or storage class
drivers/staging/tidspbridge/rmgr/drv_interface.c:134: warning: type defaults to 'int' in declaration of 'MODULE_AUTHOR'
drivers/staging/tidspbridge/rmgr/drv_interface.c:134: warning: function declaration isn't a prototype
drivers/staging/tidspbridge/rmgr/drv_interface.c:135: error: expected declaration specifiers or '...' before string constant
drivers/staging/tidspbridge/rmgr/drv_interface.c:135: warning: data definition has no type or storage class
drivers/staging/tidspbridge/rmgr/drv_interface.c:135: warning: type defaults to 'int' in declaration of 'MODULE_LICENSE'
drivers/staging/tidspbridge/rmgr/drv_interface.c:135: warning: function declaration isn't a prototype
drivers/staging/tidspbridge/rmgr/drv_interface.c:136: error: expected declaration specifiers or '...' before string constant
drivers/staging/tidspbridge/rmgr/drv_interface.c:136: warning: data definition has no type or storage class
drivers/staging/tidspbridge/rmgr/drv_interface.c:136: warning: type defaults to 'int' in declaration of 'MODULE_VERSION'
drivers/staging/tidspbridge/rmgr/drv_interface.c:136: warning: function declaration isn't a prototype
drivers/staging/tidspbridge/rmgr/drv_interface.c: In function 'omap34_xx_bridge_probe':
drivers/staging/tidspbridge/rmgr/drv_interface.c:359: error: 'THIS_MODULE' undeclared (first use in this function)
drivers/staging/tidspbridge/rmgr/drv_interface.c:359: error: (Each undeclared identifier is reported only once
drivers/staging/tidspbridge/rmgr/drv_interface.c:359: error: for each function it appears in.)

Signed-off-by: Omar Ramirez Luna <omar.ramirez@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
12 years agoMerge branch 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel...
Linus Torvalds [Tue, 13 Dec 2011 23:02:31 +0000 (15:02 -0800)]
Merge branch 'x86-urgent-for-linus' of git://git./linux/kernel/git/tip/tip

* 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  Revert "x86, efi: Calling __pa() with an ioremap()ed address is invalid"
  x86, efi: Make efi_call_phys_{prelog,epilog} CONFIG_RELOCATABLE-aware

12 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/sage/ceph...
Linus Torvalds [Tue, 13 Dec 2011 22:59:42 +0000 (14:59 -0800)]
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: add missing spin_unlock at ceph_mdsc_build_path()
  ceph: fix SEEK_CUR, SEEK_SET regression
  crush: fix mapping calculation when force argument doesn't exist
  ceph: use i_ceph_lock instead of i_lock
  rbd: remove buggy rollback functionality
  rbd: return an error when an invalid header is read
  ceph: fix rasize reporting by ceph_show_options

12 years agoMerge branch 'writeback-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git...
Linus Torvalds [Tue, 13 Dec 2011 22:58:56 +0000 (14:58 -0800)]
Merge branch 'writeback-for-linus' of git://git./linux/kernel/git/wfg/linux

* 'writeback-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/wfg/linux:
  writeback: set max_pause to lowest value on zero bdi_dirty
  writeback: permit through good bdi even when global dirty exceeded
  writeback: comment on the bdi dirty threshold
  fs: Make write(2) interruptible by a fatal signal
  writeback: Fix issue on make htmldocs

12 years agoipv6: Check dest prefix length on original route not copied one in rt6_alloc_cow().
David S. Miller [Tue, 13 Dec 2011 22:35:06 +0000 (17:35 -0500)]
ipv6: Check dest prefix length on original route not copied one in rt6_alloc_cow().

After commit 8e2ec639173f325977818c45011ee176ef2b11f6 ("ipv6: don't
use inetpeer to store metrics for routes.") the test in rt6_alloc_cow()
for setting the ANYCAST flag is now wrong.

'rt' will always now have a plen of 128, because it is set explicitly
to 128 by ip6_rt_copy.

So to restore the semantics of the test, check the destination prefix
length of 'ort'.

Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agoARM: OMAP: rx51: fix USB
Felipe Contreras [Thu, 8 Dec 2011 20:23:00 +0000 (22:23 +0200)]
ARM: OMAP: rx51: fix USB

Commit 10299e2e4e3ed3b16503d4e04edd48b33083f4e2 (ARM: RX-51:
Enable isp1704 power on/off) added power management for isp1704.

However, the transceiver should be powered on by default,
otherwise USB doesn't work at all for networking during
boot.

All kernels after v3.0 are affected.

Cc: stable@kernel.org
Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
Reviewed-by: Sebastian Reichel <sre@debian.org>
[tony@atomide.com: updated comments]
Signed-off-by: Tony Lindgren <tony@atomide.com>
12 years agoceph: add missing spin_unlock at ceph_mdsc_build_path()
Yehuda Sadeh [Tue, 13 Dec 2011 17:57:44 +0000 (09:57 -0800)]
ceph: add missing spin_unlock at ceph_mdsc_build_path()

one of the paths was missing spin_unlock

Signed-off-by: Yehuda Sadeh <yehuda@hq.newdream.net>
12 years agoPCI hotplug: Always allow acpiphp to handle non-PCIe bridges
Rafael J. Wysocki [Mon, 12 Dec 2011 23:02:28 +0000 (00:02 +0100)]
PCI hotplug: Always allow acpiphp to handle non-PCIe bridges

Commit 0d52f54e2ef64c189dedc332e680b2eb4a34590a (PCI / ACPI: Make
acpiphp ignore root bridges using PCIe native hotplug) added code
that made the acpiphp driver completely ignore PCIe root complexes
for which the kernel had been granted control of the native PCIe
hotplug feature by the BIOS through _OSC.  Unfortunately, however,
this was a mistake, because on some systems there were PCI bridges
supporting PCI (non-PCIe) hotplug under such root complexes and
those bridges should have been handled by acpiphp.

For this reason, revert the changes made by the commit mentioned
above and make register_slot() in drivers/pci/hotplug/acpiphp_glue.c
avoid registering hotplug slots for PCIe ports that belong to
root complexes with native PCIe hotplug enabled (which means that
the BIOS has granted the kernel control of this feature for the
given root complex).  This is reported to address the original
issue fixed by commit 0d52f54e2ef64c189dedc332e680b2eb4a34590a and
to work on the system where that commit broke things.

Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
12 years agogpio: mpc8xxx: don't allow input-only pins to be output for MPC5121
Wolfram Sang [Tue, 13 Dec 2011 09:12:48 +0000 (10:12 +0100)]
gpio: mpc8xxx: don't allow input-only pins to be output for MPC5121

Add a 5121-custom reject if an input-only pin is requested to be output
(see 18.3.1.1 in the refman). Also, rewrite mach-specific quirk setup to
consume less lines which scales better.

Signed-off-by: Wolfram Sang <w.sang@pengutronix.de>
[grant.likely: Fixed build error]
Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
12 years agogpio-ml-ioh: Add the irq_disable/irq_enable hooks for ml-ioh irq chip
Feng Tang [Tue, 13 Dec 2011 15:53:50 +0000 (23:53 +0800)]
gpio-ml-ioh: Add the irq_disable/irq_enable hooks for ml-ioh irq chip

These hooks will be needed by the general disabl/enable_irq();

Signed-off-by: Feng Tang <feng.tang@intel.com>
Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
12 years agogpio-ml-ioh: fix a bug in the interrupt handler
Feng Tang [Tue, 13 Dec 2011 15:53:49 +0000 (23:53 +0800)]
gpio-ml-ioh: fix a bug in the interrupt handler

GPIO's irq action's dev_id is set to the first struct ioh_gpio chip,
so when loop checking the 8 chips, the "chip" should be changed
according.

Signed-off-by: Feng Tang <feng.tang@intel.com>
Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
12 years agogpio: pl061: drop extra check for NULL platform_data
Rob Herring [Fri, 9 Dec 2011 22:56:08 +0000 (16:56 -0600)]
gpio: pl061: drop extra check for NULL platform_data

In adding DT binding support, the check for NULL platform_data got added
back in inadvertently, so remove it.

Signed-off-by: Rob Herring <rob.herring@calxeda.com>
Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
12 years agoUSB: option: Removing one bogus and adding some new Huawei combinations
Bjørn Mork [Tue, 13 Dec 2011 04:33:02 +0000 (05:33 +0100)]
USB: option: Removing one bogus and adding some new Huawei combinations

Huawei use the product code HUAWEI_PRODUCT_E353 (0x1506) for a
number of different devices, which each can appear with a number
of different descriptor sets.  Different types of interfaces
can be identified by looking at the subclass and protocol fields

Subclass 1 protocol 8 is actually the data interface of a CDC
ECM set, with subclass 1 protocol 9 as the control interface.
Neither support serial data communcation, and cannot therefore
be supported by this driver.

At the same time, add a few other sets which appear if the
device is configured in "Windows mode" using this modeswitch
message:
55534243000000000000000000000011060000000100000000000000000000

Signed-off-by: Bjørn Mork <bjorn@mork.no>
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
12 years agoconfigfs: register_filesystem() called too early
Al Viro [Tue, 13 Dec 2011 17:32:42 +0000 (12:32 -0500)]
configfs: register_filesystem() called too early

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
12 years agofuse: register_filesystem() called too early
Al Viro [Tue, 13 Dec 2011 17:25:27 +0000 (12:25 -0500)]
fuse: register_filesystem() called too early

same story as with ubifs

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
12 years agoubifs: too early register_filesystem()
Al Viro [Tue, 13 Dec 2011 04:58:21 +0000 (23:58 -0500)]
ubifs: too early register_filesystem()

doing that before you are ready to handle mount() is a Bad Idea(tm)...

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
12 years agoMerge branch 'fixes' of http://ftp.arm.linux.org.uk/pub/linux/arm/kernel/git-cur...
Linus Torvalds [Tue, 13 Dec 2011 17:28:23 +0000 (09:28 -0800)]
Merge branch 'fixes' of ftp.arm.linux.org.uk/pub/linux/arm/kernel/git-cur/linux-2.6-arm

* 'fixes' of http://ftp.arm.linux.org.uk/pub/linux/arm/kernel/git-cur/linux-2.6-arm:
  ARM: 7204/1: arch/arm/kernel/setup.c: initialize arm_dma_zone_size earlier
  ARM: 7185/1: perf: don't assign platform_device on unsupported CPUs
  ARM: 7187/1: fix unwinding for XIP kernels
  ARM: 7186/1: fix Kconfig issue with PHYS_OFFSET and !MMU

12 years agoceph: fix SEEK_CUR, SEEK_SET regression
Sage Weil [Tue, 13 Dec 2011 17:19:26 +0000 (09:19 -0800)]
ceph: fix SEEK_CUR, SEEK_SET regression

Commit 06222e491e663dac939f04b125c9dc52126a75c4 got the if wrong so that
it always evaluates as true.  This is semantically harmless, but makes
SEEK_CUR and SEEK_SET needlessly query the server.

Rewrite the if to explicitly enumerate the cases we DO need a valid i_size
to make this code less fragile.

Reported-by: Roel Kluin <roel.kluin@gmail.com>
Signed-off-by: Sage Weil <sage@newdream.net>
12 years agoMerge branch 'imx-fixes-for-arnd' of git://git.pengutronix.de/git/imx/linux-2.6 into...
Arnd Bergmann [Tue, 13 Dec 2011 16:34:25 +0000 (16:34 +0000)]
Merge branch 'imx-fixes-for-arnd' of git://git.pengutronix.de/git/imx/linux-2.6 into fixes

12 years agoibft: Fix finding IBFT ACPI table on UEFI
Yinghai Lu [Mon, 12 Dec 2011 20:39:14 +0000 (12:39 -0800)]
ibft: Fix finding IBFT ACPI table on UEFI

Found one system with UEFI/iBFT, kernel does not detect the iBFT during
iscsi_ibft module loading.

Root cause: on x86 (UEFI), we are calling of find_ibft_region() much earlier
- specifically in setup_arch() before ACPI is enabled.

Try to split acpi checking code out and call that later

At that time ACPI iBFT already get permanent mapped with ioremap.
So isa_virt_to_bus() will get wrong phys from right virt address.
We could just skip that phys address printing.

For legacy one, print the found address early.

-v2: update comments and description according to Konrad.
-v3: fix problem about module use case that is found by Konrad.
-v4: use acpi_get_table() instead of acpi_table_parse() to handle module use case that is found by Konrad again..
Signed-off-by: Yinghai Lu <yinghai@kernel.org>
Signed-off-by: Konrad Rzeszutek Wilk <konrad@kernel.org>
12 years agoALSA: hda: fix mute led polarity for HP laptops with buggy BIOS
Gustavo Maciel Dias Vieira [Tue, 13 Dec 2011 13:47:22 +0000 (11:47 -0200)]
ALSA: hda: fix mute led polarity for HP laptops with buggy BIOS

Some HP laptop models do not have a properly filled OEM string used
to set the gpio and polarity of the mute led. Make the mute led
configuration work for this case.

Signed-off-by: Gustavo Maciel Dias Vieira <gustavo@sagui.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
12 years agofuse: llseek fix race
Miklos Szeredi [Tue, 13 Dec 2011 10:40:59 +0000 (11:40 +0100)]
fuse: llseek fix race

Fix race between lseek(fd, 0, SEEK_CUR) and read/write.  This was fixed in
generic code by commit 5b6f1eb97d (vfs: lseek(fd, 0, SEEK_CUR) race condition).

Signed-off-by: Miklos Szeredi <mszeredi@suse.cz>
12 years agofuse: fix llseek bug
Roel Kluin [Tue, 13 Dec 2011 09:37:00 +0000 (10:37 +0100)]
fuse: fix llseek bug

The test in fuse_file_llseek() "not SEEK_CUR or not SEEK_SET" always evaluates
to true.

This was introduced in 3.1 by commit 06222e49 (fs: handle SEEK_HOLE/SEEK_DATA
properly in all fs's that define their own llseek) and changed the behavior of
SEEK_CUR and SEEK_SET to always retrieve the file attributes.  This is a
performance regression.

Fix the test so that it makes sense.

Signed-off-by: Miklos Szeredi <mszeredi@suse.cz>
CC: stable@vger.kernel.org
CC: Josef Bacik <josef@redhat.com>
CC: Al Viro <viro@zeniv.linux.org.uk>
12 years agofuse: fix fuse_retrieve
Miklos Szeredi [Tue, 13 Dec 2011 09:36:59 +0000 (10:36 +0100)]
fuse: fix fuse_retrieve

Fix two bugs in fuse_retrieve():

 - retrieving more than one page would yield repeated instances of the
   first page

 - if more than FUSE_MAX_PAGES_PER_REQ pages were requested than the
   request page array would overflow

fuse_retrieve() was added in 2.6.36 and these bugs had been there since the
beginning.

Signed-off-by: Miklos Szeredi <mszeredi@suse.cz>
CC: stable@vger.kernel.org
12 years agolinux/log2.h: Fix rounddown_pow_of_two(1)
Linus Torvalds [Tue, 13 Dec 2011 06:06:55 +0000 (22:06 -0800)]
linux/log2.h: Fix rounddown_pow_of_two(1)

Exactly like roundup_pow_of_two(1), the rounddown version was buggy for
the case of a compile-time constant '1' argument.  Probably because it
originated from the same code, sharing history with the roundup version
from before the bugfix (for that one, see commit 1a06a52ee1b0: "Fix
roundup_pow_of_two(1)").

However, unlike the roundup version, the fix for rounddown is to just
remove the broken special case entirely.  It's simply not needed - the
generic code

    1UL << ilog2(n)

does the right thing for the constant '1' argment too.  The only reason
roundup needed that special case was because rounding up does so by
subtracting one from the argument (and then adding one to the result)
causing the obvious problems with "ilog2(0)".

But rounddown doesn't do any of that, since ilog2() naturally truncates
(ie "rounds down") to the right rounded down value.  And without the
ilog2(0) case, there's no reason for the special case that had the wrong
value.

tl;dr: rounddown_pow_of_two(1) should be 1, not 0.

Acked-by: Dmitry Torokhov <dtor@vmware.com>
Cc: stable@kernel.org
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
12 years agoMerge branch 'hwmon-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/groec...
Linus Torvalds [Tue, 13 Dec 2011 04:08:27 +0000 (20:08 -0800)]
Merge branch 'hwmon-for-linus' of git://git./linux/kernel/git/groeck/linux-staging

* 'hwmon-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging:
  hwmon: (jz4740) Staticise jz4740_hwmon_driver
  hwmon: (jz4740) fix signedness bug

12 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/cjb/mmc
Linus Torvalds [Tue, 13 Dec 2011 04:06:13 +0000 (20:06 -0800)]
Merge branch 'for-linus' of git://git./linux/kernel/git/cjb/mmc

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/cjb/mmc:
  mmc: core: Fix deadlock when the CONFIG_MMC_UNSAFE_RESUME is not defined
  mmc: sdhci-s3c: Remove old and misprototyped suspend operations
  mmc: tmio: fix clock gating on platforms with a .set_pwr() method
  mmc: sh_mmcif: fix clock gating on platforms with a .down_pwr() method
  mmc: core: Fix typo at mmc_card_sleep
  mmc: core: Fix power_off_notify during suspend
  mmc: core: Fix setting power notify state variable for non-eMMC
  mmc: core: Add quirk for long data read time
  mmc: Add module.h include to sdhci-cns3xxx.c
  mmc: mxcmmc: fix falling back to PIO
  mmc: omap_hsmmc: DMA unmap only once in case of MMC error

12 years agoext4: display the correct mount option in /proc/mounts for [no]init_itable
Theodore Ts'o [Tue, 13 Dec 2011 03:06:18 +0000 (22:06 -0500)]
ext4: display the correct mount option in /proc/mounts for [no]init_itable

/proc/mounts was showing the mount option [no]init_inode_table when
the correct mount option that will be accepted by parse_options() is
[no]init_itable.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Cc: stable@kernel.org
12 years agosch_gred: should not use GFP_KERNEL while holding a spinlock
Eric Dumazet [Sun, 11 Dec 2011 23:42:53 +0000 (23:42 +0000)]
sch_gred: should not use GFP_KERNEL while holding a spinlock

gred_change_vq() is called under sch_tree_lock(sch).

This means a spinlock is held, and we are not allowed to sleep in this
context.

We might pre-allocate memory using GFP_KERNEL before taking spinlock,
but this is not suitable for stable material.

Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agoipip, sit: copy parms.name after register_netdevice
Ted Feng [Thu, 8 Dec 2011 00:46:21 +0000 (00:46 +0000)]
ipip, sit: copy parms.name after register_netdevice

Same fix as 731abb9cb2 for ipip and sit tunnel.
Commit 1c5cae815d removed an explicit call to dev_alloc_name in
ipip_tunnel_locate and ipip6_tunnel_locate, because register_netdevice
will now create a valid name, however the tunnel keeps a copy of the
name in the private parms structure. Fix this by copying the name back
after register_netdevice has successfully returned.

This shows up if you do a simple tunnel add, followed by a tunnel show:

$ sudo ip tunnel add mode ipip remote 10.2.20.211
$ ip tunnel
tunl0: ip/ip  remote any  local any  ttl inherit  nopmtudisc
tunl%d: ip/ip  remote 10.2.20.211  local any  ttl inherit
$ sudo ip tunnel add mode sit remote 10.2.20.212
$ ip tunnel
sit0: ipv6/ip  remote any  local any  ttl 64  nopmtudisc 6rd-prefix 2002::/16
sit%d: ioctl 89f8 failed: No such device
sit%d: ipv6/ip  remote 10.2.20.212  local any  ttl inherit

Cc: stable@vger.kernel.org
Signed-off-by: Ted Feng <artisdom@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agoipv6: Fix for adding multicast route for loopback device automatically.
Li Wei [Tue, 6 Dec 2011 21:23:45 +0000 (21:23 +0000)]
ipv6: Fix for adding multicast route for loopback device automatically.

There is no obvious reason to add a default multicast route for loopback
devices, otherwise there would be a route entry whose dst.error set to
-ENETUNREACH that would blocking all multicast packets.

====================

[ more detailed explanation ]

The problem is that the resulting routing table depends on the sequence
of interface's initialization and in some situation, that would block all
muticast packets. Suppose there are two interfaces on my computer
(lo and eth0), if we initailize 'lo' before 'eth0', the resuting routing
table(for multicast) would be

# ip -6 route show | grep ff00::
unreachable ff00::/8 dev lo metric 256 error -101
ff00::/8 dev eth0 metric 256

When sending multicasting packets, routing subsystem will return the first
route entry which with a error set to -101(ENETUNREACH).

I know the kernel will set the default ipv6 address for 'lo' when it is up
and won't set the default multicast route for it, but there is no reason to
stop 'init' program from setting address for 'lo', and that is exactly what
systemd did.

I am sure there is something wrong with kernel or systemd, currently I preferred
kernel caused this problem.

====================

Signed-off-by: Li Wei <lw@cn.fujitsu.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agoUSB: cdc-acm: add IDs for Motorola H24 HSPA USB module.
Krzysztof Hałasa [Mon, 12 Dec 2011 13:51:00 +0000 (14:51 +0100)]
USB: cdc-acm: add IDs for Motorola H24 HSPA USB module.

Add USB IDs for Motorola H24 HSPA USB module.

Signed-off-by: Krzysztof Hałasa <khalasa@piap.pl>
Acked-by: Oliver Neukum <oneukum@suse.de>
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
12 years agousb: option: Add Huawei E398 controlling interfaces
Alex Hermann [Mon, 12 Dec 2011 20:42:23 +0000 (21:42 +0100)]
usb: option: Add Huawei E398 controlling interfaces

This patch adds the controlling interfaces for the Huawei E398.

Thanks to Bjørn Mork <bjorn@mork.no> for extracting the interface
numbers from the windows driver.

Signed-off-by: Alex Hermann <alex@wenlex.nl>
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
12 years agoARM: OMAP: mcbsp: Fix possible memory corruption
Jarkko Nikula [Mon, 12 Dec 2011 08:38:26 +0000 (10:38 +0200)]
ARM: OMAP: mcbsp: Fix possible memory corruption

Commits 09d28d ("ARM: OMAP: mcbsp: Start generalize omap2_mcbsp_set_clks_src")
and 7bc0c4 ("ARM: OMAP: mcbsp: Start generalize signal muxing functions")
incorrectly set two struct omap_mcbsp_platform_data fields after
omap_device_build_ss and kfree calls.

Fix this by moving these pdata assignments before those calls.

Signed-off-by: Jarkko Nikula <jarkko.nikula@bitmer.com>
Reported-by: NeilBrown <neilb@suse.de>
Signed-off-by: Tony Lindgren <tony@atomide.com>
12 years agoRevert "[media] af9015: limit I2C access to keep FW happy"
Mauro Carvalho Chehab [Mon, 12 Dec 2011 18:02:15 +0000 (16:02 -0200)]
Revert "[media] af9015: limit I2C access to keep FW happy"

This reverts commit ff83bd82cb343d37b5ab8e402aaad9ef33d03f1e.

As requested by Antti:
From a talk with him at #linuxtv irc, he strong feeling that some apps
like MythTV will do a lot a lot of I2C I/O and now it adds locks,
with utimatelly means more delays. This could cause bad effects.

There is a new patch for 3.3 that re-writes af9013 in order to limit
I2C I/O. and thus those patches could be nice to have together
because those user who has has problems are most likely MythTV users.

So, let's revert this commit for now.

Requested-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years agoRevert "x86, efi: Calling __pa() with an ioremap()ed address is invalid"
Keith Packard [Mon, 12 Dec 2011 00:12:42 +0000 (16:12 -0800)]
Revert "x86, efi: Calling __pa() with an ioremap()ed address is invalid"

This hangs my MacBook Air at boot time; I get no console
messages at all. I reverted this on top of -rc5 and my machine
boots again.

This reverts commit e8c7106280a305e1ff2a3a8a4dfce141469fb039.

Signed-off-by: Matt Fleming <matt.fleming@intel.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
Acked-by: H. Peter Anvin <hpa@zytor.com>
Cc: Matthew Garrett <mjg@redhat.com>
Cc: Zhang Rui <rui.zhang@intel.com>
Cc: Huang Ying <huang.ying.caritas@gmail.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Andrew Morton <akpm@linux-foundation.org>
Link: http://lkml.kernel.org/r/1321621751-3650-1-git-send-email-matt@console
Signed-off-by: Ingo Molnar <mingo@elte.hu>
12 years agocrush: fix mapping calculation when force argument doesn't exist
Sage Weil [Wed, 7 Dec 2011 17:10:26 +0000 (09:10 -0800)]
crush: fix mapping calculation when force argument doesn't exist

If the force argument isn't valid, we should continue calculating a
mapping as if it weren't specified.

Signed-off-by: Sage Weil <sage@newdream.net>
12 years agohwmon: (jz4740) Staticise jz4740_hwmon_driver
Axel Lin [Thu, 8 Dec 2011 13:33:37 +0000 (08:33 -0500)]
hwmon: (jz4740) Staticise jz4740_hwmon_driver

It is not used outside this driver so no need to make the symbol global.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Acked-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com>
12 years agohwmon: (jz4740) fix signedness bug
Axel Lin [Thu, 8 Dec 2011 13:04:12 +0000 (08:04 -0500)]
hwmon: (jz4740) fix signedness bug

wait_for_completion_interruptible_timeout() may return negative value.
In this case, checking if (t > 0)  will return true if t is unsigned.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Acked-by: Lars-Peter Clausen <lars@metafoo.de>
Cc: stable@kernel.org (3.0+)
Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com>
12 years agoext4: Fix crash due to getting bogus eh_depth value on big-endian systems
Paul Mackerras [Mon, 12 Dec 2011 16:00:56 +0000 (11:00 -0500)]
ext4: Fix crash due to getting bogus eh_depth value on big-endian systems

Commit 1939dd84b3 ("ext4: cleanup ext4_ext_grow_indepth code") added a
reference to ext4_extent_header.eh_depth, but forget to pass the value
read through le16_to_cpu.  The result is a crash on big-endian
machines, such as this crash on a POWER7 server:

attempt to access beyond end of device
sda8: rw=0, want=776392648163376, limit=168558560
Unable to handle kernel paging request for data at address 0x6b6b6b6b6b6b6bcb
Faulting instruction address: 0xc0000000001f5f38
cpu 0x14: Vector: 300 (Data Access) at [c000001bd1aaecf0]
    pc: c0000000001f5f38: .__brelse+0x18/0x60
    lr: c0000000002e07a4: .ext4_ext_drop_refs+0x44/0x80
    sp: c000001bd1aaef70
   msr: 9000000000009032
   dar: 6b6b6b6b6b6b6bcb
 dsisr: 40000000
  current = 0xc000001bd15b8010
  paca    = 0xc00000000ffe4600
    pid   = 19911, comm = flush-8:0
enter ? for help
[c000001bd1aaeff0c0000000002e07a4 .ext4_ext_drop_refs+0x44/0x80
[c000001bd1aaf090c0000000002e0c58 .ext4_ext_find_extent+0x408/0x4c0
[c000001bd1aaf180c0000000002e145c .ext4_ext_insert_extent+0x2bc/0x14c0
[c000001bd1aaf2c0c0000000002e3fb8 .ext4_ext_map_blocks+0x628/0x1710
[c000001bd1aaf420c0000000002b2974 .ext4_map_blocks+0x224/0x310
[c000001bd1aaf4d0c0000000002b7f2c .mpage_da_map_and_submit+0xbc/0x490
[c000001bd1aaf5a0c0000000002b8688 .write_cache_pages_da+0x2c8/0x430
[c000001bd1aaf720c0000000002b8b28 .ext4_da_writepages+0x338/0x670
[c000001bd1aaf8d0c000000000157280 .do_writepages+0x40/0x90
[c000001bd1aaf940c0000000001ea830 .writeback_single_inode+0xe0/0x530
[c000001bd1aafa00c0000000001eb680 .writeback_sb_inodes+0x210/0x300
[c000001bd1aafb20c0000000001ebc84 .__writeback_inodes_wb+0xd4/0x140
[c000001bd1aafbe0c0000000001ebfec .wb_writeback+0x2fc/0x3e0
[c000001bd1aafce0c0000000001ed770 .wb_do_writeback+0x2f0/0x300
[c000001bd1aafdf0c0000000001ed848 .bdi_writeback_thread+0xc8/0x340
[c000001bd1aafed0c0000000000c5494 .kthread+0xb4/0xc0
[c000001bd1aaff90c000000000021f48 .kernel_thread+0x54/0x70

This is due to getting ext_depth(inode) == 0x101 and therefore running
off the end of the path array in ext4_ext_drop_refs into following
unallocated structures.

This fixes it by adding the necessary le16_to_cpu.

Signed-off-by: Paul Mackerras <paulus@samba.org>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
12 years agoext4: fix ext4_end_io_dio() racing against fsync()
Theodore Ts'o [Mon, 12 Dec 2011 15:53:02 +0000 (10:53 -0500)]
ext4: fix ext4_end_io_dio() racing against fsync()

We need to make sure iocb->private is cleared *before* we put the
io_end structure on i_completed_io_list.  Otherwise fsync() could
potentially run on another CPU and free the iocb structure out from
under us.

Reported-by: Kent Overstreet <koverstreet@google.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Cc: stable@kernel.org
12 years agoblock/swim3: Locking fixes
Benjamin Herrenschmidt [Mon, 12 Dec 2011 11:42:12 +0000 (12:42 +0100)]
block/swim3: Locking fixes

The old PowerMac swim3 driver has some "interesting" locking issues,
using a private lock and failing to lock the queue before completing
requests, which triggered WARN_ONs among others.

This rips out the private lock, makes everything operate under the
block queue lock, and generally makes things simpler.

We used to also share a queue between the two possible instances which
was problematic since we might pick the wrong controller in some cases,
so make the queue and the current request per-instance and use
queuedata to point to our private data which is a lot cleaner.

We still share the queue lock but then, it's nearly impossible to actually
use 2 swim3's simultaneously: one would need to have a Wallstreet
PowerBook, the only machine afaik with two of these on the motherboard,
and populate both hotswap bays with a floppy drive (the machine ships
only with one), so nobody cares...

While at it, add a little fix to clear up stale interrupts when loading
the driver or plugging a floppy drive in a bay.

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
12 years agousb: renesas_usbhs: add hcd->has_tt for low/full speed
Kuninori Morimoto [Fri, 9 Dec 2011 02:24:47 +0000 (18:24 -0800)]
usb: renesas_usbhs: add hcd->has_tt for low/full speed

Low/Full speed device is not recognized without this patch

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
12 years agousb: renesas_usbhs: typofix: irq_dtch control DTCHE
Kuninori Morimoto [Fri, 9 Dec 2011 02:23:56 +0000 (18:23 -0800)]
usb: renesas_usbhs: typofix: irq_dtch control DTCHE

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
12 years agousb: gadget: storage: release superspeed descriptors.
Yu Xu [Fri, 9 Dec 2011 16:03:33 +0000 (00:03 +0800)]
usb: gadget: storage: release superspeed descriptors.

Release superspeed mass storage descriptors memory
when the function is unbind.

Signed-off-by: Yu Xu <yuxu@marvell.com>
Acked-by: Michal Nazarewicz <mina86@mina86.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
12 years ago[SCSI] qla2xxx: Update version number to 8.03.07.12-k.
Chad Dupuis [Fri, 18 Nov 2011 17:02:22 +0000 (09:02 -0800)]
[SCSI] qla2xxx: Update version number to 8.03.07.12-k.

Signed-off-by: Chad Dupuis <chad.dupuis@qlogic.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
12 years ago[SCSI] qla2xxx: Submit all chained IOCBs for passthrough commands on request queue 0.
Giridhar Malavali [Fri, 18 Nov 2011 17:02:21 +0000 (09:02 -0800)]
[SCSI] qla2xxx: Submit all chained IOCBs for passthrough commands on request queue 0.

Signed-off-by: Giridhar Malavali <giridhar.malavali@qlogic.com>
Signed-off-by: Chad Dupuis <chad.dupuis@qlogic.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
12 years ago[SCSI] qla2xxx: Correct fc_host port_state display.
Saurav Kashyap [Fri, 18 Nov 2011 17:02:20 +0000 (09:02 -0800)]
[SCSI] qla2xxx: Correct fc_host port_state display.

[jejb: checkpatch fixes]
Add more fine grain parsing of vha->loop_state to export a more accurate
fc_host port_state.

Signed-off-by: Saurav Kashyap <saurav.kashyap@qlogic.com>
Signed-off-by: Chad Dupuis <chad.dupuis@qlogic.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
12 years ago[SCSI] qla2xxx: Disable generating pause frames when firmware hang detected for ISP82xx.
Giridhar Malavali [Fri, 18 Nov 2011 17:02:19 +0000 (09:02 -0800)]
[SCSI] qla2xxx: Disable generating pause frames when firmware hang detected for ISP82xx.

Signed-off-by: Giridhar Malavali <giridhar.malavali@qlogic.com>
Signed-off-by: Chad Dupuis <chad.dupuis@qlogic.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
12 years ago[SCSI] qla2xxx: Clear mailbox busy flag during premature mailbox completion for ISP82xx.
Giridhar Malavali [Fri, 18 Nov 2011 17:02:18 +0000 (09:02 -0800)]
[SCSI] qla2xxx: Clear mailbox busy flag during premature mailbox completion for ISP82xx.

Signed-off-by: Giridhar Malavali <giridhar.malavali@qlogic.com>
Signed-off-by: Chad Dupuis <chad.dupuis@qlogic.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
12 years agoALSA: HDA: Set position fix to LPIB for an Atom/Poulsbo based device
David Henningsson [Mon, 12 Dec 2011 06:01:17 +0000 (14:01 +0800)]
ALSA: HDA: Set position fix to LPIB for an Atom/Poulsbo based device

For the Asus 1101HA, reporting position by reading the DMA position
buffer map seems unstable and often wrong. The reporter says that
position_fix=LPIB works much better (although not 100%, but this is
probably due to other issues).

The controller chip is an Intel Poulsbo 8086:811b (rev 07) controller,
and complete alsa-info is available here:
https://launchpadlibrarian.net/86691768/alsa-info.txt.1TNwyE5Ea7

Cc: stable@kernel.org (3.0+)
BugLink: http://bugs.launchpad.net/bugs/825709
Tested-by: Stefano Lodi
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
12 years ago[SCSI] qla2xxx: Encapsulate prematurely completing mailbox commands during ISP82xx...
Chad Dupuis [Fri, 18 Nov 2011 17:02:17 +0000 (09:02 -0800)]
[SCSI] qla2xxx: Encapsulate prematurely completing mailbox commands during ISP82xx firmware hang.

Signed-off-by: Giridhar Malavali <giridhar.malavali@qlogic.com>
Signed-off-by: Chad Dupuis <chad.dupuis@qlogic.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
12 years ago[SCSI] qla2xxx: Display IPE error message for ISP82xx.
Chad Dupuis [Fri, 18 Nov 2011 17:02:16 +0000 (09:02 -0800)]
[SCSI] qla2xxx: Display IPE error message for ISP82xx.

[jejb: fixup checkpatch error]
Signed-off-by: Chad Dupuis <chad.dupuis@qlogic.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
12 years ago[SCSI] qla2xxx: Return the correct value for a mailbox command if 82xx is in reset...
Andrew Vasquez [Fri, 18 Nov 2011 17:02:15 +0000 (09:02 -0800)]
[SCSI] qla2xxx: Return the correct value for a mailbox command if 82xx is in reset recovery.

We need to return QLA_FUNCTION_TIMEOUT immediately otherwise we mess up the
mailbox command state machine.

Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: Chad Dupuis <chad.dupuis@qlogic.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
12 years ago[SCSI] qla2xxx: Enable Minidump by default with default capture mask 0x1f.
Giridhar Malavali [Fri, 18 Nov 2011 17:02:14 +0000 (09:02 -0800)]
[SCSI] qla2xxx: Enable Minidump by default with default capture mask 0x1f.

Signed-off-by: Giridhar Malavali <giridhar.malavali@qlogic.com>
Signed-off-by: Chad Dupuis <chad.dupuis@qlogic.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
12 years ago[SCSI] qla2xxx: Stop unconditional completion of mailbox commands issued in interrupt...
Giridhar Malavali [Fri, 18 Nov 2011 17:02:13 +0000 (09:02 -0800)]
[SCSI] qla2xxx: Stop unconditional completion of mailbox commands issued in interrupt mode during firmware hang.

Signed-off-by: Giridhar Malavali <giridhar.malavali@qlogic.com>
Signed-off-by: Chad Dupuis <chad.dupuis@qlogic.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
12 years ago[SCSI] qla2xxx: Revert back the request queue mapping to request queue 0.
Giridhar Malavali [Fri, 18 Nov 2011 17:02:12 +0000 (09:02 -0800)]
[SCSI] qla2xxx: Revert back the request queue mapping to request queue 0.

If there is an error creating multiple response queues then we need to revert
the request queue mapping back to request queue 0.

Signed-off-by: Giridhar Malavali <giridhar.malavali@qlogic.com>
Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: Chad Dupuis <chad.dupuis@qlogic.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
12 years ago[SCSI] qla2xxx: Don't call alloc_fw_dump for ISP82XX.
Saurav Kashyap [Fri, 18 Nov 2011 17:02:11 +0000 (09:02 -0800)]
[SCSI] qla2xxx: Don't call alloc_fw_dump for ISP82XX.

Signed-off-by: Saurav Kashyap <saurav.kashyap@qlogic.com>
Signed-off-by: Chad Dupuis <chad.dupuis@qlogic.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
12 years ago[SCSI] qla2xxx: Check for SCSI status on underruns.
Arun Easi [Fri, 18 Nov 2011 17:02:10 +0000 (09:02 -0800)]
[SCSI] qla2xxx: Check for SCSI status on underruns.

Signed-off-by: Arun Easi <arun.easi@qlogic.com>
Signed-off-by: Chad Dupuis <chad.dupuis@qlogic.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
12 years ago[SCSI] qla2xxx: Remove qla2x00_wait_for_loop_ready function.
Saurav Kashyap [Fri, 18 Nov 2011 17:02:09 +0000 (09:02 -0800)]
[SCSI] qla2xxx: Remove qla2x00_wait_for_loop_ready function.

This function can wait for 5min under certain scenarios. One of them is when
the port is down from switch and bus reset is issued. The bus reset used to
wait for 5 minutes for the loop and upper layer callers used to hang and give
stack trace because of getting stuck for 120 sec. It is legacy code that was
used when the driver used to do queuing of the commands.

Signed-off-by: Saurav Kashyap <saurav.kashyap@qlogic.com>
Signed-off-by: Chad Dupuis <chad.dupuis@qlogic.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
12 years ago[SCSI] mpt2sas: _scsih_smart_predicted_fault uses GFP_KERNEL in interrupt context
Anton Blanchard [Mon, 7 Nov 2011 11:05:21 +0000 (22:05 +1100)]
[SCSI] mpt2sas: _scsih_smart_predicted_fault uses GFP_KERNEL in interrupt context

_scsih_smart_predicted_fault is called in an interrupt and therefore
must allocate memory using GFP_ATOMIC.

Signed-off-by: Anton Blanchard <anton@samba.org>
Cc: <stable@kernel.org>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
12 years agoInput: synaptics - fix touchpad not working after S2R on Vostro V13
Dmitry Torokhov [Mon, 12 Dec 2011 08:05:53 +0000 (00:05 -0800)]
Input: synaptics - fix touchpad not working after S2R on Vostro V13

Synaptics touchpads on several Dell laptops, particularly Vostro V13
systems, may not respond properly to PS/2 commands and queries immediately
after resuming from suspend to RAM. This leads to unresponsive touchpad
after suspend/resume cycle.

Adding a 1-second delay after resetting the device allows touchpad to
finish initializing (calibrating?) and start reacting properly.

Reported-by: Daniel Manrique <daniel.manrique@canonical.com>
Tested-by: Daniel Manrique <daniel.manrique@canonical.com>
Cc: stable@kernel.org
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
12 years agoInput: cma3000_d0x - fix signedness bug in cma3000_thread_irq()
Xi Wang [Mon, 12 Dec 2011 07:40:56 +0000 (23:40 -0800)]
Input: cma3000_d0x - fix signedness bug in cma3000_thread_irq()

The error check (intr_status < 0) didn't work because intr_status is
a u8.  Change its type to signed int.

Signed-off-by: Xi Wang <xi.wang@gmail.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
12 years agoInput: wacom - add product id used by Samsung Slate 7
Chris Bagwell [Mon, 12 Dec 2011 07:50:59 +0000 (23:50 -0800)]
Input: wacom - add product id used by Samsung Slate 7

New product ID reported by Harvey Braun on linuxwacom mailing list
and also tested this patch with new hardware.

Signed-off-by: Chris Bagwell <chris@cnpbagwell.com>
Acked-by: Ping Cheng <pinglinux@gmail.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
12 years agoASoC: Fix hx4700 error handling to free gpios if snd_soc_register_card fails
Axel Lin [Mon, 12 Dec 2011 03:26:00 +0000 (11:26 +0800)]
ASoC: Fix hx4700 error handling to free gpios if snd_soc_register_card fails

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
12 years agoASoC: WM8958: correctly show firmware magic on mismatch
Jonathan Neuschäfer [Sun, 11 Dec 2011 18:15:49 +0000 (19:15 +0100)]
ASoC: WM8958: correctly show firmware magic on mismatch

Signed-off-by: Jonathan Neuschäfer <j.neuschaefer@gmx.net>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
12 years agoARM: 7204/1: arch/arm/kernel/setup.c: initialize arm_dma_zone_size earlier
Arnaud Patard [Sun, 11 Dec 2011 19:32:25 +0000 (20:32 +0100)]
ARM: 7204/1: arch/arm/kernel/setup.c: initialize arm_dma_zone_size earlier

arm_dma_zone_size is used by arm_bootmem_free() which is called by
paging_init(). Thus it needs to be set before calling it.

Signed-off-by: Arnaud Patard <arnaud.patard@rtp-net.org>
Acked-by: Nicolas Pitre <nico@linaro.org>
Cc: stable@kernel.org
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
12 years ago[media] s5p-fimc: Fix camera input configuration in subdev operations
Sylwester Nawrocki [Thu, 8 Dec 2011 09:56:22 +0000 (06:56 -0300)]
[media] s5p-fimc: Fix camera input configuration in subdev operations

When using only subdev user-space operations the camera
interface input was not configured properly. Fix this by
updating the corresponding data structure in set_fmt
operation.

Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] m5mols: Fix logic in sanity check
Thomas Jarosch [Sat, 15 Oct 2011 21:38:40 +0000 (18:38 -0300)]
[media] m5mols: Fix logic in sanity check

Detected by "cppcheck".

Signed-off-by: Thomas Jarosch <thomas.jarosch@intra2net.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] ati_remote: switch to single-byte scancodes
Anssi Hannula [Wed, 7 Dec 2011 01:34:29 +0000 (22:34 -0300)]
[media] ati_remote: switch to single-byte scancodes

The ati_remote driver currently uses 2-byte scancodes. However, one of
those bytes is actually a checksum and therefore shouldn't be considered
as part of the scancode.

Fix the driver to only use the actual data byte as a scancode and to
check the checksum itself. Update the bundled keymaps accordingly.

Since ati_remote was only migrated to the rc subsystem for 3.2, the
previous scancodes weren't emitted on any stable kernel.

Reported-by: George Spelvin <linux@horizon.com>
Signed-off-by: Anssi Hannula <anssi.hannula@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] V4L: mt9m111: fix uninitialised mutex
Guennadi Liakhovetski [Thu, 3 Nov 2011 11:12:00 +0000 (08:12 -0300)]
[media] V4L: mt9m111: fix uninitialised mutex

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] V4L: omap1_camera: fix missing <linux/module.h> include
Janusz Krzysztofik [Thu, 24 Nov 2011 23:16:35 +0000 (20:16 -0300)]
[media] V4L: omap1_camera: fix missing <linux/module.h> include

Otherwise compilation breaks with:

...

after apparently no longer included recursively from other header files.

Signed-off-by: Janusz Krzysztofik <jkrzyszt@tis.icnet.pl>
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] V4L: mt9t112: use after free in mt9t112_probe()
Dan Carpenter [Mon, 7 Nov 2011 18:44:12 +0000 (15:44 -0300)]
[media] V4L: mt9t112: use after free in mt9t112_probe()

priv gets dereferenced in mt9t112_set_params() so we should return
before calling that.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] V4L: soc-camera: fix compiler warnings on 64-bit platforms
Guennadi Liakhovetski [Mon, 5 Dec 2011 19:01:13 +0000 (16:01 -0300)]
[media] V4L: soc-camera: fix compiler warnings on 64-bit platforms

On 64-bit platforms assigning a pointer to a 32-bit variable causes a
compiler warning and cannot actually work. Soc-camera currently doesn't
support any 64-bit systems, but such platforms can be added in the
and in any case compiler warnings should be avoided.

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Acked-by: Janusz Krzysztofik <jkrzyszt@tis.icnet.pl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] s5p_mfc_enc: fix s/H264/H263/ typo
Peter Korsgaard [Mon, 5 Dec 2011 09:12:15 +0000 (06:12 -0300)]
[media] s5p_mfc_enc: fix s/H264/H263/ typo

Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
Aked-by: Kamil Debski <k.debski@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] omap_vout: Fix compile error in 3.1
Gary Thomas [Thu, 1 Dec 2011 11:51:09 +0000 (08:51 -0300)]
[media] omap_vout: Fix compile error in 3.1

This patch is against the mainline v3.1 release (c3b92c8) and
fixes a compile error when building for OMAP3+DSS+VOUT

Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Gary Thomas <gary@mlbassoc.com>
Cc: stable@kernel.org
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] au0828: add missing models 72101, 72201 & 72261 to the model matrix
Michael Krufky [Tue, 29 Nov 2011 21:55:04 +0000 (18:55 -0300)]
[media] au0828: add missing models 72101, 72201 & 72261 to the model matrix

Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] au0828: add missing USB ID 2040:7213
Michael Krufky [Tue, 29 Nov 2011 21:23:11 +0000 (18:23 -0300)]
[media] au0828: add missing USB ID 2040:7213

Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] au0828: add missing USB ID 2040:7260
Michael Krufky [Tue, 29 Nov 2011 21:21:41 +0000 (18:21 -0300)]
[media] au0828: add missing USB ID 2040:7260

Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years agoASoC: mxs: Add appropriate MODULE_ALIAS()
Lothar Waßmann [Fri, 9 Dec 2011 13:38:12 +0000 (14:38 +0100)]
ASoC: mxs: Add appropriate MODULE_ALIAS()

Signed-off-by: Lothar Waßmann <LW@KARO-electronics.de>
Acked-by: Wolfram Sang <w.sang@pengutronix.de>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
12 years agoASoC: mxs: Add missing MODULE_LICENSE("GPL")
Lothar Waßmann [Fri, 9 Dec 2011 13:38:11 +0000 (14:38 +0100)]
ASoC: mxs: Add missing MODULE_LICENSE("GPL")

The sound driver refuses to load as module, because of the missing
MODULE_LICENSE("GPL").
The file header indicates that the driver is indeed published under
the GPL.

Signed-off-by: Lothar Waßmann <LW@KARO-electronics.de>
Acked-by: Wolfram Sang <w.sang@pengutronix.de>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
12 years agommc: core: Fix deadlock when the CONFIG_MMC_UNSAFE_RESUME is not defined
Sujit Reddy Thumma [Wed, 23 Nov 2011 03:13:18 +0000 (08:43 +0530)]
mmc: core: Fix deadlock when the CONFIG_MMC_UNSAFE_RESUME is not defined

mmc_suspend_host() tries to claim host during suspend
and release it only when the bus suspend operation is
compeleted. If CONFIG_MMC_UNSAFE_RESUME is defined and
the host is flagged as removable, mmc_suspend_host()
tries to remove the card. In this process, the file system
sync can get blocked trying to acquire host which is already
claimed by mmc_suspend_host() causing deadlock.

Fix this deadlock by releasing host before ->remove() is called.

Signed-off-by: Sujit Reddy Thumma <sthumma@codeaurora.org>
Acked-by: Ulf Hansson <ulf.hansson@stericsson.com>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Chris Ball <cjb@laptop.org>
12 years agommc: sdhci-s3c: Remove old and misprototyped suspend operations
Mark Brown [Mon, 21 Nov 2011 18:00:51 +0000 (18:00 +0000)]
mmc: sdhci-s3c: Remove old and misprototyped suspend operations

Now that the driver is using dev_pm_ops the suspend operations in the
platform_driver structure won't get called so don't need to be there,
and certainly shouldn't be the same function as dev_pm_ops since the
signatures are different.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Jaehoon Chung <jh80.chung@samsung.com>
Signed-off-by: Chris Ball <cjb@laptop.org>
12 years agommc: tmio: fix clock gating on platforms with a .set_pwr() method
Guennadi Liakhovetski [Wed, 16 Nov 2011 09:11:45 +0000 (10:11 +0100)]
mmc: tmio: fix clock gating on platforms with a .set_pwr() method

Do not power down the card in .set_ios(), unless MMC_POWER_OFF is
requested. This fixes the SDHI functionality on ecovec.

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Chris Ball <cjb@laptop.org>
12 years agommc: sh_mmcif: fix clock gating on platforms with a .down_pwr() method
Guennadi Liakhovetski [Wed, 16 Nov 2011 09:10:41 +0000 (10:10 +0100)]
mmc: sh_mmcif: fix clock gating on platforms with a .down_pwr() method

Do not power down the card in .set_ios(), unless MMC_POWER_OFF is
requested. This fixes the MMCIF interface functionality on ecovec boards.

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Chris Ball <cjb@laptop.org>
12 years agommc: core: Fix typo at mmc_card_sleep
Kyungmin Park [Thu, 17 Nov 2011 04:34:33 +0000 (13:34 +0900)]
mmc: core: Fix typo at mmc_card_sleep

Fix wrong bus_ops->sleep check.  (This isn't expected to have real-world
consequences, because the mmc core always defines both 'awake' and
'sleep' ops.)

Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Chris Ball <cjb@laptop.org>
12 years agommc: core: Fix power_off_notify during suspend
Girish K S [Tue, 15 Nov 2011 06:25:46 +0000 (11:55 +0530)]
mmc: core: Fix power_off_notify during suspend

The eMMC 4.5 devices respond to only RESET and AWAKE command in the
sleep state. Hence the mmc switch command to notify power off state
should be sent before the device enters sleep state.

This patch fixes the same.

Signed-off-by: Girish K S <girish.shivananjappa@linaro.org>
Signed-off-by: Chris Ball <cjb@laptop.org>
12 years agommc: core: Fix setting power notify state variable for non-eMMC
Girish K S [Fri, 4 Nov 2011 10:52:47 +0000 (16:22 +0530)]
mmc: core: Fix setting power notify state variable for non-eMMC

This patch skips the setting of the power notify state variable
for non eMMC 4.5 devices. Also fixes the problem of omap_hsmmc
noisy/broken for suspend resume reported by Kevin Hilman.

Signed-off-by: Girish K S <girish.shivananjappa@linaro.org>
Acked-by: Ulf Hansson <ulf.hansson@stericsson.com>
Signed-off-by: Chris Ball <cjb@laptop.org>
12 years agommc: core: Add quirk for long data read time
Stefan Nilsson XK [Thu, 3 Nov 2011 08:44:12 +0000 (09:44 +0100)]
mmc: core: Add quirk for long data read time

Adds a quirk that sets the data read timeout to a fixed value instead
of relying on the information in the CSD. The timeout value chosen
is 300ms since that has proven enough for the problematic cards found,
but could be increased if other cards require this.

This patch also enables this quirk for certain Micron cards known to
have this problem.

Signed-off-by: Stefan Nilsson XK <stefan.xk.nilsson@stericsson.com>
Signed-off-by: Ulf Hansson <ulf.hansson@stericsson.com>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
Cc: <stable@kernel.org>
Signed-off-by: Chris Ball <cjb@laptop.org>