linux-flexiantxendom0.git
12 years agoALSA: HDA: Realtek: Take vmaster dac from multiout dac list
David Henningsson [Thu, 5 Apr 2012 11:56:28 +0000 (13:56 +0200)]
ALSA: HDA: Realtek: Take vmaster dac from multiout dac list

With the auto-parser we can choose the dac nid for vmaster from
the DACs we already know, instead of hard-coding it. This is more
future-proof and was actually wrong on one machine.

Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
(backported from commit fde48a1f808e2bb6aaad5709d2470d814a157c86
Conflicts:
sound/pci/hda/patch_realtek.c)

BugLink: https://bugs.launchpad.net/bugs/974090
Acked-by: Seth Forshee <seth.forshee@canonical.com>
Signed-off-by: Leann Ogasawara <leann.ogasawara@canonical.com>

12 years agoUBUNTU: SAUCE: (drop after 3.3) ALSA: HDA: Remove quirk for Gigabyte GA-H61M-S2PV
David Henningsson [Thu, 5 Apr 2012 08:33:18 +0000 (10:33 +0200)]
UBUNTU: SAUCE: (drop after 3.3) ALSA: HDA: Remove quirk for Gigabyte GA-H61M-S2PV

This model quirk causes codec parsing to fail for the bug reporter.
As a result, alsamixer cannot even be opened.

Verification: I have tested the changed code in hda-emu and then
the error disappears (and no new errors are appearing), and hda-emu
is a safe way to test/verify these types of errors.

Upstream: has already removed this model completely as part of a
bigger rewrite.

BugLink: https://bugs.launchpad.net/bugs/948360
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Acked-by: Stefan Bader <stefan.bader@canonical.com>
Acked-by: Tim Gardner <tim.gardner@canonical.com>
Signed-off-by: Leann Ogasawara <leann.ogasawara@canonical.com>

12 years agoUBUNTU: d-i: Add dm-mirror and dm-raid to md-modules
Leann Ogasawara [Thu, 5 Apr 2012 03:41:40 +0000 (20:41 -0700)]
UBUNTU: d-i: Add dm-mirror and dm-raid to md-modules

BugLink: http://bugs.launchpad.net/bugs/919281

Signed-off-by: Leann Ogasawara <leann.ogasawara@canonical.com>

12 years agoUBUNTU: Bump ABI
Tim Gardner [Mon, 9 Apr 2012 13:51:40 +0000 (07:51 -0600)]
UBUNTU: Bump ABI

Ignore: yes
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>

12 years agoUBUNTU: Start new release
Leann Ogasawara [Wed, 4 Apr 2012 13:48:46 +0000 (06:48 -0700)]
UBUNTU: Start new release

Ignore: yes
Signed-off-by: Leann Ogasawara <leann.ogasawara@canonical.com>

12 years agoUBUNTU: Ubuntu-3.2.0-22.35
Leann Ogasawara [Tue, 3 Apr 2012 15:59:50 +0000 (08:59 -0700)]
UBUNTU: Ubuntu-3.2.0-22.35

Signed-off-by: Leann Ogasawara <leann.ogasawara@canonical.com>

12 years agonet: mv643xx_eth: fix build error
Axel Lin [Thu, 24 Nov 2011 05:41:55 +0000 (00:41 -0500)]
net: mv643xx_eth: fix build error

BugLink: http://bugs.launchpad.net/bugs/921793

Fix below build error:
CC drivers/net/ethernet/marvell/mv643xx_eth.o
drivers/net/ethernet/marvell/mv643xx_eth.c: In function 'mv643xx_eth_get_drvinfo':
drivers/net/ethernet/marvell/mv643xx_eth.c:1505: error: 'info' undeclared (first use in this function)
drivers/net/ethernet/marvell/mv643xx_eth.c:1505: error: (Each undeclared identifier is reported only once
drivers/net/ethernet/marvell/mv643xx_eth.c:1505: error: for each function it appears in.)
make[4]: *** [drivers/net/ethernet/marvell/mv643xx_eth.o] Error 1

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
(cherry picked from commit 6f39da2c5eab64921f92a9ff4a48f3d14a8db24c)

Signed-off-by: Leann Ogasawara <leann.ogasawara@canonical.com>

12 years agoUBUNTU: SAUCE: (no-up) elide some ioctl warnings which are known benign
Andy Whitcroft [Tue, 3 Apr 2012 10:42:41 +0000 (11:42 +0100)]
UBUNTU: SAUCE: (no-up) elide some ioctl warnings which are known benign

BugLink: http://bugs.launchpad.net/bugs/972355

We have been seeing increasing reports of scarey ioctl messages in
dmesg, such as the below often in bulk:

    mdadm: sending ioctl 1261 to a partition!
    mdadm: sending ioctl 800c0910 to a partition!

Looking at the upstream discussions these are all benign and can be safely
suppressed.  This patch is based on some discussions at the link below,
on some work SUSE did in this area.  This is not suitable for upstreaming
as we need some refactoring to fix the 32bit compat ioctl mess.

Link: http://www.spinics.net/lists/raid/msg37770.html
Signed-off-by: Andy Whitcroft <apw@canonical.com>
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>

12 years agoUBUNTU: [Config] Updateconfigs after rebase to v3.2.14
Leann Ogasawara [Mon, 2 Apr 2012 20:28:54 +0000 (13:28 -0700)]
UBUNTU: [Config] Updateconfigs after rebase to v3.2.14

Signed-off-by: Leann Ogasawara <leann.ogasawara@canonical.com>

12 years agoUBUNTU: Rebase to v3.2.14
Leann Ogasawara [Mon, 2 Apr 2012 20:26:53 +0000 (13:26 -0700)]
UBUNTU: Rebase to v3.2.14

Signed-off-by: Leann Ogasawara <leann.ogasawara@canonical.com>

12 years agoDrivers: scsi: storvsc: Properly handle errors from the host
K. Y. Srinivasan [Fri, 30 Mar 2012 16:47:03 +0000 (17:47 +0100)]
Drivers: scsi: storvsc: Properly handle errors from the host

If the host returns error for pass through commands, deal with
appropriately. I would like to thank James for patiently helping
me with this patch.

Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Reviewed-by: Haiyang Zhang <haiyangz@microsoft.com>

Receieved directly from the upstream maintainer.  This is the current
state of the art for this patch, though discussion continues.
Signed-off-by: Andy Whitcroft <apw@canonical.com>

12 years agoTools: hv: Support enumeration from all the pools
K. Y. Srinivasan [Fri, 16 Mar 2012 15:02:27 +0000 (08:02 -0700)]
Tools: hv: Support enumeration from all the pools

We have only supported enumeration only from the AUTO pool. Now support
enumeration from all the available pools.

Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Reviewed-by: Haiyang Zhang <haiyangz@microsoft.com>
Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
(cherry picked from commit adc80ae60eae24a43a357bf5b30fb496f34aa605)

Signed-off-by: Andy Whitcroft <apw@canonical.com>

12 years agoTools: hv: Fully support the new KVP verbs in the user level daemon
K. Y. Srinivasan [Fri, 16 Mar 2012 15:02:26 +0000 (08:02 -0700)]
Tools: hv: Fully support the new KVP verbs in the user level daemon

Now fully support the new KVP messages in the user level daemon. Hyper-V defines
multiple persistent pools to which the host can write/read/modify KVP tuples.
In this patch we implement a file for each specified pool, where the KVP tuples
will be stored in the guest.

Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Reviewed-by: Haiyang Zhang <haiyangz@microsoft.com>
Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
(cherry picked from commit db425334e5bb7fa65bbbd7bea9d79842f65bcf45)

Signed-off-by: Andy Whitcroft <apw@canonical.com>

12 years agoDrivers: hv: Support the newly introduced KVP messages in the driver
K. Y. Srinivasan [Fri, 16 Mar 2012 15:02:25 +0000 (08:02 -0700)]
Drivers: hv: Support the newly introduced KVP messages in the driver

Support the newly defined KVP message types. It turns out that the host
pushes a set of standard key value pairs as soon as the guest opens the KVP channel.
Since we cannot handle these tuples until the user level daemon loads up, defer
reading the KVP channel until the user level daemon is launched.

Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Reviewed-by: Haiyang Zhang <haiyangz@microsoft.com>
Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
(cherry picked from commit fa3d5b85c681518b6e4ec515814dcb2d5b702b89)

Signed-off-by: Andy Whitcroft <apw@canonical.com>

12 years agoNLS: improve UTF8 -> UTF16 string conversion routine
Alan Stern [Thu, 17 Nov 2011 21:42:19 +0000 (16:42 -0500)]
NLS: improve UTF8 -> UTF16 string conversion routine

