linux-2.6-block.git
12 years agoMerge branch 'exynos-drm-fixes' of git://git.infradead.org/users/kmpark/linux-samsung...
Dave Airlie [Thu, 15 Mar 2012 09:41:26 +0000 (09:41 +0000)]
Merge branch 'exynos-drm-fixes' of git://git.infradead.org/users/kmpark/linux-samsung into drm-fixes

* 'exynos-drm-fixes' of git://git.infradead.org/users/kmpark/linux-samsung:
  drm exynos: use drm_fb_helper_set_par directly
  drm/exynos: Fix fb_videomode <-> drm_mode_modeinfo conversion
  drm/exynos: fix runtime_pm fimd device state on probe
  drm/exynos: use correct 'exynos-drm' name for platform device

12 years agodrm exynos: use drm_fb_helper_set_par directly
Sascha Hauer [Wed, 14 Mar 2012 10:44:54 +0000 (19:44 +0900)]
drm exynos: use drm_fb_helper_set_par directly

info->fix.visual already is correctly set from drm_fb_helper_fill_fix.
info->fix.line_length is also set from drm_fb_helper_fill_fix,
so drm_fb_helper_set_par directly instead of a custom
exynos_drm_fbdev_set_par.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
12 years agodrm/exynos: Fix fb_videomode <-> drm_mode_modeinfo conversion
Laurent Pinchart [Fri, 9 Mar 2012 00:45:21 +0000 (09:45 +0900)]
drm/exynos: Fix fb_videomode <-> drm_mode_modeinfo conversion

The fb_videomode structure stores the front porch and back porch in the
right_margin and left_margin fields respectively. right_margin should
thus be computed with hsync_start - hdisplay, and left_margin with
htotal - hsync_end. The same holds for the vertical direction.

       Active               Front           Sync            Back
       Region               Porch                           Porch
<-------------------><----------------><-------------><---------------->

  //////////////////|
 ////////////////// |
//////////////////  |..................               ..................
                                       _______________

<------ xres -------><- right_margin -><- hsync_len -><- left_margin -->

<---- hdisplay ----->
<------------ hsync_start ------------>
<--------------------- hsync_end -------------------->
<--------------------------------- htotal ----------------------------->

Fix the fb_videomode <-> drm_mode_modeinfo conversion functions
accordingly.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Acked-by: Joonyoung Shim <jy0922.shim@samsung.com>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
12 years agodrm/exynos: fix runtime_pm fimd device state on probe
Marek Szyprowski [Thu, 8 Mar 2012 01:28:56 +0000 (10:28 +0900)]
drm/exynos: fix runtime_pm fimd device state on probe

A call to pm_runtime_set_active() forces device to be at the active
state and skips calling its runtime suspend/resume callbacks. This
results in a freeze with a new power domain code based on gen_pd. Fimd
driver does all required runtime power management calls, so this
pm_runtime_set_active call is buggy. This patch removes it and corrects
clock management in probe function (clocks are now enabled by
pm_runtime_get_sync() call).

Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
12 years agodrm/exynos: use correct 'exynos-drm' name for platform device
Marek Szyprowski [Mon, 5 Mar 2012 11:02:30 +0000 (12:02 +0100)]
drm/exynos: use correct 'exynos-drm' name for platform device

Currently Exynos DRM driver uses DRIVER_NAME ('exynos') name for the
core platform device. This is confusing, because it doesn't refer to the
function the platform device is performing. This patch renames the
platform device to the 'exynos-drm', which matches the convention for
naming the platform devices. The name used inside DRM subsystem has not
been changed.

Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
12 years agoMerge branch 'for-linus' of git://git.kernel.dk/linux-block
Linus Torvalds [Thu, 15 Mar 2012 00:16:45 +0000 (17:16 -0700)]
Merge branch 'for-linus' of git://git.kernel.dk/linux-block

Pull block fixes from Jens Axboe:
 "Been sitting on this for a while, but lets get this out the door.
  This fixes various important bugs for 3.3 final, along with a few more
  trivial ones.  Please pull!"

* 'for-linus' of git://git.kernel.dk/linux-block:
  block: fix ioc leak in put_io_context
  block, sx8: fix pointer math issue getting fw version
  Block: use a freezable workqueue for disk-event polling
  drivers/block/DAC960: fix -Wuninitialized warning
  drivers/block/DAC960: fix DAC960_V2_IOCTL_Opcode_T -Wenum-compare warning
  block: fix __blkdev_get and add_disk race condition
  block: Fix setting bio flags in drivers (sd_dif/floppy)
  block: Fix NULL pointer dereference in sd_revalidate_disk
  block: exit_io_context() should call elevator_exit_icq_fn()
  block: simplify ioc_release_fn()
  block: replace icq->changed with icq->flags

12 years agoMerge tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator
Linus Torvalds [Thu, 15 Mar 2012 00:16:02 +0000 (17:16 -0700)]
Merge tag 'for-linus' of git://git./linux/kernel/git/broonie/regulator

Pull regulator fixes from Mark Brown:
 "Another small batch of driver specific bug fixes, a couple more errors
  in the da9052 driver and a bad return value in the tps6524x driver."

* tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator:
  regulator: da9052: Ensure the selected voltage falls within the specified range
  regulator: Set n_voltages for da9052 regulators
  regulator: Fix setting selector in tps6524x set_voltage function

12 years agoMerge branch 'stable' of git://git.kernel.org/pub/scm/linux/kernel/git/cmetcalf/linux...
Linus Torvalds [Thu, 15 Mar 2012 00:13:49 +0000 (17:13 -0700)]
Merge branch 'stable' of git://git./linux/kernel/git/cmetcalf/linux-tile

Pull arch/tile update to run "make minconfig" on the tile defconfigs
from Chris Metcalf.

This removes almost three thousand lines of inane defconfig chatter.

* 'stable' of git://git.kernel.org/pub/scm/linux/kernel/git/cmetcalf/linux-tile:
  arch/tile/configs: convert to minimal configs via "make savedefconfig"

12 years agomwifiex: correction in structure name passed to sizeof()
Amitkumar Karwar [Wed, 14 Mar 2012 02:36:49 +0000 (19:36 -0700)]
mwifiex: correction in structure name passed to sizeof()

"hscfg" is declared as struct mwifiex_ds_hs_cfg. Use same structure
name for calculating it's size.

Signed-off-by: Amitkumar Karwar <akarwar@marvell.com>
Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agomwifiex: fix checkpatch --strict warnings/errors Part 9
Yogesh Ashok Powar [Wed, 14 Mar 2012 02:22:42 +0000 (19:22 -0700)]
mwifiex: fix checkpatch --strict warnings/errors Part 9

For files sta_rx.c, sta_tx.c, txrx.c, util.c and wmm.c

Signed-off-by: Yogesh Ashok Powar <yogeshp@marvell.com>
Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agomwifiex: fix checkpatch --strict warnings/errors Part 8
Yogesh Ashok Powar [Wed, 14 Mar 2012 02:22:41 +0000 (19:22 -0700)]
mwifiex: fix checkpatch --strict warnings/errors Part 8

For files sta_event.c and sta_ioctl.c

Signed-off-by: Yogesh Ashok Powar <yogeshp@marvell.com>
Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agomwifiex: fix checkpatch --strict warnings/errors Part 7
Yogesh Ashok Powar [Wed, 14 Mar 2012 02:22:40 +0000 (19:22 -0700)]
mwifiex: fix checkpatch --strict warnings/errors Part 7

