pandora-kernel.git
12 years agoBtrfs: fix eof while discarding extents
Liu Bo [Thu, 12 Apr 2012 20:03:56 +0000 (16:03 -0400)]
Btrfs: fix eof while discarding extents

We miscalculate the length of extents we're discarding, and it leads to
an eof of device.

Reported-by: Daniel Blueman <daniel@quora.org>
Signed-off-by: Liu Bo <liubo2009@cn.fujitsu.com>
Signed-off-by: Chris Mason <chris.mason@oracle.com>
12 years agoBtrfs: fix uninit variable in repair_eb_io_failure
Chris Mason [Thu, 12 Apr 2012 19:55:15 +0000 (15:55 -0400)]
Btrfs: fix uninit variable in repair_eb_io_failure

We'd have to be passing bogus extent buffers for this uninit variable to
actually be used, but set it to zero just in case.

Signed-off-by: Chris Mason <chris.mason@oracle.com>
12 years agoMerge tag 'irqdomain-for-linus' of git://git.secretlab.ca/git/linux-2.6
Linus Torvalds [Thu, 12 Apr 2012 19:49:56 +0000 (12:49 -0700)]
Merge tag 'irqdomain-for-linus' of git://git.secretlab.ca/git/linux-2.6

Pull irqdomain bug fixes from Grant Likely:
 "This branch fixes a bug in irq_create_mapping() where an error return
  from irq_alloc_desc_from() gets ignored.

  It also removes irq_virq_count to fix a bug on powerpc where the
  irqdomain code does not find irqs allocated above the CONFIG_NR_IRQS
  boundary.

  The remaining patches get rid of an completely pointless export and
  fix some minor bugs in the irqdomain debug output."

* tag 'irqdomain-for-linus' of git://git.secretlab.ca/git/linux-2.6:
  irq_domain: Move irq_virq_count into NOMAP revmap
  irqdomain: Fix debugfs formatting
  irq_domain: correct the debugfs file name
  irq: Kill pointless irqd_to_hw export
  irq/irq_domain: Quit ignoring error returns from irq_alloc_desc_from().

12 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input
Linus Torvalds [Thu, 12 Apr 2012 19:49:07 +0000 (12:49 -0700)]
Merge branch 'for-linus' of git://git./linux/kernel/git/dtor/input

Pull input updates from Dmitry Torokhov:
 "Just a few small fixes..."

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input:
  Input: da9052 - fix memory leak in da9052_onkey_probe()
  Input: gpio_mouse - use linux/gpio.h rather than asm/gpio.h
  Input: trackpoint - use psmouse_fmt() for messages
  Input: elantech - v4 is a clickpad, with only one button
  Input: elantech - reset touchpad before configuring it
  Input: sentelic - filter taps in absolute mode
  Input: tps6507x-ts - fix MODULE_ALIAS to match driver name

12 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs
Linus Torvalds [Thu, 12 Apr 2012 19:07:39 +0000 (12:07 -0700)]
Merge branch 'for-linus' of git://git./linux/kernel/git/viro/vfs

Pull vfs fixes from Al Viro:
 "Regression fix in mtdchar_open(), fix for a really old leak
  (almost never hit in practice - it's a b0rken failure exit in
  simple_fill_super()) and a typo fix in vfs.txt (misspelled
  method type)."

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs:
  typo fix in Documentation/filesystems/vfs.txt
  dentry leak in simple_fill_super() failure exit
  fix breakage in mtdchar_open(), sanitize failure exits

12 years agoALSA: hda/realtek - Add quirk for Mac Pro 5,1 machines
Josh Boyer [Thu, 12 Apr 2012 17:55:36 +0000 (13:55 -0400)]
ALSA: hda/realtek - Add quirk for Mac Pro 5,1 machines

A user reported that setting model=imac24 used to allow sound to work on their
Mac Pro 5,1 machine.  Commit 5671087ffa "Move ALC885 macpro and imac24 models
to auto-parser" removed this model option.  All Mac machines are now explicitly
handled with a quirk and the auto-parser.  This adds a quirk for the device
found on the Mac Pro 5,1 machines.

This (partially) fixes https://bugzilla.redhat.com/show_bug.cgi?id=808559

[sorted the new entry in the ID number order by tiwai]

Reported-by: Gabriel Somlo <somlo@cmu.edu>
Signed-off-by: Josh Boyer <jwboyer@redhat.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
12 years agoALSA: hda/realtek - Add a fixup entry for Acer Aspire 8940G
Takashi Iwai [Thu, 12 Apr 2012 06:00:19 +0000 (08:00 +0200)]
ALSA: hda/realtek - Add a fixup entry for Acer Aspire 8940G

It's compatible with 8930G.
Using the same fixup gives the proper 5.1 sound back.

Reported-and-tested-by: Dany Martineau <dany.luc.martineau@gmail.com>
Cc: <stable@kernel.org> [v3.3+]
Signed-off-by: Takashi Iwai <tiwai@suse.de>
12 years agoRevert "Btrfs: increase the global block reserve estimates"
Chris Mason [Thu, 12 Apr 2012 17:46:48 +0000 (13:46 -0400)]
Revert "Btrfs: increase the global block reserve estimates"

This reverts commit 5500cdbe14d7435e04f66ff3cfb8ecd8b8e44ebf.

We've had a number of complaints of early enospc that bisect down
to this patch.  We'll hae to fix the reservations differently.

CC: stable@kernel.org
Signed-off-by: Chris Mason <chris.mason@oracle.com>
12 years agoMerge branch 'exynos-drm-fixes' of git://git.infradead.org/users/kmpark/linux-samsung...
Dave Airlie [Thu, 12 Apr 2012 16:42:01 +0000 (17:42 +0100)]
Merge branch 'exynos-drm-fixes' of git://git.infradead.org/users/kmpark/linux-samsung into drm-intel-fixes

* 'exynos-drm-fixes' of git://git.infradead.org/users/kmpark/linux-samsung:
  drm/exynos: fixed exynos broken ioctl
  drm/exynos: fix to pointer manager member of struct exynos_drm_subdrv
  drm/exynos: fix struct for operation callback functions to driver name
  drm/exynos: use define instead of default_win member in struct mixer_context
  drm/exynos: rename s/HDMI_OVERLAY_NUMBER/MIXER_WIN_NR
  drm/exynos: remove unused codes in hdmi and mixer
  drm/exynos: remove unnecessary type conversion of hdmi and mixer
  drm/exynos: add format list of plane
  drm/exynos: fixed duplicated page allocation bug.
  drm/exynos: fixed page align and code clean.

12 years agoMerge branch 'drm-intel-fixes' of git://people.freedesktop.org/~danvet/drm-intel...
Dave Airlie [Thu, 12 Apr 2012 12:01:57 +0000 (13:01 +0100)]
Merge branch 'drm-intel-fixes' of git://people.freedesktop.org/~danvet/drm-intel into drm-intel-fixes

Daniel Vetter writes:
3 regression fixes:
- disable gmbus again, too broken for 3.4, we'll try again for 3.5
- dp bandwidth computation fix, we've lost the 6bpc dithering flag
 sometimes, this is a 3.3 regression (maybe even earlier for some
 configurations).
- fix resume regression caused by the gen2/3 fencing fix merged into -rc2.

And a few other fixes:
- gpu hang fix for i845 (Chris)
- sprite fix (Armin Reese)
- crtc disable vs. scanlinewait race fix (Chris)
- rc6 module option read-only, it confused testers (Jesse)
- fbc related blitter death hw workaround, note that we disable fbc on snb
 by default anyway.

With these fixes we have one 3.4 regression outstanding: One of the
cleanup patches for the interlaced support managed to confuse the lvds
panel fitter when upscaling. The root-cause is still unclear, but test
patches are awaiting feedback from the reporter.

* 'drm-intel-fixes' of git://people.freedesktop.org/~danvet/drm-intel:
  drm/i915: clear fencing tracking state when retiring requests
  drm/i915: make rc6 module parameter read-only
  drm/i915: implement ColorBlt w/a
  drm/i915/ringbuffer: Exclude last 2 cachlines of ring on 845g
  Revert "drm/i915: reenable gmbus on gen3+ again"
  drm/i915: properly compute dp dithering for user-created modes
  drm/i915: Finish any pending operations on the framebuffer before disabling
  drm/i915: Removed IVB forced enable of sprite dest key.

12 years agoUSB: update usbtmc api documentation
Stephen Lewis [Mon, 2 Apr 2012 20:38:49 +0000 (13:38 -0700)]
USB: update usbtmc api documentation

Correct path names in API documentation for usbtmc

Signed-off-by: Stephen Lewis <lewis@sdf.lonestar.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agoMerge tag 'for-usb-linus-2012-04-11' of git://git.kernel.org/pub/scm/linux/kernel...
Greg Kroah-Hartman [Thu, 12 Apr 2012 15:18:49 +0000 (08:18 -0700)]
Merge tag 'for-usb-linus-2012-04-11' of git://git./linux/kernel/git/sarah/xhci into usb-linus

Hi Greg,

Here's 11 xHCI bug fixes for 3.4.

Some of the patches fix issues with crashes on system resume related to
VIA xHCI host controllers accessing bad memory addresses.  The patches
change the register restore ordering, so I had several vendors confirm
that the patches don't break their xHCI hosts.

Elric Fu confirms this patchset fixes the VIA issue, Alex He confirms
the changes does not break suspend/resume on AMD xHCI systems, and I've
made sure it doesn't break Intel host controllers.  I have not heard
back from Felipe about the TI host, so at this point, I'm just going to
send them off.

Several of the patches are marked for stable.  Please pull.

Sarah Sharp

12 years agoIB/srpt: Set srq_type to IB_SRQT_BASIC
Roland Dreier [Thu, 12 Apr 2012 14:51:08 +0000 (07:51 -0700)]
IB/srpt: Set srq_type to IB_SRQT_BASIC

Since commit 96104eda0169 ("RDMA/core: Add SRQ type field"), kernel
users of SRQs need to specify srq_type = IB_SRQT_BASIC in struct
ib_srq_init_attr, or else most low-level drivers will fail in
when srpt_add_one() calls ib_create_srq() and gets -ENOSYS.