The utf8s_to_utf16s conversion routine needs to be improved.  Unlike
its utf16s_to_utf8s sibling, it doesn't accept arguments specifying
the maximum length of the output buffer or the endianness of its
16-bit output.

This patch (as1501) adds the two missing arguments, and adjusts the
only two places in the kernel where the function is called.  A
follow-on patch will add a third caller that does utilize the new
capabilities.

The two conversion routines are still annoyingly inconsistent in the
way they handle invalid byte combinations.  But that's a subject for a
different patch.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
CC: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
(cherry picked from commit 0720a06a7518c9d0c0125bd5d1f3b6264c55c3dd)

Signed-off-by: Andy Whitcroft <apw@canonical.com>

12 years agonet/hyperv: fix erroneous NETDEV_TX_BUSY use
Eric Dumazet [Wed, 14 Mar 2012 08:53:34 +0000 (08:53 +0000)]
net/hyperv: fix erroneous NETDEV_TX_BUSY use

A driver start_xmit() method cannot free skb and return NETDEV_TX_BUSY,
since caller is going to reuse freed skb.

This is mostly a revert of commit bf769375c (staging: hv: fix the return
status of netvsc_start_xmit())

In fact netif_tx_stop_queue() / netif_stop_queue() is needed before
returning NETDEV_TX_BUSY or you can trigger a ksoftirqd fatal loop.

In case of memory allocation error, only safe way is to drop the packet
and return NETDEV_TX_OK

Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Cc: "K. Y. Srinivasan" <kys@microsoft.com>
Cc: Haiyang Zhang <haiyangz@microsoft.com>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Reviewed-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
(cherry picked from commit bb6d5e76fb4fba9aa36726db41404512f3286c0f)

Signed-off-by: Andy Whitcroft <apw@canonical.com>

12 years agoDrivers: hv: Add new message types to enhance KVP
K. Y. Srinivasan [Sat, 10 Mar 2012 23:32:08 +0000 (15:32 -0800)]
Drivers: hv: Add new message types to enhance KVP

Add additional KVP (Key Value Pair) protocol  messages to
enhance KVP functionality for Linux guests on Hyper-V. As part of this,
patch define an explicit version negoitiation message.

Reviewed-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
(cherry picked from commit e485ceac9ebd43901ef0ce13622385d509e072e7)

Signed-off-by: Andy Whitcroft <apw@canonical.com>

12 years agonet/hyperv: Add support for vlan trunking from guests
Haiyang Zhang [Mon, 12 Mar 2012 10:20:50 +0000 (10:20 +0000)]
net/hyperv: Add support for vlan trunking from guests

With this feature, a Linux guest can now configure multiple vlans through
a single synthetic NIC on Win8 Hyper-V host.

Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Reviewed-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
(cherry picked from commit 1f5f3a75e216fe771b8d6805e0bb2f43595a6ee1)

Signed-off-by: Andy Whitcroft <apw@canonical.com>

12 years agonet/hyperv: Fix data corruption in rndis_filter_receive()
Haiyang Zhang [Mon, 12 Mar 2012 10:20:49 +0000 (10:20 +0000)]
net/hyperv: Fix data corruption in rndis_filter_receive()

Limiting the memcpy to be the sizeof(struct rndis_message) can truncate
the message if there are Per-Packet-Info or Out-of-Band data.

In my earlier patch (commit 45326342), the unnecessary kmap_atomic and
kunmap_atomic surrounding this memcpy have been removed because the memory
in the receive buffer is always mapped. This memcpy is not necessary
either. To fix the bug, I removed the memcpy.

Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Reviewed-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
(cherry picked from commit ef31bef6216db76950c38f1993b45953402f4c63)

Signed-off-by: Andy Whitcroft <apw@canonical.com>

12 years agodrivers: hv: Increase the number of VCPUs supported in the guest
K. Y. Srinivasan [Fri, 3 Feb 2012 00:56:51 +0000 (16:56 -0800)]
drivers: hv: Increase the number of VCPUs supported in the guest

The current code arbirarily limited the number of CPUs the guest could have.
Change that so that we can support the maximum number of CPUs the guest can
support. While we use NR_CPUS to size the per-cpu state all we are allocating
based on NR_CPUS are the  pointers to per-cpu state that will be allocatted in
the context of the initializing CPU. This patch triggers a checkpatch warning
for the usage of NR_CPU and since all we are allocating a couple of pointers
per CPU, it should be ok.

Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
(cherry picked from commit 14c1bf8a8920f36f6e0603a2ff920b48eec14387)

Signed-off-by: Andy Whitcroft <apw@canonical.com>

12 years agodrivers: hv: kvp: Cleanup the kernel/user protocol
K. Y. Srinivasan [Fri, 3 Feb 2012 00:56:50 +0000 (16:56 -0800)]
drivers: hv: kvp: Cleanup the kernel/user protocol

Now, cleanup the user/kernel KVP protocol by using the same structure
definition that is used for host/guest KVP protocol. This simplifies the code.

Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
(cherry picked from commit 2640335438ca4d7b139e114dae5f0d80e740e106)

Signed-off-by: Andy Whitcroft <apw@canonical.com>

12 years agodrivers: hv: Cleanup the kvp related state in hyperv.h
K. Y. Srinivasan [Fri, 3 Feb 2012 00:56:48 +0000 (16:56 -0800)]
drivers: hv: Cleanup the kvp related state in hyperv.h

Now cleanup the hyperv.h with regards to KVP definitions.

Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
(cherry picked from commit 59a084a70afa0678bda2a23a7bc7cc59664945c7)

Signed-off-by: Andy Whitcroft <apw@canonical.com>

12 years agotools: hv: Use hyperv.h to get the KVP definitions
K. Y. Srinivasan [Fri, 3 Feb 2012 00:56:49 +0000 (16:56 -0800)]
tools: hv: Use hyperv.h to get the KVP definitions

Now use hyperv.h to get the KVP defines in the KVP user-mode code.

Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
(cherry picked from commit eab6af71f0b83a7f62b9c48be5b2c0a82a86fad3)

Signed-off-by: Andy Whitcroft <apw@canonical.com>

12 years agonet/hyperv: Remove the unnecessary memset in rndis_filter_send()
Haiyang Zhang [Sun, 5 Feb 2012 12:13:10 +0000 (12:13 +0000)]
net/hyperv: Remove the unnecessary memset in rndis_filter_send()

The memory has been allocated by kzalloc, so it's unnecessary to memset
again.

Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
(cherry picked from commit bce60806de882cf15ad3a80a51e9878863a8fced)

Signed-off-by: Andy Whitcroft <apw@canonical.com>

12 years agonet/hyperv: Correct the assignment in netvsc_recv_callback()
Haiyang Zhang [Sun, 5 Feb 2012 12:13:09 +0000 (12:13 +0000)]
net/hyperv: Correct the assignment in netvsc_recv_callback()

The first assignment to variable "net" is wrong, but overridden by the
latter assignments. So the bug isn't manifested.

Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
(cherry picked from commit 6f4c44460750dd4eb9926a58ab1ad0ceacef8284)

Signed-off-by: Andy Whitcroft <apw@canonical.com>

12 years agonet/hyperv: Convert camel cased variables in rndis_filter.c to lower cases
Haiyang Zhang [Sun, 5 Feb 2012 12:13:08 +0000 (12:13 +0000)]
net/hyperv: Convert camel cased variables in rndis_filter.c to lower cases

Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Reviewed-by: Jesper Juhl <jj@chaosbits.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
(cherry picked from commit 5fccab3b66d53883a97fc65e0c33f3ebf74e8ff9)

Signed-off-by: Andy Whitcroft <apw@canonical.com>

12 years agodrivers: hv: kvp: Move the contents of hv_kvp.h to hyperv.h
K. Y. Srinivasan [Fri, 27 Jan 2012 23:55:58 +0000 (15:55 -0800)]
drivers: hv: kvp: Move the contents of hv_kvp.h to hyperv.h

In preparation for consolidating all KVP related defines into a single header file
that both the kernel and user level components can use, move the contents of
hv_kvp.h into hyperv.h.

Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
(cherry picked from commit 2939437ce8f2de07237eb2bcce29b6a699bfe799)

Signed-off-by: Andy Whitcroft <apw@canonical.com>

12 years agodrivers: hv: kvp: Add/cleanup connector defines
K. Y. Srinivasan [Fri, 27 Jan 2012 23:55:57 +0000 (15:55 -0800)]
drivers: hv: kvp: Add/cleanup connector defines