For sta_cmd.c and sta_cmdresp.c

Signed-off-by: Yogesh Ashok Powar <yogeshp@marvell.com>
Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agomwifiex: fix checkpatch --strict warnings/errors Part 6
Yogesh Ashok Powar [Wed, 14 Mar 2012 02:22:39 +0000 (19:22 -0700)]
mwifiex: fix checkpatch --strict warnings/errors Part 6

For file sdio.c

Signed-off-by: Yogesh Ashok Powar <yogeshp@marvell.com>
Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agomwifiex: fix checkpatch --strict warnings/errors Part 5
Yogesh Ashok Powar [Wed, 14 Mar 2012 02:22:38 +0000 (19:22 -0700)]
mwifiex: fix checkpatch --strict warnings/errors Part 5

For file scan.c

Signed-off-by: Yogesh Ashok Powar <yogeshp@marvell.com>
Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agomwifiex: fix checkpatch --strict warnings/errors Part 4
Yogesh Ashok Powar [Wed, 14 Mar 2012 02:22:37 +0000 (19:22 -0700)]
mwifiex: fix checkpatch --strict warnings/errors Part 4

For files main.c, main.h and pcie.c

Signed-off-by: Yogesh Ashok Powar <yogeshp@marvell.com>
Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agomwifiex: fix checkpatch --strict warnings/errors Part 3
Yogesh Ashok Powar [Wed, 14 Mar 2012 02:22:36 +0000 (19:22 -0700)]
mwifiex: fix checkpatch --strict warnings/errors Part 3

For files fw.h, init.c and join.c

Signed-off-by: Yogesh Ashok Powar <yogeshp@marvell.com>
Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agomwifiex: fix checkpatch --strict warnings/errors Part 2
Yogesh Ashok Powar [Wed, 14 Mar 2012 02:22:35 +0000 (19:22 -0700)]
mwifiex: fix checkpatch --strict warnings/errors Part 2

For files cfg80211.c, cfp.c, and cmdevt.c

Signed-off-by: Yogesh Ashok Powar <yogeshp@marvell.com>
Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agomwifiex: fix checkpatch --strict warnings/errors Part 1
Yogesh Ashok Powar [Wed, 14 Mar 2012 02:22:34 +0000 (19:22 -0700)]
mwifiex: fix checkpatch --strict warnings/errors Part 1

For files 11n.c, 11n.h, 11n_aggr.c, 11n_rxreorder.c

Signed-off-by: Yogesh Ashok Powar <yogeshp@marvell.com>
Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoarch/tile/configs: convert to minimal configs via "make savedefconfig"
Chris Metcalf [Wed, 14 Mar 2012 18:33:16 +0000 (14:33 -0400)]
arch/tile/configs: convert to minimal configs via "make savedefconfig"

Signed-off-by: Chris Metcalf <cmetcalf@tilera.com>
12 years agoMerge branch 'drm-intel-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/keith...
Dave Airlie [Wed, 14 Mar 2012 18:32:27 +0000 (18:32 +0000)]
Merge branch 'drm-intel-fixes' of git://git./linux/kernel/git/keithp/linux into drm-fixes

* 'drm-intel-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/keithp/linux:
  drm/i915: support 32 bit BGR formats in sprite planes
  drm/i915: fix color order for BGR formats on SNB
  drm/gma500: Fix Cedarview boot failures in 3.3-rc

12 years agoMerge tag 'perf-urgent-for-mingo' of git://git.kernel.org/pub/scm/linux/kernel/git...
Ingo Molnar [Wed, 14 Mar 2012 17:49:05 +0000 (18:49 +0100)]
Merge tag 'perf-urgent-for-mingo' of git://git./linux/kernel/git/acme/linux into perf/urgent

Some corner case fixes.

Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
12 years agohwmon: (zl6100) Enable interval between chip accesses for all chips
Guenter Roeck [Tue, 13 Mar 2012 16:05:14 +0000 (09:05 -0700)]
hwmon: (zl6100) Enable interval between chip accesses for all chips

Intersil reports that all chips supported by the zl6100 driver require
an interval between chip accesses, even ZL2004 and ZL6105 which were thought
to be safe.

Reported-by: Vivek Gani <vgani@intersil.com>
Cc: stable@vger.kernel.org # 3.2+
Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com>
12 years agoperf tools, x86: Build perf on older user-space as well
Ingo Molnar [Wed, 14 Mar 2012 15:42:34 +0000 (12:42 -0300)]
perf tools, x86: Build perf on older user-space as well

On ancient systems I get this build failure:

  util/../../../arch/x86/include/asm/unistd.h:67:29: error: asm/unistd_64.h: No such file or directory
  In file included from util/cache.h:7,
                   from builtin-test.c:8:
  util/../perf.h: In function ‘sys_perf_event_open’:In file included from util/../perf.h:16
  perf.h:170: error: ‘__NR_perf_event_open’ undeclared (first use in this function)

The reason is that this old system does not have the split
unistd.h headers yet, from which to pick up the syscall
definitions.

Add the syscall numbers to the already existing i386 and x86_64
blocks in perf.h, and also provide empty include file stubs.

With this patch perf builds and works fine on 5 years old
user-space as well.

Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
Link: http://lkml.kernel.org/n/tip-jctwg64le1w47tuaoeyftsg9@git.kernel.org
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
12 years agoperf tools: Use scnprintf where applicable
Arnaldo Carvalho de Melo [Wed, 14 Mar 2012 15:29:29 +0000 (12:29 -0300)]
perf tools: Use scnprintf where applicable

Several places were expecting that the value returned was the number of
characters printed, not what would be printed if there was space.

Fix it by using the scnprintf and vscnprintf variants we inherited from
the kernel sources.

Some corner cases where the number of printed characters were not
accounted were fixed too.

Reported-by: Anton Blanchard <anton@samba.org>
Cc: Anton Blanchard <anton@samba.org>
Cc: Eric B Munson <emunson@mgebm.net>
Cc: David Ahern <dsahern@gmail.com>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Stephane Eranian <eranian@google.com>
Cc: Yanmin Zhang <yanmin_zhang@linux.intel.com>
Cc: stable@kernel.org
Link: http://lkml.kernel.org/n/tip-kwxo2eh29cxmd8ilixi2005x@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
12 years agoperf tools: Incorrect use of snprintf results in SEGV
Anton Blanchard [Wed, 7 Mar 2012 00:42:49 +0000 (11:42 +1100)]
perf tools: Incorrect use of snprintf results in SEGV

I have a workload where perf top scribbles over the stack and we SEGV.
What makes it interesting is that an snprintf is causing this.

The workload is a c++ gem that has method names over 3000 characters
long, but snprintf is designed to avoid overrunning buffers. So what
went wrong?

The problem is we assume snprintf returns the number of characters
written:

    ret += repsep_snprintf(bf + ret, size - ret, "[%c] ", self->level);
...
    ret += repsep_snprintf(bf + ret, size - ret, "%s", self->ms.sym->name);

Unfortunately this is not how snprintf works. snprintf returns the
number of characters that would have been written if there was enough
space. In the above case, if the first snprintf returns a value larger
than size, we pass a negative size into the second snprintf and happily
scribble over the stack. If you have 3000 character c++ methods thats a
lot of stack to trample.

This patch fixes repsep_snprintf by clamping the value at size - 1 which
is the maximum snprintf can write before adding the NULL terminator.