(mlx4_ib works OK nearly all of the time, because it just needs
srq_type != IB_SRQT_XRC.  And apparently nearly everyone using
ib_srpt is using mlx4 hardware)

Reported-by: Alexey Shvetsov <alexxy@gentoo.org>
Cc: <stable@vger.kernel.org>
Signed-off-by: Roland Dreier <roland@purestorage.com>
12 years agoMerge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wirel...
John W. Linville [Thu, 12 Apr 2012 13:55:22 +0000 (09:55 -0400)]
Merge branch 'master' of git://git./linux/kernel/git/linville/wireless into for-davem

12 years agodrm/exynos: fixed exynos broken ioctl
Inki Dae [Thu, 12 Apr 2012 07:42:54 +0000 (16:42 +0900)]
drm/exynos: fixed exynos broken ioctl

this patch removes the pointer of uint64_t *edid. it should be just
a uint64_t.

Signed-off-by: Inki Dae <inki.dae@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
12 years agodrm/i915: clear fencing tracking state when retiring requests
Daniel Vetter [Wed, 11 Apr 2012 23:27:57 +0000 (01:27 +0200)]
drm/i915: clear fencing tracking state when retiring requests

This fixes a resume regression introduced in

commit 7dd4906586274f3945f2aeaaa5a33b451c3b4bba
Author: Chris Wilson <chris@chris-wilson.co.uk>
Date:   Wed Mar 21 10:48:18 2012 +0000

    drm/i915: Mark untiled BLT commands as fenced on gen2/3

which fixed fencing tracking for untiled blt commands.

A side effect of that patch was that now also untiled objects have a
non-zero obj->last_fenced_seqno to track when a fence can be set up
after a pipelined tiling change. Unfortunately this was only cleared
by the fence setup and teardown code, resulting in tons of untiled but
inactive objects with non-zero last_fenced_seqno.

Now after resume we completely reset the seqno tracking, both on the
driver side (by setting dev_priv->next_seqno = 1) and on the hw side
(by allocating a new hws page, which contains the seqnos). Hilarity
and indefinite waits ensued from the stale seqnos in
obj->last_fenced_seqno from before the suspend.

The fix is to properly clear the fencing tracking state like we
already do for the normal gpu rendering while moving objects off the
active list.

Reported-and-tested-by: "Rafael J. Wysocki" <rjw@sisk.pl>
Cc: Jiri Slaby <jslaby@suse.cz>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
Signed-Off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
12 years agoblock: mtip32xx: remove HOTPLUG_PCI_PCIE dependancy
Greg Kroah-Hartman [Thu, 12 Apr 2012 06:47:05 +0000 (08:47 +0200)]
block: mtip32xx: remove HOTPLUG_PCI_PCIE dependancy

This removes the HOTPLUG_PCI_PCIE dependency on the driver and makes it
depend on PCI.

Cc: Sam Bradshaw <sbradshaw@micron.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Acked-by: Asai Thambi S P <asamymuthupa@micron.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
12 years agoirq_domain: Move irq_virq_count into NOMAP revmap
Grant Likely [Wed, 15 Feb 2012 22:06:08 +0000 (15:06 -0700)]
irq_domain: Move irq_virq_count into NOMAP revmap

This patch replaces the old global setting of irq_virq_count that is only
used by the NOMAP mapping and instead uses a revmap_data property so that
the maximum NOMAP allocation can be set per NOMAP irq_domain.

There is exactly one user of irq_virq_count in-tree right now: PS3.
Also, irq_virq_count is only useful for the NOMAP mapping.  So,
instead of having a single global irq_virq_count values, this change
drops it entirely and added a max_irq argument to irq_domain_add_nomap().
That makes it a property of an individual nomap irq domain instead of
a global system settting.

Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
Tested-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Milton Miller <miltonm@bga.com>
12 years agomd/bitmap: prevent bitmap_daemon_work running while initialising bitmap
NeilBrown [Thu, 12 Apr 2012 06:05:06 +0000 (16:05 +1000)]
md/bitmap: prevent bitmap_daemon_work running while initialising bitmap

If a bitmap is added while the array is active, it is possible
for bitmap_daemon_work to run while the bitmap is being
initialised.
This is particularly a problem if bitmap_daemon_work sees
bitmap->filemap as non-NULL before it has been filled in properly.
So hold bitmap_info.mutex while filling in ->filemap
to prevent problems.

This patch is suitable for any -stable kernel, though it might not
apply cleanly before about 3.1.

Cc: stable@vger.kernel.org
Signed-off-by: NeilBrown <neilb@suse.de>
12 years agomd/raid1,raid10: Fix calculation of 'vcnt' when processing error recovery.
majianpeng [Thu, 12 Apr 2012 06:04:47 +0000 (16:04 +1000)]
md/raid1,raid10: Fix calculation of 'vcnt' when processing error recovery.

If r1bio->sectors % 8 != 0,then the memcmp and a later
memcpy will omit the last bio_vec.

This is suitable for any stable kernel since 3.1 when bad-block
management was introduced.

Cc: stable@vger.kernel.org
Signed-off-by: majianpeng <majianpeng@gmail.com>
Signed-off-by: NeilBrown <neilb@suse.de>
12 years agoALSA: hda/realtek - Fix GPIO1 setup for Acer Aspire 4930 & co
Takashi Iwai [Wed, 11 Apr 2012 15:18:12 +0000 (17:18 +0200)]
ALSA: hda/realtek - Fix GPIO1 setup for Acer Aspire 4930 & co

Add GPIO1 setup explicitly for Acer Aspire 493x & co.
This could be set by alc_auto_init_amp(), but it's safer to set it
more explicitly in the fixup table.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
12 years agoMD: Bitmap version cleanup.
Andrei Warkentin [Thu, 12 Apr 2012 05:55:21 +0000 (15:55 +1000)]
MD: Bitmap version cleanup.

bitmap_new_disk_sb() would still create V3 bitmap superblock
with host-endian layout.

Perhaps I'm confused, but shouldn't bitmap_new_disk_sb() be
creating a V4 bitmap superblock instead, that is portable,
as per comment in bitmap.h?

Signed-off-by: Andrei Warkentin <andrey.warkentin@gmail.com>
Signed-off-by: NeilBrown <neilb@suse.de>
12 years agodrm/exynos: fix to pointer manager member of struct exynos_drm_subdrv
Joonyoung Shim [Thu, 5 Apr 2012 11:49:27 +0000 (20:49 +0900)]
drm/exynos: fix to pointer manager member of struct exynos_drm_subdrv

The struct exynos_drm_manager has to exist for exynos drm sub driver
using encoder and connector. If it isn't NULL to member of struct
exynos_drm_subdrv, will create encoder and connector else will not. And
the is_local member also doesn't need.

Signed-off-by: Joonyoung Shim <jy0922.shim@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
12 years agodrm/exynos: fix struct for operation callback functions to driver name
Joonyoung Shim [Thu, 5 Apr 2012 11:49:26 +0000 (20:49 +0900)]
drm/exynos: fix struct for operation callback functions to driver name

The mixer driver and hdmi driver have each operation callback functions
and they is registered to hdmi common driver. Their struct names in hdmi
common driver include display, manager and overlay. It confuses to
appear whose operation and two driver cannot register same operation
callback functions at the same time. Use their struct names to driver
name.

Signed-off-by: Joonyoung Shim <jy0922.shim@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
12 years agodrm/exynos: use define instead of default_win member in struct mixer_context
Joonyoung Shim [Thu, 5 Apr 2012 11:49:25 +0000 (20:49 +0900)]
drm/exynos: use define instead of default_win member in struct mixer_context

The default_win member in struct mixer_context isn't change its value
after initialized to 0, so it's better using to define.

Signed-off-by: Joonyoung Shim <jy0922.shim@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
12 years agodrm/exynos: rename s/HDMI_OVERLAY_NUMBER/MIXER_WIN_NR
Joonyoung Shim [Thu, 5 Apr 2012 11:49:24 +0000 (20:49 +0900)]
drm/exynos: rename s/HDMI_OVERLAY_NUMBER/MIXER_WIN_NR

HDMI_OVERLAY_NUMBER is specific of mixer driver and be used "windows
layer" term in exynos user manaual, so rename it.

Signed-off-by: Joonyoung Shim <jy0922.shim@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
12 years agodrm/exynos: remove unused codes in hdmi and mixer
Joonyoung Shim [Thu, 5 Apr 2012 11:49:23 +0000 (20:49 +0900)]
drm/exynos: remove unused codes in hdmi and mixer

Some members in struct mixer_context aren't used and the define
HDMI_OVERLAY_NUMBER is unused in hdmi driver, remove them.

Signed-off-by: Joonyoung Shim <jy0922.shim@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
12 years agodrm/exynos: remove unnecessary type conversion of hdmi and mixer
Joonyoung Shim [Thu, 5 Apr 2012 11:49:22 +0000 (20:49 +0900)]
drm/exynos: remove unnecessary type conversion of hdmi and mixer

When the void pointer type variable is assigned to the specific pointer
type variable, don't need to do type conversion.

Signed-off-by: Joonyoung Shim <jy0922.shim@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
12 years agoInput: da9052 - fix memory leak in da9052_onkey_probe()
Jesper Juhl [Thu, 12 Apr 2012 03:55:18 +0000 (20:55 -0700)]
Input: da9052 - fix memory leak in da9052_onkey_probe()

If, in drivers/input/misc/da9052_onkey.c::da9052_onkey_probe(), the
call to either kzalloc() or input_allocate_device() fails then we will
return -ENOMEM from the function without freeing the other allocation
that may have succeeded, thus we leak either the memory allocated for
'onkey' or the memory allocated for 'input_dev' if one succeeds and
the other fails.
Fix that by jumping to the 'err_free_mem' label at the end of the
function that properly cleans up rather than returning directly.

Signed-off-by: Jesper Juhl <jj@chaosbits.net>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
12 years agoMerge branch 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc
Linus Torvalds [Thu, 12 Apr 2012 03:56:28 +0000 (20:56 -0700)]
Merge branch 'merge' of git://git./linux/kernel/git/benh/powerpc

