linux-flexiantxendom0.git
11 years agotcm_fc: Add abort flag for gracefully handling exchange timeout
Mark Rustad [Tue, 3 Apr 2012 17:24:41 +0000 (10:24 -0700)]
tcm_fc: Add abort flag for gracefully handling exchange timeout

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

commit e1c4038282c7586c3544542b37872c434669d3ac upstream.

Add abort flag and use it to terminate processing when an exchange
is timed out or is reset. The abort flag is used in place of the
transport_generic_free_cmd function call in the reset and timeout
cases, because calling that function in that context would free
memory that was in use. The aborted flag allows the lifetime to
be managed in a more normal way, while truncating the processing.

This change eliminates a source of memory corruption which
manifested in a variety of ugly ways.

(nab: Drop unused struct fc_exch *ep in ft_recv_seq)

Signed-off-by: Mark Rustad <mark.d.rustad@intel.com>
Acked-by: Kiran Patil <Kiran.patil@intel.com>
Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Leann Ogasawara <leann.ogasawara@canonical.com>
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>

11 years agommc: atmel-mci: correct data timeout computation
Ludovic Desroches [Wed, 28 Mar 2012 10:28:33 +0000 (12:28 +0200)]
mmc: atmel-mci: correct data timeout computation

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

commit 66292ad92c6d3f2f1c137a1c826b331ca8595dfd upstream.

The HSMCI operates at a rate of up to Master Clock divided by two.
Moreover previous calculation can cause overflows and so wrong
timeouts.

Signed-off-by: Ludovic Desroches <ludovic.desroches@atmel.com>
Acked-by: Nicolas Ferre <nicolas.ferre@atmel.com>
Signed-off-by: Chris Ball <cjb@laptop.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Leann Ogasawara <leann.ogasawara@canonical.com>
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>

11 years agommc: sdhci-dove: Fix compile error by including module.h
Alf Høgemark [Wed, 4 Apr 2012 16:27:09 +0000 (12:27 -0400)]
mmc: sdhci-dove: Fix compile error by including module.h

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

commit 8c2fc8e413ecc2c96b696e28d4eb1bc6cee8dc84 upstream.

This patch fixes a compile error in drivers/mmc/host/sdhci-dove.c
by including the linux/module.h file.

Signed-off-by: Alf Høgemark <alf@i100.no>
Signed-off-by: Chris Ball <cjb@laptop.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Leann Ogasawara <leann.ogasawara@canonical.com>
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>

11 years agoARM: tegra: remove Tegra30 errata from MACH_TEGRA_DT
Stephen Warren [Thu, 5 Apr 2012 22:50:05 +0000 (16:50 -0600)]
ARM: tegra: remove Tegra30 errata from MACH_TEGRA_DT

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

[no upstream commit match, as this is a fix for a mis-applied patch in the
previous 3.2-stable release. - gregkh]

Commit 83e4194 "ARM: tegra: select required CPU and L2 errata options"
contained two chunks; one was errata for Tegra20 (correctly applied)
and the second errata for Tegra30. The latter was accidentally applied
to the wrong config option; Tegra30 support wasn't added until v3.3,
and so the second chunk should have just been dropped. This patch does
so.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Leann Ogasawara <leann.ogasawara@canonical.com>
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>

11 years agoCIFS: Fix VFS lock usage for oplocked files
Pavel Shilovsky [Wed, 28 Mar 2012 17:56:19 +0000 (21:56 +0400)]
CIFS: Fix VFS lock usage for oplocked files

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

commit 66189be74ff5f9f3fd6444315b85be210d07cef2 upstream.

We can deadlock if we have a write oplock and two processes
use the same file handle. In this case the first process can't
unlock its lock if the second process blocked on the lock in the
same time.

Fix it by using posix_lock_file rather than posix_lock_file_wait
under cinode->lock_mutex. If we request a blocking lock and
posix_lock_file indicates that there is another lock that prevents
us, wait untill that lock is released and restart our call.

Acked-by: Jeff Layton <jlayton@redhat.com>
Signed-off-by: Pavel Shilovsky <piastry@etersoft.ru>
Signed-off-by: Steve French <sfrench@us.ibm.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Leann Ogasawara <leann.ogasawara@canonical.com>
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>

11 years agox86,kgdb: Fix DEBUG_RODATA limitation using text_poke()
Jason Wessel [Fri, 23 Mar 2012 14:35:05 +0000 (09:35 -0500)]
x86,kgdb: Fix DEBUG_RODATA limitation using text_poke()

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

commit 3751d3e85cf693e10e2c47c03c8caa65e171099b upstream.

There has long been a limitation using software breakpoints with a
kernel compiled with CONFIG_DEBUG_RODATA going back to 2.6.26. For
this particular patch, it will apply cleanly and has been tested all
the way back to 2.6.36.

The kprobes code uses the text_poke() function which accommodates
writing a breakpoint into a read-only page.  The x86 kgdb code can
solve the problem similarly by overriding the default breakpoint
set/remove routines and using text_poke() directly.

The x86 kgdb code will first attempt to use the traditional
probe_kernel_write(), and next try using a the text_poke() function.
The break point install method is tracked such that the correct break
point removal routine will get called later on.

Cc: x86@kernel.org
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: H. Peter Anvin <hpa@zytor.com>
Inspried-by: Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com>
Signed-off-by: Jason Wessel <jason.wessel@windriver.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Leann Ogasawara <leann.ogasawara@canonical.com>
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>

11 years agokgdbts: (2 of 2) fix single step awareness to work correctly with SMP
Jason Wessel [Thu, 29 Mar 2012 22:41:24 +0000 (17:41 -0500)]
kgdbts: (2 of 2) fix single step awareness to work correctly with SMP

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

commit 23bbd8e346f1ef3fc1219c79cea53d8d52b207d8 upstream.

The do_fork and sys_open tests have never worked properly on anything
other than a UP configuration with the kgdb test suite.  This is
because the test suite did not fully implement the behavior of a real
debugger.  A real debugger tracks the state of what thread it asked to
single step and can correctly continue other threads of execution or
conditionally stop while waiting for the original thread single step
request to return.

Below is a simple method to cause a fatal kernel oops with the kgdb
test suite on a 2 processor ARM system:

while [ 1 ] ; do ls > /dev/null 2> /dev/null; done&
while [ 1 ] ; do ls > /dev/null 2> /dev/null; done&
echo V1I1F100 > /sys/module/kgdbts/parameters/kgdbts

Very soon after starting the test the kernel will start warning with
messages like:

kgdbts: BP mismatch c002487c expected c0024878
------------[ cut here ]------------
WARNING: at drivers/misc/kgdbts.c:317 check_and_rewind_pc+0x9c/0xc4()
[<c01f6520>] (check_and_rewind_pc+0x9c/0xc4)
[<c01f595c>] (validate_simple_test+0x3c/0xc4)
[<c01f60d4>] (run_simple_test+0x1e8/0x274)

The kernel will eventually recovers, but the test suite has completely
failed to test anything useful.

This patch implements behavior similar to a real debugger that does
not rely on hardware single stepping by using only software planted
breakpoints.

In order to mimic a real debugger, the kgdb test suite now tracks the
most recent thread that was continued (cont_thread_id), with the
intent to single step just this thread.  When the response to the
single step request stops in a different thread that hit the original
break point that thread will now get continued, while the debugger
waits for the thread with the single step pending.  Here is a high
level description of the sequence of events.

   cont_instead_of_sstep = 0;

1) set breakpoint at do_fork
2) continue
3)   Save the thread id where we stop to cont_thread_id
4) Remove breakpoint at do_fork
5) Reset the PC if needed depending on kernel exception type
6) soft single step
7)   Check where we stopped
       if current thread != cont_thread_id {
           if (here for more than 2 times for the same thead) {
              ### must be a really busy system, start test again ###
      goto step 1
           }
           goto step 5
       } else {
           cont_instead_of_sstep = 0;
       }
8) clean up and run test again if needed
9) Clear out any threads that were waiting on a break point at the
   point in time the test is ended with get_cont_catch().  This
   happens sometimes because breakpoints are used in place of single
   stepping and some threads could have been in the debugger exception
   handling queue because breakpoints were hit concurrently on
   different CPUs.  This also means we wait at least one second before
   unplumbing the debugger connection at the very end, so as respond
   to any debug threads waiting to be serviced.