The current KVP code carries some private connector related defines.
Update connector.h to have all the KVP defines. As part of this patch
get rid of some unused defines.

Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
(cherry picked from commit 4f03a2c934894f30a64d397df8c7c4de129c5b30)

Signed-off-by: Andy Whitcroft <apw@canonical.com>

12 years agodrivers: hv: Get rid of some unnecessary code
K. Y. Srinivasan [Sun, 8 Jan 2012 18:12:18 +0000 (10:12 -0800)]
drivers: hv: Get rid of some unnecessary code

The current code unnecessarily limits the number of offers we handle.
Get rid of this limitation. As part of this cleanup, also get rid of an
unused define - MAX_MSG_TYPES.

Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
(cherry picked from commit 2897a563a55442379e5e59ec68c229a7f27fb7c6)

Signed-off-by: Andy Whitcroft <apw@canonical.com>

12 years agodrm/i915: Sanitize BIOS debugging bits from PIPECONF
Chris Wilson [Thu, 22 Mar 2012 15:00:50 +0000 (15:00 +0000)]
drm/i915: Sanitize BIOS debugging bits from PIPECONF

Quoting the BSpec from time immemorial:

  PIPEACONF, bits 28:27: Frame Start Delay (Debug)

  Used to delay the frame start signal that is sent to the display planes.
  Care must be taken to insure that there are enough lines during VBLANK
  to support this setting.

An instance of the BIOS leaving these bits set was found in the wild,
where it caused our modesetting to go all squiffy and skewiff.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=47271
Reported-and-tested-by: Eva Wang <evawang@linpus.com>
Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=43012
Reported-and-tested-by: Carl Richell <carl@system76.com>
Cc: stable@kernel.org
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>

(cherry-picked from commit f47166d2b0001fcb752b40c5a2d4db986dfbea68 drm-intel)
BugLink: http://bugs.launchpad.net/bugs/968307
Acked-by: Robert Hooker <sarvatt@canonical.com>
Signed-off-by: Andy Whitcroft <apw@canonical.com>

12 years agoUBUNTU: SAUCE: (drop after 3.5) drm/i915: reinstate GM45 TV detection fix
Daniel Vetter [Mon, 2 Apr 2012 15:36:57 +0000 (08:36 -0700)]
UBUNTU: SAUCE: (drop after 3.5) drm/i915: reinstate GM45 TV detection fix

BugLink: http://bugs.launchpad.net/bugs/638939
cherry picked from drm-intel-next-queue

This reverts commmit d4b74bf07873da2e94219a7b67a334fc1c3ce649 which
reverted the origin fix fb8b5a39b6310379d7b54c0c7113703a8eaf4a57.

We have at least 3 different bug reports that this fixes things and no
indication what is exactly wrong with this. So try again.

To make matters slightly more fun, the commit itself was cc: stable
whereas the revert has not been.

According to Peter Clifton he discussed this with Zhao Yakui and this
seems to be in contradiction of the GM45 PRM, but rumours have it that
this is how the BIOS does it ... let's see.

Reviewed-by: Rodrigo Vivi <rodrigo.vivi@gmail.com>
Tested-by: Peter Clifton <Peter.Clifton@clifton-electronics.com>
Cc: Zhao Yakui <yakui.zhao@intel.com>
Cc: Dave Airlie <airlied@redhat.com>
Cc: Eric Anholt <eric@anholt.net>
Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=16236
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=25913
Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=14792
Signed-Off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Brad Figg <brad.figg@canonical.com>
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>

12 years agoUBUNTU: [Config] Enable CONFIG_USBIP_CORE=m
Leann Ogasawara [Mon, 2 Apr 2012 15:37:08 +0000 (08:37 -0700)]
UBUNTU: [Config] Enable CONFIG_USBIP_CORE=m

BugLink: http://bugs.launchpad.net/bugs/900384

CONFIG_USBIP_CORE=m
CONFIG_USBIP_HOST=m
CONFIG_USBIP_VHCI_HCD=m

Signed-off-by: Leann Ogasawara <leann.ogasawara@canonical.com>

12 years agoeeepc-wmi: refine quirks handling
Corentin Chary [Tue, 20 Mar 2012 08:53:12 +0000 (09:53 +0100)]
eeepc-wmi: refine quirks handling

BugLink: http://bugs.launchpad.net/bugs/969576

Signed-off-by: Corentin Chary <corentin.chary@gmail.com>
Signed-off-by: Matthew Garrett <mjg@redhat.com>
(cherry picked from commit c55d995dd3cebffdeb2b7eff8acc813c56d62c97)

Signed-off-by: Tim Gardner <tim.gardner@canonical.com>

12 years agoasus-wmi: move WAPF variable into quirks_entry
Corentin Chary [Tue, 20 Mar 2012 08:53:10 +0000 (09:53 +0100)]
asus-wmi: move WAPF variable into quirks_entry

BugLink: http://bugs.launchpad.net/bugs/969576

Some models work better with different values of wapf, so move the
variable into quriks_entry to make it more easy to give a specific
value to different models.

Based on original patch from AceLan Kao <acelan.kao@canonical.com>

Cc: AceLan Kao <acelan.kao@canonical.com>
Signed-off-by: Corentin Chary <corentin.chary@gmail.com>
Signed-off-by: Matthew Garrett <mjg@redhat.com>
(cherry picked from commit 6a2bcccdb3206950d28e343476d9050e23e79b7e)

Signed-off-by: Tim Gardner <tim.gardner@canonical.com>

12 years agoACPICA: Fix regression in FADT revision checks
Julian Anastasov [Thu, 23 Feb 2012 20:40:43 +0000 (22:40 +0200)]
ACPICA: Fix regression in FADT revision checks

BugLink: http://bugs.launchpad.net/bugs/883441

commit 64b3db22c04586997ab4be46dd5a5b99f8a2d390 (2.6.39),
"Remove use of unreliable FADT revision field" causes regression
for old P4 systems because now cst_control and other fields are
not reset to 0.

The effect is that acpi_processor_power_init will notice
cst_control != 0 and a write to CST_CNT register is performed
that should not happen. As result, the system oopses after the
"No _CST, giving up" message, sometimes in acpi_ns_internalize_name,
sometimes in acpi_ns_get_type, usually at random places. May be
during migration to CPU 1 in acpi_processor_get_throttling.

Every one of these settings help to avoid this problem:
 - acpi=off
 - processor.nocst=1
 - maxcpus=1

The fix is to update acpi_gbl_FADT.header.length after
the original value is used to check for old revisions.

https://bugzilla.kernel.org/show_bug.cgi?id=42700
https://bugzilla.redhat.com/show_bug.cgi?id=727865

Signed-off-by: Julian Anastasov <ja@ssi.bg>
Acked-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
(cherry picked from commit 3e80acd1af40fcd91a200b0416a7616b20c5d647)

Signed-off-by: Colin King <colin.king@canonical.com>
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>

12 years agoUBUNTU: SAUCE: SECCOMP: adjust prctl constant
Kees Cook [Fri, 30 Mar 2012 20:20:07 +0000 (13:20 -0700)]
UBUNTU: SAUCE: SECCOMP: adjust prctl constant

3.4-rc1 contains new prctl values that conflict with the ones chosen for
nnp, so push them forward with the hopes that we will align with the future.

Signed-off-by: Kees Cook <kees@ubuntu.com>
Signed-off-by: Leann Ogasawara <leann.ogasawara@canonical.com>

12 years agoUBUNTU: SAUCE: SECCOMP: audit: always report seccomp violations
Kees Cook [Fri, 30 Mar 2012 20:19:08 +0000 (13:19 -0700)]
UBUNTU: SAUCE: SECCOMP: audit: always report seccomp violations

Violations of seccomp filters should always be reported, regardless
of audit context. This the minimal change version of what has been
proposed upstream: https://lkml.org/lkml/2012/3/23/332

Signed-off-by: Kees Cook <kees@ubuntu.com>
Signed-off-by: Leann Ogasawara <leann.ogasawara@canonical.com>

12 years agoRevert "sched: tg->se->load should be initialised to tg->shares"
Tim Gardner [Fri, 30 Mar 2012 16:45:11 +0000 (10:45 -0600)]
Revert "sched: tg->se->load should be initialised to tg->shares"

Dropping since this patch never made it upstream.

This reverts commit f55c2f6c615f6c975eae2d956b54bbc3e81de2f6.

12 years agosched: Fix nohz load accounting
Brad Figg [Fri, 30 Mar 2012 16:24:43 +0000 (09:24 -0700)]
sched: Fix nohz load accounting