Pull powerpc fixes from Benjamin Herrenschmidt:
 "Fixes for two nasty regression affecting powerpc in 3.4."

* 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc:
  powerpc: Fix typo in runlatch code
  powerpc: Fix page fault with lockdep regression

12 years agoRevert "clocksource: Load the ACPI PM clocksource asynchronously"
Thomas Gleixner [Wed, 11 Apr 2012 21:49:16 +0000 (23:49 +0200)]
Revert "clocksource: Load the ACPI PM clocksource asynchronously"

This reverts commit b519508298e0292e1771eecf14aaf67755adc39d.

The reason for this revert is that making the frequency verification
preemptible and interruptible is not working reliably. Michaels
machine failed to use PM-timer with the message:

  PM-Timer running at invalid rate: 113% of normal - aborting.

That's not a surprise as the frequency verification does rely on
interrupts being disabled. With a async scheduled thread there is no
guarantee to achieve the same result. Also some driver might fiddle
with the CTC channel 2 during the verification period, which makes the
result even more random and unpredictable.

This can be solved by using the same mechanism as we use in the
deferred TSC validation code, but that only will work if we verified a
working HPET _BEFORE_ trying to do the PM-Timer lazy validation.

So for now reverting is the safe option.

Bisected-by: Michael Witten <mfwitten@gmail.com>
Cc: Arjan van de Ven <arjanvandeven@gmail.com>
Cc: Arjan van de Ven <arjan@infradead.org>
Cc: John Stultz <johnstul@us.ibm.com>
Cc: Len Brown <lenb@kernel.org>
LKML-Reference: <alpine.LFD.2.02.1204112303270.2542@ionos>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
12 years agoMerge tag 'rdma-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/roland...
Linus Torvalds [Wed, 11 Apr 2012 20:24:52 +0000 (13:24 -0700)]
Merge tag 'rdma-for-linus' of git://git./linux/kernel/git/roland/infiniband

Pull infiniband fixes from Roland Dreier:
 "Fix a regression in the /sys/class/infiniband/.../rate attribute --
  old kernels used to just return something, even if the underlying
  value was out-of-bounds, while 3.4-rc1 returned EINVAL to userspace.
  This breaks some applications that check for the error, so go back to
  the old behavior."

* tag 'rdma-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/roland/infiniband:
  IB/core: Don't return EINVAL from sysfs rate attribute for invalid speeds
  IB/mlx4: Don't return an invalid speed when a port is down

12 years agodrm/i915: make rc6 module parameter read-only
Jesse Barnes [Wed, 11 Apr 2012 16:39:02 +0000 (09:39 -0700)]
drm/i915: make rc6 module parameter read-only

People have been getting confused and thinking this is a runtime control.

Cc: stable@vger.kernel.org
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
12 years agoNFC: Fix the LLCP Tx fragmentation loop
Samuel Ortiz [Tue, 10 Apr 2012 17:43:03 +0000 (19:43 +0200)]
NFC: Fix the LLCP Tx fragmentation loop

Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agortlwifi: Add missing DMA buffer unmapping for PCI drivers
Larry Finger [Mon, 26 Mar 2012 15:48:20 +0000 (10:48 -0500)]
rtlwifi: Add missing DMA buffer unmapping for PCI drivers

In https://bugzilla.kernel.org/show_bug.cgi?id=42976, a system with driver
rtl8192se used as an AP suffers from "Out of SW-IOMMU space" errors. These
are caused by the DMA buffers used for beacons never being unmapped.

This bug was also reported at
https://bugs.launchpad.net/ubuntu/+source/linux/+bug/961618

Reported-and-Tested-by: Da Xue <da@lessconfused.com>
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Cc: Stable <stable@vger.kernel.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agortlwifi: Preallocate USB read buffers and eliminate kalloc in read routine
Larry Finger [Mon, 19 Mar 2012 20:44:31 +0000 (15:44 -0500)]
rtlwifi: Preallocate USB read buffers and eliminate kalloc in read routine

The current version of rtlwifi for USB operations uses kmalloc to
acquire a 32-bit buffer for each read of the device. When
_usb_read_sync() is called with the rcu_lock held, the result is
a "sleeping function called from invalid context" BUG. This is
reported for two cases in https://bugzilla.kernel.org/show_bug.cgi?id=42775.
The first case has the lock originating from within rtlwifi and could
be fixed by rearranging the locking; however, the second originates from
within mac80211. The kmalloc() call is removed from _usb_read_sync()
by creating a ring buffer pointer in the private area and
allocating the buffer data in the probe routine.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Cc: Stable <stable@vger.kernel.org> [This version good for 3.3+ - different patch for 3.2 - 2.6.39]
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoMerge branch 'stable' of git://git.kernel.org/pub/scm/linux/kernel/git/cmetcalf/linux...
Linus Torvalds [Wed, 11 Apr 2012 18:08:20 +0000 (11:08 -0700)]
Merge branch 'stable' of git://git./linux/kernel/git/cmetcalf/linux-tile

Pull arch/tile fixes from Chris Metcalf:
 "This is one important change from Srivatsa Bhat that got dropped when
  I put together my pull request for -rc2, plus a trivial change to
  remove a compiler warning."

* 'stable' of git://git.kernel.org/pub/scm/linux/kernel/git/cmetcalf/linux-tile:
  arch/tile: avoid unused variable warning in proc.c for tilegx
  tile/CPU hotplug: Add missing call to notify_cpu_starting()

12 years agoMerge tag 'sound-3.4' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound
Linus Torvalds [Wed, 11 Apr 2012 18:07:38 +0000 (11:07 -0700)]
Merge tag 'sound-3.4' of git://git./linux/kernel/git/tiwai/sound

Pull sound fixes from Takashi Iwai:
 - A series of fixes for Conexant 20549 HD-audio codec chip
 - A workaround for HDMI hotplug debug prints that annoyed people
 - A fix for the new support of platform DAPM contexts
 - Many driver-specific minor fixes

* tag 'sound-3.4' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound:
  ALSA: hda - hide HDMI/ELD printks unless snd.debug=2
  ALSA: sound/isa/sscape.c: add missing resource-release code
  sound: sound/oss/msnd_pinnacle.c: add vfrees
  ALSA: hda - clean up CX20549 test mixer setup
  ALSA: hda - CX20549 doesn't need pin_amp_workaround.
  ALSA: hda - Remove CD control from model=benq for CX20549
  ALSA: hda - fix record volume controls of CX20459 ("Venice")
  ALSA: hda - Rename capture sources of CX20549 to match common conventions
  ALSA: hda - Fix proc output for ADC amp values of CX20549
  ASoC: tegra: fix i2s compilation when !CONFIG_DEBUG_FS
  ASoC: set idle_bias_off=1 for all platform DAPM contexts
  ASoC: imx-audmux: Check for NULL pointer
  ASoC: imx-audmux: Fix ssi port numbers in sysfs
  ASoC: ak4642: fixup: mute needs +1 step
  MAINTAINERS: Don't list everyone working on Wolfson drivers
  MAINTAINERS: Add missing ASoC OMAP co-maintainer
  ASoC: pxa: pxa2xx-i2s: add io.h for IOMEM macro
  ASoC: tegra: ensure clocks are enabled when touching registers
  ASoC: sgtl5000: Enable VAG when DAC/ADC up
  ALSA: asihpi - fix return value of hpios_locked_mem_alloc()

12 years agoMerge branch 'v4l_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab...
Linus Torvalds [Wed, 11 Apr 2012 18:05:34 +0000 (11:05 -0700)]
Merge branch 'v4l_for_linus' of git://git./linux/kernel/git/mchehab/linux-media

Pull media fixes from Mauro Carvalho Chehab:

 - dvb core: there is a regression found when used with xine.  For
   whatever unknown reason, xine (and xine-lib clients) wants that the
   frontend to tell what frequency he is using even before the PLL lock
   (or at least, it expects a non-zero frequency).

   On DVB, the frequency is only actually known after a frequency
   zig-zag seek, done by the DVB core.  Anyway, the fix was trivial.
   That solves Fedora BZ#808871.

 - ivtv: fix a regression when selecting the language channel

 - uvc: fix a race-related crash

 - it913x: fixes firmware loading

 - two trivial patches (a dependency issue at a radio driver at sound
   Kconfig, and a warning fix on dvb).

* 'v4l_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media:
  [media] uvcvideo: Fix race-related crash in uvc_video_clock_update()
  [media] Drivers/media/radio: Fix build error
  [media] dvb_frontend: fix compiler warning
  [media] it913x: fix firmware loading errors
  [media] ivtv: Fix AUDIO_(BILINGUAL_)CHANNEL_SELECT regression
  [media] dvb_frontend: regression fix: userspace ABI broken for xine

12 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/steve/gfs2-3.0-fixes
Linus Torvalds [Wed, 11 Apr 2012 18:04:45 +0000 (11:04 -0700)]
Merge git://git./linux/kernel/git/steve/gfs2-3.0-fixes

Pull GFS2 fixes from Steven Whitehouse

* git://git.kernel.org/pub/scm/linux/kernel/git/steve/gfs2-3.0-fixes:
  GFS2: Allow caching of rindex glock
  GFS2: Make sure rindex is uptodate before starting transactions
  GFS2: use depends instead of select in kconfig
  GFS2: put glock reference in error patch of read_rindex_entry

12 years agoarch/tile: avoid unused variable warning in proc.c for tilegx
Chris Metcalf [Wed, 11 Apr 2012 16:45:20 +0000 (12:45 -0400)]
arch/tile: avoid unused variable warning in proc.c for tilegx

Until we push the unaligned access support for tilegx, it's silly
to have arch/tile/kernel/proc.c generate a warning about an unused
variable.  Extend the #ifdef to cover all the code and data for now.