Signed-off-by: Jason Wessel <jason.wessel@windriver.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Leann Ogasawara <leann.ogasawara@canonical.com>
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>

11 years agokgdbts: (1 of 2) fix single step awareness to work correctly with SMP
Jason Wessel [Thu, 29 Mar 2012 22:41:24 +0000 (17:41 -0500)]
kgdbts: (1 of 2) fix single step awareness to work correctly with SMP

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

commit 486c5987a00a89d56c2c04c506417ef8f823ca2e upstream.

The do_fork and sys_open tests have never worked properly on anything
other than a UP configuration with the kgdb test suite.  This is
because the test suite did not fully implement the behavior of a real
debugger.  A real debugger tracks the state of what thread it asked to
single step and can correctly continue other threads of execution or
conditionally stop while waiting for the original thread single step
request to return.

Below is a simple method to cause a fatal kernel oops with the kgdb
test suite on a 4 processor x86 system:

while [ 1 ] ; do ls > /dev/null 2> /dev/null; done&
while [ 1 ] ; do ls > /dev/null 2> /dev/null; done&
while [ 1 ] ; do ls > /dev/null 2> /dev/null; done&
while [ 1 ] ; do ls > /dev/null 2> /dev/null; done&
echo V1I1F1000 > /sys/module/kgdbts/parameters/kgdbts

Very soon after starting the test the kernel will oops with a message like:

kgdbts: BP mismatch 3b7da66480 expected ffffffff8106a590
WARNING: at drivers/misc/kgdbts.c:303 check_and_rewind_pc+0xe0/0x100()
Call Trace:
 [<ffffffff812994a0>] check_and_rewind_pc+0xe0/0x100
 [<ffffffff81298945>] validate_simple_test+0x25/0xc0
 [<ffffffff81298f77>] run_simple_test+0x107/0x2c0
 [<ffffffff81298a18>] kgdbts_put_char+0x18/0x20

The warn will turn to a hard kernel crash shortly after that because
the pc will not get properly rewound to the right value after hitting
a breakpoint leading to a hard lockup.

This change is broken up into 2 pieces because archs that have hw
single stepping (2.6.26 and up) need different changes than archs that
do not have hw single stepping (3.0 and up).  This change implements
the correct behavior for an arch that supports hw single stepping.

A minor defect was fixed where sys_open should be do_sys_open
for the sys_open break point test.  This solves the problem of running
a 64 bit with a 32 bit user space.  The sys_open() never gets called
when using the 32 bit file system for the kgdb testsuite because the
32 bit binaries invoke the compat_sys_open() call leading to the test
never completing.

In order to mimic a real debugger, the kgdb test suite now tracks the
most recent thread that was continued (cont_thread_id), with the
intent to single step just this thread.  When the response to the
single step request stops in a different thread that hit the original
break point that thread will now get continued, while the debugger
waits for the thread with the single step pending.  Here is a high
level description of the sequence of events.

   cont_instead_of_sstep = 0;

1) set breakpoint at do_fork
2) continue
3)   Save the thread id where we stop to cont_thread_id
4) Remove breakpoint at do_fork
5) Reset the PC if needed depending on kernel exception type
6) if (cont_instead_of_sstep) { continue } else { single step }
7)   Check where we stopped
       if current thread != cont_thread_id {
           cont_instead_of_sstep = 1;
           goto step 5
       } else {
           cont_instead_of_sstep = 0;
       }
8) clean up and run test again if needed

Signed-off-by: Jason Wessel <jason.wessel@windriver.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Leann Ogasawara <leann.ogasawara@canonical.com>
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>

11 years agokgdbts: Fix kernel oops with CONFIG_DEBUG_RODATA
Jason Wessel [Thu, 29 Mar 2012 11:55:44 +0000 (06:55 -0500)]
kgdbts: Fix kernel oops with CONFIG_DEBUG_RODATA

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

commit 456ca7ff24841bf2d2a2dfd690fe7d42ef70d932 upstream.

On x86 the kgdb test suite will oops when the kernel is compiled with
CONFIG_DEBUG_RODATA and you run the tests after boot time. This is
regression has existed since 2.6.26 by commit: b33cb815 (kgdbts: Use
HW breakpoints with CONFIG_DEBUG_RODATA).

The test suite can use hw breakpoints for all the tests, but it has to
execute the hardware breakpoint specific tests first in order to
determine that the hw breakpoints actually work.  Specifically the
very first test causes an oops:

# echo V1I1 > /sys/module/kgdbts/parameters/kgdbts
kgdb: Registered I/O driver kgdbts.
kgdbts:RUN plant and detach test

Entering kdb (current=0xffff880017aa9320, pid 1078) on processor 0 due to Keyboard Entry
[0]kdb> kgdbts: ERROR PUT: end of test buffer on 'plant_and_detach_test' line 1 expected OK got $E14#aa
WARNING: at drivers/misc/kgdbts.c:730 run_simple_test+0x151/0x2c0()
[...oops clipped...]

This commit re-orders the running of the tests and puts the RODATA
check into its own function so as to correctly avoid the kernel oops
by detecting and using the hw breakpoints.

Signed-off-by: Jason Wessel <jason.wessel@windriver.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Leann Ogasawara <leann.ogasawara@canonical.com>
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>

11 years agokgdb,debug_core: pass the breakpoint struct instead of address and memory
Jason Wessel [Wed, 21 Mar 2012 15:17:03 +0000 (10:17 -0500)]
kgdb,debug_core: pass the breakpoint struct instead of address and memory

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

commit 98b54aa1a2241b59372468bd1e9c2d207bdba54b upstream.

There is extra state information that needs to be exposed in the
kgdb_bpt structure for tracking how a breakpoint was installed.  The
debug_core only uses the the probe_kernel_write() to install
breakpoints, but this is not enough for all the archs.  Some arch such
as x86 need to use text_poke() in order to install a breakpoint into a
read only page.

Passing the kgdb_bpt structure to kgdb_arch_set_breakpoint() and
kgdb_arch_remove_breakpoint() allows other archs to set the type
variable which indicates how the breakpoint was installed.

Signed-off-by: Jason Wessel <jason.wessel@windriver.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Leann Ogasawara <leann.ogasawara@canonical.com>
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>

11 years agotarget: Fix unsupported WRITE_SAME sense payload
Martin Svec [Tue, 7 Feb 2012 06:13:25 +0000 (22:13 -0800)]
target: Fix unsupported WRITE_SAME sense payload

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

commit 67236c44741e250199ccd77f1115568e68cf8848 upstream.

This patch fixes a bug in target-core where unsupported WRITE_SAME ops
from a target_check_write_same_discard() failure was incorrectly
returning CHECK_CONDITION w/ TCM_INVALID_CDB_FIELD sense data.
This was causing some clients to not properly fall back, so go ahead
and use the correct TCM_UNSUPPORTED_SCSI_OPCODE sense for this case.

Reported-by: Martin Svec <martin.svec@zoner.cz>
Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Leann Ogasawara <leann.ogasawara@canonical.com>
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>

11 years agor8169: runtime resume before shutdown.
françois romieu [Tue, 6 Mar 2012 01:14:12 +0000 (01:14 +0000)]
r8169: runtime resume before shutdown.

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

commit 2a15cd2ff488a9fdb55e5e34060f499853b27c77 upstream.

With runtime PM, if the ethernet cable is disconnected, the device is
transitioned to D3 state to conserve energy. If the system is shutdown
in this state, any register accesses in rtl_shutdown are dropped on
the floor. As the device was programmed by .runtime_suspend() to wake
on link changes, it is thus brought back up as soon as the link recovers.

Resuming every suspended device through the driver core would slow things
down and it is not clear how many devices really need it now.

Original report and D0 transition patch by Sameer Nanda. Patch has been
changed to comply with advices by Rafael J. Wysocki and the PM folks.

Reported-by: Sameer Nanda <snanda@chromium.org>
Signed-off-by: Francois Romieu <romieu@fr.zoreil.com>
Cc: Rafael J. Wysocki <rjw@sisk.pl>
Cc: Hayes Wang <hayeswang@realtek.com>
Cc: Alan Stern <stern@rowland.harvard.edu>
Acked-by: Rafael J. Wysocki <rjw@sisk.pl>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Leann Ogasawara <leann.ogasawara@canonical.com>
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>

11 years agodrm/i915: quirk away broken OpRegion VBT
Daniel Vetter [Sat, 24 Mar 2012 22:51:30 +0000 (23:51 +0100)]
drm/i915: quirk away broken OpRegion VBT

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