BugLink: http://bugs.launchpad.net/bugs/838811

Various people reported nohz load tracking still being wrecked, but Doug
spotted the actual problem. We fold the nohz remainder in too soon,
causing us to loose samples and under-account.

So instead of playing catch-up up-front, always do a single load-fold
with whatever state we encounter and only then fold the nohz remainder
and play catch-up.

Reported-by: Doug Smythies <dsmythies@telus.net>
Reported-by: LesÃ…=82aw Kope=C4=87 <leslaw.kopec@nasza-klasa.pl>
Reported-by: Aman Gupta <aman@tmm1.net>
Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Link:
http://lkml.kernel.org/n/tip-4v31etnhgg9kwd6ocgx3rxl8@git.kernel.org
Signed-off-by: Ingo Molnar <mingo@elte.hu>

(backport of upstream: c308b56b5398779cd3da0f62ab26b0453494c3d4)

Signed-off-by: Brad Figg <brad.figg@canonical.com>
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>

12 years agoethtool: Null-terminate filename passed to ethtool_ops::flash_device
Ben Hutchings [Wed, 1 Feb 2012 09:32:25 +0000 (09:32 +0000)]
ethtool: Null-terminate filename passed to ethtool_ops::flash_device

BugLink: http://bugs.launchpad.net/bugs/921793

The parameters for ETHTOOL_FLASHDEV include a filename, which ought to
be null-terminated.  Currently the only driver that implements
ethtool_ops::flash_device attempts to add a null terminator if
necessary, but does it wrongly.  Do it in the ethtool core instead.

Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>

12 years agobe2net: create RSS rings even in multi-channel configs
Sathya Perla [Thu, 19 Jan 2012 20:34:04 +0000 (20:34 +0000)]
be2net: create RSS rings even in multi-channel configs

BugLink: http://bugs.launchpad.net/bugs/921793

Currently RSS rings are not created in a multi-channel config.
RSS rings can be created on one (out of four) interfaces per port in a
multi-channel config. Doing this insulates the driver from a FW bug wherin
multi-channel config is wrongly reported even when not enabled. This also
helps performance in a multi-channel config, as one interface per port gets
RSS rings.

Signed-off-by: Sathya Perla <sathya.perla@emulex.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>

12 years agonetdev: make net_device_ops const
stephen hemminger [Thu, 5 Jan 2012 19:10:25 +0000 (19:10 +0000)]
netdev: make net_device_ops const

BugLink: http://bugs.launchpad.net/bugs/921793

More drivers where net_device_ops should be const.

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>

12 years agobe2net: query link status in be_open()
Ajit Khaparde [Fri, 30 Dec 2011 12:15:40 +0000 (12:15 +0000)]
be2net: query link status in be_open()

BugLink: http://bugs.launchpad.net/bugs/921793

be2net gets an async link status notification from the FW when it creates
an MCC queue. There are some cases in which this gratuitous notification
is not received from FW. To cover this explicitly query the link status
in be_open().

Signed-off-by: Vasundhara Volam <vasundhara.volam@emulex.com>
Signed-off-by: Sathya Perla <sathya.perla@emulex.com>
Signed-off-by: Ajit Khaparde <ajit.khaparde@emulex.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>

12 years agobe2net: fix range check for set_qos for a VF
Ajit Khaparde [Fri, 30 Dec 2011 12:15:30 +0000 (12:15 +0000)]
be2net: fix range check for set_qos for a VF

BugLink: http://bugs.launchpad.net/bugs/921793

Signed-off-by: Ajit Khaparde <ajit.khaparde@emulex.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>

12 years agobe2net: Fix INTx processing for Lancer
Padmanabh Ratnakar [Mon, 19 Dec 2011 01:53:35 +0000 (01:53 +0000)]
be2net: Fix INTx processing for Lancer

BugLink: http://bugs.launchpad.net/bugs/921793

Lancer does not have HW registers to indicate the EQ causing the INTx
interrupt. As a result EQE entries of one EQ may be consumed when interrupt
is caused by another EQ. Fix this by arming CQs at the end of NAPI poll
routine to regenerate the EQEs.

Signed-off-by: Padmanabh Ratnakar <padmanabh.ratnakar@emulex.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>

12 years agobe2net: Add support for Skyhawk cards
Ajit Khaparde [Thu, 15 Dec 2011 06:31:38 +0000 (06:31 +0000)]
be2net: Add support for Skyhawk cards

BugLink: http://bugs.launchpad.net/bugs/921793

Signed-off-by: Ajit Khaparde <ajit.khaparde@emulex.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>

12 years agobe2net: refactor/cleanup vf configuration code
Sathya Perla [Tue, 13 Dec 2011 00:58:50 +0000 (00:58 +0000)]
be2net: refactor/cleanup vf configuration code

BugLink: http://bugs.launchpad.net/bugs/921793

- use adapter->num_vfs (and not the module param) to store the actual
number of vfs created. Use the same variable to reflect SRIOV
enable/disable state. So, drop the adapter->sriov_enabled field.

- use for_all_vfs() macro in VF configuration code

- drop the "vf_" prefix for the fields of be_vf_cfg; the prefix is
redundant and removing it helps reduce line wrap

Signed-off-by: Sathya Perla <sathya.perla@emulex.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>

12 years agobe2net: fix ethtool ringparam reporting
Sathya Perla [Tue, 13 Dec 2011 00:58:49 +0000 (00:58 +0000)]
be2net: fix ethtool ringparam reporting

BugLink: http://bugs.launchpad.net/bugs/921793

The ethtool "-g" option is supposed to report the max queue length and
user modified queue length for RX and TX queues.  be2net doesn't support
user modification of queue lengths. So, the correct values for these
would be the max numbers.
be2net incorrectly reports the queue used values for these fields.

Signed-off-by: Sathya Perla <sathya.perla@emulex.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>

12 years agobe2net: workaround to fix a bug in BE
Ajit Khaparde [Fri, 9 Dec 2011 13:53:17 +0000 (13:53 +0000)]
be2net: workaround to fix a bug in BE

BugLink: http://bugs.launchpad.net/bugs/921793

disable Tx vlan offloading in certain cases.

Signed-off-by: Ajit Khaparde <ajit.khaparde@emulex.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>

12 years agobe2net: update some counters to display via ethtool
Ajit Khaparde [Fri, 9 Dec 2011 13:53:09 +0000 (13:53 +0000)]
be2net: update some counters to display via ethtool

BugLink: http://bugs.launchpad.net/bugs/921793

update pmem_fifo_overflow_drop, rx_priority_pause_frames counters.

Signed-off-by: Ajit Khaparde <ajit.khaparde@emulex.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>

12 years agobe2net: netpoll support
Ivan Vecera [Thu, 8 Dec 2011 01:31:21 +0000 (01:31 +0000)]
be2net: netpoll support

BugLink: http://bugs.launchpad.net/bugs/921793

Add missing netpoll support.

Signed-off-by: Ivan Vecera <ivecera@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>

12 years agobe2net: Fix non utilization of RX queues
Padmanabh Ratnakar [Fri, 25 Nov 2011 05:48:53 +0000 (05:48 +0000)]
be2net: Fix non utilization of RX queues

BugLink: http://bugs.launchpad.net/bugs/921793

When non power of two MSIX vectors are given to driver, some RX queues
are not utilized. Program RSS table in such a way that all queues
are utilized.

Signed-off-by: Padmanabh Ratnakar <padmanabh.ratnakar@emulex.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>

12 years agobe2net: Use new hash key
Padmanabh Ratnakar [Fri, 25 Nov 2011 05:48:38 +0000 (05:48 +0000)]
be2net: Use new hash key

BugLink: http://bugs.launchpad.net/bugs/921793

This new hash key gives better distribution of packets across RX
queues.

Signed-off-by: Padmanabh Ratnakar <padmanabh.ratnakar@emulex.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>

12 years agobe2net: Add error handling for Lancer
Padmanabh Ratnakar [Fri, 25 Nov 2011 05:48:23 +0000 (05:48 +0000)]
be2net: Add error handling for Lancer

BugLink: http://bugs.launchpad.net/bugs/921793

Detect error in Lancer by polling a HW register and
recover from this error if it is recoverable.

Signed-off-by: Padmanabh Ratnakar <padmanabh.ratnakar@emulex.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>

12 years agobe2net: Fix error recovery paths
Padmanabh Ratnakar [Fri, 25 Nov 2011 05:48:06 +0000 (05:48 +0000)]
be2net: Fix error recovery paths