I get the sinking feeling that there are a lot of other uses of snprintf
that have this same bug, we should audit them all.

Cc: David Ahern <dsahern@gmail.com>
Cc: Eric B Munson <emunson@mgebm.net>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Yanmin Zhang <yanmin_zhang@linux.intel.com>
Cc: stable@kernel.org
Link: http://lkml.kernel.org/r/20120307114249.44275ca3@kryten
Signed-off-by: Anton Blanchard <anton@samba.org>
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
12 years agoblock: fix ioc leak in put_io_context
Xiaotian Feng [Wed, 14 Mar 2012 14:34:48 +0000 (15:34 +0100)]
block: fix ioc leak in put_io_context

When put_io_context is called, if ioc->icq_list is empty and refcount
is 1, kernel will not free the ioc.

This is caught by following kmemleak:

unreferenced object 0xffff880036349fe0 (size 216):
  comm "sh", pid 2137, jiffies 4294931140 (age 290579.412s)
  hex dump (first 32 bytes):
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
    01 00 01 00 ad 4e ad de ff ff ff ff 00 00 00 00  .....N..........
  backtrace:
    [<ffffffff8169f926>] kmemleak_alloc+0x26/0x50
    [<ffffffff81195a9c>] kmem_cache_alloc_node+0x1cc/0x2a0
    [<ffffffff81356b67>] create_io_context_slowpath+0x27/0x130
    [<ffffffff81356d2b>] get_task_io_context+0xbb/0xf0
    [<ffffffff81055f0e>] copy_process+0x188e/0x18b0
    [<ffffffff8105609b>] do_fork+0x11b/0x420
    [<ffffffff810247f8>] sys_clone+0x28/0x30
    [<ffffffff816d3373>] stub_clone+0x13/0x20
    [<ffffffffffffffff>] 0xffffffffffffffff

ioc should be freed if ioc->icq_list is empty.
Signed-off-by: Xiaotian Feng <dannyfeng@tencent.com>
Acked-by: Vivek Goyal <vgoyal@redhat.com>
Acked-by: Tejun Heo <tj@kernel.org>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
12 years agoixgbe: dcb: use DCB config values for FCoE traffic class on open
John Fastabend [Sat, 11 Feb 2012 06:26:00 +0000 (06:26 +0000)]
ixgbe: dcb: use DCB config values for FCoE traffic class on open

Disabling and enabling DCB can cause FCoE hardware initialization to
occur on the incorrect traffic class when the up2tc mapping has not
yet been reconfigured.

Fix this by using the DCB configuration maps that are correct
and will be pushed at mqprio after DCB driver setup completes
successfully.

Signed-off-by: John Fastabend <john.r.fastabend@intel.com>
Tested-by: Marcus Dennis <marcusx.e.dennis@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
12 years agoixgbe: Fix race condition where RX buffer could become corrupted.
Atita Shirwaikar [Sat, 18 Feb 2012 02:58:58 +0000 (02:58 +0000)]
ixgbe: Fix race condition where RX buffer could become corrupted.

There was a race condition in the reset path where the RX buffer
could become corrupted during Fdir configuration.This is due to
a HW bug.The fix right now is to lock the buffer while we do the
fdir configuration.Since we were using similar workaround for another bug,
I moved the existing code to a function and reused it.HW team also recommended
that IXGBE_MAX_SECRX_POLL value be changed from 30 to 40.The erratum for this
bug will be published in the next release 82599 Spec Update

Signed-off-by: Atita Shirwaikar <atita.shirwaikar@intel.com>
Acked-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
Tested-by: Stephen Ko <stephen.s.ko@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
12 years agoixgbe: use typed min/max functions where possible
Jesse Brandeburg [Fri, 10 Feb 2012 10:20:02 +0000 (10:20 +0000)]
ixgbe: use typed min/max functions where possible

using the form min((int)var, ver)) is replaced by min_t(int, ...)

Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
Tested-by: Stephen Ko <stephen.s.ko@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
12 years agoixgbe: fix obvious return value bug.
Don Skidmore [Fri, 17 Feb 2012 07:38:13 +0000 (07:38 +0000)]
ixgbe: fix obvious return value bug.

This is clearly a typeo where we are not checking the return value from
get_link_capabilities but should.  This patch corrects that.

Signed-off-by: Don Skidmore <donald.c.skidmore@intel.com>
Tested-by: Stephen Ko <stephen.s.ko@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
12 years agoixgbe: Replace eitr_low and eitr_high with static values in ixgbe_update_itr
Alexander Duyck [Wed, 8 Feb 2012 07:50:20 +0000 (07:50 +0000)]
ixgbe: Replace eitr_low and eitr_high with static values in ixgbe_update_itr

There isn't much point in using variables to store the values of eitr_low
and eitr_high since they are not user changeable.  As such I am replacing
them with the constants 10 and 20 in order to avoid any confusion on what
the values actually are.

Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com>
Tested-by: Stephen Ko <stephen.s.ko@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
12 years agoixgbe: Do not disable read relaxed ordering when DCA is enabled
Alexander Duyck [Wed, 8 Feb 2012 07:50:14 +0000 (07:50 +0000)]
ixgbe: Do not disable read relaxed ordering when DCA is enabled

A previous fix had gone though and disabled relaxed ordering for Rx
descriptor read fetching.  This was not necessary as this functions
correctly and has no ill effects on the system.

In addition several of the defines used for the DCA control registers were
incorrect in that they indicated descriptor effects when they actually had
an impact on either data or header write back.  As such I have update these
to correctly reflect either DATA or HEAD.

Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com>
Tested-by: Stephen Ko <stephen.s.ko@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
12 years agoixgb: Remove unnecessary defines, use pr_debug
Joe Perches [Wed, 8 Feb 2012 16:14:59 +0000 (16:14 +0000)]
ixgb: Remove unnecessary defines, use pr_debug

Use the current logging styles.

Remove unnecessary _DEBUG_DRIVER_ and PFX, use pr_debug.
Coalesce format.

Signed-off-by: Joe Perches <joe@perches.com>
Tested-by: Jeff Pieper <jeffrey.e.pieper@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
12 years agoiscsi-target: Fix reservation conflict -EBUSY response handling bug
Nicholas Bellinger [Wed, 14 Mar 2012 01:20:11 +0000 (18:20 -0700)]
iscsi-target: Fix reservation conflict -EBUSY response handling bug

This patch addresses a iscsi-target specific bug related to reservation conflict
handling in iscsit_handle_scsi_cmd() that has been causing reservation conflicts
to complete and not fail as expected due to incorrect errno checking.  The problem
occured with the change to return -EBUSY from transport_generic_cmd_sequencer() ->
transport_generic_allocate_tasks() failures, that broke iscsit_handle_scsi_cmd()
checking for -EINVAL in order to invoke a non GOOD status response.

This was manifesting itself as data corruption with legacy SPC-2 reservations,
but also effects iscsi-target LUNs with SPC-3 persistent reservations.

This bug was originally introduced in lio-core commit:

commit 03e98c9eb916f3f0868c1dc344dde2a60287ff72
Author: Nicholas Bellinger <nab@linux-iscsi.org>
Date:   Fri Nov 4 02:36:16 2011 -0700

    target: Address legacy PYX_TRANSPORT_* return code breakage