commit 25e341cfc33d94435472983825163e97fe370a6c upstream.

Somehow the BIOS manages to screw things up when copying the VBT
around, because the one we scrap from the VBIOS rom actually works.

Tested-by: Markus Heinz <markus.heinz@uni-dortmund.de>
Acked-by: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Rodrigo Vivi <rodrigo.vivi@gmail.com>
Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=28812
Signed-Off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Leann Ogasawara <leann.ogasawara@canonical.com>
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>

11 years agodrm/i915: Add lock on drm_helper_resume_force_mode
Sean Paul [Fri, 23 Mar 2012 12:52:58 +0000 (08:52 -0400)]
drm/i915: Add lock on drm_helper_resume_force_mode

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

commit 927a2f119e8235238a2fc64871051b16c9bdae75 upstream.

i915_drm_thaw was not locking the mode_config lock when calling
drm_helper_resume_force_mode. When there were multiple wake sources,
this caused FDI training failure on SNB which in turn corrupted the
display.

Signed-off-by: Sean Paul <seanpaul@chromium.org>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
Signed-Off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Leann Ogasawara <leann.ogasawara@canonical.com>
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>

11 years agodrm/i915: no-lvds quirk on MSI DC500
Anisse Astier [Wed, 7 Mar 2012 17:36:35 +0000 (18:36 +0100)]
drm/i915: no-lvds quirk on MSI DC500

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

commit 97effadb65ed08809e1720c8d3ee80b73a93665c upstream.

This hardware doesn't have an LVDS, it's a desktop box. Fix incorrect
LVDS detection.

Signed-off-by: Anisse Astier <anisse@astier.eu>
Acked-by: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Leann Ogasawara <leann.ogasawara@canonical.com>
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>

11 years agodrm/radeon/kms: fix fans after resume
Alex Deucher [Thu, 29 Mar 2012 23:04:08 +0000 (19:04 -0400)]
drm/radeon/kms: fix fans after resume

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

commit 402976fe51b2d1a58a29ba06fa1ca5ace3a4cdcd upstream.

On pre-R600 asics, the SpeedFanControl table is not
executed as part of ASIC_Init as it is on newer asics.

Fixes:
https://bugzilla.kernel.org/show_bug.cgi?id=29412

Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Leann Ogasawara <leann.ogasawara@canonical.com>
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>

11 years agodrm: Validate requested virtual size against allocated fb size
Chris Wilson [Mon, 26 Mar 2012 20:15:53 +0000 (21:15 +0100)]
drm: Validate requested virtual size against allocated fb size

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

commit 62fb376e214d3c1bfdf6fbb77dac162f6da04d7e upstream.

mplayer -vo fbdev tries to create a screen that is twice as tall as the
allocated framebuffer for "doublebuffering". By default, and all in-tree
users, only sufficient memory is allocated and mapped to satisfy the
smallest framebuffer and the virtual size is no larger than the actual.
For these users, we should therefore reject any userspace request to
create a screen that requires a buffer larger than the framebuffer
originally allocated.

References: https://bugs.freedesktop.org/show_bug.cgi?id=38138
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Leann Ogasawara <leann.ogasawara@canonical.com>
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>

11 years agortlwifi: rtl8192ce: rtl8192cu: rtl8192de: Fix low-gain setting when scanning
Larry Finger [Mon, 26 Mar 2012 14:59:48 +0000 (09:59 -0500)]
rtlwifi: rtl8192ce: rtl8192cu: rtl8192de: Fix low-gain setting when scanning

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

commit 643c61e119459e9d750087b7b34be94491efebf9 upstream.

In https://bugzilla.redhat.com/show_bug.cgi?id=770207, slowdowns of driver
rtl8192ce are reported. One fix (commit a9b89e2) has already been applied,
and it helped, but the maximum RX speed would still drop to 1 Mbps. As in
the previous fix, the initial gain was determined to be the problem; however,
the problem arises from a setting of the gain when scans are started.

Driver rtl8192de also has the same code structure - this one is fixed as well.

Reported-and-Tested-by: Ivan Pesin <ivan.pesin@gmail.com>
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Leann Ogasawara <leann.ogasawara@canonical.com>
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>

11 years agomac80211: fix possible tid_rx->reorder_timer use after free
Stanislaw Gruszka [Mon, 19 Mar 2012 15:00:26 +0000 (16:00 +0100)]
mac80211: fix possible tid_rx->reorder_timer use after free

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

commit d72308bff5c2fa207949a5925b020bce74495e33 upstream.

Is possible that we will arm the tid_rx->reorder_timer after
del_timer_sync() in ___ieee80211_stop_rx_ba_session(). We need to stop
timer after RCU grace period finish, so move it to
ieee80211_free_tid_rx(). Timer will not be armed again, as
rcu_dereference(sta->ampdu_mlme.tid_rx[tid]) will return NULL.

Debug object detected problem with the following warning:
ODEBUG: free active (active state 0) object type: timer_list hint: sta_rx_agg_reorder_timer_expired+0x0/0xf0 [mac80211]

Bug report (with all warning messages):
https://bugzilla.redhat.com/show_bug.cgi?id=804007

Reported-by: "jan p. springer" <jsd@igroup.org>
Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Leann Ogasawara <leann.ogasawara@canonical.com>
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>

11 years agom68k/mac: Add missing platform check before registering platform devices
Geert Uytterhoeven [Sun, 18 Mar 2012 12:21:38 +0000 (13:21 +0100)]
m68k/mac: Add missing platform check before registering platform devices

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

commit 6cfeba53911d6d2f17ebbd1246893557d5ff5aeb upstream.

On multi-platform kernels, the Mac platform devices should be registered
when running on Mac only. Else it may crash later.

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Leann Ogasawara <leann.ogasawara@canonical.com>
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>

11 years agotracing: Fix ent_size in trace output
Steven Rostedt [Tue, 27 Mar 2012 14:43:28 +0000 (10:43 -0400)]
tracing: Fix ent_size in trace output

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

commit 12b5da349a8b94c9dbc3430a6bc42eabd9eaf50b upstream.

When reading the trace file, the records of each of the per_cpu buffers
are examined to find the next event to print out. At the point of looking
at the event, the size of the event is recorded. But if the first event is
chosen, the other events in the other CPU buffers will reset the event size
that is stored in the iterator descriptor, causing the event size passed to
the output functions to be incorrect.

In most cases this is not a problem, but for the case of stack traces, it
is. With the change to the stack tracing to record a dynamic number of
back traces, the output depends on the size of the entry instead of the
fixed 8 back traces. When the entry size is not correct, the back traces
would not be fully printed.

Note, reading from the per-cpu trace files were not affected.

Reported-by: Thomas Gleixner <tglx@linutronix.de>
Tested-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Leann Ogasawara <leann.ogasawara@canonical.com>
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>

11 years agotracing: Fix ftrace stack trace entries
Wolfgang Mauerer [Thu, 22 Mar 2012 10:18:20 +0000 (11:18 +0100)]
tracing: Fix ftrace stack trace entries

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

commit 01de982abf8c9e10fc3089e10585cd2cc914bdab upstream.

8 hex characters tell only half the tale for 64 bit CPUs,
so use the appropriate length.

Link: http://lkml.kernel.org/r/1332411501-8059-2-git-send-email-wolfgang.mauerer@siemens.com

Signed-off-by: Wolfgang Mauerer <wolfgang.mauerer@siemens.com>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Leann Ogasawara <leann.ogasawara@canonical.com>
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>

11 years agogenirq: Adjust irq thread affinity on IRQ_SET_MASK_OK_NOCOPY return value
Jiang Liu [Fri, 30 Mar 2012 15:11:33 +0000 (23:11 +0800)]
genirq: Adjust irq thread affinity on IRQ_SET_MASK_OK_NOCOPY return value

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

commit f5cb92ac82d06cb583c1f66666314c5c0a4d7913 upstream.

irq_move_masked_irq() checks the return code of
chip->irq_set_affinity() only for 0, but IRQ_SET_MASK_OK_NOCOPY is
also a valid return code, which is there to avoid a redundant copy of
the cpumask. But in case of IRQ_SET_MASK_OK_NOCOPY we not only avoid
the redundant copy, we also fail to adjust the thread affinity of an
eventually threaded interrupt handler.