BugLink: http://bugs.launchpad.net/bugs/921793

When TX queues are created again after error recovery,
netif_set_real_num_tx_queues() is invoked to update number of real
TX queues created. rtnl lock needs to be held when invoking this routine.

Signed-off-by: Padmanabh Ratnakar <padmanabh.ratnakar@emulex.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>

12 years agobe2net: Move to new SR-IOV implementation in Lancer
Padmanabh Ratnakar [Fri, 25 Nov 2011 05:47:26 +0000 (05:47 +0000)]
be2net: Move to new SR-IOV implementation in Lancer

BugLink: http://bugs.launchpad.net/bugs/921793

SR-IOV implementation is Lancer has changed in following ways -
1)PF driver assigns one MAC addresses for VF using COMMON_SET_IFACE_MAC_LIST.
2)VF driver queries its MAC address using COMMON_GET_IFACE_MAC_LIST command
and assigns it to its interface.

Signed-off-by: Mammatha Edhala <mammatha.edhala@emulex.com>
Signed-off-by: Padmanabh Ratnakar <padmanabh.ratnakar@emulex.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>

12 years agobe2net: Use V1 query link status command for lancer
Padmanabh Ratnakar [Wed, 16 Nov 2011 02:03:45 +0000 (02:03 +0000)]
be2net: Use V1 query link status command for lancer

BugLink: http://bugs.launchpad.net/bugs/921793

Use V1 version of query link status command for Lancer.

Signed-off-by: Padmanabh Ratnakar <padmanabh.ratnakar@emulex.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>

12 years agobe2net: Fix VLAN promiscous mode for Lancer
Padmanabh Ratnakar [Wed, 16 Nov 2011 02:03:32 +0000 (02:03 +0000)]
be2net: Fix VLAN promiscous mode for Lancer

BugLink: http://bugs.launchpad.net/bugs/921793

To enable VLAN promiscous mode, the HW interface should be created
with VLAN promiscous capability in Lancer. Add this capability during
creation of the HW interface.

Signed-off-by: Padmanabh Ratnakar <padmanabh.ratnakar@emulex.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>

12 years agobe2net: Add EEPROM dump feature for Lancer
Padmanabh Ratnakar [Wed, 16 Nov 2011 02:03:07 +0000 (02:03 +0000)]
be2net: Add EEPROM dump feature for Lancer

BugLink: http://bugs.launchpad.net/bugs/921793

Implemented eeprom dump using ethtool feature for Lancer.

Signed-off-by: Padmanabh Ratnakar <padmanabh.ratnakar@emulex.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>

12 years agobe2net: add register dump feature for Lancer
Padmanabh Ratnakar [Wed, 16 Nov 2011 02:02:43 +0000 (02:02 +0000)]
be2net: add register dump feature for Lancer

BugLink: http://bugs.launchpad.net/bugs/921793

Implement register dump using ethtool for Lancer.

Signed-off-by: Padmanabh Ratnakar <padmanabh.ratnakar@emulex.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>

12 years agobe2net: Fix TX queue create for Lancer
Padmanabh Ratnakar [Wed, 16 Nov 2011 02:02:23 +0000 (02:02 +0000)]
be2net: Fix TX queue create for Lancer

BugLink: http://bugs.launchpad.net/bugs/921793

Lancer uses V1 version of TXQ create. This command needs interface
id for TX queue creation. Rearrange code such that tx queue create
is after interface create. As TXQ create is now called after MCC
ring create use MCC instead of MBOX.

Signed-off-by: Padmanabh Ratnakar <padmanabh.ratnakar@emulex.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>

12 years agobe2net: stop issuing FW cmds if any cmd times out
Sathya Perla [Thu, 10 Nov 2011 19:18:00 +0000 (19:18 +0000)]
be2net: stop issuing FW cmds if any cmd times out

BugLink: http://bugs.launchpad.net/bugs/921793

A FW cmd timeout (with a sufficiently large timeout value in the
order of tens of seconds) indicates an unresponsive FW. In this state
issuing further cmds and waiting for a completion will only stall the process.

Signed-off-by: Sathya Perla <sathya.perla@emulex.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>

12 years agobe2net: don't log more than one error on detecting EEH/UE errors
Sathya Perla [Thu, 10 Nov 2011 19:17:59 +0000 (19:17 +0000)]
be2net: don't log more than one error on detecting EEH/UE errors

BugLink: http://bugs.launchpad.net/bugs/921793

Currently we're spamming error messages each time a FW cmd call is made
while in EEH/UE error state. One log msg on error detection is enough.

Signed-off-by: Sathya Perla <sathya.perla@emulex.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>

12 years agobe2net: stop checking the UE registers after an EEH error
Sathya Perla [Thu, 10 Nov 2011 19:17:58 +0000 (19:17 +0000)]
be2net: stop checking the UE registers after an EEH error

BugLink: http://bugs.launchpad.net/bugs/921793

Signed-off-by: Sathya Perla <sathya.perla@emulex.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>

12 years agobe2net: init (vf)_if_handle/vf_pmac_id to handle failure scenarios
Sathya Perla [Thu, 10 Nov 2011 19:17:57 +0000 (19:17 +0000)]
be2net: init (vf)_if_handle/vf_pmac_id to handle failure scenarios

BugLink: http://bugs.launchpad.net/bugs/921793

Initialize if_handle, vf_if_handle and vf_pmac_id with "-1" so that in
failure cases when be_clear() is called, we can skip over
if_destroy/pmac_del cmds if they have not been created.

Signed-off-by: Sathya Perla <sathya.perla@emulex.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>

12 years agosweep the floors and convert some .get_drvinfo routines to strlcpy
Rick Jones [Mon, 7 Nov 2011 13:29:27 +0000 (13:29 +0000)]
sweep the floors and convert some .get_drvinfo routines to strlcpy

BugLink: http://bugs.launchpad.net/bugs/921793

Per the mention made by Ben Hutchings that strlcpy is now the preferred
string copy routine for a .get_drvinfo routine, do a bit of floor
sweeping and convert some of the as-yet unconverted ethernet drivers to
it.

Signed-off-by: Rick Jones <rick.jones2@hp.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>

12 years agoUBUNTU: SAUCE: remove __initdata from vesafb_fix
Tim Gardner [Fri, 30 Mar 2012 15:16:21 +0000 (09:16 -0600)]
UBUNTU: SAUCE: remove __initdata from vesafb_fix

BugLink: http://bugs.launchpad.net/bugs/969309

OK. Then, I think we also want to fix these warnings probably introduced by
commit a6021559 "UBUNTU: SAUCE: (no-up) Modularize vesafb".

WARNING: drivers/video/vesafb.o(.exit.text+0x42): Section mismatch in reference from the function vesafb_remove() to the (unknown reference) .init.data:(unknown)
The function __exit vesafb_remove() references
a (unknown reference) __initdata (unknown).
This is often seen when error handling in the exit function
uses functionality in the init path.
The fix is often to remove the __initdata annotation of
(unknown) so it may be used outside an init section.

WARNING: drivers/video/vesafb.o(.exit.text+0x4a): Section mismatch in reference from the function vesafb_remove() to the variable .init.data:vesafb_fix
The function __exit vesafb_remove() references
a variable __initdata vesafb_fix.
This is often seen when error handling in the exit function
uses functionality in the init path.
The fix is often to remove the __initdata annotation of
vesafb_fix so it may be used outside an init section.

Reported-by: Tetsuo Honda <from-ubuntu@I-love.SAKURA.ne.jp>
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>

12 years agoRevert "UBUNTU: SAUCE: hotkey quirks for various Zeptro Znote and Fujitsu Amilo laptops"
Andy Whitcroft [Fri, 30 Mar 2012 15:38:51 +0000 (16:38 +0100)]
Revert "UBUNTU: SAUCE: hotkey quirks for various Zeptro Znote and Fujitsu Amilo laptops"

This reverts commit f5931d1fc7c699a650ca14a31f4b4bc620977389.

These have already been converted to udev rules so we no longer need
these to be quirked in the kernel.

Signed-off-by: Andy Whitcroft <apw@canonical.com>

12 years agoUBUNTU: d-i: Fix module name for dm-raid45
Stefan Bader [Fri, 30 Mar 2012 14:52:13 +0000 (16:52 +0200)]
UBUNTU: d-i: Fix module name for dm-raid45

This was incorrectly named in the md-modules section.

BugLink: http://bugs.launchpad.net/bugs/969248

Signed-off-by: Stefan Bader <stefan.bader@canonical.com>
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>