Signed-off-by: Chris Metcalf <cmetcalf@tilera.com>
12 years agox86: merge 32/64-bit versions of 'strncpy_from_user()' and speed it up
Linus Torvalds [Fri, 6 Apr 2012 21:32:32 +0000 (14:32 -0700)]
x86: merge 32/64-bit versions of 'strncpy_from_user()' and speed it up

This merges the 32- and 64-bit versions of the x86 strncpy_from_user()
by just rewriting it in C rather than the ancient inline asm versions
that used lodsb/stosb and had been duplicated for (trivial) differences
between the 32-bit and 64-bit versions.

While doing that, it also speeds them up by doing the accesses a word at
a time.  Finally, the new routines also properly handle the case of
hitting the end of the address space, which we have never done correctly
before (fs/namei.c has a hack around it for that reason).

Despite all these improvements, it actually removes more lines than it
adds, due to the de-duplication.  Also, we no longer export (or define)
the legacy __strncpy_from_user() function (that was defined to not do
the user permission checks), since it's not actually used anywhere, and
the user address space checks are built in to the new code.

Other architecture maintainers have been notified that the old hack in
fs/namei.c will be going away in the 3.5 merge window, in case they
copied the x86 approach of being a bit cavalier about the end of the
address space.

Cc: linux-arch@vger.kernel.org
Cc: Ingo Molnar <mingo@kernel.org>
Cc: Peter Anvin" <hpa@zytor.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
12 years agoxHCI: Correct the #define XHCI_LEGACY_DISABLE_SMI
Alex He [Fri, 30 Mar 2012 02:21:38 +0000 (10:21 +0800)]
xHCI: Correct the #define XHCI_LEGACY_DISABLE_SMI

Re-define XHCI_LEGACY_DISABLE_SMI and used it in right way. All SMI enable
bits will be cleared to zero and flag bits 29:31 are also cleared to zero.
Other bits should be presvered as Table 146.

This patch should be backported to kernels as old as 2.6.31.

Signed-off-by: Alex He <alex.he@amd.com>
Signed-off-by: Sarah Sharp <sarah.a.sharp@linux.intel.com>
Cc: stable@vger.kernel.org
12 years agoxHCI: use gfp flags from caller instead of GFP_ATOMIC
Dan Carpenter [Wed, 28 Mar 2012 07:30:26 +0000 (10:30 +0300)]
xHCI: use gfp flags from caller instead of GFP_ATOMIC

The caller is allowed to specify the GFP flags for these functions.
We should prefer their flags unless we have good reason.  For
example, if we take a spin_lock ourselves we'd need to use
GFP_ATOMIC.  But in this case it's safe to use the callers GFP
flags.

The callers all pass GFP_ATOMIC here, so this change doesn't affect
how the kernel behaves but we may add other callers later and this
is a cleanup.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Sarah Sharp <sarah.a.sharp@linux.intel.com>
12 years agoxHCI: add XHCI_RESET_ON_RESUME quirk for VIA xHCI host
Elric Fu [Thu, 29 Mar 2012 07:47:50 +0000 (15:47 +0800)]
xHCI: add XHCI_RESET_ON_RESUME quirk for VIA xHCI host

The suspend operation of VIA xHCI host have some issues and
hibernate operation works fine, so The XHCI_RESET_ON_RESUME
quirk is added for it.

This patch should base on "xHCI: Don't write zeroed pointer
to xHC registers" that is released by Sarah. Otherwise, the
host system error will ocurr in the hibernate operation
process.

This should be backported to stable kernels as old as 2.6.37,
that contain the commit c877b3b2ad5cb9d4fe523c5496185cc328ff3ae9
"xhci: Add reset on resume quirk for asrock p67 host".

Signed-off-by: Elric Fu <elricfu1@gmail.com>
Signed-off-by: Sarah Sharp <sarah.a.sharp@linux.intel.com>
Cc: stable@vger.kernel.org
12 years agoUSB: fix bug of device descriptor got from superspeed device
Elric Fu [Mon, 26 Mar 2012 13:16:02 +0000 (21:16 +0800)]
USB: fix bug of device descriptor got from superspeed device

When the Seagate Goflex USB3.0 device is attached to VIA xHCI
host, sometimes the device will downgrade mode to high speed.
By the USB analyzer, I found the device finished the link
training process and worked at superspeed mode. But the device
descriptor got from the device shows the device works at 2.1.
It is very strange and seems like the device controller of
Seagate Goflex has a little confusion.

The first 8 bytes of device descriptor should be:
12 01 00 03 00 00 00 09

But the first 8 bytes of wrong device descriptor are:
12 01 10 02 00 00 00 40

The wrong device descriptor caused the initialization of mass
storage failed. After a while, the device would be recognized
as a high speed device and works fine.

This patch will warm reset the device to fix the issue after
finding the bcdUSB field of device descriptor isn't 0x0300
but the speed mode of device is superspeed.

This patch should be backported to kernels as old as 3.2, or ones that
contain the commit 75d7cf72ab9fa01dc70877aa5c68e8ef477229dc "usbcore:
refine warm reset logic".

Signed-off-by: Elric Fu <elricfu1@gmail.com>
Acked-by: Andiry Xu <Andiry.Xu@amd.com>
Acked-by: Sergei Shtylyov <sshtylyov@mvista.com>
Signed-off-by: Sarah Sharp <sarah.a.sharp@linux.intel.com>
Cc: stable@vger.kernel.org
12 years agoxhci: Fix register save/restore order.
Sarah Sharp [Fri, 16 Mar 2012 20:19:35 +0000 (13:19 -0700)]
xhci: Fix register save/restore order.

The xHCI 1.0 spec errata released on June 13, 2011, changes the ordering
that the xHCI registers are saved and restored in.  It moves the
interrupt pending (IMAN) and interrupt control (IMOD) registers to be
saved and restored last.  I believe that's because the host controller
may attempt to fetch the event ring table when interrupts are
re-enabled.  Therefore we need to restore the event ring registers
before we re-enable interrupts.

This should be backported to kernels as old as 2.6.37, that contain the
commit 5535b1d5f8885695c6ded783c692e3c0d0eda8ca "USB: xHCI: PCI power
management implementation"

Signed-off-by: Sarah Sharp <sarah.a.sharp@linux.intel.com>
Tested-by: Elric Fu <elricfu1@gmail.com>
Cc: Andiry Xu <andiry.xu@amd.com>
Cc: stable@vger.kernel.org
12 years agoxhci: Restore event ring dequeue pointer on resume.
Sarah Sharp [Fri, 16 Mar 2012 20:27:39 +0000 (13:27 -0700)]
xhci: Restore event ring dequeue pointer on resume.

The xhci_save_registers() function saved the event ring dequeue pointer
in the s3 register structure, but xhci_restore_registers() never
restored it.  No other code in the xHCI successful resume path would
ever restore it either.  Fix that.

This should be backported to kernels as old as 2.6.37, that contain the
commit 5535b1d5f8885695c6ded783c692e3c0d0eda8ca "USB: xHCI: PCI power
management implementation".

Signed-off-by: Sarah Sharp <sarah.a.sharp@linux.intel.com>
Tested-by: Elric Fu <elricfu1@gmail.com>
Cc: Andiry Xu <andiry.xu@amd.com>
Cc: stable@vger.kernel.org
12 years agoxhci: Don't write zeroed pointers to xHC registers.
Sarah Sharp [Fri, 16 Mar 2012 20:09:39 +0000 (13:09 -0700)]
xhci: Don't write zeroed pointers to xHC registers.

When xhci_mem_cleanup() is called, we can't be sure if the xHC is
actually halted.  We can ask the xHC to halt by writing to the RUN bit
in the command register, but that might timeout due to a HW hang.

If the host controller is still running, we should not write zeroed
values to the event ring dequeue pointers or base tables, the DCBAA
pointers, or the command ring pointers.  Eric Fu reports his VIA VL800
host accesses the event ring pointers after a failed register restore on
resume from suspend.  The hypothesis is that the host never actually
halted before the register write to change the event ring pointer to
zero.

Remove all writes of zeroed values to pointer registers in
xhci_mem_cleanup().  Instead, make all callers of the function reset the
host controller first, which will reset those registers to zero.
xhci_mem_init() is the only caller that doesn't first halt and reset the
host controller before calling xhci_mem_cleanup().

This should be backported to kernels as old as 2.6.32.

Signed-off-by: Sarah Sharp <sarah.a.sharp@linux.intel.com>
Tested-by: Elric Fu <elricfu1@gmail.com>
Cc: stable@vger.kernel.org
12 years agoxhci: Warn when hosts don't halt.
Sarah Sharp [Fri, 16 Mar 2012 19:58:20 +0000 (12:58 -0700)]
xhci: Warn when hosts don't halt.

Eric Fu reports a problem with his VIA host controller fetching a zeroed
event ring pointer on resume from suspend.  The host should have been
halted, but we can't be sure because that code ignores the return value
from xhci_halt().  Print a warning when the host controller refuses to
halt within XHCI_MAX_HALT_USEC (currently 16 seconds).

(Update: it turns out that the VIA host controller is reporting a halted
state when it fetches the zeroed event ring pointer.  However, we still
need this warning for other host controllers.)

Signed-off-by: Sarah Sharp <sarah.a.sharp@linux.intel.com>
12 years agoxhci: don't re-enable IE constantly
Felipe Balbi [Thu, 15 Mar 2012 14:37:08 +0000 (16:37 +0200)]
xhci: don't re-enable IE constantly

While we're at that, define IMAN bitfield to aid readability.

The interrupt enable bit should be set once on driver init, and we
shouldn't need to continually re-enable it.  Commit c21599a3 introduced
a read of the irq_pending register, and that allows us to preserve the
state of the IE bit.  Before that commit, we were blindly writing 0x3 to
the register.

This patch should be backported to kernels as old as 2.6.36, or ones
that contain the commit c21599a36165dbc78b380846b254017a548b9de5 "USB:
xhci: Reduce reads and writes of interrupter registers".

Signed-off-by: Felipe Balbi <balbi@ti.com>
Signed-off-by: Sarah Sharp <sarah.a.sharp@linux.intel.com>
Cc: stable@vger.kernel.org
12 years agocred: copy_process() should clear child->replacement_session_keyring
Oleg Nesterov [Mon, 9 Apr 2012 19:03:50 +0000 (21:03 +0200)]
cred: copy_process() should clear child->replacement_session_keyring