Handle IRQ_SET_MASK_OK (==0) and IRQ_SET_MASK_OK_NOCOPY(==1) return
values correctly by checking the valid return values seperately.

Signed-off-by: Jiang Liu <jiang.liu@huawei.com>
Cc: Jiang Liu <liuj97@gmail.com>
Cc: Keping Chen <chenkeping@huawei.com>
Link: http://lkml.kernel.org/r/1333120296-13563-2-git-send-email-jiang.liu@huawei.com
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Leann Ogasawara <leann.ogasawara@canonical.com>
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>

11 years agomodpost: fix ALL_INIT_DATA_SECTIONS
Jan Beulich [Thu, 8 Mar 2012 09:41:25 +0000 (09:41 +0000)]
modpost: fix ALL_INIT_DATA_SECTIONS

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

commit 9aaf440f8fabcebf9ea79a62ccf4c212e6544b49 upstream.

This was lacking a comma between two supposed to be separate strings.

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Signed-off-by: Michal Marek <mmarek@suse.cz>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Leann Ogasawara <leann.ogasawara@canonical.com>
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>

11 years agoPNPACPI: Fix device ref leaking in acpi_pnp_match
Yinghai Lu [Sat, 3 Mar 2012 21:29:20 +0000 (13:29 -0800)]
PNPACPI: Fix device ref leaking in acpi_pnp_match

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

commit 89e96ada572fb216e582dbe3f64e1a6939a37f74 upstream.

During testing pci root bus removal, found some root bus bridge is not freed.
If booting with pnpacpi=off, those hostbridge could be freed without problem.
It turns out that some devices reference are not released during acpi_pnp_match.
that match should not hold one device ref during every calling.
Add pu_device calling before returning.

Signed-off-by: Yinghai Lu <yinghai@kernel.org>
Signed-off-by: Len Brown <len.brown@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Leann Ogasawara <leann.ogasawara@canonical.com>
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>

11 years agoACPI: Do cpufreq clamping for throttling per package v2
Andi Kleen [Mon, 6 Feb 2012 16:17:11 +0000 (08:17 -0800)]
ACPI: Do cpufreq clamping for throttling per package v2

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

commit 2815ab92ba3ab27556212cc306288dc95692824b upstream.

On Intel CPUs the processor typically uses the highest frequency
set by any logical CPU. When the system overheats
Linux first forces the frequency to the lowest available one
to lower the temperature.

However this was done only per logical CPU, which means all
logical CPUs in a package would need to go through this before
the frequency is actually lowered.

Worse this delay actually prevents real throttling, because
the real throttle code only proceeds when the lowest frequency
is already reached.

So when a throttle event happens force the lowest frequency
for all CPUs in the package where it happened. The per CPU
state is now kept per package, not per logical CPU. An alternative
would be to do it per cpufreq unit, but since we want to bring
down the temperature of the complete chip it's better
to do it for all.

In principle it may even make sense to do it for all CPUs,
but I kept it on the package for now.

With this change the frequency is actually lowered, which
in terms also allows real throttling to proceed.

I also removed an unnecessary per cpu variable initialization.

v2: Fix package mapping

Signed-off-by: Andi Kleen <ak@linux.intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Leann Ogasawara <leann.ogasawara@canonical.com>
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>

11 years agomtd: m25p80: set writebufsize
Brian Norris [Tue, 31 Jan 2012 08:06:03 +0000 (00:06 -0800)]
mtd: m25p80: set writebufsize

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

commit b54f47c8bcfc5f766bf13ec31bd7dd1d4726d33b upstream.

Using UBI on m25p80 can give messages like:

    UBI error: io_init: bad write buffer size 0 for 1 min. I/O unit

We need to initialize writebufsize; I think "page_size" is the correct
"bufsize", although I'm not sure. Comments?

Signed-off-by: Brian Norris <computersforpeace@gmail.com>
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Leann Ogasawara <leann.ogasawara@canonical.com>
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>

11 years agomtd: lart: initialize writebufsize
Artem Bityutskiy [Fri, 3 Feb 2012 07:53:28 +0000 (09:53 +0200)]
mtd: lart: initialize writebufsize

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

commit fcc44a07dae0af16e84e93425fc8afe642ddc603 upstream.

The writebufsize concept was introduce by commit
"0e4ca7e mtd: add writebufsize field to mtd_info struct" and it represents
the maximum amount of data the device writes to the media at a time. This is
an important parameter for UBIFS which is used during recovery and which
basically defines how big a corruption caused by a power cut can be.

Set writebufsize to 4 because this drivers writes at max 4 bytes at a time.

Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Leann Ogasawara <leann.ogasawara@canonical.com>
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>

11 years agomtd: block2mtd: initialize writebufsize
Artem Bityutskiy [Fri, 3 Feb 2012 07:32:44 +0000 (09:32 +0200)]
mtd: block2mtd: initialize writebufsize

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

commit b604387411ec6a072e95910099262616edd2bd2f upstream.

The writebufsize concept was introduce by commit
"0e4ca7e mtd: add writebufsize field to mtd_info struct" and it represents
the maximum amount of data the device writes to the media at a time. This is
an important parameter for UBIFS which is used during recovery and which
basically defines how big a corruption caused by a power cut can be.

However, we forgot to set this parameter for block2mtd. Set it to PAGE_SIZE
because this is actually the amount of data we write at a time.

Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
Acked-by: Joern Engel <joern@lazybastard.org>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Leann Ogasawara <leann.ogasawara@canonical.com>
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>

11 years agomtd: sst25l: initialize writebufsize
Artem Bityutskiy [Fri, 3 Feb 2012 08:16:50 +0000 (10:16 +0200)]
mtd: sst25l: initialize writebufsize

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

commit c4cc625ea5958d065c21cc0fcea29e9ed8f3d2bc upstream.

The writebufsize concept was introduce by commit
"0e4ca7e mtd: add writebufsize field to mtd_info struct" and it represents
the maximum amount of data the device writes to the media at a time. This is
an important parameter for UBIFS which is used during recovery and which
basically defines how big a corruption caused by a power cut can be.

Set writebufsize to the flash page size because it is the maximum amount of
data it writes at a time.

Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Leann Ogasawara <leann.ogasawara@canonical.com>
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>

11 years agomtd: nand: gpmi: use correct member for checking NAND_BBT_USE_FLASH
Wolfram Sang [Tue, 31 Jan 2012 12:10:43 +0000 (13:10 +0100)]
mtd: nand: gpmi: use correct member for checking NAND_BBT_USE_FLASH

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

commit 5289966ea576a062b80319975b31b661c196ff9d upstream.

This has been moved from .options to .bbt_options meanwhile. So, it
currently checks for something totally different (NAND_OWN_BUFFERS) and
decides according to that.

Artem Bityutskiy: the options were moved in
a40f734 mtd: nand: consolidate redundant flash-based BBT flags

Artem Bityutskiy: CCing -stable

Signed-off-by: Wolfram Sang <w.sang@pengutronix.de>
Acked-by: Huang Shijie <b32955@freescale.com>
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Leann Ogasawara <leann.ogasawara@canonical.com>
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>

11 years agomtd: mips: lantiq: reintroduce support for cmdline partitions
Daniel Schwierzeck [Thu, 23 Feb 2012 16:59:49 +0000 (17:59 +0100)]
mtd: mips: lantiq: reintroduce support for cmdline partitions

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

commit bf011f2ed53d587fdd8148c173c4f09ed77bdf1a upstream.

Since commit ca97dec2ab5c87e9fbdf7e882e1820004a3966fa the
command line parsing of MTD partitions does not work anymore.

Signed-off-by: Daniel Schwierzeck <daniel.schwierzeck@googlemail.com>
Signed-off-by: John Crispin <blogic@openwrt.org>
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
Acked-by: John Crispin <blogic@openwrt.org>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Leann Ogasawara <leann.ogasawara@canonical.com>
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>

11 years agomtd: ixp4xx: oops in ixp4xx_flash_probe
Marc Kleine-Budde [Wed, 8 Feb 2012 19:24:29 +0000 (20:24 +0100)]
mtd: ixp4xx: oops in ixp4xx_flash_probe

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

commit a3c1e3b732b3708a80e4035b9d845f3f7c7dd0c9 upstream.

In commit "c797533 mtd: abstract last MTD partition parser argument" the
third argument of "mtd_device_parse_register()" changed from start address
of the MTD device to a pointer to a struct.

The "ixp4xx_flash_probe()" function was not converted properly, causing
an oops during boot.