12 years agoUBUNTU: SAUCE: PCI: Allow pcie_aspm=force to work even when FADT indicates it is...
Colin Ian King [Fri, 30 Mar 2012 10:13:54 +0000 (11:13 +0100)]
UBUNTU: SAUCE: PCI: Allow pcie_aspm=force to work even when FADT indicates it is unsupported

Submitted upstream.
BugLink: http://bugs.launchpad.net/bugs/962038

Right now using pcie_aspm=force will not enable ASPM if the FADT indicates
ASPM is unsupported.  However, the semantics of force should probably allow
for this, especially as they did before the ASPM disable rework with commit
3c076351c4027a56d5005a39a0b518a4ba393ce2

This patch just skips the clearing of any ASPM setup that the firmware has
carried out on this bus if pcie_aspm=force is being used.

Signed-off-by: Colin Ian King <colin.king@canonical.com>
Acked-by: Stefan Bader <stefan.bader@canonical.com>
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>

12 years agoUBUNTU: SAUCE (drop after 3.4) Quirk for enabling backlight hotkeys on Samsung N150P
Brad Figg [Thu, 29 Mar 2012 19:59:33 +0000 (12:59 -0700)]
UBUNTU: SAUCE (drop after 3.4) Quirk for enabling backlight hotkeys on Samsung N150P

BugLink: http://bugs.launchpad.net/bugs/875893

This patch is a very small part of a much larger patch that is upstream. I felt
the full patch was too invasive to try to backport.

(partial backport of upstream commit: a979e2e2af7d5b4bb3b20f6a716c627bb23a6753)
Signed-off-by: Brad Figg <brad.figg@canonical.com>
Acked-by: Seth Forshee <seth.forshee@canonical.com>
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>

12 years agoata_piix: Add Toshiba Satellite Pro A120 to the quirks list due to broken suspend...
Benjamin Larsson [Thu, 29 Mar 2012 17:58:16 +0000 (10:58 -0700)]
ata_piix: Add Toshiba Satellite Pro A120 to the quirks list due to broken suspend functionality.

BugLink: http://bugs.launchpad.net/bugs/886850

Signed-off-by: Benjamin Larsson <benjamin@southpole.se>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
(cherry picked from commit b73fa4630e63e4d23407181c2bc0a54777bd0ce8)
Signed-off-by: Brad Figg <brad.figg@canonical.com>
Signed-off-by: Leann Ogasawara <leann.ogasawara@canonical.com>

12 years agotoshiba_acpi: Refuse to load on machines with buggy INFO implementations
Seth Forshee [Wed, 18 Jan 2012 19:44:11 +0000 (13:44 -0600)]
toshiba_acpi: Refuse to load on machines with buggy INFO implementations

BugLink: http://bugs.launchpad.net/bugs/810015

Several Satellite models have a buggy implementation of the INFO method
that causes ACPI exceptions when executed:

 ACPI Error: Result stack is empty! State=ffff88012d70f800 (20110413/dswstate-98)
 ACPI Exception: AE_AML_NO_RETURN_VALUE, Missing or null operand (20110413/dsutils-646)
 ACPI Exception: AE_AML_NO_RETURN_VALUE, While creating Arg 0 (20110413/dsutils-763)
 ACPI Error: Method parse/execution failed [\_SB_.VALZ.GETE] (Node ffff880131175eb0), AE_AML_NO_RETURN_VALUE (20110413/psparse-536)
 ACPI Error: Method parse/execution failed [\_SB_.VALZ.INFO] (Node ffff880131175ed8), AE_AML_NO_RETURN_VALUE (20110413/psparse-536)
 toshiba_acpi: ACPI INFO method execution failed
 toshiba_acpi: Failed to query hotkey event

All known machines with this implementation also have a WMI interface
with event GUID 59142400-C6A3-40FA-BADB-8A2652834100 which is not seen
on any other models. Refuse to load toshiba_acpi on machines with this
guid.

Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
Signed-off-by: Matthew Garrett <mjg@redhat.com>
(cherry picked from commit f11f999e989061952f1a27bd0c49645a46d13173)

Signed-off-by: Tim Gardner <tim.gardner@canonical.com>

12 years agotoshiba_acpi: Support additional hotkey scancodes
Azael Avalos [Wed, 18 Jan 2012 19:44:10 +0000 (13:44 -0600)]
toshiba_acpi: Support additional hotkey scancodes

BugLink: http://bugs.launchpad.net/bugs/810015

These scancodes are used by many of the models now supported with
the addition of TOS1900 device support.

Signed-off-by: Azael Avalos <coproscefalo@gmail.com>
Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
Signed-off-by: Matthew Garrett <mjg@redhat.com>
(cherry picked from commit af502837a08c8ca3495d3940d4c4eb4e19a3beaa)

Signed-off-by: Tim Gardner <tim.gardner@canonical.com>

12 years agotoshiba_acpi: Support alternate hotkey interfaces
Seth Forshee [Wed, 18 Jan 2012 19:44:09 +0000 (13:44 -0600)]
toshiba_acpi: Support alternate hotkey interfaces

BugLink: http://bugs.launchpad.net/bugs/810015

There are two types of problems that prevent hotkeys from working
on many of the machines supported by toshiba_acpi. The first of
these is the lack of a functioning SCI for hotkey events. For these
machines it is possible to filter the Fn keypresses from the
keyboard and generate a notification by executing the ACPI NTFY
method.

The second problem is a lack of support for HCI_SYSTEM_EVENT, which
is used for reading the hotkey scancodes. On these machines the
scancodes can be read by executing the ACPI NTFY method.

This patch fixes both problems by installing an i8042 filter when
the NTFY method is present to generate notifications and by
detecting which of INFO or HCI_SYSTEM_EVENT is supported for
reading scancodes. If neither method of reading scancodes is
supported, the hotkey input device is not registered.

Signed-off-by: Azael Avalos <coproscefalo@gmail.com>
Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
Signed-off-by: Matthew Garrett <mjg@redhat.com>
(cherry picked from commit 29cd293f9f8cd76444657622980010b9364b1de6)

Signed-off-by: Tim Gardner <tim.gardner@canonical.com>

12 years agoACPI: EC: Add ec_get_handle()
Seth Forshee [Wed, 18 Jan 2012 19:44:08 +0000 (13:44 -0600)]
ACPI: EC: Add ec_get_handle()

BugLink: http://bugs.launchpad.net/bugs/810015

toshiba_acpi needs to execute an AML method within the EC namespace
to make hotkeys work on some platforms. Provide an interface to
allow it to easily get a handle to the EC namespace for this purpose.

Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
Signed-off-by: Matthew Garrett <mjg@redhat.com>
(cherry picked from commit 3e2abc5a35d25442821e1733687b7abbc83b5072)

Signed-off-by: Tim Gardner <tim.gardner@canonical.com>

12 years agotoshiba_acpi: make one-bit bitfields unsigned
Dan Carpenter [Sun, 15 Jan 2012 11:28:20 +0000 (14:28 +0300)]
toshiba_acpi: make one-bit bitfields unsigned

BugLink: http://bugs.launchpad.net/bugs/810015

This doesn't change how the code works, but it silences a Sparse
complaint:
drivers/platform/x86/toshiba_acpi.c:121:37: error: dubious one-bit signed bitfield

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Matthew Garrett <mjg@redhat.com>
(cherry picked from commit 592b746c55b63770da25148ea3b56ed463a596b2)

Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
Signed-off-by: Seth Forshee <seth.forshee@canonical.com>

12 years agoUBUNTU: SAUCE (no-up) Provide a param for allowing the BIOS to handle changing the...
Brad Figg [Thu, 29 Mar 2012 15:53:11 +0000 (08:53 -0700)]
UBUNTU: SAUCE (no-up) Provide a param for allowing the BIOS to handle changing the brightness on AC/battery status changes.

BugLink: http://bugs.launchpad.net/bugs/949311

We currently carry a SAUCE patch which lets the OS handle the brightness
levels automatically when connecting/disconnecting AC. There are some
laptops (MSI Wind) for which this doesn't work. Provide a driver param
which allows this behaviour to be overriden.

Signed-off-by: Brad Figg <brad.figg@canonical.com>
Acked-by: Colin King <colin.king@canonical.com>
Signed-off-by: Leann Ogasawara <leann.ogasawara@canonical.com>

12 years agoUBUNTU: Bump ABI
Tim Gardner [Mon, 2 Apr 2012 14:41:40 +0000 (08:41 -0600)]
UBUNTU: Bump ABI

Ignore: yes
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>