keyctl_session_to_parent(task) sets ->replacement_session_keyring,
it should be processed and cleared by key_replace_session_keyring().

However, this task can fork before it notices TIF_NOTIFY_RESUME and
the new child gets the bogus ->replacement_session_keyring copied by
dup_task_struct(). This is obviously wrong and, if nothing else, this
leads to put_cred(already_freed_cred).

change copy_creds() to clear this member. If copy_process() fails
before this point the wrong ->replacement_session_keyring doesn't
matter, exit_creds() won't be called.

Cc: <stable@vger.kernel.org>
Signed-off-by: Oleg Nesterov <oleg@redhat.com>
Acked-by: David Howells <dhowells@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
12 years agoperf kvm: Finding struct machine fails for PERF_RECORD_MMAP
Nikunj A. Dadhania [Mon, 9 Apr 2012 08:22:23 +0000 (13:52 +0530)]
perf kvm: Finding struct machine fails for PERF_RECORD_MMAP

Running 'perf kvm --host --guest --guestmount /tmp/guestmount record -a -g -- sleep 2'

Was resulting in a segfault. For event type PERF_RECORD_MMAP,
event->ip.pid is being used in perf_session__find_machine_for_cpumode,
which is not correct.

The event->ip.pid field happens to be 0 in this case and results in
returning a NULL machine object. Finally, access to self->pid in
machine__mmap_name, results in a segfault later.

For PERF_RECORD_MMAP type, pass event->mmap.pid.

Signed-off-by: Nikunj A. Dadhania <nikunj@linux.vnet.ibm.com>
Reviewed-by: David Ahern <dsahern@gmail.com>
Tested-by: David Ahern <dsahern@gmail.com>
Cc: David Ahern <dsahern@gmail.com>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Stephane Eranian <eranian@google.com>
Cc: Nikunj A. Dadhania <nikunj@linux.vnet.ibm.com>
Link: http://lkml.kernel.org/r/20120409081835.10576.22018.stgit@abhimanyu.in.ibm.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
12 years agotcp: avoid order-1 allocations on wifi and tx path
Eric Dumazet [Tue, 10 Apr 2012 20:30:48 +0000 (20:30 +0000)]
tcp: avoid order-1 allocations on wifi and tx path

Marc Merlin reported many order-1 allocations failures in TX path on its
wireless setup, that dont make any sense with MTU=1500 network, and non
SG capable hardware.

After investigation, it turns out TCP uses sk_stream_alloc_skb() and
used as a convention skb_tailroom(skb) to know how many bytes of data
payload could be put in this skb (for non SG capable devices)

Note : these skb used kmalloc-4096 (MTU=1500 + MAX_HEADER +
sizeof(struct skb_shared_info) being above 2048)

Later, mac80211 layer need to add some bytes at the tail of skb
(IEEE80211_ENCRYPT_TAILROOM = 18 bytes) and since no more tailroom is
available has to call pskb_expand_head() and request order-1
allocations.

This patch changes sk_stream_alloc_skb() so that only
sk->sk_prot->max_header bytes of headroom are reserved, and use a new
skb field, avail_size to hold the data payload limit.

This way, order-0 allocations done by TCP stack can leave more than 2 KB
of tailroom and no more allocation is performed in mac80211 layer (or
any layer needing some tailroom)

avail_size is unioned with mark/dropcount, since mark will be set later
in IP stack for output packets. Therefore, skb size is unchanged.

Reported-by: Marc MERLIN <marc@merlins.org>
Tested-by: Marc MERLIN <marc@merlins.org>
Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agonet: allow pskb_expand_head() to get maximum tailroom
Eric Dumazet [Tue, 10 Apr 2012 20:08:39 +0000 (20:08 +0000)]
net: allow pskb_expand_head() to get maximum tailroom

Marc Merlin reported many order-1 allocations failures in TX path on its
wireless setup, that dont make any sense with MTU=1500 network, and non
SG capable hardware.

Turns out part of the problem comes from pskb_expand_head() not using
ksize() to get exact head size given by kmalloc(). Doing the same thing
than __alloc_skb() allows more tailroom in skb and can prevent future
reallocations.

As a bonus, struct skb_shared_info becomes cache line aligned.

Reported-by: Marc MERLIN <marc@merlins.org>
Tested-by: Marc MERLIN <marc@merlins.org>
Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agobridge: Do not send queries on multicast group leaves
Herbert Xu [Wed, 4 Apr 2012 01:01:20 +0000 (01:01 +0000)]
bridge: Do not send queries on multicast group leaves

As it stands the bridge IGMP snooping system will respond to
group leave messages with queries for remaining membership.
This is both unnecessary and undesirable.  First of all any
multicast routers present should be doing this rather than us.
What's more the queries that we send may end up upsetting other
multicast snooping swithces in the system that are buggy.

In fact, we can simply remove the code that send these queries
because the existing membership expiry mechanism doesn't rely
on them anyway.

So this patch simply removes all code associated with group
queries in response to group leave messages.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agoALSA: hda/realtek - Add a few ALC882 model strings back
Takashi Iwai [Wed, 11 Apr 2012 12:03:41 +0000 (14:03 +0200)]
ALSA: hda/realtek - Add a few ALC882 model strings back

Since there are still many Acer models that might not be covered by
the current fixup table, let's add back a few typical model names so
that user can test the fixup without recompiling.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
12 years agodrm/i915: implement ColorBlt w/a
Daniel Vetter [Sat, 31 Mar 2012 09:21:57 +0000 (11:21 +0200)]
drm/i915: implement ColorBlt w/a

According to an internal workaround master list, we need to set bit 5
of register 9400 to avoid issues with color blits.

Testing shows that this seems to fix the blitter hangs when fbc is
enabled on snb, thanks to Chris Wilson for figuring this out.

Tested-by: Chris Wilson <chris@chris-wilson.co.uk>
Tested-by: Michael "brot" Groh <michael.groh@minad.de>
Acked-by: Ben Widawsky <ben@bwidawsk.net>
Signed-Off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
12 years agodrm/i915/ringbuffer: Exclude last 2 cachlines of ring on 845g
Chris Wilson [Mon, 9 Apr 2012 12:59:46 +0000 (13:59 +0100)]
drm/i915/ringbuffer: Exclude last 2 cachlines of ring on 845g

The 845g shares the errata with i830 whereby executing a command
within 2 cachelines of the end of the ringbuffer may cause a GPU hang.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: stable@kernel.org
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
12 years agoRevert "drm/i915: reenable gmbus on gen3+ again"
Daniel Vetter [Mon, 9 Apr 2012 19:10:38 +0000 (21:10 +0200)]
Revert "drm/i915: reenable gmbus on gen3+ again"

This reverts commit c3dfefa0a6d235bd465309e12f4c56ea16e71111.

gmbus in 3.4 has simply too many known issues:
- gmbus is too noisy, we need to rework the logging:
  https://bugs.freedesktop.org/show_bug.cgi?id=48248
- zero-length writes cause an OOPS, and they are
  userspace-triggerable:
  https://lkml.org/lkml/2012/3/30/176
- same for zero-length reads:
  https://bugs.freedesktop.org/show_bug.cgi?id=48269

We can try again for 3.5.

Acked-by: Chris Wilson <chris@chris-wilson.co.uk>
Signed-Off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
12 years agodrm/radeon: only add the mm i2c bus if the hw_i2c module param is set
Alex Deucher [Tue, 10 Apr 2012 16:14:27 +0000 (12:14 -0400)]
drm/radeon: only add the mm i2c bus if the hw_i2c module param is set

It seems it can corrupt the monitor EDID in certain cases on certain
boards when running sensors detect.  It's rarely used anyway outside
of AIW boards.

http://lists.lm-sensors.org/pipermail/lm-sensors/2012-April/035847.html
http://lists.freedesktop.org/archives/xorg/2011-January/052239.html

Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Cc: stable@vger.kernel.org
Acked-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Dave Airlie <airlied@redhat.com>
12 years agovgaarb.h: fix build warnings
Randy Dunlap [Mon, 30 Jan 2012 19:43:52 +0000 (11:43 -0800)]
vgaarb.h: fix build warnings

Fix build warnings by providing a struct stub since no fields of
the struct are used:

include/linux/vgaarb.h:66:9: warning: 'struct pci_dev' declared inside parameter list
include/linux/vgaarb.h:66:9: warning: its scope is only this definition or declaration, which is probably not what you want
include/linux/vgaarb.h:99:34: warning: 'struct pci_dev' declared inside parameter list
include/linux/vgaarb.h:109:6: warning: 'struct pci_dev' declared inside parameter list
include/linux/vgaarb.h:121:8: warning: 'struct pci_dev' declared inside parameter list
include/linux/vgaarb.h:140:37: warning: 'struct pci_dev' declared inside parameter list

Signed-off-by: Randy Dunlap <rdunlap@xenotime.net>
Signed-off-by: Dave Airlie <airlied@redhat.com>
12 years agoirqdomain: Fix debugfs formatting
Grant Likely [Wed, 11 Apr 2012 06:26:25 +0000 (00:26 -0600)]
irqdomain: Fix debugfs formatting

This patch fixes the irq_domain_mapping debugfs output to pad pointer
values with leading zeros so that pointer values are displayed
correctly.  Otherwise you get output similar to "0x 5e0000000000000".
Also, when the irq_domain is set to 'null'

Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
Cc: David Daney <david.daney@cavium.com>
Cc: Mika Westerberg <mika.westerberg@linux.intel.com>
12 years agoirq_domain: correct the debugfs file name
Mika Westerberg [Tue, 10 Apr 2012 12:25:42 +0000 (15:25 +0300)]
irq_domain: correct the debugfs file name

The actual name of the irq_domain mapping debugfs file is
"irq_domain_mapping" not "virq_mapping".

Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
12 years agoirq: Kill pointless irqd_to_hw export
Grant Likely [Tue, 3 Apr 2012 13:11:04 +0000 (07:11 -0600)]
irq: Kill pointless irqd_to_hw export