This patch fixes the problem by filling the needed information into a
"struct mtd_part_parser_data" and passing it to
"mtd_device_parse_register()".

Signed-off-by: Marc Kleine-Budde <mkl@blackshift.org>
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Leann Ogasawara <leann.ogasawara@canonical.com>
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>

11 years agoASoC: wm8994: Update WM8994 DCS calibration
Mark Brown [Wed, 21 Mar 2012 13:22:40 +0000 (13:22 +0000)]
ASoC: wm8994: Update WM8994 DCS calibration

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

commit e16605855d58803fe0608417150c7a618b4f8243 upstream.

Based on latest production information.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Leann Ogasawara <leann.ogasawara@canonical.com>
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>

11 years agoFix non TBI PHY access; a bad merge undid bug fix in a previous commit.
Kenth Eriksson [Tue, 27 Mar 2012 22:05:54 +0000 (22:05 +0000)]
Fix non TBI PHY access; a bad merge undid bug fix in a previous commit.

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

[ Upstream commit 464b57da56910c8737ede75ad820b9a7afc46b3e ]

The merge done in commit b26e478f undid bug fix in commit c3e072f8
("net: fsl_pq_mdio: fix non tbi phy access"), with the result that non
TBI (e.g. MDIO) PHYs cannot be accessed.

Signed-off-by: Kenth Eriksson <kenth.eriksson@transmode.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Leann Ogasawara <leann.ogasawara@canonical.com>
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>

11 years agonet: usb: cdc_eem: fix mtu
Rabin Vincent [Thu, 29 Mar 2012 07:15:15 +0000 (07:15 +0000)]
net: usb: cdc_eem: fix mtu

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

[ Upstream commit 78fb72f7936c01d5b426c03a691eca082b03f2b9 ]

Make CDC EEM recalculate the hard_mtu after adjusting the
hard_header_len.

Without this, usbnet adjusts the MTU down to 1494 bytes, and the host is
unable to receive standard 1500-byte frames from the device.

Tested with the Linux USB Ethernet gadget.

Cc: Oliver Neukum <oliver@neukum.name>
Signed-off-by: Rabin Vincent <rabin@rab.in>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Leann Ogasawara <leann.ogasawara@canonical.com>
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>

11 years agorose_dev: fix memcpy-bug in rose_set_mac_address
danborkmann@iogearbox.net [Tue, 27 Mar 2012 22:47:43 +0000 (22:47 +0000)]
rose_dev: fix memcpy-bug in rose_set_mac_address

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

[ Upstream commit 81213b5e8ae68e204aa7a3f83c4f9100405dbff9 ]

If both addresses equal, nothing needs to be done. If the device is down,
then we simply copy the new address to dev->dev_addr. If the device is up,
then we add another loopback device with the new address, and if that does
not fail, we remove the loopback device with the old address. And only
then, we update the dev->dev_addr.

Signed-off-by: Daniel Borkmann <daniel.borkmann@tik.ee.ethz.ch>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Leann Ogasawara <leann.ogasawara@canonical.com>
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>

11 years agosky2: dont overwrite settings for PHY Quick link
Lino Sanfilippo [Fri, 30 Mar 2012 07:28:59 +0000 (07:28 +0000)]
sky2: dont overwrite settings for PHY Quick link

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

[ Upstream commit 2240eb4ae3dc4acff20d1a8947c441c451513e37 ]

This patch corrects a bug in function sky2_open() of the Marvell Yukon 2 driver
in which the settings for PHY quick link are overwritten.

Signed-off-by: Lino Sanfilippo <LinoSanfilippo@gmx.de>
Acked-by: Stephen Hemminger <shemminger@vyattta.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Leann Ogasawara <leann.ogasawara@canonical.com>
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>

11 years agotg3: Fix 5717 serdes powerdown problem
Matt Carlson [Mon, 2 Apr 2012 09:01:40 +0000 (09:01 +0000)]
tg3: Fix 5717 serdes powerdown problem

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

[ Upstream commit 085f1afc56619bda424941412fdeaff1e32c21dc ]

If port 0 of a 5717 serdes device powers down, it hides the phy from
port 1.  This patch works around the problem by keeping port 0's phy
powered up.

Signed-off-by: Matt Carlson <mcarlson@broadcom.com>
Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Leann Ogasawara <leann.ogasawara@canonical.com>
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>

11 years agox86 bpf_jit: fix a bug in emitting the 16-bit immediate operand of AND
zhuangfeiran@ict.ac.cn [Wed, 28 Mar 2012 23:27:00 +0000 (23:27 +0000)]
x86 bpf_jit: fix a bug in emitting the 16-bit immediate operand of AND

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

[ Upstream commit 1d24fb3684f347226747c6b11ea426b7b992694e ]

When K >= 0xFFFF0000, AND needs the two least significant bytes of K as
its operand, but EMIT2() gives it the least significant byte of K and
0x2. EMIT() should be used here to replace EMIT2().

Signed-off-by: Feiran Zhuang <zhuangfeiran@ict.ac.cn>
Acked-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Leann Ogasawara <leann.ogasawara@canonical.com>
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>

11 years agoUBUNTU: Start new release
Luis Henriques [Mon, 30 Apr 2012 18:04:27 +0000 (19:04 +0100)]
UBUNTU: Start new release

Ignore: yes
Signed-off-by: Luis Henriques <luis.henriques@canonical.com>

12 years agoUBUNTU: Ubuntu-3.2.0-24.37
Leann Ogasawara [Tue, 24 Apr 2012 14:48:10 +0000 (07:48 -0700)]
UBUNTU: Ubuntu-3.2.0-24.37

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

12 years agoUBUNTU: [Config] powerpc-smp: build in ATI and RADEON frame buffer drivers
Tim Gardner [Mon, 23 Apr 2012 13:09:14 +0000 (07:09 -0600)]
UBUNTU: [Config] powerpc-smp: build in ATI and RADEON frame buffer drivers

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

Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
Acked-by: Stefan Bader <stefan.bader@canonical.com>
Acked-by: Herton Ronaldo Krzesinski <herton.krzesinski@canonical.com>
Signed-off-by: Leann Ogasawara <leann.ogasawara@canonical.com>

12 years agoHID: usbhid: add quirk no_get for quanta 3008 devices
Benjamin Tissoires [Tue, 6 Mar 2012 09:53:48 +0000 (10:53 +0100)]
HID: usbhid: add quirk no_get for quanta 3008 devices

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

Some quanta devices do not like to be polled for reports
descriptors, thus this quirk.

Signed-off-by: Benjamin Tissoires <benjamin.tissoires@enac.fr>
Acked-by: Henrik Rydberg <rydberg@euromail.se>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
(cherry picked from commit 8d31321ca5367daf0415ed81f9cbd93adb16e8bc)

Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
Acked-by: Herton Krzesinski <herton.krzesinski@canonical.com>

12 years agoHID: multitouch: merge quanta driver into hid-multitouch
Benjamin Tissoires [Tue, 29 Nov 2011 12:13:10 +0000 (13:13 +0100)]
HID: multitouch: merge quanta driver into hid-multitouch

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

This patch merge the last old-style hid multitouch driver to
the generic one.
It also adds 2 more quanta pids.

Signed-off-by: Benjamin Tissoires <benjamin.tissoires@gmail.com>
Acked-by: Henrik Rydberg <rydberg@euromail.se>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
(cherry picked from commit 5e7ea11f603a0aeb77fd1bff0b242931ffe139de)

Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
Acked-by: Herton Krzesinski <herton.krzesinski@canonical.com>

12 years agoUBUNTU: [Config] Remove hiq-quanta module references
Tim Gardner [Mon, 23 Apr 2012 13:36:35 +0000 (07:36 -0600)]
UBUNTU: [Config] Remove hiq-quanta module references

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

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

12 years agoUBUNTU: d-i: Add rtl8187 driver to nic-usb-modules
Herton Ronaldo Krzesinski [Fri, 20 Apr 2012 20:47:12 +0000 (17:47 -0300)]
UBUNTU: d-i: Add rtl8187 driver to nic-usb-modules

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

Signed-off-by: Herton Ronaldo Krzesinski <herton.krzesinski@canonical.com>
Acked-by: Tim Gardner <tim.gardner@canonical.com>
Signed-off-by: Leann Ogasawara <leann.ogasawara@canonical.com>