12 years agoUBUNTU: Start new release
Leann Ogasawara [Fri, 30 Mar 2012 14:55:51 +0000 (07:55 -0700)]
UBUNTU: Start new release

Ignore: yes
Signed-off-by: Leann Ogasawara <leann.ogasawara@canonical.com>

12 years agoUBUNTU: Ubuntu-3.2.0-21.34
Leann Ogasawara [Thu, 29 Mar 2012 15:34:15 +0000 (08:34 -0700)]
UBUNTU: Ubuntu-3.2.0-21.34

Signed-off-by: Leann Ogasawara <leann.ogasawara@canonical.com>

12 years agoUBUNTU: SAUCE: disable_nx should not be in __cpuinitdata section for X86_32
Tim Gardner [Thu, 29 Mar 2012 12:21:01 +0000 (06:21 -0600)]
UBUNTU: SAUCE: disable_nx should not be in __cpuinitdata section for X86_32

BugLink: http://bugs.launchpad.net/bugs/968233

I noticed a section mismatch warning while building 3.2.0-20.33 for X86_32.

 AR      arch/x86/lib/lib.a
  LD      vmlinux.o
  MODPOST vmlinux.o
WARNING: vmlinux.o(.text+0x187833): Section mismatch in reference from the function load_elf_binary() to the variable .cpuinit.data:disable_nx
The function load_elf_binary() references
the variable __cpuinitdata disable_nx.
This is often because load_elf_binary lacks a __cpuinitdata
annotation or the annotation of disable_nx is wrong.

load_elf_binary() is definitely called after initialization.

This code was added by 'UBUNTU: ubuntu: nx-emu - i386: NX emulation', so
this is not an upstream problem.

Reported-by: Tetsuo Handa <from-ubuntu@I-love.SAKURA.ne.jp>
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>

12 years agoUBUNTU: d-i: Add brcm*mac drivers to nic-modules
Leann Ogasawara [Wed, 28 Mar 2012 17:59:34 +0000 (10:59 -0700)]
UBUNTU: d-i: Add brcm*mac drivers to nic-modules

Signed-off-by: Leann Ogasawara <leann.ogasawara@canonical.com>

12 years agoUBUNTU: d-i: Remove obsolete bcm43xx* drivers from nic-modules
Leann Ogasawara [Wed, 28 Mar 2012 17:56:27 +0000 (10:56 -0700)]
UBUNTU: d-i: Remove obsolete bcm43xx* drivers from nic-modules

Signed-off-by: Leann Ogasawara <leann.ogasawara@canonical.com>

12 years agoUBUNTU: d-i: Add missing iwl* drivers to nic-modules
Leann Ogasawara [Wed, 28 Mar 2012 17:53:37 +0000 (10:53 -0700)]
UBUNTU: d-i: Add missing iwl* drivers to nic-modules

BugLink: http://bugs.launchpad.net/bugs/965116

Signed-off-by: Leann Ogasawara <leann.ogasawara@canonical.com>

12 years agoUBUNTU: d-i: Fix iwl3945 driver name typo in nic-modules
Leann Ogasawara [Wed, 28 Mar 2012 17:43:08 +0000 (10:43 -0700)]
UBUNTU: d-i: Fix iwl3945 driver name typo in nic-modules

s/ipw3945/iwl3945/ in nic-modules file

Signed-off-by: Leann Ogasawara <leann.ogasawara@canonical.com>

12 years agodrm/i915: Add Clientron E830 to the ignore LVDS list
Joel Sass [Tue, 10 Jan 2012 18:03:55 +0000 (13:03 -0500)]
drm/i915: Add Clientron E830 to the ignore LVDS list

BugLink: http://bugs.launchpad.net/bugs/907055

Signed-off-by: Joel Sass <jsass@disklessworkstations.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
(cherry picked from commit 44306ab302687b519a31aa498b954c1e26f95a6b)

Signed-off-by: Tim Gardner <tim.gardner@canonical.com>

12 years agodrm/i915: Ignore LVDS on hp t5745 and hp st5747 thin client
Marc Gariepy [Thu, 9 Feb 2012 14:35:21 +0000 (09:35 -0500)]
drm/i915: Ignore LVDS on hp t5745 and hp st5747 thin client

Add a no_lvds quirk for the HP t5745 and HP st5747 thin clients

dmidecode for those thin clients are attached in thoses bugs:
BugLink: https://bugs.launchpad.net/bugs/911916
BugLink: https://bugs.launchpad.net/bugs/911920

Signed-off-by: Marc Gariepy <mgariepy@ubuntu.com>
Acked-by: Adam Jackson <ajax@redhat.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
(cherry picked from commit f5b8a7ed0405d48fd096acce48fbefbed77fb055)

Signed-off-by: Tim Gardner <tim.gardner@canonical.com>

12 years agoUBUNTU: SAUCE: AppArmor: Fix change_onexec when called from a confined task
John Johansen [Tue, 27 Mar 2012 11:16:06 +0000 (04:16 -0700)]
UBUNTU: SAUCE: AppArmor: Fix change_onexec when called from a confined task

Patch submitted upstream, but not merged yet.

Fix failure in aa_change_onexec api when the request is made from a confined
task.  This failure was caused by two problems

 The AA_MAY_ONEXEC perm was not being mapped correctly for this case.

 The executable name was being checked as second time instead of using the
 requested onexec profile name, which may not be the same as the exec
 profile name. This mistake can not be exploited to grant extra permission
 because of the above flaw where the ONEXEC permission was not being mapped
 so it will not be granted.

BugLink: http://bugs.launchpad.net/bugs/963756

Signed-off-by: John Johansen <john.johansen@canonical.com>
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>

12 years agox86, tsc: Fix SMI induced variation in quick_pit_calibrate()
Linus Torvalds [Tue, 17 Jan 2012 23:35:37 +0000 (15:35 -0800)]
x86, tsc: Fix SMI induced variation in quick_pit_calibrate()

BugLink: http://bugs.launchpad.net/bugs/965586

pit_expect_msb() returns success wrongly in the below SMI scenario:

a. pit_verify_msb() has not yet seen the MSB transition.

b. we are close to the MSB transition though and got a SMI immediately after
   returning from pit_verify_msb() which didn't see the MSB transition. PIT MSB
   transition has happened somewhere during SMI execution.

c. returned from SMI and we noted down the 'tsc', saw the pit MSB change now and
   exited the loop to calculate 'deltatsc'. Instead of noting the TSC at the MSB
   transition, we are way off because of the SMI.  And as the SMI happened
   between the pit_verify_msb() and before the 'tsc' is recorded in the
   for loop, 'delattsc' (d1/d2 in quick_pit_calibrate()) will be small and
   quick_pit_calibrate() will not notice this error.

Depending on whether SMI disturbance happens while computing d1 or d2, we will
see the TSC calibrated value smaller or bigger than the expected value. As a
result, in a cluster we were seeing a variation of approximately +/- 20MHz in
the calibrated values, resulting in NTP failures.

  [ As far as the SMI source is concerned, this is a periodic SMI that gets
    disabled after ACPI is enabled by the OS. But the TSC calibration happens
    before the ACPI is enabled. ]

To address this, change pit_expect_msb() so that

 - the 'tsc' is the TSC in between the two reads that read the MSB
change from the PIT (same as before)

 - the 'delta' is the difference in TSC from *before* the MSB changed
to *after* the MSB changed.

Now the delta is twice as big as before (it covers four PIT accesses,
roughly 4us) and quick_pit_calibrate() will loop a bit longer to get
the calibrated value with in the 500ppm precision. As the delta (d1/d2)
covers four PIT accesses, actual calibrated result might be closer to
250ppm precision.

As the loop now takes longer to stabilize, double MAX_QUICK_PIT_MS to 50.

SMI disturbance will showup as much larger delta's and the loop will take
longer than usual for the result to be with in the accepted precision. Or will
fallback to slow PIT calibration if it takes more than 50msec.

Also while we are at this, remove the calibration correction that aims to
get the result to the middle of the error bars. We really don't know which
direction to correct into, so remove it.

Reported-and-tested-by: Suresh Siddha <suresh.b.siddha@intel.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Suresh Siddha <suresh.b.siddha@intel.com>
Link: http://lkml.kernel.org/r/1326843337.5291.4.camel@sbsiddha-mobl2
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
(cherry picked from commit 68f30fbee19cc67849b9fa8e153ede70758afe81)

Signed-off-by: Leann Ogasawara <leann.ogasawara@canonical.com>