Reported-by: Martin Svec <martin.svec@zoner.cz>
Cc: Martin Svec <martin.svec@zoner.cz>
Cc: Christoph Hellwig <hch@lst.de>
Cc: stable@vger.kernel.org
Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
12 years agotarget: Fix compatible reservation handling (CRH=1) with legacy RESERVE/RELEASE
Nicholas Bellinger [Wed, 14 Mar 2012 04:29:06 +0000 (21:29 -0700)]
target: Fix compatible reservation handling (CRH=1) with legacy RESERVE/RELEASE

This patch addresses a bug with target_check_scsi2_reservation_conflict()
return checking in target_scsi2_reservation_[reserve,release]() that was
preventing CRH=1 operation from silently succeeding in the two special
cases defined by SPC-3, and not failing with reservation conflict status
when dealing with legacy RESERVE/RELEASE + active SPC-3 PR logic.

Also explictly set cmd->scsi_status = SAM_STAT_RESERVATION_CONFLICT during
the early non reservation holder failure from pr_ops->t10_seq_non_holder()
check in transport_generic_cmd_sequencer() for fabrics that already expect
it to be set.

This bug was originally introduced in mainline commit:

commit eacac00ce5bfde8086cd0615fb53c986f7f970fe
Author: Christoph Hellwig <hch@infradead.org>
Date:   Thu Nov 3 17:50:40 2011 -0400

    target: split core_scsi2_emulate_crh

Reported-by: Martin Svec <martin.svec@zoner.cz>
Cc: Martin Svec <martin.svec@zoner.cz>
Cc: Christoph Hellwig <hch@lst.de>
Cc: stable@vger.kernel.org
Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
12 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc
Linus Torvalds [Wed, 14 Mar 2012 01:39:28 +0000 (18:39 -0700)]
Merge git://git./linux/kernel/git/davem/sparc

Pull sparc updates from David Miller:
 "Please pull to get this fix for the sparc32 build when using a more
  recent binutils."

* git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc:
  sparc32: Add -Av8 to assembler command line.

12 years agosparc32: Add -Av8 to assembler command line.
David S. Miller [Wed, 14 Mar 2012 01:19:51 +0000 (18:19 -0700)]
sparc32: Add -Av8 to assembler command line.

Newer version of binutils are more strict about specifying the
correct options to enable certain classes of instructions.

The sparc32 build is done for v7 in order to support sun4c systems
which lack hardware integer multiply and divide instructions.

So we have to pass -Av8 when building the assembler routines that
use these instructions and get patched into the kernel when we find
out that we have a v8 capable cpu.

Reported-by: Paul Gortmaker <paul.gortmaker@windriver.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
Linus Torvalds [Wed, 14 Mar 2012 00:57:07 +0000 (17:57 -0700)]
Merge git://git./linux/kernel/git/davem/net

Pull networking changes from David Miller:
 "The most important bit here is the TCP syncookies issue, which seems
  to have been busted for some time.  That fix has been verified in
  production by the reporter.

  1) Persistent TUN devices erroneously hold on to the network namespace
     in such a way that it cannot be shutdown.  Fix from Stanislav
     Kinsbursky with help from Eric Dumazet.

  2) TCP SYN cookies have been broken for a while due to how the route
     lookup flow key is managed, connections can be delayed by as much
     as 20 seconds due to this bug.  Fix from Eric Dumazet.

  3) Missing jiffies.h include in lib/dynamic_queue_limits.c can break
     the build, from Tom Herbert.

  4) Add USB device ID for Sitecom LN-031, from Joerg Neikes.

  5) Fix OOPS in delayed workqueue in iwlegacy, from Stanislaw Gruszka.

  6) rt2x00 TX queue can be disabled forever due to races, fix by
     synchronizing pause/unpause with a lock.  Also from Stanislaw
     Gruszka.

  7) Statistics and endian fix in bnx2x driver from Yuval Mintz, Eilon
     Greenstein, and Ariel Elior."

* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net:
  tun: don't hold network namespace by tun sockets
  bnx2x: FCoE statistics id fixed
  bnx2x: dcb bit indices flags used as bits
  bnx2x: added cpu_to_le16 when preparing ramrod's data
  bnx2x: pfc statistics counts pfc events twice
  rt2x00: fix random stalls
  iwl3945: fix possible il->txq NULL pointer dereference in delayed works
  dql: Fix undefined jiffies
  tcp: fix syncookie regression
  usb: asix: Patch for Sitecom LN-031

12 years agoMerge branch 'stable' of git://git.kernel.org/pub/scm/linux/kernel/git/cmetcalf/linux...
Linus Torvalds [Wed, 14 Mar 2012 00:06:02 +0000 (17:06 -0700)]
Merge branch 'stable' of git://git./linux/kernel/git/cmetcalf/linux-tile

Pull arch/tile update from Chris Metcalf
 "These include a couple of queued-up minor bug fixes from the
  community, a fix to unbreak the sysfs hooks in tile, and syncing up
  the defconfigs."

Ugh.  defconfigs updates without "make minconfig".  Tons of ugly
pointless lines there, I suspect.

* 'stable' of git://git.kernel.org/pub/scm/linux/kernel/git/cmetcalf/linux-tile:
  tile: Use set_current_blocked() and block_sigmask()
  arch/tile: misplaced parens near likely
  arch/tile: sync up the defconfig files to the tip
  arch/tile: Fix up from commit 8a25a2fd126c621f44f3aeaef80d51f00fc11639

12 years agoMerge branch 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel...
Linus Torvalds [Wed, 14 Mar 2012 00:04:50 +0000 (17:04 -0700)]
Merge branch 'perf-urgent-for-linus' of git://git./linux/kernel/git/tip/tip

Pull perf fixes from Ingo Molnar.

* 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  perf record: Fix buffer overrun bug in tracepoint_id_to_path()
  perf/x86: Fix local vs remote memory events for NHM/WSM

12 years agoMerge git://git.samba.org/sfrench/cifs-2.6
Linus Torvalds [Wed, 14 Mar 2012 00:03:53 +0000 (17:03 -0700)]
Merge git://git.samba.org/sfrench/cifs-2.6

Pull CIFS fixes from Steve French.

* git://git.samba.org/sfrench/cifs-2.6:
  CIFS: Do not kmalloc under the flocks spinlock
  cifs: possible memory leak in xattr.

12 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs
Linus Torvalds [Wed, 14 Mar 2012 00:00:50 +0000 (17:00 -0700)]
Merge branch 'for-linus' of git://git./linux/kernel/git/viro/vfs

Pull vfs fixes from Al Viro:
 "A bunch of assorted fixes; Jan's freezing stuff still _not_ in there
  and neither is mm fun ;-/"

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs:
  restore smp_mb() in unlock_new_inode()
  vfs: fix return value from do_last()
  vfs: fix double put after complete_walk()
  udf: Fix deadlock in udf_release_file()
  vfs: Correctly set the dir i_mutex lockdep class

12 years agotile: Use set_current_blocked() and block_sigmask()
Matt Fleming [Tue, 14 Feb 2012 11:41:06 +0000 (11:41 +0000)]
tile: Use set_current_blocked() and block_sigmask()