It makes no sense to export this trivial function.  Make it a static inline
instead.

This patch also drops virq_to_hw from arch/c6x since it is unused by that
architecture.

v2: Move irq_hw_number_t into types.h to fix ARM build failure

Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
Acked-by: Thomas Gleixner <tglx@linutronix.de>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
12 years agoirq/irq_domain: Quit ignoring error returns from irq_alloc_desc_from().
David Daney [Thu, 5 Apr 2012 23:52:13 +0000 (16:52 -0700)]
irq/irq_domain: Quit ignoring error returns from irq_alloc_desc_from().

In commit 4bbdd45a (irq_domain/powerpc: eliminate irq_map; use
irq_alloc_desc() instead) code was added that ignores error returns
from irq_alloc_desc_from() by (silently) casting the return value to
unsigned.  The negitive value error return now suddenly looks like a
valid irq number.

Commits cc79ca69 (irq_domain: Move irq_domain code from powerpc to
kernel/irq) and 1bc04f2c (irq_domain: Add support for base irq and
hwirq in legacy mappings) move this code to its current location in
irqdomain.c

The result of all of this is a null pointer dereference OOPS if one of
the error cases is hit.

The fix: Don't cast away the negativeness of the return value and then
check for errors.

Signed-off-by: David Daney <david.daney@cavium.com>
Acked-by: Rob Herring <rob.herring@calxeda.com>
[grant.likely: dropped addition of new 'irq' variable]
Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
12 years agospi/imx: prevent NULL pointer dereference in spi_imx_probe()
Lothar Waßmann [Tue, 3 Apr 2012 13:03:44 +0000 (15:03 +0200)]
spi/imx: prevent NULL pointer dereference in spi_imx_probe()

When no platform_data is present and either 'spi-num-chipselects' is
not defined in the DT or 'cs-gpios' has less entries than
'spi-num-chipselects' specifies, the NULL platform_data pointer is
being dereferenced.

Signed-off-by: Lothar Waßmann <LW@KARO-electronics.de>
Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
12 years agogpio/exynos: Fix compiler warning in gpio-samsung.c file
Sachin Kamat [Tue, 3 Apr 2012 08:42:55 +0000 (14:12 +0530)]
gpio/exynos: Fix compiler warning in gpio-samsung.c file

Fixes the following warning when "SAMSUNG EXYNOS5" is not selected:

warning: ‘exynos5_gpios_1’ defined but not used [-Wunused-variable]
warning: ‘exynos5_gpios_2’ defined but not used [-Wunused-variable]
warning: ‘exynos5_gpios_3’ defined but not used [-Wunused-variable]
warning: ‘exynos5_gpios_4’ defined but not used [-Wunused-variable]

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
12 years agoMAINTAINERS: Mark NATSEMI driver as orphan'd.
David S. Miller [Wed, 11 Apr 2012 01:10:43 +0000 (21:10 -0400)]
MAINTAINERS: Mark NATSEMI driver as orphan'd.

After discussion with Tim Hockin.

Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agopowerpc: Fix typo in runlatch code
Benjamin Herrenschmidt [Wed, 11 Apr 2012 00:42:15 +0000 (10:42 +1000)]
powerpc: Fix typo in runlatch code

Commit fe1952fc0afb9a2e4c79f103c08aef5d13db1873
"powerpc: Rework runlatch code" has a nasty typo
where it uses "TLF_RUNLATCH" instead of "_TLF_RUNLATCH"
(bit number instead of bit mask), causing some flags to
be potentially lost such as _TLF_RESTORE_SIGMASK

(Brown paper bag for me ! We should be able to make
that break at compile time with a bit of magic, any
volunteer ?)

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
12 years agoSmack: build when CONFIG_AUDIT not defined
Kees Cook [Tue, 10 Apr 2012 20:26:44 +0000 (13:26 -0700)]
Smack: build when CONFIG_AUDIT not defined

This fixes builds where CONFIG_AUDIT is not defined and
CONFIG_SECURITY_SMACK=y.

This got introduced by the stack-usage reducation commit 48c62af68a40
("LSM: shrink the common_audit_data data union").

Signed-off-by: Kees Cook <keescook@chromium.org>
Acked-by: Eric Paris <eparis@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
12 years agoMerge tag 'dmaengine-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/djbw...
Linus Torvalds [Tue, 10 Apr 2012 22:30:16 +0000 (15:30 -0700)]
Merge tag 'dmaengine-fixes' of git://git./linux/kernel/git/djbw/dmaengine

Pull dmaengine fixes from Dan Williams:

1/ regression fix for Xen as it now trips over a broken assumption
   about the dma address size on 32-bit builds

2/ new quirk for netdma to ignore dma channels that cannot meet
   netdma alignment requirements

3/ fixes for two long standing issues in ioatdma (ring size overflow)
   and iop-adma (potential stack corruption)

* tag 'dmaengine-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/djbw/dmaengine:
  netdma: adding alignment check for NETDMA ops
  ioatdma: DMA copy alignment needed to address IOAT DMA silicon errata
  ioat: ring size variables need to be 32bit to avoid overflow
  iop-adma: Corrected array overflow in RAID6 Xscale(R) test.
  ioat: fix size of 'completion' for Xen

12 years agousb: xhci: fix section mismatch in linux-next
Gerard Snitselaar [Fri, 16 Mar 2012 18:34:11 +0000 (11:34 -0700)]
usb: xhci: fix section mismatch in linux-next

xhci_unregister_pci() is called in xhci_hcd_init().

Signed-off-by: Gerard Snitselaar <dev@snitselaar.org>
Signed-off-by: Sarah Sharp <sarah.a.sharp@linux.intel.com>
12 years agoxHCI: correct to print the true HSEE of USBCMD
Alex He [Thu, 22 Mar 2012 07:06:59 +0000 (15:06 +0800)]
xHCI: correct to print the true HSEE of USBCMD

Correct the print of HSEE of USBCMD in xhci-dbg.c.

Signed-off-by: Alex He <alex.he@amd.com>
Signed-off-by: Sarah Sharp <sarah.a.sharp@linux.intel.com>
12 years agokobject: provide more diagnostic info for kobject_add_internal() failures
Dan Williams [Fri, 6 Apr 2012 20:41:15 +0000 (13:41 -0700)]
kobject: provide more diagnostic info for kobject_add_internal() failures

1/ convert open-coded KERN_ERR+dump_stack() to WARN(), so that automated
   tools pick up this warning.

2/ include the 'child' and 'parent' kobject names.  This information was
   useful for tracking down the case where scsi invoked device_del() on a
   parent object and subsequently invoked device_add() on a child.  Now the
   warning looks like:

     kobject_add_internal failed for target8:0:16 (error: -2 parent: end_device-8:0:24)
     Pid: 2942, comm: scsi_scan_8 Not tainted 3.3.0-rc7-isci+ #2
     Call Trace:
      [<ffffffff8125e551>] kobject_add_internal+0x1c1/0x1f3
      [<ffffffff81075149>] ? trace_hardirqs_on+0xd/0xf
      [<ffffffff8125e659>] kobject_add_varg+0x41/0x50
      [<ffffffff8125e723>] kobject_add+0x64/0x66
      [<ffffffff8131124b>] device_add+0x12d/0x63a
      [<ffffffff8125e0ef>] ? kobject_put+0x4c/0x50
      [<ffffffff8132f370>] scsi_sysfs_add_sdev+0x4e/0x28a
      [<ffffffff8132dce3>] do_scan_async+0x9c/0x145

Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: James Bottomley <JBottomley@parallels.com>
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agosysfs: handle 'parent deleted before child added'
Dan Williams [Fri, 6 Apr 2012 20:41:06 +0000 (13:41 -0700)]
sysfs: handle 'parent deleted before child added'

In scsi at least two cases of the parent device being deleted before the
child is added have been observed.

1/ scsi is performing async scans and the device is removed prior to the
   async can thread running (can happen with an in-opportune / unlikely
   unplug during initial scan).

2/ libsas discovery event running after the parent port has been torn
   down (this is a bug in libsas).

Result in crash signatures like:
 BUG: unable to handle kernel NULL pointer dereference at 0000000000000098
 IP: [<ffffffff8115e100>] sysfs_create_dir+0x32/0xb6
 ...
 Process scsi_scan_8 (pid: 5417, threadinfo ffff88080bd16000, task ffff880801b8a0b0)
 Stack:
  00000000fffffffe ffff880813470628 ffff88080bd17cd0 ffff88080614b7e8
  ffff88080b45c108 00000000fffffffe ffff88080bd17d20 ffffffff8125e4a8
  ffff88080bd17cf0 ffffffff81075149 ffff88080bd17d30 ffff88080614b7e8
 Call Trace:
  [<ffffffff8125e4a8>] kobject_add_internal+0x120/0x1e3
  [<ffffffff81075149>] ? trace_hardirqs_on+0xd/0xf
  [<ffffffff8125e641>] kobject_add_varg+0x41/0x50
  [<ffffffff8125e70b>] kobject_add+0x64/0x66
  [<ffffffff8131122b>] device_add+0x12d/0x63a

In this scenario the parent is still valid (because we have a
reference), but it has been device_del()'d which means its kobj->sd
pointer is NULL'd via:

 device_del()->kobject_del()->sysfs_remove_dir()

...and then sysfs_create_dir() (without this fix) goes ahead and
de-references parent_sd via sysfs_ns_type():

 return (sd->s_flags & SYSFS_NS_TYPE_MASK) >> SYSFS_NS_TYPE_SHIFT;

This scenario is being fixed in scsi/libsas, but if other subsystems
present the same ordering the system need not immediately crash.

Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: James Bottomley <JBottomley@parallels.com>
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agosysfs: Prevent crash on unset sysfs group attributes
Bruno Prémont [Tue, 3 Apr 2012 07:59:48 +0000 (09:59 +0200)]
sysfs: Prevent crash on unset sysfs group attributes

Do not let the kernel crash when a device is registered with
sysfs while group attributes are not set (aka NULL).