12 years agoUBUNTU: SAUCE: fsam7400: use UMH_WAIT_PROC consistently
Tim Gardner [Sun, 25 Mar 2012 16:59:57 +0000 (10:59 -0600)]
UBUNTU: SAUCE: fsam7400: use UMH_WAIT_PROC consistently

BugLink: http://bugs.launchpad.net/bugs/963685

Inspired by Testuo Handa, "usermodehelper: use UMH_WAIT_PROC consistently"

Signed-off-by: Tim Gardner <tim.gardner@canonical.com>

12 years agokmod: make __request_module() killable
Oleg Nesterov [Fri, 23 Mar 2012 22:02:50 +0000 (15:02 -0700)]
kmod: make __request_module() killable

BugLink: http://bugs.launchpad.net/bugs/963685

As Tetsuo Handa pointed out, request_module() can stress the system
while the oom-killed caller sleeps in TASK_UNINTERRUPTIBLE.

The task T uses "almost all" memory, then it does something which
triggers request_module().  Say, it can simply call sys_socket().  This
in turn needs more memory and leads to OOM.  oom-killer correctly
chooses T and kills it, but this can't help because it sleeps in
TASK_UNINTERRUPTIBLE and after that oom-killer becomes "disabled" by the
TIF_MEMDIE task T.

Make __request_module() killable.  The only necessary change is that
call_modprobe() should kmalloc argv and module_name, they can't live in
the stack if we use UMH_KILLABLE.  This memory is freed via
call_usermodehelper_freeinfo()->cleanup.

Reported-by: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
Signed-off-by: Oleg Nesterov <oleg@redhat.com>
Cc: Rusty Russell <rusty@rustcorp.com.au>
Cc: Tejun Heo <tj@kernel.org>
Cc: David Rientjes <rientjes@google.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
(cherry picked from commit 1cc684ab75123efe7ff446eb821d44375ba8fa30)

Signed-off-by: Tim Gardner <tim.gardner@canonical.com>

12 years agokmod: introduce call_modprobe() helper
Oleg Nesterov [Fri, 23 Mar 2012 22:02:49 +0000 (15:02 -0700)]
kmod: introduce call_modprobe() helper

BugLink: http://bugs.launchpad.net/bugs/963685

No functional changes.  Move the call_usermodehelper code from
__request_module() into the new simple helper, call_modprobe().

Signed-off-by: Oleg Nesterov <oleg@redhat.com>
Cc: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
Cc: Rusty Russell <rusty@rustcorp.com.au>
Cc: Tejun Heo <tj@kernel.org>
Cc: David Rientjes <rientjes@google.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
(cherry picked from commit 3e63a93b987685f02421e18b2aa452d20553a88b)

Signed-off-by: Tim Gardner <tim.gardner@canonical.com>

12 years agousermodehelper: ____call_usermodehelper() doesn't need do_exit()
Oleg Nesterov [Fri, 23 Mar 2012 22:02:49 +0000 (15:02 -0700)]
usermodehelper: ____call_usermodehelper() doesn't need do_exit()

BugLink: http://bugs.launchpad.net/bugs/963685

Minor cleanup.  ____call_usermodehelper() can simply return, no need to
call do_exit() explicitely.

Signed-off-by: Oleg Nesterov <oleg@redhat.com>
Cc: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
Cc: Rusty Russell <rusty@rustcorp.com.au>
Cc: Tejun Heo <tj@kernel.org>
Cc: David Rientjes <rientjes@google.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
(cherry picked from commit 5b9bd473e3b8a8c6c4ae99be475e6e9b27568555)

Signed-off-by: Tim Gardner <tim.gardner@canonical.com>

12 years agousermodehelper: kill umh_wait, renumber UMH_* constants
Oleg Nesterov [Fri, 23 Mar 2012 22:02:48 +0000 (15:02 -0700)]
usermodehelper: kill umh_wait, renumber UMH_* constants

BugLink: http://bugs.launchpad.net/bugs/963685

No functional changes.  It is not sane to use UMH_KILLABLE with enum
umh_wait, but obviously we do not want another argument in
call_usermodehelper_* helpers.  Kill this enum, use the plain int.

Signed-off-by: Oleg Nesterov <oleg@redhat.com>
Cc: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
Cc: Rusty Russell <rusty@rustcorp.com.au>
Cc: Tejun Heo <tj@kernel.org>
Cc: David Rientjes <rientjes@google.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
(cherry picked from commit 9d944ef32e83405a07376f112e9f02161d3e9731)

Signed-off-by: Tim Gardner <tim.gardner@canonical.com>

12 years agousermodehelper: implement UMH_KILLABLE
Oleg Nesterov [Fri, 23 Mar 2012 22:02:47 +0000 (15:02 -0700)]
usermodehelper: implement UMH_KILLABLE

BugLink: http://bugs.launchpad.net/bugs/963685

Implement UMH_KILLABLE, should be used along with UMH_WAIT_EXEC/PROC.
The caller must ensure that subprocess_info->path/etc can not go away
until call_usermodehelper_freeinfo().

call_usermodehelper_exec(UMH_KILLABLE) does
wait_for_completion_killable.  If it fails, it uses
xchg(&sub_info->complete, NULL) to serialize with umh_complete() which
does the same xhcg() to access sub_info->complete.

If call_usermodehelper_exec wins, it can safely return.  umh_complete()
should get NULL and call call_usermodehelper_freeinfo().

Otherwise we know that umh_complete() was already called, in this case
call_usermodehelper_exec() falls back to wait_for_completion() which
should succeed "very soon".

Note: UMH_NO_WAIT == -1 but it obviously should not be used with
UMH_KILLABLE.  We delay the neccessary cleanup to simplify the back
porting.

Signed-off-by: Oleg Nesterov <oleg@redhat.com>
Cc: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
Cc: Rusty Russell <rusty@rustcorp.com.au>
Cc: Tejun Heo <tj@kernel.org>
Cc: David Rientjes <rientjes@google.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
(cherry picked from commit d0bd587a80960d7ba7e0c8396e154028c9045c54)

Signed-off-by: Tim Gardner <tim.gardner@canonical.com>

12 years agousermodehelper: introduce umh_complete(sub_info)
Oleg Nesterov [Fri, 23 Mar 2012 22:02:47 +0000 (15:02 -0700)]
usermodehelper: introduce umh_complete(sub_info)

BugLink: http://bugs.launchpad.net/bugs/963685

Preparation.  Add the new trivial helper, umh_complete().  Currently it
simply does complete(sub_info->complete).

Signed-off-by: Oleg Nesterov <oleg@redhat.com>
Cc: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
Cc: Rusty Russell <rusty@rustcorp.com.au>
Cc: Tejun Heo <tj@kernel.org>
Cc: David Rientjes <rientjes@google.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
(cherry picked from commit b3449922502f5a161ee2b5022a33aec8472fbf18)

Signed-off-by: Tim Gardner <tim.gardner@canonical.com>

12 years agousermodehelper: use UMH_WAIT_PROC consistently
Oleg Nesterov [Fri, 23 Mar 2012 22:02:46 +0000 (15:02 -0700)]
usermodehelper: use UMH_WAIT_PROC consistently

BugLink: http://bugs.launchpad.net/bugs/963685

A few call_usermodehelper() callers use the hardcoded constant instead of
the proper UMH_WAIT_PROC, fix them.

Reported-by: Tetsuo Handa <penguin-kernel@i-love.sakura.ne.jp>
Signed-off-by: Oleg Nesterov <oleg@redhat.com>
Cc: Lars Ellenberg <drbd-dev@lists.linbit.com>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Michal Januszewski <spock@gentoo.org>
Cc: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
Cc: Kentaro Takeda <takedakn@nttdata.co.jp>
Cc: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
Cc: James Morris <jmorris@namei.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
(cherry picked from commit 70834d3070c3f3015ab5c05176d54bd4a0100546)

Signed-off-by: Tim Gardner <tim.gardner@canonical.com>

12 years agoUBUNTU: Rebase to v3.2.13
Leann Ogasawara [Sat, 24 Mar 2012 07:52:26 +0000 (00:52 -0700)]
UBUNTU: Rebase to v3.2.13

Signed-off-by: Leann Ogasawara <leann.ogasawara@canonical.com>

12 years agoUBUNTU: [Config]: enable CONFIG_DRM_LOAD_EDID_FIRMWARE
Andy Whitcroft [Fri, 23 Mar 2012 18:10:55 +0000 (18:10 +0000)]
UBUNTU: [Config]: enable CONFIG_DRM_LOAD_EDID_FIRMWARE

Signed-off-by: Andy Whitcroft <apw@canonical.com>
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>