As described in e6fa16ab ("signal: sigprocmask() should do
retarget_shared_pending()") the modification of current->blocked is
incorrect as we need to check whether the signal we're about to block
is pending in the shared queue.

Also, use the new helper function introduced in commit 5e6292c0f28f
("signal: add block_sigmask() for adding sigmask to current->blocked")
which centralises the code for updating current->blocked after
successfully delivering a signal and reduces the amount of duplicate
code across architectures. In the past some architectures got this
code wrong, so using this helper function should stop that from
happening again.

Cc: Arnd Bergmann <arnd@arndb.de>
Acked-by: Oleg Nesterov <oleg@redhat.com>
Signed-off-by: Matt Fleming <matt.fleming@intel.com>
Signed-off-by: Chris Metcalf <cmetcalf@tilera.com>
12 years agomac80211: Don't let regulatory make us deaf
Paul Stewart [Tue, 13 Mar 2012 14:46:18 +0000 (07:46 -0700)]
mac80211: Don't let regulatory make us deaf

When regulatory information changes our HT behavior (e.g,
when we get a country code from the AP we have just associated
with), we should use this information to change the power with
which we transmit, and what channels we transmit.  Sometimes
the channel parameters we derive from regulatory information
contradicts the parameters we used in association.  For example,
we could have associated specifying HT40, but the regulatory
rules we apply may forbid HT40 operation.

In the situation above, we should reconfigure ourselves to
transmit in HT20 only, however it makes no sense for us to
disable receive in HT40, since if we associated with these
parameters, the AP has every reason to expect we can and
will receive packets this way.  The code in mac80211 does
not have the capability of sending the appropriate action
frames to signal a change in HT behaviour so the AP has
no clue we can no longer receive frames encoded this way.
In some broken AP implementations, this can leave us
effectively deaf if the AP never retries in lower HT rates.

This change breaks up the channel_type parameter in the
ieee80211_enable_ht function into a separate receive and
transmit part.  It honors the channel flags set by regulatory
in order to configure the rate control algorithm, but uses
the capability flags to configure the channel on the radio,
since these were used in association to set the AP's transmit
rate.

Signed-off-by: Paul Stewart <pstew@chromium.org>
Cc: Sam Leffler <sleffler@chromium.org>
Cc: Johannes Berg <johannes@sipsolutions.net>
Reviewed-by: Luis R Rodriguez <mcgrof@frijolero.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agomac80211: rename bss_conf timestamp to last_tsf
Johannes Berg [Tue, 13 Mar 2012 13:29:30 +0000 (14:29 +0100)]
mac80211: rename bss_conf timestamp to last_tsf

This value is not really very useful by itself,
yet some drivers (including iwlwifi until I can
figure out what it should do) use it. At least
rename it to "last_tsf" to indicate the meaning
and add a note that it may be really old.

I suspect the value may become useful combined
with the rx_status->mactime, but we don't (yet)
store that value and pass it to the driver.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agocfg80211: clarify timestamp in cfg80211_inform_bss
Johannes Berg [Tue, 13 Mar 2012 12:57:04 +0000 (13:57 +0100)]
cfg80211: clarify timestamp in cfg80211_inform_bss

This is intended to be the timestamp sent by the
peer in the beacon/probe response, not any form
of host timestamp. Clarify the documentation and
variable names.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agobrmc80211: dont use jiffies for BSS TSF
Johannes Berg [Tue, 13 Mar 2012 12:57:03 +0000 (13:57 +0100)]
brmc80211: dont use jiffies for BSS TSF

The cfg80211_inform_bss() timestamp argument is
intended to be the TSF, not any form of host
timestamp.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoDocumentation: make exists consistent
Yegor Yefremov [Tue, 13 Mar 2012 09:57:51 +0000 (10:57 +0100)]
Documentation: make exists consistent

Signed-off-by: Yegor Yefremov <yegorslists@googlemail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agomwifiex: rename fuctions and variables for better readability
Yogesh Ashok Powar [Tue, 13 Mar 2012 02:35:13 +0000 (19:35 -0700)]
mwifiex: rename fuctions and variables for better readability

Renaming the long fuctions and variable names from 11n_rxreoder.c
file to shorter ones for better readability.

Signed-off-by: Yogesh Ashok Powar <yogeshp@marvell.com>
Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agomwifiex: rearrange if and else blocks to avoid extra indentation
Yogesh Ashok Powar [Tue, 13 Mar 2012 02:35:12 +0000 (19:35 -0700)]
mwifiex: rearrange if and else blocks to avoid extra indentation

This adds better readability.

Signed-off-by: Yogesh Ashok Powar <yogeshp@marvell.com>
Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agomwifiex: use usleep_range instead of udelay
Yogesh Ashok Powar [Tue, 13 Mar 2012 02:35:11 +0000 (19:35 -0700)]
mwifiex: use usleep_range instead of udelay

For the delay of 10 uSec or more usleep_range is prefered.
Unlike udelay, sleep_range avoids large number of undesired
interrupts.

Ref Documentation/timers/timers-howto.txt

Signed-off-by: Yogesh Ashok Powar <yogeshp@marvell.com>
Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agomwifiex: merge functions to derive cfp by chan & freq in one
Yogesh Ashok Powar [Tue, 13 Mar 2012 02:35:10 +0000 (19:35 -0700)]
mwifiex: merge functions to derive cfp by chan & freq in one

There exist different functions with very long names
to derive the channel frequency and power tripplet
based on band and channel/freq.

Signed-off-by: Yogesh Ashok Powar <yogeshp@marvell.com>
Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agomwifiex: rearrange switch statement
Yogesh Ashok Powar [Tue, 13 Mar 2012 02:35:09 +0000 (19:35 -0700)]
mwifiex: rearrange switch statement

Fixing coding style by rearranging the switch statement

Signed-off-by: Yogesh Ashok Powar <yogeshp@marvell.com>
Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agomwifiex: rename long function names to shorter ones
Yogesh Ashok Powar [Tue, 13 Mar 2012 02:35:08 +0000 (19:35 -0700)]
mwifiex: rename long function names to shorter ones

This saves some space and adds better readability.

Signed-off-by: Yogesh Ashok Powar <yogeshp@marvell.com>
Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agomac80211: linearize SKBs as needed for crypto
Johannes Berg [Mon, 12 Mar 2012 12:49:14 +0000 (13:49 +0100)]
mac80211: linearize SKBs as needed for crypto

Not linearizing every SKB will help actually pass
non-linear SKBs all the way up when on an encrypted
connection. For now, linearize TKIP completely as
it is lower performance and I don't quite grok all
the details.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agomac80211: move RX WEP weak IV counting
Johannes Berg [Mon, 12 Mar 2012 12:49:13 +0000 (13:49 +0100)]
mac80211: move RX WEP weak IV counting

This is better done inside the WEP decrypt
function where it doesn't have to check all
the conditions any more since they've been
tested already.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agob43: Load firmware from a work queue and not from the probe routine
Larry Finger [Fri, 9 Mar 2012 04:27:46 +0000 (22:27 -0600)]
b43: Load firmware from a work queue and not from the probe routine

Recent changes in udev are causing problems for drivers that load firmware
from the probe routine. As b43 has such a structure, it must be changed.
As this driver loads more than 1 firmware file, changing to the asynchronous routine
request_firmware_nowait() would be complicated. In this implementation, the probe
routine starts a queue that calls the firmware loading routines.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agob43legacy: Load firmware from work queue instead of from probe routine
Larry Finger [Fri, 9 Mar 2012 04:25:57 +0000 (22:25 -0600)]
b43legacy: Load firmware from work queue instead of from probe routine

Recent changes in udev are causing problems for drivers that load firmware
from the probe routine. As b43legacy has such a structure, it must be changed.
As this driver loads 3 or 4 firmware files, changing to the asynchronous routine
request_firmware_nowait() would be complicated. In this implementation, the probe
routine starts a work queue that calls the firmware loading routines.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoMerge branch 'for-linville' of git://github.com/kvalo/ath6kl
John W. Linville [Tue, 13 Mar 2012 18:45:40 +0000 (14:45 -0400)]
Merge branch 'for-linville' of git://github.com/kvalo/ath6kl

12 years agoMerge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wirel...
John W. Linville [Tue, 13 Mar 2012 18:38:51 +0000 (14:38 -0400)]
Merge branch 'master' of git://git./linux/kernel/git/linville/wireless into for-davem

12 years agoperf record: Fix buffer overrun bug in tracepoint_id_to_path()
Stephane Eranian [Tue, 13 Mar 2012 15:51:02 +0000 (16:51 +0100)]
perf record: Fix buffer overrun bug in tracepoint_id_to_path()

This patch fixes a buffer overrun bug in
tracepoint_id_to_path(). The bug manisfested itself as a memory
error reported by perf record. I ran into it with perf sched:

 $ perf sched rec noploop 2 noploop for 2 seconds
 [ perf record: Woken up 14 times to write data ]
 [ perf record: Captured and wrote 42.701 MB perf.data (~1865622 samples) ]
 Fatal: No memory to alloc tracepoints list

It turned out that tracepoint_id_to_path() was reading the
tracepoint id using read() but the buffer was not large enough
to include the \n terminator for id with 4 digits or more.

The patch fixes the problem by extending the buffer to a more
reasonable size covering all possible id length include \n
terminator. Note that atoll() stops at the first non digit
character, thus it is not necessary to clear the buffer between
each read.

Signed-off-by: Stephane Eranian <eranian@google.com>
Acked-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Acked-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: fweisbec@gmail.com
Cc: dsahern@gmail.com
Link: http://lkml.kernel.org/r/20120313155102.GA6465@quad
Signed-off-by: Ingo Molnar <mingo@elte.hu>
12 years agoath6kl: fix debug.c file mode
Kalle Valo [Tue, 13 Mar 2012 12:36:27 +0000 (14:36 +0200)]
ath6kl: fix debug.c file mode

Commit 7504a3e1 ("ath6kl: add padding to firmware log records") accidentally
changed debug.c mode from 100644 to 100755. Revert that back to original.

Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
12 years agoath6kl: use max_t() in ath6kl_cfg80211_connect()
Kalle Valo [Mon, 12 Mar 2012 11:23:23 +0000 (13:23 +0200)]
ath6kl: use max_t() in ath6kl_cfg80211_connect()

ath6kl/cfg80211.c:589: WARNING: max() should probably be
max_t(u16, vif->listen_intvl_t, ATH6KL_MAX_WOW_LISTEN_INTL)

Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
12 years agoath6kl: fix open parenthesis alignment in ath6kl_sdio_suspend()
Kalle Valo [Mon, 12 Mar 2012 11:23:14 +0000 (13:23 +0200)]
ath6kl: fix open parenthesis alignment in ath6kl_sdio_suspend()

ath6kl/sdio.c:875: CHECK: Alignment should match open parenthesis

Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
12 years agoath6kl: replace strict_strtoul() with kstrtoul()
Kalle Valo [Mon, 12 Mar 2012 11:23:03 +0000 (13:23 +0200)]
ath6kl: replace strict_strtoul() with kstrtoul()

Recommended by checkpatch.

Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
12 years agoath6kl: fix regression in ath6kl_upload_board_file()
Kalle Valo [Mon, 12 Mar 2012 11:22:54 +0000 (13:22 +0200)]
ath6kl: fix regression in ath6kl_upload_board_file()

My patch 24fc32b3 ("ath6kl: add ath6kl_bmi_write_hi32()") caused a regression
in ath6kl_upload_board_file() and the board_address variable was not
properly initialised in some cases:

ath6kl/init.c:1068:6: warning: ‘board_address’ may be used uninitialized
in this function

Most likely this broke ar6004 support but I can't test that right now.

Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
12 years agohwmon: (w83627ehf) Describe undocumented pwm attributes
Guenter Roeck [Thu, 9 Feb 2012 16:41:03 +0000 (08:41 -0800)]
hwmon: (w83627ehf) Describe undocumented pwm attributes

Add description of pwm[1-4]_start_output, pwm[1-4]_step_output,
pwm[1-4]_stop_output, and pwm[1-4]_max_output attributes to driver
documentation.

Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com>
Acked-by: Jean Delvare <khali@linux-fr.org>
12 years agohwmon: (w83627ehf) Fix temp2 source for W83627UHG
Jean Delvare [Tue, 13 Mar 2012 08:03:27 +0000 (04:03 -0400)]
hwmon: (w83627ehf) Fix temp2 source for W83627UHG

Properly set the source of temp2 for the W83627UHG. Also fix a
comment right before that, and document the W83627UHG as reporting up
to 3 temperatures.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Cc: Guenter Roeck <guenter.roeck@ericsson.com>
Cc: stable@vger.kernel.org
Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com>
12 years agoMerge branch 'for_linus' of git://cavan.codon.org.uk/platform-drivers-x86
Linus Torvalds [Tue, 13 Mar 2012 05:59:34 +0000 (22:59 -0700)]
Merge branch 'for_linus' of git://cavan.codon.org.uk/platform-drivers-x86

Pull x86 platfrm driver fixes from Matthew Garrett:
 "Some trivial patches that fix wifi on some Lenovos and avoid a
  potential memory corruption issue on some Panasonics, plus two
  straightforward new drivers that touch no existing code."

* 'for_linus' of git://cavan.codon.org.uk/platform-drivers-x86:
  panasonic-laptop: avoid overflow in acpi_pcc_hotkey_add()
  acer-wmi: No wifi rfkill on Lenovo machines
  Fujitsu tablet extras driver
  x86: Add amilo-rfkill driver for some Fujitsu-Siemens Amilo laptops

12 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jbarnes/pci
Linus Torvalds [Tue, 13 Mar 2012 05:53:37 +0000 (22:53 -0700)]
Merge branch 'for-linus' of git://git./linux/kernel/git/jbarnes/pci

Pull PCI changes from Jesse Barnes:
 "A single fix for a regression that affects some people who try to
  disable ASPM for whatever reason."

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jbarnes/pci:
  PCI: ignore pre-1.1 ASPM quirking when ASPM is disabled

12 years agoMerge tag 'sh-for-linus' of git://github.com/pmundt/linux-sh
Linus Torvalds [Tue, 13 Mar 2012 05:50:20 +0000 (22:50 -0700)]
Merge tag 'sh-for-linus' of git://github.com/pmundt/linux-sh

Pull SuperH fixes from Paul Mundt.

* tag 'sh-for-linus' of git://github.com/pmundt/linux-sh:
  sh-sci / PM: Avoid deadlocking runtime PM
  sh: fix up the ubc clock definition for sh7785.
  sh: add parameter for RSPI in clock-sh7757
  sh: Fix sh2a vbr table for more than 255 irqs

12 years agoMerge tag 'rmobile-for-linus' of git://github.com/pmundt/linux-sh
Linus Torvalds [Tue, 13 Mar 2012 05:47:20 +0000 (22:47 -0700)]
Merge tag 'rmobile-for-linus' of git://github.com/pmundt/linux-sh

Pull SH/R-Mobile fixes from Paul Mundt.

* tag 'rmobile-for-linus' of git://github.com/pmundt/linux-sh:
  ARM: mach-shmobile: ap4evb: fixup fsi2_ak4643_info typo
  ARM: mach-shmobile: mackerel: Reserve DMA memory for the frame buffer
  ARM: mach-shmobile: Fix ag5evm compilation by including linux/videodev2.h
  ARM: mach-shmobile: Fix bonito compile breakage

12 years agoixgbe: Simplify logic for ethtool loopback frame creation and testing
Alexander Duyck [Wed, 8 Feb 2012 07:50:09 +0000 (07:50 +0000)]
ixgbe: Simplify logic for ethtool loopback frame creation and testing

This change makes it a bit easier to do the loopback frame creating and
testing.  Previously we were doing an and to drop the last bit, and then
dividing the frame_size by 2 in order to get locations for frame bytes and
testing.  Instead we can simplify it by just shifting the register one bit
to the right and using that for the frame offsets.

This change also replaces all instances of rx_buffer_info with just
rx_buffer since that is closer to the name of the actual structure being
used and can save a few extra characters.

In addition I have updated the logic for cleaning up a test frame so that
we pass an rx_buffer instead of the sk_buff.  The main motivation behind
this is changes that will replace the sk_buff with just a page in the
future.

Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com>
Tested-by: Stephen Ko <stephen.s.ko@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
12 years agoixgbe: Add iterator for cycling through rings on a q_vector
Alexander Duyck [Wed, 8 Feb 2012 07:50:04 +0000 (07:50 +0000)]
ixgbe: Add iterator for cycling through rings on a q_vector

Since there are multiple spots where we have to cycle through all of the
rings on a q_vector it makes sense to just add a function for iterating
through all of them.

Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com>
Tested-by: Stephen Ko <stephen.s.ko@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
12 years agoixgbe: Allocate rings as part of the q_vector
Alexander Duyck [Wed, 8 Feb 2012 07:49:59 +0000 (07:49 +0000)]
ixgbe: Allocate rings as part of the q_vector

This patch makes the rings a part of the q_vector directly instead of
indirectly.  Specifically on x86 systems this helps to avoid any cache
set conflicts between the q_vector, the tx_rings, and the rx_rings as the
critical stride is 4K and in order to cross that boundary you would need to
have over 15 rings on a single q_vector.

In addition this allows for smarter allocations when Flow Director is
enabled.  Previously Flow Director would set the irq_affinity hints based
on the CPU and was still using a node interleaving approach which on some
systems would end up with the two values mismatched.  With the new approach
we can set the affinity for the irq_vector and use the CPU for that
affinity to determine the node value for the node and the rings.

Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com>
Tested-by: Stephen Ko <stephen.s.ko@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
12 years agoixgbe: Drop unnecessary napi_schedule_prep and spare blank line from ixgbe_intr
Alexander Duyck [Wed, 8 Feb 2012 07:49:54 +0000 (07:49 +0000)]
ixgbe: Drop unnecessary napi_schedule_prep and spare blank line from ixgbe_intr

This patch is a minor cleanup to address the unnecessary use of
napi_schedule_prep in ixgbe_intr and to also remove a blank line that is
not needed since it is separating a comment from the line it is explaining.

Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com>
Tested-by: Stephen Ko <stephen.s.ko@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
12 years agoixgbe: Default to queue pairs when number of queues is less than CPUs
Alexander Duyck [Fri, 10 Feb 2012 02:08:37 +0000 (02:08 +0000)]
ixgbe: Default to queue pairs when number of queues is less than CPUs

The old code had several errors in how it was determining the vector
budget.  In order to simplify things this patch updates the code so that it
will attempt to always allocated paired Rx/Tx vectors instead of attempting
to allocate individual vectors when the number of queues is less than the
number of CPUs.

Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com>
Tested-by: Stephen Ko <stephen.s.ko@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
12 years agoixgbe: Correct Adaptive Interrupt Moderation so that it will change values
Alexander Duyck [Wed, 8 Feb 2012 07:49:43 +0000 (07:49 +0000)]
ixgbe: Correct Adaptive Interrupt Moderation so that it will change values

This change corrects an issue in which Adaptive Interrupt Moderation was
not changing values due to the fact that we were performing an and
operation on the resultant value that was causing the value to never change
from the default 20K interrupts per second.

Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com>
Tested-by: Stephen Ko <stephen.s.ko@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
12 years agoixgbe: Address issues with Tx WHTRESH value not being set correctly
Alexander Duyck [Wed, 8 Feb 2012 07:49:38 +0000 (07:49 +0000)]
ixgbe: Address issues with Tx WHTRESH value not being set correctly

This change is meant to address the fact that the tx_itr_setting was
dropping to 0 when no separate Tx vectors were provided.  This had resulted
in the driver incorrectly configuring the Tx ring with a WTHRESH of 1 in
order to avoid Tx hangs even though that was not necessary. This change
makes it so that we instead take a look at the Tx ring's q_vector to
determine if the ring will have an ITR value less than 8us.

Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com>
Tested-by: Stephen Ko <stephen.s.ko@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
12 years agoixgbe: Reorder adapter contents for better cache utilization
Alexander Duyck [Wed, 8 Feb 2012 07:49:28 +0000 (07:49 +0000)]
ixgbe: Reorder adapter contents for better cache utilization

This change moves several frequently accessed items together into one cache
line in order to reduce cache misses in the hot-path.

Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com>
Tested-by: Stephen Ko <stephen.s.ko@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
12 years agoixgbe: Do no clear Tx status bits since eop_desc provides enough info
Alexander Duyck [Wed, 8 Feb 2012 07:49:23 +0000 (07:49 +0000)]
ixgbe: Do no clear Tx status bits since eop_desc provides enough info

There isn't any need to clear the status bits in the descriptors due to the
fact that the eop_desc provides enough information for us to know
that we have cleaned to the last packet that the software has put on the
ring.  The status bits are cleared as a part of putting the frame on the
ring so as long as we do not read the descriptor bit prior to reading the
value eop_desc we should be able to guarantee that we will not clean beyond
the end of the current data stream.

Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com>
Tested-by: Stephen Ko <stephen.s.ko@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
12 years agonet: Add memory barriers to prevent possible race in byte queue limits
Alexander Duyck [Tue, 7 Feb 2012 02:29:06 +0000 (02:29 +0000)]
net: Add memory barriers to prevent possible race in byte queue limits

This change adds a memory barrier to the byte queue limit code to address a
possible race as has been seen in the past with the
netif_stop_queue/netif_wake_queue logic.

Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com>
Tested-by: Stephen Ko <stephen.s.ko@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
12 years agonet: Fix issue with netdev_tx_reset_queue not resetting queue from XOFF state
Alexander Duyck [Tue, 7 Feb 2012 02:29:01 +0000 (02:29 +0000)]
net: Fix issue with netdev_tx_reset_queue not resetting queue from XOFF state

We are seeing dev_watchdog hangs on several drivers.  I suspect this is due
to the __QUEUE_STATE_STACK_XOFF bit being set prior to a reset for link
change, and then not being cleared by netdev_tx_reset_queue.  This change
corrects that.

In addition we were seeing dev_watchdog hangs on igb after running the
ethtool tests.  We found this to be due to the fact that the ethtool test
runs the same logic as ndo_start_xmit, but we were never clearing the XOFF
flag since the loopback test in ethtool does not do byte queue accounting.

Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com>
Tested-by: Stephen Ko <stephen.s.ko@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
12 years agoixgbe: add support for byte queue limits
Alexander Duyck [Tue, 7 Feb 2012 08:14:33 +0000 (08:14 +0000)]
ixgbe: add support for byte queue limits

This adds support for byte queue limits (BQL).

Based on patch from Eric Dumazet for igb.

Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com>
Tested-by: Stephen Ko <stephen.s.ko@intel.com>
12 years agoixgbe: remove tie between NAPI work limits and interrupt moderation
Jeff Kirsher [Fri, 23 Sep 2011 15:34:38 +0000 (15:34 +0000)]
ixgbe: remove tie between NAPI work limits and interrupt moderation

As noted by Ben Hutchings and David Miller, work limits for NAPI
should not be tied to interrupt moderation parameters.  This
should be handled by NAPI, possibly through sysfs.

Neil Horman & Stephen Hemminger are working on a solution for
NAPI currently.  In the meantime, remove this tie between
work limits and interrupt moderation.

Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
CC: Ben Hutchings <bhutchings@solarflare.com>
Tested-by: Phil Schmitt <phillip.j.schmitt@intel.com>
12 years agoigb: fix ethtool offline test
Jeff Kirsher [Thu, 19 Jan 2012 18:31:34 +0000 (18:31 +0000)]
igb: fix ethtool offline test

A bug was introduced with the following patch:

  Commmit bdbc063129e811264cd6c311d8c2d9b95de01231
  Author: Eric Dumazet <eric.dumazet@gmail.com>
  igb: Add support for byte queue limits.

The ethtool offline tests will cause a perpetual link flap, this
is because the tests also need to account for byte queue limits (BQL).

CC: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: John Fastabend <john.r.fastabend@intel.com>
Tested-by: Jeff Pieper <jeffrey.e.pieper@intel.com>
12 years agotun: don't hold network namespace by tun sockets
Stanislav Kinsbursky [Mon, 12 Mar 2012 02:59:41 +0000 (02:59 +0000)]
tun: don't hold network namespace by tun sockets

v3: added previously removed sock_put() to the tun_release() callback, because
sk_release_kernel() doesn't drop the socket reference.

v2: sk_release_kernel() used for socket release. Dummy tun_release() is
required for sk_release_kernel() ---> sock_release() ---> sock->ops->release()
call.

TUN was designed to destroy it's socket on network namesapce shutdown. But this
will never happen for persistent device, because it's socket holds network
namespace.
This patch removes of holding network namespace by TUN socket and replaces it
by creating socket in init_net and then changing it's net it to desired one. On
shutdown socket is moved back to init_net prior to final put.

Signed-off-by: Stanislav Kinsbursky <skinsbursky@parallels.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agobnx2x: code doesn't use stats for allocating Rx BDs
Dmitry Kravkov [Mon, 12 Mar 2012 08:53:14 +0000 (08:53 +0000)]
bnx2x: code doesn't use stats for allocating Rx BDs

Previously, allocation used queue statistics directly in its calcualtion.
This change causes these calculations to be summed into the statistics,
without being affected by them.

Signed-off-by: Dmitry Kravkov <dmitry@broadcom.com>
Signed-off-by: Yuval Mintz <yuvalmin@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agobnx2x: ethtool returns req. AN even when AN fails
Yuval Mintz [Mon, 12 Mar 2012 08:53:13 +0000 (08:53 +0000)]
bnx2x: ethtool returns req. AN even when AN fails

Previously, if autoneg failed, ethtool would return the achieved autoneg.
This patch corrects this, causing ethtool to return the requested autoneg
capabilities even if autoneg fails.

Signed-off-by: Yuval Mintz <yuvalmin@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agobnx2x: ethtool now returns unknown speed/duplex
Yuval Mintz [Mon, 12 Mar 2012 08:53:12 +0000 (08:53 +0000)]
bnx2x: ethtool now returns unknown speed/duplex

Previously, unless both interface and link were up, ethtool returned
the requested speed/duplex when asked for the interface's settings.
This change will now enable the driver to answer correctly (i.e.,
return unknown as its answer).

Signed-off-by: Yuval Mintz <yuvalmin@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agobnx2x: mark functions as loaded on shared memory
Yuval Mintz [Mon, 12 Mar 2012 08:53:11 +0000 (08:53 +0000)]
bnx2x: mark functions as loaded on shared memory

This change enables the FW to make more accurate decisions regarding the
active functions.

Signed-off-by: Yuval Mintz <yuvalmin@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agobnx2x: use param's id instead of sp_obj's id
Yuval Mintz [Mon, 12 Mar 2012 08:53:10 +0000 (08:53 +0000)]
bnx2x: use param's id instead of sp_obj's id

Previously, we've used the object's function id instead of using the
input's value. This is remedied, as in other flows.

Signed-off-by: Yuval Mintz <yuvalmin@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agobnx2x: set_one_mac_e1x uses raw's state as input
Yuval Mintz [Mon, 12 Mar 2012 08:53:09 +0000 (08:53 +0000)]
bnx2x: set_one_mac_e1x uses raw's state as input

Previously, we used a hard-coded value as paramater, instead of using the
input's value. This is now remedied, as in other flows.

Signed-off-by: Yuval Mintz <yuvalmin@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agobnx2x: removed unused function bnx2x_queue_set_cos_cid
Yuval Mintz [Mon, 12 Mar 2012 08:53:08 +0000 (08:53 +0000)]
bnx2x: removed unused function bnx2x_queue_set_cos_cid

Signed-off-by: Yuval Mintz <yuvalmin@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agobnx2x: move LLH_CAM to header, apply naming conventions
Yuval Mintz [Mon, 12 Mar 2012 08:53:07 +0000 (08:53 +0000)]
bnx2x: move LLH_CAM to header, apply naming conventions

These definitions are united into the header.

Signed-off-by: Yuval Mintz <yuvalmin@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agolpc32xx: Added ethernet driver
stigge@antcom.de [Thu, 8 Mar 2012 11:49:17 +0000 (11:49 +0000)]
lpc32xx: Added ethernet driver

This patch adds an ethernet driver for the LPC32xx ARM SoC.

Signed-off-by: Roland Stigge <stigge@antcom.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
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>
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>
12 years agonet: ipv4: Standardize prefixes for message logging
Joe Perches [Mon, 12 Mar 2012 07:03:32 +0000 (07:03 +0000)]
net: ipv4: Standardize prefixes for message logging

Add #define pr_fmt(fmt) as appropriate.

Add "IPv4: ", "TCP: ", and "IPsec: " to appropriate files.
Standardize on "UDPLite: " for appropriate uses.
Some prefixes were previously "UDPLITE: " and "UDP-Lite: ".

Add KBUILD_MODNAME ": " to icmp and gre.
Remove embedded prefixes as appropriate.

Add missing "\n" to pr_info in gre.c.

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agobnx2x: FCoE statistics id fixed
Yuval Mintz [Mon, 12 Mar 2012 11:22:07 +0000 (11:22 +0000)]
bnx2x: FCoE statistics id fixed

FCoE statistics ids were distinguished from the L2's statistics ids.
However, not all of the change was committed. This causes a possible
collision of indices when FCoE is present.

This patch fixes the issue.

Signed-off-by: Yuval Mintz <yuvalmin@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>