Warn about the offender with some information about the offending
device.

This would warn instead of trying NULL pointer deref like:
 BUG: unable to handle kernel NULL pointer dereference at (null)
 IP: [<ffffffff81152673>] internal_create_group+0x83/0x1a0
 PGD 0
 Oops: 0000 [#1] SMP
 CPU 0
 Modules linked in:

 Pid: 1, comm: swapper/0 Not tainted 3.4.0-rc1-x86_64 #3 HP ProLiant DL360 G4
 RIP: 0010:[<ffffffff81152673>]  [<ffffffff81152673>] internal_create_group+0x83/0x1a0
 RSP: 0018:ffff88019485fd70  EFLAGS: 00010202
 RAX: 0000000000000001 RBX: 0000000000000000 RCX: 0000000000000001
 RDX: ffff880192e99908 RSI: ffff880192e99630 RDI: ffffffff81a26c60
 RBP: ffff88019485fdc0 R08: 0000000000000000 R09: 0000000000000000
 R10: ffff880192e99908 R11: 0000000000000000 R12: ffffffff81a16a00
 R13: ffff880192e99908 R14: ffffffff81a16900 R15: 0000000000000000
 FS:  0000000000000000(0000) GS:ffff88019bc00000(0000) knlGS:0000000000000000
 CS:  0010 DS: 0000 ES: 0000 CR0: 000000008005003b
 CR2: 0000000000000000 CR3: 0000000001a0c000 CR4: 00000000000007f0
 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
 DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400
 Process swapper/0 (pid: 1, threadinfo ffff88019485e000, task ffff880194878000)
 Stack:
  ffff88019485fdd0 ffff880192da9d60 0000000000000000 ffff880192e99908
  ffff880192e995d8 0000000000000001 ffffffff81a16a00 ffff880192da9d60
  0000000000000000 0000000000000000 ffff88019485fdd0 ffffffff811527be
 Call Trace:
  [<ffffffff811527be>] sysfs_create_group+0xe/0x10
  [<ffffffff81376ca6>] device_add_groups+0x46/0x80
  [<ffffffff81377d3d>] device_add+0x46d/0x6a0
  ...

Signed-off-by: Bruno Prémont <bonbons@linux-vserver.org>
Acked-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agoUSB: serial: fix race between probe and open
Johan Hovold [Tue, 20 Mar 2012 15:59:33 +0000 (16:59 +0100)]
USB: serial: fix race between probe and open

Fix race between probe and open by making sure that the disconnected
flag is not cleared until all ports have been registered.

A call to tty_open while probe is running may get a reference to the
serial structure in serial_install before its ports have been
registered. This may lead to usb_serial_core calling driver open before
port is fully initialised.

With ftdi_sio this result in the following NULL-pointer dereference as
the private data has not been initialised at open:

[  199.698286] IP: [<f811a089>] ftdi_open+0x59/0xe0 [ftdi_sio]
[  199.698297] *pde = 00000000
[  199.698303] Oops: 0000 [#1] PREEMPT SMP
[  199.698313] Modules linked in: ftdi_sio usbserial
[  199.698323]
[  199.698327] Pid: 1146, comm: ftdi_open Not tainted 3.2.11 #70 Dell Inc. Vostro 1520/0T816J
[  199.698339] EIP: 0060:[<f811a089>] EFLAGS: 00010286 CPU: 0
[  199.698344] EIP is at ftdi_open+0x59/0xe0 [ftdi_sio]
[  199.698348] EAX: 0000003e EBX: f5067000 ECX: 00000000 EDX: 80000600
[  199.698352] ESI: f48d8800 EDI: 00000001 EBP: f515dd54 ESP: f515dcfc
[  199.698356]  DS: 007b ES: 007b FS: 00d8 GS: 0033 SS: 0068
[  199.698361] Process ftdi_open (pid: 1146, ti=f515c000 task=f481e040 task.ti=f515c000)
[  199.698364] Stack:
[  199.698368]  f811a9fe f811a9e0 f811b3ef 00000000 00000000 00001388 00000000 f4a86800
[  199.698387]  00000002 00000000 f806e68e 00000000 f532765c f481e040 00000246 22222222
[  199.698479]  22222222 22222222 22222222 f5067004 f5327600 f5327638 f515dd74 f806e6ab
[  199.698496] Call Trace:
[  199.698504]  [<f806e68e>] ? serial_activate+0x2e/0x70 [usbserial]
[  199.698511]  [<f806e6ab>] serial_activate+0x4b/0x70 [usbserial]
[  199.698521]  [<c126380c>] tty_port_open+0x7c/0xd0
[  199.698527]  [<f806e660>] ? serial_set_termios+0xa0/0xa0 [usbserial]
[  199.698534]  [<f806e76f>] serial_open+0x2f/0x70 [usbserial]
[  199.698540]  [<c125d07c>] tty_open+0x20c/0x510
[  199.698546]  [<c10e9eb7>] chrdev_open+0xe7/0x230
[  199.698553]  [<c10e48f2>] __dentry_open+0x1f2/0x390
[  199.698559]  [<c144bfec>] ? _raw_spin_unlock+0x2c/0x50
[  199.698565]  [<c10e4b76>] nameidata_to_filp+0x66/0x80
[  199.698570]  [<c10e9dd0>] ? cdev_put+0x20/0x20
[  199.698576]  [<c10f3e08>] do_last+0x198/0x730
[  199.698581]  [<c10f4440>] path_openat+0xa0/0x350
[  199.698587]  [<c10f47d5>] do_filp_open+0x35/0x80
[  199.698593]  [<c144bfec>] ? _raw_spin_unlock+0x2c/0x50
[  199.698599]  [<c10ff110>] ? alloc_fd+0xc0/0x100
[  199.698605]  [<c10f0b72>] ? getname_flags+0x72/0x120
[  199.698611]  [<c10e4450>] do_sys_open+0xf0/0x1c0
[  199.698617]  [<c11fcc08>] ? trace_hardirqs_on_thunk+0xc/0x10
[  199.698623]  [<c10e458e>] sys_open+0x2e/0x40
[  199.698628]  [<c144c990>] sysenter_do_call+0x12/0x36
[  199.698632] Code: 85 89 00 00 00 8b 16 8b 4d c0 c1 e2 08 c7 44 24 14 88 13 00 00 81 ca 00 00 00 80 c7 44 24 10 00 00 00 00 c7 44 24 0c 00 00 00 00 <0f> b7 41 78 31 c9 89 44 24 08 c7 44 24 04 00 00 00 00 c7 04 24
[  199.698884] EIP: [<f811a089>] ftdi_open+0x59/0xe0 [ftdi_sio] SS:ESP 0068:f515dcfc
[  199.698893] CR2: 0000000000000078
[  199.698925] ---[ end trace 77c43ec023940cff ]---

Reported-and-tested-by: Ken Huang <csuhgw@gmail.com>
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Johan Hovold <jhovold@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agogpio: Fix range check in of_gpio_simple_xlate()
Roland Stigge [Wed, 4 Apr 2012 00:02:58 +0000 (02:02 +0200)]
gpio: Fix range check in of_gpio_simple_xlate()

of_gpio_simple_xlate() has an off-by-one bug where it checks to see if
args[0] is > ngpio instead of >=.  args[0] must always be less than
ngpio because it is a zero-based enumeration.

Signed-off-by: Roland Stigge <stigge@antcom.de>
[grant.likely: beef up commit text]
Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
12 years agogpio: Fix uninitialized variable bit in adp5588_irq_handler
Axel Lin [Fri, 6 Apr 2012 12:37:43 +0000 (20:37 +0800)]
gpio: Fix uninitialized variable bit in adp5588_irq_handler

The variable 'bit' is uninitialized in the first iteration of for
loop. Fix it.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
12 years agogpio/sodaville: Convert sodaville driver to new irqdomain API
Grant Likely [Wed, 28 Mar 2012 20:55:04 +0000 (14:55 -0600)]
gpio/sodaville: Convert sodaville driver to new irqdomain API

The irqdomain api changed significantly in v3.4 which caused a build
failure for this driver.

Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
Acked-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Cc: Hans J. Koch <hjk@linutronix.de>
Cc: Torben Hohn <torbenh@linutronix.de>
12 years agotcp: fix tcp_rcv_rtt_update() use of an unscaled RTT sample
Neal Cardwell [Tue, 10 Apr 2012 07:59:20 +0000 (07:59 +0000)]
tcp: fix tcp_rcv_rtt_update() use of an unscaled RTT sample

Fix a code path in tcp_rcv_rtt_update() that was comparing scaled and
unscaled RTT samples.

The intent in the code was to only use the 'm' measurement if it was a
new minimum.  However, since 'm' had not yet been shifted left 3 bits
but 'new_sample' had, this comparison would nearly always succeed,
leading us to erroneously set our receive-side RTT estimate to the 'm'
sample when that sample could be nearly 8x too high to use.

The overall effect is to often cause the receive-side RTT estimate to
be significantly too large (up to 40% too large for brief periods in
my tests).

Signed-off-by: Neal Cardwell <ncardwell@google.com>
Acked-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agotcp: restore correct limit
Eric Dumazet [Tue, 10 Apr 2012 00:56:42 +0000 (00:56 +0000)]
tcp: restore correct limit

Commit c43b874d5d714f (tcp: properly initialize tcp memory limits) tried
to fix a regression added in commits 4acb4190 & 3dc43e3,
but still get it wrong.

Result is machines with low amount of memory have too small tcp_rmem[2]
value and slow tcp receives : Per socket limit being 1/1024 of memory
instead of 1/128 in old kernels, so rcv window is capped to small
values.

Fix this to match comment and previous behavior.

Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Cc: Jason Wang <jasowang@redhat.com>
Cc: Glauber Costa <glommer@parallels.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agoMerge branch 'master' of git://1984.lsi.us.es/net
David S. Miller [Tue, 10 Apr 2012 18:38:31 +0000 (14:38 -0400)]
Merge branch 'master' of git://1984.lsi.us.es/net

12 years agoRevert "ath9k: fix going to full-sleep on PS idle"
Sujith Manoharan [Tue, 10 Apr 2012 06:56:11 +0000 (12:26 +0530)]
Revert "ath9k: fix going to full-sleep on PS idle"

This reverts commit c1afdaff90538ef085b756454f12b29575411214.

Users have reported connection failures in 3.3.1 and suspend/resume
failures in 3.4-rcX. Revert this commit for now - PS IDLE can be
fixed in a clean manner later on.

Cc: stable@vger.kernel.org
Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agort2x00: Fix rfkill_polling register function.
Chen, Chien-Chia [Thu, 29 Mar 2012 10:21:47 +0000 (18:21 +0800)]
rt2x00: Fix rfkill_polling register function.

  Move rt2x00rfkill_register(rt2x00dev) to rt2x00lib_probe_dev
  function. It fixes of starting rfkill_poll function at the
  right time if sets hard rfkill block and reboot. rt2x00mac_rfkill_poll
  should be starting before bringing up the wireless interface.

Signed-off-by: Chen, Chien-Chia <machen@suse.com>
Acked-by: Helmut Schaa <helmut.schaa@googlemail.com>
CC: Kevin Chou <kevin.chou@mediatek.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agobcma: fix build error on MIPS; implicit pcibios_enable_device
Paul Gortmaker [Mon, 26 Mar 2012 00:02:55 +0000 (20:02 -0400)]
bcma: fix build error on MIPS; implicit pcibios_enable_device

The following is seen during allmodconfig builds for MIPS:

drivers/bcma/driver_pci_host.c:518:2: error: implicit declaration
of function 'pcibios_enable_device' [-Werror=implicit-function-declaration]
cc1: some warnings being treated as errors
make[3]: *** [drivers/bcma/driver_pci_host.o] Error 1

Most likey introduced by commit 49dc9577155576b10ff79f0c1486c816b01f58bf

    "bcma: add PCIe host controller"

Add the header instead of implicitly assuming it will be present.
Sounds like a good idea, but that alone doesn't fix anything.

The real problem is that the Kconfig has settings related to whether
PCI is possible, i.e.

  config BCMA_HOST_PCI_POSSIBLE
        bool
        depends on BCMA && PCI = y
        default y

  config BCMA_HOST_PCI
        bool "Support for BCMA on PCI-host bus"
        depends on BCMA_HOST_PCI_POSSIBLE

...but what is missing is that BCMA_DRIVER_PCI_HOSTMODE doesn't
have any dependencies on the above.  Add one.

CC: Hauke Mehrtens <hauke@hauke-m.de>
CC: John W. Linville <linville@tuxdriver.com>
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
Acked-by: Hauke Mehrtens <hauke@hauke-m.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc
Linus Torvalds [Tue, 10 Apr 2012 17:28:26 +0000 (10:28 -0700)]
Merge git://git./linux/kernel/git/davem/sparc

Pull sparc fixes from David Miller:

1) Build fix for LEON, from Sam Ravnborg.

2) Make the sparc side changes that go along with the infrastructure to
   retry faults when blocking on a disk transfer.  From Kautuk Consul.