12 years agoUBUNTU: Bump ABI
Leann Ogasawara [Thu, 19 Apr 2012 21:11:57 +0000 (14:11 -0700)]
UBUNTU: Bump ABI

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

12 years agoUBUNTU: d-i: Add hid-logitech-dj to input-modules
Herton Ronaldo Krzesinski [Thu, 19 Apr 2012 19:18:56 +0000 (16:18 -0300)]
UBUNTU: d-i: Add hid-logitech-dj to input-modules

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

Signed-off-by: Herton Ronaldo Krzesinski <herton.krzesinski@canonical.com>
Acked-by: Brad Figg <brad.figg@canonical.com>
Signed-off-by: Leann Ogasawara <leann.ogasawara@canonical.com>

12 years agoUBUNTU: SAUCE: NFSv4: Ensure that we check lock exclusive/shared type against open...
Trond Myklebust [Thu, 19 Apr 2012 09:45:03 +0000 (10:45 +0100)]
UBUNTU: SAUCE: NFSv4: Ensure that we check lock exclusive/shared type against open modes

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

Since we may be simulating flock() locks using NFS byte range locks,
we can't rely on the VFS having checked the file open mode for us.

Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Cc: stable@vger.kernel.org
(cherry picked from commit 5de4815015e550bdd33f39650554325540356f0c git://git.linux-nfs.org/projects/trondmy/linux-nfs.git)

Signed-off-by: Luis Henriques <luis.henriques@canonical.com>
Signed-off-by: Leann Ogasawara <leann.ogasawara@canonical.com>

12 years agoUBUNTU: SAUCE: NFSv4: Ensure that the LOCK code sets exception->inode
Trond Myklebust [Thu, 19 Apr 2012 09:45:02 +0000 (10:45 +0100)]
UBUNTU: SAUCE: NFSv4: Ensure that the LOCK code sets exception->inode

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

All callers of nfs4_handle_exception() that need to handle
NFS4ERR_OPENMODE correctly should set exception->inode

Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Cc: stable@vger.kernel.org [>= 3.3.1]
(cherry picked from commit 487790f27df9bb27d3400486bd021dd59edc7589 git://git.linux-nfs.org/projects/trondmy/linux-nfs.git)

Signed-off-by: Luis Henriques <luis.henriques@canonical.com>
Signed-off-by: Leann Ogasawara <leann.ogasawara@canonical.com>

12 years agoNFSv4: Rate limit the state manager for lock reclaim warning messages
William Dauchy [Thu, 19 Apr 2012 09:45:01 +0000 (10:45 +0100)]
NFSv4: Rate limit the state manager for lock reclaim warning messages

BugLink: https://bugs.launchpad.net/bugs/974664

Adding rate limit on `Lock reclaim failed` messages since it could fill
up system logs
Signed-off-by: William Dauchy <wdauchy@gmail.com>
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
(backported from commit 96dcadc2fdd111dca90d559f189a30c65394451a
Conflicts:
fs/nfs/nfs4state.c)

Signed-off-by: Luis Henriques <luis.henriques@canonical.com>
Signed-off-by: Leann Ogasawara <leann.ogasawara@canonical.com>

12 years agoNFSv4: Minor cleanups for nfs4_handle_exception and nfs4_async_handle_error
Trond Myklebust [Thu, 19 Apr 2012 09:45:00 +0000 (10:45 +0100)]
NFSv4: Minor cleanups for nfs4_handle_exception and nfs4_async_handle_error

BugLink: https://bugs.launchpad.net/bugs/974664

Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
(cherry picked from commit 14977489ffdb80d4caf5a184ba41b23b02fbacd9)

Signed-off-by: Luis Henriques <luis.henriques@canonical.com>
Signed-off-by: Leann Ogasawara <leann.ogasawara@canonical.com>

12 years agoUBUNTU: SAUCE: ite-cir: postpone ISR registration
Luis Henriques [Wed, 18 Apr 2012 16:33:32 +0000 (17:33 +0100)]
UBUNTU: SAUCE: ite-cir: postpone ISR registration

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

An early registration of an ISR was causing a crash to several users.  The
reason was that IRQs were being triggered before the driver initialisation
was completed.

This patch fixes this by moving the invocation to request_irq() to a later
stage on the driver probe function.

Signed-off-by: Luis Henriques <luis.henriques@canonical.com>
Acked-by: Brad Figg <brad.figg@canonical.com>
Acked-by: Seth Forshee <seth.forshee@canonical.com>
Signed-off-by: Leann Ogasawara <leann.ogasawara@canonical.com>

12 years agodrm/i915: Fixes distorted external screen image on HP 2730p
Philipp Grete [Mon, 16 Apr 2012 15:29:07 +0000 (12:29 -0300)]
drm/i915: Fixes distorted external screen image on HP 2730p

Fixes LP: #796030 by removing forced pipe A on HP 2730p.  Quirk has
previously been introduced to fix a sleep mode problem that does not
exist any more.

v2: Added Tested-by and Bugzilla Link
[herton - removed Bugzilla, replaced with BugLink]

BugLink: http://bugs.launchpad.net/bugs/796030
Tested-by: Ronny Standtke <ronny.standtke@gmx.net>
Signed-off-by: Philipp Grete <mail@pgrete.de>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
(cherry-picked from commit d12d04512c4430e29daede7f24b97f83f8cf259a upstream)
Signed-off-by: Herton Ronaldo Krzesinski <herton.krzesinski@canonical.com>
Acked-by: Leann Ogasawara <leann.ogasawara@canonical.com>
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>

12 years agoUBUNTU: SAUCE: staging: comedi: Add kernel config for default buffer sizes
Ian Abbott [Fri, 13 Apr 2012 13:12:54 +0000 (14:12 +0100)]
UBUNTU: SAUCE: staging: comedi: Add kernel config for default buffer sizes

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

Allow the default values for the module parameters for the default
initial buffer size and default maximum buffer size to be specified in
the kernel configuration.

I'm not sure what the defaults for the defaults for the defaults should
be, but 64 KiB seems to small, so I used values suggested by Bernd Porr,
which are 2048 KiB for the default initial buffer size and 20480 for the
default maximum buffer size.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Cc: Bernd Porr <berndporr@f2s.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
(cherry picked from commit 234bb3c60f1f1489630750aba4adf40154e0bd70 in
git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging.git staging-next)

Signed-off-by: Leann Ogasawara <leann.ogasawara@canonical.com>
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>

12 years agoUBUNTU: SAUCE: staging: comedi: Add module parameters for default buffer size
Ian Abbott [Fri, 13 Apr 2012 13:12:53 +0000 (14:12 +0100)]
UBUNTU: SAUCE: staging: comedi: Add module parameters for default buffer size

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

For comedi subdevices that support asynchronous transfer commands, the
initial buffer size and maximum buffer size for the transfer are both
set to 64 KiB when the comedi device is "attached" to the hardware
device.  For many applications with reasonable fast sample rates and
slow user-space (e.g. Python) these sizes are a bit too small.

A task with CAP_SYS_ADMIN privileges can change the maximum buffer size
for a comedi subdevice with an ioctl call or by writing to a device
attribute file in sysfs, but that's not very convenient.  For comedi
devices attached during system startup, this could be done by a start-up
script, but for hot-plugged devices it would require scripts run by udev
rules, etc.

Rather than use hardwired values, this patch introduces a couple of
module parameters to set the defaults for the initial buffer size
(comedi_default_buf_size_kb) and maximum buffer size
(comedi_default_buf_maxsize_kb).  These values are applied in place of
the previous hard-wired values when the comedi device is "attached".
The module parameter values are in units of KiB for consistency with the
existing device attribute files.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
(backported from commit 4d7df821277e82ebe2fc9c9af07c928a83f572b8 in
git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging.git staging-next)

Signed-off-by: Leann Ogasawara <leann.ogasawara@canonical.com>
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>

12 years agoUBUNTU: [Config] Set CONFIG_COMEDI_DEFAULT_BUF_[SIZE_KB,MAXSIZE_KB]
Leann Ogasawara [Sat, 14 Apr 2012 03:40:29 +0000 (20:40 -0700)]
UBUNTU: [Config] Set CONFIG_COMEDI_DEFAULT_BUF_[SIZE_KB,MAXSIZE_KB]

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

Result of applying:
  staging: comedi: Add kernel config for default buffer sizes

Set the suggested defaults:
  CONFIG_COMEDI_DEFAULT_BUF_MAXSIZE_KB=20480
  CONFIG_COMEDI_DEFAULT_BUF_SIZE_KB=2048

Signed-off-by: Leann Ogasawara <leann.ogasawara@canonical.com>
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>

12 years agoUBUNTU: SAUCE: Bluetooth: btusb: Add vendor specific ID (0489 e042) for BCM20702A0
Manoj Iyer [Fri, 13 Apr 2012 16:58:29 +0000 (11:58 -0500)]
UBUNTU: SAUCE: Bluetooth: btusb: Add vendor specific ID (0489 e042) for BCM20702A0

T: Bus=02 Lev=02 Prnt=02 Port=04 Cnt=01 Dev#= 3 Spd=12 MxCh= 0
D: Ver= 2.00 Cls=ff(vend.) Sub=01 Prot=01 MxPS=64 #Cfgs= 1
P: Vendor=0489 ProdID=e042 Rev=01.12
S: Manufacturer=Broadcom Corp
S: Product=BCM20702A0
S: SerialNumber=E4D53DCA61B5
C: #Ifs= 4 Cfg#= 1 Atr=e0 MxPwr=0mA
I: If#= 0 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=01 Prot=01 Driver=(none)
I: If#= 1 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=01 Prot=01 Driver=(none)
I: If#= 2 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff Driver=(none)
I: If#= 3 Alt= 0 #EPs= 0 Cls=fe(app. ) Sub=01 Prot=01 Driver=(none)

https://lkml.org/lkml/2012/4/9/144
BugLink: http://bugs.launchpad.net/bugs/980965
Reported-by: Dennis Chua <dennis.chua@canonical.com>
Signed-off-by: Manoj Iyer <manoj.iyer@canonical.com>
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
Signed-off-by: Manoj Iyer <manoj.iyer@canonical.com>
Acked-by: Brad Figg <brad.figg@canonical.com>
Signed-off-by: Leann Ogasawara <leann.ogasawara@canonical.com>

12 years agoInput: sentelic - filter taps in absolute mode
Oskari Saarenmaa [Tue, 3 Apr 2012 16:46:32 +0000 (09:46 -0700)]
Input: sentelic - filter taps in absolute mode

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

Taps in absolute positioning single-finger mode are currently reported
as physical clicks by the driver. This should be handled by userspace,
not the kernel.

When a tap occurs, the FSP_PB0_LBTN bit is set, but the FSP_PB0_PHY_BTN
is not. We use this to filter out physical clicks from taps.

Signed-off-by: Oskari Saarenmaa <os@ohmu.fi>
Reviewed-by: Tai-hwa Liang <avatar@sentelic.com>
Reviewed-by: Chase Douglas <chase.douglas@canonical.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
(cherry picked from commit d626dad58f02e13730ded6ac84d6a9e53123f0e8)

Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
Acked-by: Chase Douglas <chase.douglas@canonical.com>

12 years agoInput: sentelic - improve packet debugging information
Oskari Saarenmaa [Mon, 26 Mar 2012 00:17:27 +0000 (17:17 -0700)]
Input: sentelic - improve packet debugging information

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

Signed-off-by: Oskari Saarenmaa <os@ohmu.fi>
Signed-off-by: Tai-hwa Liang <avatar@sentelic.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
(cherry picked from commit 727f9b480754dfcb82e36d431e85984893011b79)

Signed-off-by: Eric Miao <eric.miao@canonical.com>
Acked-by: Leann Ogasawara <leann.ogasawara@canonical.com>
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>

12 years agoInput: sentelic - minor code cleanup
Tai-hwa Liang [Mon, 26 Mar 2012 00:17:00 +0000 (17:17 -0700)]
Input: sentelic - minor code cleanup

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

Improve code readability by converting yet another magic number into a
pre-defined constant.

Signed-off-by: Tai-hwa Liang <avatar@sentelic.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
(cherry picked from commit 7b85f73d0461188aa397d428e6c53419ebfd86b4)

Signed-off-by: Eric Miao <eric.miao@canonical.com>
Acked-by: Leann Ogasawara <leann.ogasawara@canonical.com>
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>

12 years agoInput: sentelic - enabling absolute coordinates output for newer hardware
Tai-hwa Liang [Mon, 26 Mar 2012 00:16:36 +0000 (17:16 -0700)]
Input: sentelic - enabling absolute coordinates output for newer hardware

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

- Hooking multi-finger coordinates output with kernel multitouch library;
- Enabling absolute coordinates output for Cx+ hardware. The older hardware
  performs much better in relative mode; thus relative mode related code
  are preserved.

Part of the code is based on the work done by Oskari Saarenmaa <os@ohmu.fi>,
which was used to support the clickpad found on ASUS UX21/31 Ultrabook.
On the other hand, the FSP found on UX21/31 doesn't have hardware capability
register other than PnP ID, which means that we'll have to figure out an
alternative approach to identify such pad correctly; otherwise, blindly
adding INPUT_PROP_BUTTONPAD property may compatability issues amongst
existing FSPs.

Signed-off-by: Tai-hwa Liang <avatar@sentelic.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
(cherry picked from commit a4c85075f00d56b38f5c277ab89f9aaad69eb17b)

Signed-off-by: Eric Miao <eric.miao@canonical.com>
Acked-by: Leann Ogasawara <leann.ogasawara@canonical.com>
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>

12 years agoInput: sentelic - refactor code for upcoming new hardware support
Tai-hwa Liang [Mon, 26 Mar 2012 00:15:03 +0000 (17:15 -0700)]
Input: sentelic - refactor code for upcoming new hardware support

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

- Move event bits setup code into a separate function,
  fsp_set_input_params(), so that we can perform hardware-specific settings
  in the future;
- Take hardware version information into account when activating
  protocol;
- Remove button information from boot message as it's somewhat confusing
  and is only for internal processing. While there, also move button
  retrieval code to be a part of protocol activation process.

Signed-off-by: Tai-hwa Liang <avatar@sentelic.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
(cherry picked from commit 3ac1780f9e6ed212e56d4132e997551297a97112)

Signed-off-by: Eric Miao <eric.miao@canonical.com>
Acked-by: Leann Ogasawara <leann.ogasawara@canonical.com>
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>

12 years agoInput: psmouse - use psmouse_[de]activate() from sentelic and hgpk drivers
Paul Fox [Fri, 24 Feb 2012 08:51:37 +0000 (00:51 -0800)]
Input: psmouse - use psmouse_[de]activate() from sentelic and hgpk drivers

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

Make use of psmouse_activate() and psmouse_deactivate() from psmouse-base.c

Signed-off-by: Andres Salomon <dilinger@queued.net>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
(cherry picked from commit c35c0e7d425c11f629d9d037df6c37a7ffebcd96)

Signed-off-by: Eric Miao <eric.miao@canonical.com>
Acked-by: Leann Ogasawara <leann.ogasawara@canonical.com>
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>

12 years agoInput: psmouse - allow drivers to use psmouse_{de,}activate
Andres Salomon [Fri, 24 Feb 2012 08:51:37 +0000 (00:51 -0800)]
Input: psmouse - allow drivers to use psmouse_{de,}activate

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

Other drivers duplicate this code; no sense in having it be private
to psmouse-base.

Signed-off-by: Andres Salomon <dilinger@queued.net>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
(cherry picked from commit bd26f3d6fbb84f101f3e78f0591415d1c407976a)
Signed-off-by: Eric Miao <eric.miao@canonical.com>
Acked-by: Leann Ogasawara <leann.ogasawara@canonical.com>
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>

12 years agoUBUNTU: Extract firmware module info during getabi
Tim Gardner [Thu, 12 Apr 2012 13:35:44 +0000 (07:35 -0600)]
UBUNTU: Extract firmware module info during getabi

Create $DEBIAN/abi/$ABI/fwinfo

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

12 years agoUBUNTU: SAUCE: hv_storvsc: Account for in-transit packets in the RESET path
K. Y. Srinivasan [Wed, 11 Apr 2012 14:56:33 +0000 (15:56 +0100)]
UBUNTU: SAUCE: hv_storvsc: Account for in-transit packets in the RESET path

Properly account for I/O in transit before returning from the RESET call.
In the absense of this patch we could have a situation where the host may
respond to a command that was issued prior to the issuance of the RESET
command at some arbitrary time after responding to the RESET command.
Currently, the host does not do anything with the RESET command and so
it is ok to wait for the in-transit I/O to be accounted for. If the host
side sematics changes, we will have to revisit this.

Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>

BugLink: http://bugs.launchpad.net/bugs/978394
Signed-off-by: Andy Whitcroft <apw@canonical.com>
Acked-by: Stefan Bader <stefan.bader@canonical.com>
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>

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

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

12 years agoUBUNTU: Ubuntu-3.2.0-23.36
Leann Ogasawara [Tue, 10 Apr 2012 15:17:24 +0000 (08:17 -0700)]
UBUNTU: Ubuntu-3.2.0-23.36

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

12 years agoUBUNTU: Remove headers asm symlink entirely
Tim Gardner [Tue, 10 Apr 2012 14:36:22 +0000 (08:36 -0600)]
UBUNTU: Remove headers asm symlink entirely

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

"UBUNTU: [Config] Fix invalid linux-headers link" moved the erroneous
symlink from asm-$ARCH to asm-generic. As it turns out, the asm symlink
is superfluous, so just remove it entirely.

Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
Signed-off-by: Leann Ogasawara <leann.ogasawara@canonical.com>

12 years agoRevert "x86/ioapic: Add register level checks to detect bogus io-apic entries"
Leann Ogasawara [Tue, 10 Apr 2012 03:30:08 +0000 (20:30 -0700)]
Revert "x86/ioapic: Add register level checks to detect bogus io-apic entries"

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

This reverts commit 73d63d038ee9f769f5e5b46792d227fe20e442c5.

This patch results in a NULL pointer dereference which renders a system
unbootable if attempting to boot in pvops mode.  We received this patch
via upstream stable v3.2.14.  However, upstream discussion indicates
this patch was not meant to be included in any v3.2.y upstream stable
release.  Revert it.

http://www.mail-archive.com/stable@vger.kernel.org/msg04782.html

Acked-by: Tim Gardner <tim.gardner@canonical.com>
Acked-by: Stefan Bader <stefan.bader@canonical.com>
Signed-off-by: Leann Ogasawara <leann.ogasawara@canonical.com>

12 years agoUBUNTU: Hyper-V KVP daemon -- add to the tools package
Andy Whitcroft [Fri, 6 Apr 2012 17:52:43 +0000 (18:52 +0100)]
UBUNTU: Hyper-V KVP daemon -- add to the tools package

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

Add the Hyper-V KVP userspace daemon to the kernel tools package.

Signed-off-by: Andy Whitcroft <apw@canonical.com>
Acked-by: Leann Ogasawara <leann.ogasawara@canonical.com>
Acked-by: Brad Figg <brad.figg@canonical.com>
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>

12 years agoUBUNTU: tools/hv: add basic manual pages
Andy Whitcroft [Fri, 6 Apr 2012 17:52:42 +0000 (18:52 +0100)]
UBUNTU: tools/hv: add basic manual pages

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

Signed-off-by: Andy Whitcroft <apw@canonical.com>
Acked-by: Leann Ogasawara <leann.ogasawara@canonical.com>
Acked-by: Brad Figg <brad.figg@canonical.com>
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>

12 years agoUBUNTU: tools/hv: add basic Makefile
Andy Whitcroft [Fri, 6 Apr 2012 17:52:41 +0000 (18:52 +0100)]
UBUNTU: tools/hv: add basic Makefile

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

Signed-off-by: Andy Whitcroft <apw@canonical.com>
Acked-by: Leann Ogasawara <leann.ogasawara@canonical.com>
Acked-by: Brad Figg <brad.figg@canonical.com>
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>

12 years agopstore: Introduce get_reason_str() to pstore
Seiji Aguchi [Fri, 16 Mar 2012 22:36:59 +0000 (15:36 -0700)]
pstore: Introduce get_reason_str() to pstore

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

Recently, there has been some changes in kmsg_dump() below and they have been applied to linus-tree.
 (1) kmsg_dump(KMSG_DUMP_KEXEC) was removed.
     http://git.kernel.org/?p=linux/kernel/git/torvalds/linux.git;a=commitdiff;h=a3dd3323058d281abd584b15ad4c5b65064d7a61

 (2) The order of "enum kmsg_dump_reason" was modified.
     http://git.kernel.org/?p=linux/kernel/git/torvalds/linux.git;a=commitdiff;h=c22ab332902333f83766017478c1ef6607ace681

Replace the fragile reason_str array with a more robust solution that
will not be broken by future re-arrangements of the enum values.

Signed-off-by: Seiji Aguchi <seiji.aguchi@hds.com>
Signed-off-by: Adrian Hunter <adrian.hunter@intel.com>
Acked-by: Don Zickus <dzickus@redhat.com>
Link: https://lkml.org/lkml/2012/3/16/417
Signed-off-by: Tony Luck <tony.luck@intel.com>
(cherry picked from commit 381b872cf7942ab8c95de156ce403bd906f3915d)
Acked-by: Colin King <colin.king@canonical.com>
Acked-by: Seth Forshee <seth.forshee@canonical.com>
Signed-off-by: Joseph Salisbury <joseph.salisbury@canonical.com>
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>

12 years agokmsg_dump: don't run on non-error paths by default
Matthew Garrett [Mon, 5 Mar 2012 22:59:10 +0000 (14:59 -0800)]
kmsg_dump: don't run on non-error paths by default

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

Since commit 04c6862c055f ("kmsg_dump: add kmsg_dump() calls to the
reboot, halt, poweroff and emergency_restart paths"), kmsg_dump() gets
run on normal paths including poweroff and reboot.

This is less than ideal given pstore implementations that can only
represent single backtraces, since a reboot may overwrite a stored oops
before it's been picked up by userspace.  In addition, some pstore
backends may have low performance and provide a significant delay in
reboot as a result.

This patch adds a printk.always_kmsg_dump kernel parameter (which can also
be changed from userspace).  Without it, the code will only be run on
failure paths rather than on normal paths.  The option can be enabled in
environments where there's a desire to attempt to audit whether or not a
reboot was cleanly requested or not.

Signed-off-by: Matthew Garrett <mjg@redhat.com>
Acked-by: Seiji Aguchi <seiji.aguchi@hds.com>
Cc: Seiji Aguchi <seiji.aguchi@hds.com>
Cc: David Woodhouse <dwmw2@infradead.org>
Cc: Marco Stornelli <marco.stornelli@gmail.com>
Cc: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
Cc: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
Cc: Vivek Goyal <vgoyal@redhat.com>
Cc: Don Zickus <dzickus@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
(cherry picked from commit c22ab332902333f83766017478c1ef6607ace681)
Acked-by: Colin King <colin.king@canonical.com>
Acked-by: Seth Forshee <seth.forshee@canonical.com>
Signed-off-by: Joseph Salisbury <joseph.salisbury@canonical.com>
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>

12 years agokexec: remove KMSG_DUMP_KEXEC
WANG Cong [Fri, 13 Jan 2012 01:20:11 +0000 (17:20 -0800)]
kexec: remove KMSG_DUMP_KEXEC

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

KMSG_DUMP_KEXEC is useless because we already save kernel messages inside
/proc/vmcore, and it is unsafe to allow modules to do other stuffs in a
crash dump scenario.

[akpm@linux-foundation.org: fix powerpc build]
Signed-off-by: WANG Cong <xiyou.wangcong@gmail.com>
Reported-by: Vivek Goyal <vgoyal@redhat.com>
Acked-by: Vivek Goyal <vgoyal@redhat.com>
Acked-by: Jarod Wilson <jarod@redhat.com>
Cc: "Eric W. Biederman" <ebiederm@xmission.com>
Cc: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
(cherry picked from commit a3dd3323058d281abd584b15ad4c5b65064d7a61)
Acked-by: Colin King <colin.king@canonical.com>
Acked-by: Seth Forshee <seth.forshee@canonical.com>
Signed-off-by: Joseph Salisbury <joseph.salisbury@canonical.com>
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>

12 years agoUBUNTU: [Config] Fix invalid linux-headers link
Tim Gardner [Thu, 5 Apr 2012 17:35:43 +0000 (11:35 -0600)]
UBUNTU: [Config] Fix invalid linux-headers link

BugLink: http://bugs.launchpad.net/bugs/974403
https://lists.ubuntu.com/archives/kernel-team/2012-March/019679.html

Acked-by: Leann Ogasawara <leann.ogasawara@canonical.com>
Acked-by: Herton Krzesinski <herton.krzesinski@canonical.com>
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>

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>