* git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc:
  sparc32,leon: fix leon build
  sparc/mm/fault_32.c: Port OOM changes to do_sparc_fault
  sparc/mm/fault_64.c: Port OOM changes to do_sparc64_fault

12 years agoMerge tag 'regulator-3.4' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie...
Linus Torvalds [Tue, 10 Apr 2012 17:26:41 +0000 (10:26 -0700)]
Merge tag 'regulator-3.4' of git://git./linux/kernel/git/broonie/regulator

Pull a regulator build fix from Mark Brown:
 "Fix a build warning in the anatop driver for 3.4

  This is a trivial rename to stop the build system complaining that
  we're referencing things we shouldn't be."

* tag 'regulator-3.4' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator:
  regulator: anatop: fix 'anatop_regulator' name collision

12 years agodrm/i915: properly compute dp dithering for user-created modes
Daniel Vetter [Tue, 10 Apr 2012 08:42:36 +0000 (10:42 +0200)]
drm/i915: properly compute dp dithering for user-created modes

We've only computed whether we need to fall back to 6bpc due to dp
link bandwidth constrains in mode_valid, but not mode_fixup. Under
various circumstances X likes to create new modes which then lack
proper 6bpc flags (if required), resulting in mode_fixup failures and
ultimately black screens.

Chris Wilson pointed out that we still get things wrong for bpp > 24,
but that should be fixed in another patch (and it'll be easier because
this patch consolidates the logic).

The likely culprit for this regression is

commit 3d794f87238f74d80e78a7611c7fbde8a54c85c2
Author: Keith Packard <keithp@keithp.com>
Date:   Wed Jan 25 08:16:25 2012 -0800

    drm/i915: Force explicit bpp selection for intel_dp_link_required

v2: Fix indentation and tune down the too bold claim that this should
fix the world. Both noticed by Chris Wilson.

v3: Try to really git add things.

Reported-and-tested-by: Brice Goglin <Brice.Goglin@ens-lyon.org>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=48170
Cc: stable@kernel.org
Reviewed-by: Adam Jackson <ajax@redhat.com>
Signed-Off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
12 years agostaging/xgifb: fix display on XGI Volari Z11m cards
Dmitry Eremin-Solenikov [Mon, 19 Mar 2012 17:50:09 +0000 (21:50 +0400)]
staging/xgifb: fix display on XGI Volari Z11m cards

Image on Z11m cards was totally garbled due to wrong memory being
selected. Add a special handling for Z11m cards. Tested on PCIe Z11 and
Z11m cards.

Signed-off-by: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agoStaging: android: timed_gpio: Fix resource leak in timed_gpio_probe error paths
Axel Lin [Wed, 21 Mar 2012 01:24:57 +0000 (09:24 +0800)]
Staging: android: timed_gpio: Fix resource leak in timed_gpio_probe error paths

If gpio_request fails, we need to free all allocated resources.
Current code uses wrong array index to access gpio_data array.
So current code actually frees gpio_data[i].gpio by j times.

This patch moves the error handling code to err_out and thus improves
readability.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agoandroid: make persistent_ram based drivers depend on HAVE_MEMBLOCK
Colin Cross [Wed, 21 Mar 2012 17:18:33 +0000 (10:18 -0700)]
android: make persistent_ram based drivers depend on HAVE_MEMBLOCK

m68k doesn't have memblock_reserve, which causes a build failure
with allmodconfig.  Make PERSISTENT_RAM and RAM_CONSOLE depend on
HAVE_MEMBLOCK.

Reported-by: Geert Uytterhoeven <geert@linux-m68k.org>
Reported-by: Paul Gortmaker <paul.gortmaker@windriver.com>
Signed-off-by: Colin Cross <ccross@android.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: iio: ak8975: Remove i2c client data corruption
Preetham Chandru [Mon, 9 Apr 2012 12:35:01 +0000 (18:05 +0530)]
staging: iio: ak8975: Remove i2c client data corruption

i2c client data set is of type struct indio_dev pointer and hence the
pointer returned from i2c_get_clientdata() should be assigned to
an object of type struct indio_dev and not to an object of type
struct ak8975_data.

Also in ak8975_probe() client data should be set first
before calling ak8975_setup() as it references the client data.

Signed-off-by: Preetham Chandru R <pchandru@nvidia.com>
CC: Laxman Dewangan <ldewangan@nvidia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: drm/omap: move where DMM driver is registered
Rob Clark [Thu, 5 Apr 2012 15:34:56 +0000 (10:34 -0500)]
staging: drm/omap: move where DMM driver is registered

Not sure what triggered the change in behavior, but seems to
result in recursively acquiring a mutex and hanging on boot.  But
omap_drm_init() seems a much more sane place to register the
driver for the DMM sub-device.

Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: zsmalloc: fix memory leak
Nitin Gupta [Mon, 2 Apr 2012 14:13:56 +0000 (09:13 -0500)]
staging: zsmalloc: fix memory leak

This patch fixes a memory leak in zsmalloc where the first
subpage of each zspage is leaked when the zspage is freed.

Signed-off-by: Nitin Gupta <ngupta@vflare.org>
Acked-by: Seth Jennings <sjenning@linux.vnet.ibm.com>
Acked-by: Dan Magenheimer <dan.magenheimer@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agoStaging: rts_pstor: off by one in for loop
Dan Carpenter [Thu, 29 Mar 2012 18:52:57 +0000 (21:52 +0300)]
Staging: rts_pstor: off by one in for loop

I already fixed the other similar for loop in this file.  I'm not sure
how I missed this one.  We use seg_no+1 inside the loop so we can't go
right up to the end of the loop.

Also if we don't break out of the loop then we end up past the end of
the array, but with this fix we end up on the last element.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: ozwpan: Added new maintainer for ozwpan
Chris Kelly [Thu, 29 Mar 2012 12:09:45 +0000 (12:09 +0000)]
staging: ozwpan: Added new maintainer for ozwpan

Added Rupesh Gujare to MAINTAINERS file and contact in TODO file
for ozwpan driver.

Signed-off-by: Chris Kelly <ckelly@ozmodevices.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging:rts_pstor:Avoid "Bad target number" message when probing driver
wwang [Tue, 27 Mar 2012 08:43:20 +0000 (16:43 +0800)]
staging:rts_pstor:Avoid "Bad target number" message when probing driver

Avoid "Bad LUN" and "Bad target number" message by setting the supported
max_lun and max_id for the scsi host

Signed-off-by: wwang <wei_wang@realsil.com.cn>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging:rts_pstor:Fix possible panic by NULL pointer dereference
wwang [Tue, 27 Mar 2012 08:43:11 +0000 (16:43 +0800)]
staging:rts_pstor:Fix possible panic by NULL pointer dereference

rtsx_transport.c (rtsx_transfer_sglist_adma_partial):
pointer struct scatterlist *sg, which is mapped in dma_map_sg,
is used as an iterator in later transfer operation. It is corrupted and
passed to dma_unmap_sg, thus causing fatal unmap of some erroneous address.
Fix it by duplicating *sg_ptr for iterating.

Signed-off-by: wwang <wei_wang@realsil.com.cn>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>