cascardo/linux.git
12 years agodrm/i915/ringbuffer: Idling requires waiting for the ring to be empty
Chris Wilson [Tue, 12 Jul 2011 17:03:29 +0000 (18:03 +0100)]
drm/i915/ringbuffer: Idling requires waiting for the ring to be empty

...which is measured by the size and not the amount of space remaining.

Waiting upon size-8, did one of two things. In the common case with more
than 8 bytes available to write into the ring, it would return
immediately. Otherwise, it would timeout given the impossible condition
of waiting for more space than is available in the ring, leading to
warnings such as:

[drm:intel_cleanup_ring_buffer] *ERROR* failed to quiesce render ring
whilst cleaning up: -16

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Keith Packard <keithp@keithp.com>
12 years agoRevert "drm/i915: enable rc6 by default"
Keith Packard [Tue, 12 Jul 2011 15:49:31 +0000 (08:49 -0700)]
Revert "drm/i915: enable rc6 by default"

This reverts commit a51f7a66fb5e4af5ec4286baef940d06594b59d2.

We still have a few Ironlake and Sandybridge machines which fail when
RC6 is enabled. Better luck next release?

Signed-off-by: Keith Packard <keithp@keithp.com>
12 years agodrm/i915: Clean up i915_driver_load failure path
Keith Packard [Sun, 10 Jul 2011 20:12:17 +0000 (13:12 -0700)]
drm/i915: Clean up i915_driver_load failure path

i915_driver_load adds a write-combining MTRR region for the GTT
aperture to improve memory speeds through the aperture. If
i915_driver_load fails after this, it would not have cleaned up the
MTRR. This shouldn't cause any problems, except for consuming an MTRR
register. Still, it's best to clean up completely in the failure path,
which is easily done by calling mtrr_del if the mtrr was successfully
allocated.

i915_driver_load calls i915_gem_load which register
i915_gem_inactive_shrink. If i915_driver_load fails after calling
i915_gem_load, the shrinker will be left registered. When called, it
will access freed memory and crash. The fix is to unregister the shrinker in the
failure path using code duplicated from i915_driver_unload.

i915_driver_load also has some incorrect gotos in the error cleanup
paths:

 * After failing to initialize the GTT (which cannot happen, btw,
   intel_gtt_get returns a fixed (non-NULL) value), it tries to
   free the uninitialized WC IO mapping. Fixed this by changing the
   target from out_iomapfree to out_rmmap

Signed-off-by: Keith Packard <keithp@keithp.com>
Tested-by: Lin Ming <ming.m.lin@intel.com>
12 years agolanai: use pci_dev->subsystem_device
Sergei Shtylyov [Tue, 12 Jul 2011 14:59:38 +0000 (07:59 -0700)]
lanai: use pci_dev->subsystem_device

The driver reads PCI subsystem IDs from the PCI configuration registers while
it is already stored by the PCI subsystem in the 'subsystem_device' field of
'struct pci_dev'...

Signed-off-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agokbuild: Do not write to builddir in modules_install
Michal Marek [Tue, 12 Jul 2011 09:54:48 +0000 (11:54 +0200)]
kbuild: Do not write to builddir in modules_install

Let depmod.sh create a temporary directory in /tmp instead of writing to
the build directory as root. The mktemp utility should be available on
any recent system (and there is already scripts/gen_initramfs_list.sh
relying on it).

Reported-by: Christian Kujau <lists@nerdbynature.de>
Signed-off-by: Michal Marek <mmarek@suse.cz>
12 years agodrm/radeon/kms: fix typo in read_disabled vbios code
Alex Deucher [Mon, 11 Jul 2011 20:22:33 +0000 (20:22 +0000)]
drm/radeon/kms: fix typo in read_disabled vbios code

BUS_CNTL reg and bits moved between pre-PCIE and PCIE asics.

Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
12 years agodrm/radeon/kms: use correct BUS_CNTL reg on rs600
Alex Deucher [Mon, 11 Jul 2011 20:27:23 +0000 (20:27 +0000)]
drm/radeon/kms: use correct BUS_CNTL reg on rs600

BUS_CNTL is at 0x30 on rs600, not 0x4c.

Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
12 years agodrm/radeon/kms: fix backend map typo on juniper
Alex Deucher [Mon, 11 Jul 2011 19:45:32 +0000 (19:45 +0000)]
drm/radeon/kms: fix backend map typo on juniper

Don't enable backends that don't exist.

Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
Cc: stable@kernel.org
Signed-off-by: Dave Airlie <airlied@redhat.com>
12 years agodrm/radeon/kms: fix regression in hotplug
Alex Deucher [Mon, 11 Jul 2011 14:49:28 +0000 (14:49 +0000)]
drm/radeon/kms: fix regression in hotplug

Skip connectors that do not have an HPD pin.

Should fix:
https://bugs.freedesktop.org/show_bug.cgi?id=39027

Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
Tested-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
12 years agodrivers/net: static should be at beginning of declaration
Jesper Juhl [Tue, 12 Jul 2011 05:15:02 +0000 (22:15 -0700)]
drivers/net: static should be at beginning of declaration

Make sure that the 'static' keywork is at the beginning of declaration
for drivers/net/usb/kalmia.c

This gets rid of warnings like
  warning: ‘static’ is not at beginning of declaration
when building with -Wold-style-declaration (and/or -Wextra which also
enables it).

Signed-off-by: Jesper Juhl <jj@chaosbits.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agoslip: fix wrong SLIP6 ifdef-endif placing
Matvejchikov Ilya [Sun, 10 Jul 2011 08:49:26 +0000 (08:49 +0000)]
slip: fix wrong SLIP6 ifdef-endif placing

SLIP6 have nothing to do with CSLIP so placing a block of
SLIP6-related code within a CSLIP ifdef-endif block is incorrect.

Signed-off-by: Ilya Matvejchikov <matvejchikov@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agoinetpeer: kill inet_putpeer race
Eric Dumazet [Mon, 11 Jul 2011 02:49:52 +0000 (02:49 +0000)]
inetpeer: kill inet_putpeer race

We currently can free inetpeer entries too early :

[  782.636674] WARNING: kmemcheck: Caught 32-bit read from uninitialized memory (f130f44c)
[  782.636677] 1f7b13c100000000000000000000000002000000000000000000000000000000
[  782.636686]  i i i i u u u u i i i i u u u u i i i i u u u u u u u u u u u u
[  782.636694]                          ^
[  782.636696]
[  782.636698] Pid: 4638, comm: ssh Not tainted 3.0.0-rc5+ #270 Hewlett-Packard HP Compaq 6005 Pro SFF PC/3047h
[  782.636702] EIP: 0060:[<c13fefbb>] EFLAGS: 00010286 CPU: 0
[  782.636707] EIP is at inet_getpeer+0x25b/0x5a0
[  782.636709] EAX: 00000002 EBX: 00010080 ECX: f130f3c0 EDX: f0209d30
[  782.636711] ESI: 0000bc87 EDI: 0000ea60 EBP: f0209ddc ESP: c173134c
[  782.636712]  DS: 007b ES: 007b FS: 00d8 GS: 0033 SS: 0068
[  782.636714] CR0: 8005003b CR2: f0beca80 CR3: 30246000 CR4: 000006d0
[  782.636716] DR0: 00000000 DR1: 00000000 DR2: 00000000 DR3: 00000000
[  782.636717] DR6: ffff4ff0 DR7: 00000400
[  782.636718]  [<c13fbf76>] rt_set_nexthop.clone.45+0x56/0x220
[  782.636722]  [<c13fc449>] __ip_route_output_key+0x309/0x860
[  782.636724]  [<c141dc54>] tcp_v4_connect+0x124/0x450
[  782.636728]  [<c142ce43>] inet_stream_connect+0xa3/0x270
[  782.636731]  [<c13a8da1>] sys_connect+0xa1/0xb0
[  782.636733]  [<c13a99dd>] sys_socketcall+0x25d/0x2a0
[  782.636736]  [<c149deb8>] sysenter_do_call+0x12/0x28
[  782.636738]  [<ffffffff>] 0xffffffff

Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agoe1000e: remove e1000_queue_stats
Eric Dumazet [Mon, 11 Jul 2011 10:00:40 +0000 (10:00 +0000)]
e1000e: remove e1000_queue_stats

struct e1000_queue_stats is not used, lets remove it

Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Acked-by: Bruce Allan <bruce.w.allan@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agonet: introduce __netdev_alloc_skb_ip_align
Eric Dumazet [Tue, 12 Jul 2011 03:08:34 +0000 (20:08 -0700)]
net: introduce __netdev_alloc_skb_ip_align

RX rings should use GFP_KERNEL allocations if possible, add
__netdev_alloc_skb_ip_align() helper to ease this.

Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agoMerge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/jkirsher/net...
David S. Miller [Tue, 12 Jul 2011 03:07:20 +0000 (20:07 -0700)]
Merge branch 'master' of /linux/kernel/git/jkirsher/net-next-2.6

12 years agoixgbe: Make certain to initialize the fdir_perfect_lock in all cases
Alexander Duyck [Thu, 2 Jun 2011 04:28:39 +0000 (04:28 +0000)]
ixgbe: Make certain to initialize the fdir_perfect_lock in all cases

This fix makes it so that the fdir_perfect_lock is initialized in all
cases.  This is necessary as the fdir_filter_exit routine will always
attempt to take the lock before inspecting the filter table.

Reported-by: Ben Greear <greearb@candelatech.com>
Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
12 years agoigb: Add support of SerDes Forced mode for certain hardware
Carolyn Wyborny [Tue, 24 May 2011 06:52:51 +0000 (06:52 +0000)]
igb: Add support of SerDes Forced mode for certain hardware

This patch changes the serdes link code to support a forced mode for
some hardware, based on bit set in EEPROM.

Signed-off-by: Carolyn Wyborny <carolyn.wyborny@intel.com>
Tested-by: Jeff Pieper <jeffrey.e.pieper@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
12 years agoigb: Update copyright on all igb driver files.
Carolyn Wyborny [Wed, 29 Jun 2011 01:16:10 +0000 (01:16 +0000)]
igb: Update copyright on all igb driver files.

This patch updates the copyright on the igb driver files to 2011.

Signed-off-by: Carolyn Wyborny <carolyn.wyborny@intel.com>
Tested-by: Aaron Brown <aaron.f.brown@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
12 years agoigb: Fix lack of flush after register write and before delay
Carolyn Wyborny [Sat, 25 Jun 2011 13:18:12 +0000 (13:18 +0000)]
igb: Fix lack of flush after register write and before delay

Register writes followed by a delay are required to have a flush
before the delay in order to commit the values to the register.  Without
the flush, the code following the delay may not function correctly.

Reported-by: Tong Ho <tong.ho@ericsson.com>
Reported-by: Guenter Roeck <guenter.roeck@ericsson.com>
Signed-off-by: Carolyn Wyborny <carolyn.wyborny@intel.com>
Tested-by: Aaron Brown <aaron.f.brown@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
12 years agopowerpc/mm: Fix memory_block_size_bytes() for non-pseries
Benjamin Herrenschmidt [Tue, 14 Jun 2011 00:57:51 +0000 (10:57 +1000)]
powerpc/mm: Fix memory_block_size_bytes() for non-pseries

Just compiling pseries in the kernel causes it to override
memory_block_size_bytes() regardless of what is the runtime
platform.

This cleans up the implementation of that function, fixing
a bug or two while at it, so that it's harmless (and potentially
useful) for other platforms. Without this, bugs in that code
would trigger a WARN_ON() in drivers/base/memory.c when
booting some different platforms.

If/when we have another platform supporting memory hotplug we
might want to either move that out to a generic place or
make it a ppc_md. callback.

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
12 years agomm: Move definition of MIN_MEMORY_BLOCK_SIZE to a header
Benjamin Herrenschmidt [Tue, 14 Jun 2011 00:57:50 +0000 (10:57 +1000)]
mm: Move definition of MIN_MEMORY_BLOCK_SIZE to a header

The macro MIN_MEMORY_BLOCK_SIZE is currently defined twice in two .c
files, and I need it in a third one to fix a powerpc bug, so let's
first move it into a header

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Acked-by: Ingo Molnar <mingo@elte.hu>
12 years agoLinux 3.0-rc7 v3.0-rc7
Linus Torvalds [Mon, 11 Jul 2011 23:51:52 +0000 (16:51 -0700)]
Linux 3.0-rc7

12 years agoDocumentation/Changes: remove some really obsolete text
Linus Torvalds [Mon, 11 Jul 2011 23:48:38 +0000 (16:48 -0700)]
Documentation/Changes: remove some really obsolete text

That file harkens back to the days of the big 2.4 -> 2.6 version jump,
and was based even then on older versions.  Some of it is just obsolete,
and Jesper Juhl points out that it talks about kernel versions 2.6 and
should be updated to 3.0.

Remove some obsolete text, and re-phrase some other to not be 2.6-specific.

Reported-by: Jesper Juhl <jj@chaosbits.net>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
12 years agoMerge branch 'v4l_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab...
Linus Torvalds [Mon, 11 Jul 2011 23:43:27 +0000 (16:43 -0700)]
Merge branch 'v4l_for_linus' of git://git./linux/kernel/git/mchehab/linux-2.6

* 'v4l_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-2.6:
  [media] msp3400: fill in v4l2_tuner based on vt->type field
  [media] tuner-core.c: don't change type field in g_tuner or g_frequency
  [media] cx18/ivtv: fix g_tuner support
  [media] tuner-core: power up tuner when called with s_power(1)
  [media] v4l2-ioctl.c: check for valid tuner type in S_HW_FREQ_SEEK
  [media] tuner-core: simplify the standard fixup
  [media] tuner-core/v4l2-subdev: document that the type field has to be filled in
  [media] v4l2-subdev.h: remove unused s_mode tuner op
  [media] feature-removal-schedule: change in how radio device nodes are handled
  [media] bttv: fix s_tuner for radio
  [media] pvrusb2: fix g/s_tuner support
  [media] v4l2-ioctl.c: prefill tuner type for g_frequency and g/s_tuner
  [media] tuner-core: fix tuner_resume: use t->mode instead of t->type
  [media] tuner-core: fix s_std and s_tuner

12 years agoNFSv4.1: update nfs4_fattr_bitmap_maxsz
Andy Adamson [Mon, 11 Jul 2011 21:17:42 +0000 (17:17 -0400)]
NFSv4.1: update nfs4_fattr_bitmap_maxsz

Attribute IDs assigned in RFC 5661 now require three bitmaps.
Fixes hitting a BUG_ON in xdr_shrink_bufhead when getting ACLs.

Signed-off-by: Andy Adamson <andros@netapp.com>
Cc:stable@kernel.org [2.6.39]
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
12 years agoMerge branch 'fix' of git://git.kernel.org/pub/scm/linux/kernel/git/ycmiao/pxa-linux...
Arnd Bergmann [Mon, 11 Jul 2011 21:26:16 +0000 (23:26 +0200)]
Merge branch 'fix' of git://git./linux/kernel/git/ycmiao/pxa-linux-2.6 into fixes

12 years agoMerge branch 'pm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/suspe...
Linus Torvalds [Mon, 11 Jul 2011 19:49:03 +0000 (12:49 -0700)]
Merge branch 'pm-fixes' of git://git./linux/kernel/git/rafael/suspend-2.6

* 'pm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/suspend-2.6:
  PM: Reintroduce dropped call to check_wakeup_irqs

12 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/sfrench/cifs-2.6
Linus Torvalds [Mon, 11 Jul 2011 19:48:24 +0000 (12:48 -0700)]
Merge git://git./linux/kernel/git/sfrench/cifs-2.6

* git://git.kernel.org/pub/scm/linux/kernel/git/sfrench/cifs-2.6:
  cifs: drop spinlock before calling cifs_put_tlink
  cifs: fix expand_dfs_referral
  cifs: move bdi_setup_and_register outside of CONFIG_CIFS_DFS_UPCALL
  cifs: factor smb_vol allocation out of cifs_setup_volume_info
  cifs: have cifs_cleanup_volume_info not take a double pointer
  cifs: fix build_unc_path_to_root to account for a prefixpath
  cifs: remove bogus call to cifs_cleanup_volume_info

12 years agoMerge branch 'fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/davej/cpufreq
Linus Torvalds [Mon, 11 Jul 2011 19:47:53 +0000 (12:47 -0700)]
Merge branch 'fixes' of git://git./linux/kernel/git/davej/cpufreq

* 'fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/davej/cpufreq:
  [CPUFREQ] fix cpumask memory leak in acpi-cpufreq on cpu hotplug.

12 years agoMerge branch 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mjg59/platf...
Linus Torvalds [Mon, 11 Jul 2011 19:47:09 +0000 (12:47 -0700)]
Merge branch 'for_linus' of git://git./linux/kernel/git/mjg59/platform-drivers-x86

* 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mjg59/platform-drivers-x86:
  hp-wmi: fix use after free
  dell-laptop - using buffer without mutex_lock
  Revert: "dell-laptop: Toggle the unsupported hardware killswitch"
  platform-drivers-x86: set backlight type to BACKLIGHT_PLATFORM
  thinkpad-acpi: handle HKEY 0x4010, 0x4011 events
  drivers/platform/x86: Fix memory leak
  thinkpad-acpi: handle some new HKEY 0x60xx events
  acer-wmi: fix bitwise bug when set device state
  acer-wmi: Only update rfkill status for associated hotkey events

12 years agoMerge branch 'movieboard' of git://git.kernel.org/pub/scm/linux/kernel/git/ieee1394...
Linus Torvalds [Mon, 11 Jul 2011 19:46:39 +0000 (12:46 -0700)]
Merge branch 'movieboard' of git://git./linux/kernel/git/ieee1394/linux1394-2.6

* 'movieboard' of git://git.kernel.org/pub/scm/linux/kernel/git/ieee1394/linux1394-2.6:
  firewire: ohci: do not bind to Pinnacle cards, avert panic

12 years agoath5k: Add missing breaks in switch/case
Joe Perches [Sun, 10 Jul 2011 09:28:26 +0000 (02:28 -0700)]
ath5k: Add missing breaks in switch/case

Signed-off-by: Joe Perches <joe@perches.com>
Acked-by: Pavel Roskin <proski@gnu.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
12 years agoDocumentation/spinlocks.txt: Remove reference to sti()/cli()
Muthu Kumar [Mon, 11 Jul 2011 18:04:58 +0000 (11:04 -0700)]
Documentation/spinlocks.txt: Remove reference to sti()/cli()

Since we removed sti()/cli() and related, how about removing it from
Documentation/spinlocks.txt?

Signed-off-by: Muthukumar R <muthur@gmail.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
12 years agoiwlagn: fix warning in testmode attribute table
Wey-Yi Guy [Mon, 11 Jul 2011 17:47:39 +0000 (10:47 -0700)]
iwlagn: fix warning in testmode attribute table

Fix the compile warning cause by [IWL_TM_ATTR_MAX - 1]

Reported-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoath9k: remove an unnecessary function declaration
Mohammed Shafi Shajakhan [Mon, 11 Jul 2011 14:44:14 +0000 (20:14 +0530)]
ath9k: remove an unnecessary function declaration

Signed-off-by: Mohammed Shafi Shajakhan <mohammed@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agort2800usb: Add new device ID for Belkin
Eduardo Bacchi Kienetz [Sun, 10 Jul 2011 15:05:14 +0000 (17:05 +0200)]
rt2800usb: Add new device ID for Belkin

Belkin's Connect N150 Wireless USB Adapter, model F7D1101 version 2, uses ID 0x945b.
Chipset info: rt: 3390, rf: 000b, rev: 3213.
I have just bought one, which started to work perfectly after the ID was added through this patch.

Signed-off-by: Eduardo Bacchi Kienetz <eduardo@kienetz.com>
Acked-by: Gertjan van Wingerde <gwingerde@gmail.com>
Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoath5k: Add missing breaks in switch/case
Joe Perches [Sun, 10 Jul 2011 09:28:26 +0000 (02:28 -0700)]
ath5k: Add missing breaks in switch/case

Signed-off-by: Joe Perches <joe@perches.com>
Acked-by: Pavel Roskin <proski@gnu.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agortlwifi: rtl8192cu: Fix duplicate if test
Larry Finger [Sat, 9 Jul 2011 18:15:58 +0000 (13:15 -0500)]
rtlwifi: rtl8192cu: Fix duplicate if test

A typo causes routine rtl92cu_phy_rf6052_set_cck_txpower() to test the
same condition twice. The problem was found using cppcheck-1.49, and the
proper fix was verified against the pre-mac80211 version of the code.

Reported-by: David Binderman <dcb314@hotmail.com>
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Cc: stable <stable@kernel.org> [back to 2.6.39]
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agolibertas: fix handling of command timeout, completion and interruption
Daniel Drake [Sat, 9 Jul 2011 14:41:25 +0000 (15:41 +0100)]
libertas: fix handling of command timeout, completion and interruption

When commands time out, corruption ensues. As lbs_complete_command()
is called without locking, the command node is mistakenly freed twice.
Also fixed up locking here in a few other places.

The nature of command timeout may be that the card didn't even
acknowledge receipt of the request. Detect this case and reset dnld_sent
so that other commands don't hang forever.

When cmdnodes are moved between the free list and the pending list,
their list heads should be reinitialized. Fixed this.

Sometimes commands are completed without actually submitting them or
removing them from cmdpendingq. We must remember to remove them from
cmdpendingq in these cases, so handle this in lbs_complete_command().

Harmless signals generated during suspend/resume were interrupting
lbs_cmd. Convert to an uninterruptible sleep to avoid this.

lbs_thread must be woken up every time there is some new work to do.
I found that when 2 commands are queued, ther completion of the first
command would not wake up lbs_thread to submit the second. Poke lbs_thread
at the end of lbs_complete_command() to fix this.

Signed-off-by: Daniel Drake <dsd@laptop.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agomac80211: allocate only one RX queue
Johannes Berg [Sat, 9 Jul 2011 13:39:16 +0000 (15:39 +0200)]
mac80211: allocate only one RX queue

We don't have multiple RX queues, so there's no use
in allocating multiple, use alloc_netdev_mqs() to
allocate multiple TX but only one RX queue.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agomac80211: fix docbook
Johannes Berg [Sat, 9 Jul 2011 12:48:31 +0000 (14:48 +0200)]
mac80211: fix docbook

I changed the TKIP key functions, but forgot to
update the documentation includes, fix that.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agocfg80211: fix docbook
Johannes Berg [Sat, 9 Jul 2011 12:48:30 +0000 (14:48 +0200)]
cfg80211: fix docbook

Looks like I forgot to document the "gfp" parameter
to cfg80211_gtk_rekey_notify, add it.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agobcma: add check if sprom is available before accessing it.
Hauke Mehrtens [Sat, 9 Jul 2011 11:22:03 +0000 (13:22 +0200)]
bcma: add check if sprom is available before accessing it.

The SoCs like the bcm4716 do not have a sprom on the bcma bus like a
pcie device. It stores the values in some partition on flash memory.
For ssb this informations are read out in the bcm47xx arch code,
something like that should also be implemented for bcma. Without this
patch bcma panics on SoCs.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agolibertas: fix errors in functions accessing module registers
Olivier Sobrie [Sat, 9 Jul 2011 10:57:05 +0000 (12:57 +0200)]
libertas: fix errors in functions accessing module registers

Problems located in the two functions lbs_set_reg() and lbs_get_reg():
- The offset field of struct cmd_ds_reg_access was not filled in
- The test on the return code of lbs_cmd_with_response() in function
  lbs_get_reg() was inverted

Signed-off-by: Olivier Sobrie <olivier@sobrie.be>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoath5k: fix typos, bad comment formatting and GHz in place of MHz
Pavel Roskin [Sat, 9 Jul 2011 04:17:51 +0000 (00:17 -0400)]
ath5k: fix typos, bad comment formatting and GHz in place of MHz

Signed-off-by: Pavel Roskin <proski@gnu.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoath5k: validate mode in ath5k_ani_init() before trying to set it
Pavel Roskin [Sat, 9 Jul 2011 04:17:45 +0000 (00:17 -0400)]
ath5k: validate mode in ath5k_ani_init() before trying to set it

Signed-off-by: Pavel Roskin <proski@gnu.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoath9k_hw: add a missing delay for an analog register
Felix Fietkau [Sat, 9 Jul 2011 04:12:54 +0000 (11:12 +0700)]
ath9k_hw: add a missing delay for an analog register

AR_AN_SYNTH9 is in the analog shift register range and thus needs to be
written using the ath9k_hw_analog_shift_rmw function.

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoath9k_hw: fix synth delay for half/quarter channels
Felix Fietkau [Sat, 9 Jul 2011 04:12:53 +0000 (11:12 +0700)]
ath9k_hw: fix synth delay for half/quarter channels

The radio needs twice / four times as much time to stabilize for half/quarter
channels.

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoath9k_hw: set 5 GHz half/quarter channels on AR9002 using fractional mode
Felix Fietkau [Sat, 9 Jul 2011 04:12:52 +0000 (11:12 +0700)]
ath9k_hw: set 5 GHz half/quarter channels on AR9002 using fractional mode

The radio seems to perform better that way

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoath9k_hw: remove ar9287 v1.3+ specific hardcoded register hacks
Felix Fietkau [Sat, 9 Jul 2011 04:12:51 +0000 (11:12 +0700)]
ath9k_hw: remove ar9287 v1.3+ specific hardcoded register hacks

Now that the clock rate is initialized properly and SIFS, EIFS, USEC,
slot time and ACK timeout are properly calculated by the generic code,
the 'async FIFO' register hacks are no longer necessary.

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoath9k_hw: initialize more timing related registers for half/quarter channels
Felix Fietkau [Sat, 9 Jul 2011 04:12:50 +0000 (11:12 +0700)]
ath9k_hw: initialize more timing related registers for half/quarter channels

Initialize the the clock-to-TSF field of AR_USEC and the SIFS and EIFS time
registers based on the clock rate instead of relying on initvals.
With those changes, some of the hardcoded AR9287 1.3+ specific overrides
can be dropped.

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoath9k_hw: fix MAC clock rate for AR9287 v1.3+
Felix Fietkau [Sat, 9 Jul 2011 04:12:49 +0000 (11:12 +0700)]
ath9k_hw: fix MAC clock rate for AR9287 v1.3+

This chip uses the async FIFO feature and runs the MAC at 117 MHz

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoath9k_hw: fix MAC clock for half/quarter rate
Felix Fietkau [Sat, 9 Jul 2011 04:12:48 +0000 (11:12 +0700)]
ath9k_hw: fix MAC clock for half/quarter rate

Enabling half/quarter rate makes the MAC run at half/quarter clock speed.

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoath9k_hw: always enable 5 GHz fast clock for AR9280
Felix Fietkau [Sat, 9 Jul 2011 04:12:47 +0000 (11:12 +0700)]
ath9k_hw: always enable 5 GHz fast clock for AR9280

All devices support this, but some disable it using an EEPROM flag
for some reason. Improves 5 GHz performance on those devices.

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoath9k_hw: remove hardcoded PLL overrides for AR9280
Felix Fietkau [Sat, 9 Jul 2011 04:12:46 +0000 (11:12 +0700)]
ath9k_hw: remove hardcoded PLL overrides for AR9280

Use the proper masks for the register instead.
Fixes adding the (still unused) half/quarter PLL flags.

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agomwifiex: 11n specific configuration for transmit
Amitkumar Karwar [Sat, 9 Jul 2011 03:40:30 +0000 (20:40 -0700)]
mwifiex: 11n specific configuration for transmit

Currently device is not able to transmit in 40MHz in spite of
enabling 40MHz support in HTCapInfo IE in assoc req, because
11n specific FW capabilities for transmission are not initialized.
This patch adds code to initilize these capabilities.

Signed-off-by: Amitkumar Karwar <akarwar@marvell.com>
Signed-off-by: Yogesh Ashok Powar <yogeshp@marvell.com>
Signed-off-by: Kiran Divekar <dkiran@marvell.com>
Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoiwlagn: remove iwlagn_hcmd_utils structure and call directly
Don Fry [Fri, 8 Jul 2011 15:46:29 +0000 (08:46 -0700)]
iwlagn: remove iwlagn_hcmd_utils structure and call directly

Not needed since the driver split.  Move single use routines to
calling location and keep static where possible.

Signed-off-by: Don Fry <donald.h.fry@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoiwlagn: separate and enhance the fixed rate from
Wey-Yi Guy [Fri, 8 Jul 2011 15:46:28 +0000 (08:46 -0700)]
iwlagn: separate and enhance the fixed rate from

For testing purpose, we need better control of msc from user application.
Separate the fixed_rate between debugfs and testmode and enforce it.

Signed-off-by: Kenny Hsu <kenny.hsu@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoiwlagn: block regular host commands if driver don't own uCode
Wey-Yi Guy [Fri, 8 Jul 2011 15:46:27 +0000 (08:46 -0700)]
iwlagn: block regular host commands if driver don't own uCode

The only host command allow to send to uCode is the one initiated from
testmode if testmode is the owner of uCode

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoiwlagn: allow application own the uCode operation
Wey-Yi Guy [Fri, 8 Jul 2011 15:46:26 +0000 (08:46 -0700)]
iwlagn: allow application own the uCode operation

Since we open the door to allow application control the device behavior through
testmode, add command to allow application request the ownership of the uCode

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoiwlagn: add CMD_ON_DEMAND flag for host command from testmode
Wey-Yi Guy [Fri, 8 Jul 2011 15:46:25 +0000 (08:46 -0700)]
iwlagn: add CMD_ON_DEMAND flag for host command from testmode

For all the hist command request from testmode, set the CMD_ON_DEMAND flag.
this flag will be used later to control the uCode behavior

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoiwlagn: declare static
Wey-Yi Guy [Fri, 8 Jul 2011 15:46:24 +0000 (08:46 -0700)]
iwlagn: declare static

Declare iwl_mac_rssi_callback as "static"

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoiwlagn: Enable/disable PS poll based on RSSI and BT coex traffic state
Meenakshi Venkataraman [Fri, 8 Jul 2011 15:46:23 +0000 (08:46 -0700)]
iwlagn: Enable/disable PS poll based on RSSI and BT coex traffic state

WiFi throughput drops drastically when BT is turned on, BT and WiFi
are simultaneously transmitting/receiving traffic. This is particularly true
when BT has higher priority over WiFi, and hence the device defers TX frames.
The AP assumes that the channel is bad and reduces the data rate, implying
longer airtime, which exacerbates the problem further, resulting ultimately
in what is popularly called the "death-spiral" phenomenon. The use of PS-poll
in such scenarios guarantees a low but consistent throughput.

Since the death-spiral phenomenon is observed only when the RSSI is low, use
PS-poll only when RSSI is low and disable when high, with a known hysterisis.

This feature specifies the high and low thresholds and implements the
callbacks registered with mac80211, which will be called when threshold events
occur.

iwlwifi: dynamic pspoll: optimize rssi monitor code

Signed-off-by: Meenakshi Venkataraman <meenakshi.venkataraman@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agomac80211: add driver RSSI threshold events
Meenakshi Venkataraman [Fri, 8 Jul 2011 15:46:22 +0000 (08:46 -0700)]
mac80211: add driver RSSI threshold events

mac80211 maintains a running average of the RSSI when a STA
is associated to an AP. Report threshold events to any driver
that has registered callbacks for getting RSSI measurements.

Implement callbacks in mac80211 so that driver can set thresholds.
Add callbacks in mac80211 which is invoked when an RSSI threshold
event occurs.

mac80211: add tracing to rssi_reports api and remove extraneous fn argument
mac80211: scale up rssi thresholds from driver by 16 before storing

Signed-off-by: Meenakshi Venkataraman <meenakshi.venkataraman@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoiwlagn: use bt handler for 2030 and 135 series devices
Wey-Yi Guy [Fri, 8 Jul 2011 15:46:21 +0000 (08:46 -0700)]
iwlagn: use bt handler for 2030 and 135 series devices

For bt combo devices, need to use bt enabled handlers and functions

Reported-by: Don Fry <donald.h.fry@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoiwlagn: remove double level temperature indirect call
Wey-Yi Guy [Fri, 8 Jul 2011 15:46:20 +0000 (08:46 -0700)]
iwlagn: remove double level temperature indirect call

No need to do double level indirect call after driver split
no functional changes

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoiwlagn: remove indirection for eeprom_query_addr
Fry, Donald H [Fri, 8 Jul 2011 15:46:19 +0000 (08:46 -0700)]
iwlagn: remove indirection for eeprom_query_addr

Not needed since the driver split.  Eliminate redundant routine.

Signed-off-by: Don Fry <donald.h.fry@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoiwlagn: remove the indirection for iwl_apm_init
Fry, Donald H [Fri, 8 Jul 2011 15:46:18 +0000 (08:46 -0700)]
iwlagn: remove the indirection for iwl_apm_init

Not needed since the driver split.

Signed-off-by: Don Fry <donald.h.fry@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoiwlagn: remove the indirection for update_chain_flags
Fry, Donald H [Fri, 8 Jul 2011 15:46:17 +0000 (08:46 -0700)]
iwlagn: remove the indirection for update_chain_flags

Not needed since the driver split.

Signed-off-by: Don Fry <donald.h.fry@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoiwlagn: provide heplers to access the transport ops
Emmanuel Grumbach [Fri, 8 Jul 2011 15:46:16 +0000 (08:46 -0700)]
iwlagn: provide heplers to access the transport ops

This removes the for priv->trans.ops->...

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoiwlagn: remove the indirection for the dma channel num
Wey-Yi Guy [Fri, 8 Jul 2011 15:46:15 +0000 (08:46 -0700)]
iwlagn: remove the indirection for the dma channel num

Not needed since the driver split.

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoiwlagn: consolidate the API that sends host commands and move to transport
Emmanuel Grumbach [Fri, 8 Jul 2011 15:46:14 +0000 (08:46 -0700)]
iwlagn: consolidate the API that sends host commands and move to transport

Now, there are only two functions to send a host command:
* send_cmd that receives a iwl_host_cmd
* send_cmd_pdu that builds the iwl_host_cmd itself and received flags

The flags CMD_ASYNC / CMD_SYNC / CMD_WANT_SKB are not changed by the API
functions.

Kill the unused flags CMD_SIZE_NORMAL / CMD_NO_SKB on the way.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoiwlagn: remove code duplication
Emmanuel Grumbach [Fri, 8 Jul 2011 15:46:13 +0000 (08:46 -0700)]
iwlagn: remove code duplication

Code duplication was needed during the move, not needed any more.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoiwlagn: add an API for TX stop
Emmanuel Grumbach [Fri, 8 Jul 2011 15:46:12 +0000 (08:46 -0700)]
iwlagn: add an API for TX stop

Tx stop moves to transport layer.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoiwlagn: add an API for RX stop
Emmanuel Grumbach [Fri, 8 Jul 2011 15:46:11 +0000 (08:46 -0700)]
iwlagn: add an API for RX stop

Rx stop moves to transport layer.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoiwlagn: add an API to free the TX context
Emmanuel Grumbach [Fri, 8 Jul 2011 15:46:10 +0000 (08:46 -0700)]
iwlagn: add an API to free the TX context

Tx free functions move to the transport layer. Unify the functions that deal with tx queues and cmd queue.

Since the CMD queue is not fully allocated, but uses the q->n_bd / q->window trick, the release flow of TX queue and CMD queue was different.
iwlagn_txq_free_tfd receives now the index of the TFD to be freed, which allows to unify the release flow for all the queues.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoiwlagn: remove the CMD_MAPPED flag
Emmanuel Grumbach [Fri, 8 Jul 2011 15:46:09 +0000 (08:46 -0700)]
iwlagn: remove the CMD_MAPPED flag

It is uneeded since Johannes removed the HUGE flag. The DMA mapping is always held in the same index as the command.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoMerge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/padovan/bluetoot...
John W. Linville [Mon, 11 Jul 2011 18:58:22 +0000 (14:58 -0400)]
Merge branch 'master' of /linux/kernel/git/padovan/bluetooth-next-2.6

Conflicts:
net/bluetooth/l2cap_core.c

12 years agoMerge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wirel...
John W. Linville [Mon, 11 Jul 2011 18:46:59 +0000 (14:46 -0400)]
Merge branch 'master' of git://git./linux/kernel/git/linville/wireless-2.6

Conflicts:
drivers/net/wireless/ath/ath5k/sysfs.c
net/bluetooth/l2cap_core.c
net/mac80211/wpa.c

12 years agocifs: drop spinlock before calling cifs_put_tlink
Jeff Layton [Mon, 11 Jul 2011 14:16:34 +0000 (10:16 -0400)]
cifs: drop spinlock before calling cifs_put_tlink

...as that function can sleep.

Signed-off-by: Jeff Layton <jlayton@redhat.com>
Signed-off-by: Steve French <sfrench@us.ibm.com>
12 years agohp-wmi: fix use after free
Eric Dumazet [Mon, 11 Jul 2011 10:22:21 +0000 (12:22 +0200)]
hp-wmi: fix use after free

[  191.310008] WARNING: kmemcheck: Caught 32-bit read from freed memory (f0d25f14)
[  191.310011] c056d2f088000000105fd2f00000000050415353040000000000000000000000
[  191.310020]  i i i i f f f f f f f f f f f f f f f f f f f f f f f f f f f f
[  191.310027]                                          ^
[  191.310029]
[  191.310032] Pid: 737, comm: modprobe Not tainted 3.0.0-rc5+ #268 Hewlett-Packard HP Compaq 6005 Pro SFF PC/3047h
[  191.310036] EIP: 0060:[<f80b3104>] EFLAGS: 00010286 CPU: 0
[  191.310039] EIP is at hp_wmi_perform_query+0x104/0x150 [hp_wmi]
[  191.310041] EAX: f0d25601 EBX: f0d25f00 ECX: 000121cf EDX: 000121ce
[  191.310043] ESI: f0d25f10 EDI: f0f97ea8 EBP: f0f97ec4 ESP: c173f34c
[  191.310045]  DS: 007b ES: 007b FS: 00d8 GS: 0033 SS: 0068
[  191.310046] CR0: 8005003b CR2: f540c000 CR3: 30f30000 CR4: 000006d0
[  191.310048] DR0: 00000000 DR1: 00000000 DR2: 00000000 DR3: 00000000
[  191.310050] DR6: ffff4ff0 DR7: 00000400
[  191.310051]  [<f80b317b>] hp_wmi_dock_state+0x2b/0x40 [hp_wmi]
[  191.310054]  [<f80b6093>] hp_wmi_init+0x93/0x1a8 [hp_wmi]
[  191.310057]  [<c10011f0>] do_one_initcall+0x30/0x170
[  191.310061]  [<c107ab9f>] sys_init_module+0xef/0x1a60
[  191.310064]  [<c149f998>] sysenter_do_call+0x12/0x28
[  191.310067]  [<ffffffff>] 0xffffffff

Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: Matthew Garrett <mjg@redhat.com>
12 years agodell-laptop - using buffer without mutex_lock
Jose Alonso [Sun, 10 Jul 2011 18:46:51 +0000 (15:46 -0300)]
dell-laptop - using buffer without mutex_lock

Using buffer->output[1] without mutex_lock()

Signed-off-by: Jose Alonso <joalonsof@gmail.com>
Signed-off-by: Matthew Garrett <mjg@redhat.com>
12 years agoRevert: "dell-laptop: Toggle the unsupported hardware killswitch"
Keng-Yu Lin [Mon, 27 Jun 2011 10:19:03 +0000 (11:19 +0100)]
Revert: "dell-laptop: Toggle the unsupported hardware killswitch"

This reverts commit a3d77411e8b2ad661958c1fbee65beb476ec6d70,

as it causes a mess in the wireless rfkill status on some models.
It is probably a bad idea to toggle the rfkill for all dell models
without the respect to the claim that it is hardware-controlled.

Cc: stable@kernel.org
Signed-off-by: Keng-Yu Lin <kengyu@canonical.com>
Signed-off-by: Matthew Garrett <mjg@redhat.com>
12 years agoPM: Reintroduce dropped call to check_wakeup_irqs
Colin Cross [Mon, 11 Jul 2011 08:51:49 +0000 (10:51 +0200)]
PM: Reintroduce dropped call to check_wakeup_irqs

Patch 2e711c04dbbf7a7732a3f7073b1fc285d12b369d
(PM: Remove sysdev suspend, resume and shutdown operations)
deleted sysdev_suspend(), which was being relied on to call
check_wakeup_irqs() in suspend.  If check_wakeup_irqs() is not
called, wake interrupts that are pending when suspend is
entered may be lost.  It also breaks IRQCHIP_MASK_ON_SUSPEND,
which is handled in check_wakeup_irqs().

This patch adds a call to check_wakeup_irqs() in syscore_suspend(),
similar to what was deleted in sysdev_suspend().

Signed-off-by: Colin Cross <ccross@android.com>
Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
12 years agoipv4: Use universal hash for ARP.
David S. Miller [Mon, 11 Jul 2011 08:37:28 +0000 (01:37 -0700)]
ipv4: Use universal hash for ARP.

We need to make sure the multiplier is odd.

Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agoneigh: Store hash shift instead of mask.
David S. Miller [Mon, 11 Jul 2011 08:28:12 +0000 (01:28 -0700)]
neigh: Store hash shift instead of mask.

And mask the hash function result by simply shifting
down the "->hash_shift" most significant bits.

Currently which bits we use is arbitrary since jhash
produces entropy evenly across the whole hash function
result.

But soon we'll be using universal hashing functions,
and in those cases more entropy exists in the higher
bits than the lower bits, because they use multiplies.

Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agopcmcia: pxa2xx/vpac270: free gpios on exist rather than requesting
Jonathan Cameron [Mon, 6 Jun 2011 14:24:13 +0000 (15:24 +0100)]
pcmcia: pxa2xx/vpac270: free gpios on exist rather than requesting

Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Acked-by: Marek Vasut <marek.vasut@gmail.com>
Signed-off-by: Eric Miao <eric.y.miao@gmail.com>
12 years agoARM: pxa/raumfeld: fix device name for codec ak4104
Daniel Mack [Wed, 25 May 2011 11:37:33 +0000 (13:37 +0200)]
ARM: pxa/raumfeld: fix device name for codec ak4104

In commit f0fba2ad (ASoC: multi-component - ASoC Multi-Component
Support), the name of the ak4104 codec driver was changed without
amending the platform code which uses it as well.

Signed-off-by: Daniel Mack <zonque@gmail.com>
Signed-off-by: Eric Miao <eric.y.miao@gmail.com>
12 years agoARM: pxa/raumfeld: display initialisation fixes
Sven Neumann [Wed, 25 May 2011 11:37:32 +0000 (13:37 +0200)]
ARM: pxa/raumfeld: display initialisation fixes

The display requires some milliseconds between GPIO_TFT_VA_EN
and GPIO_DISPLAY_ENABLE. Reorder initialisation to comply with
the display spec.

Also tune timings for better compliance with the spec.

Signed-off-by: Sven Neumann <s.neumann@raumfeld.com>
Acked-by: Daniel Mack <zonque@gmail.com>
Signed-off-by: Eric Miao <eric.y.miao@gmail.com>
12 years agoARM: pxa/raumfeld: adapt to upcoming hardware change
Sven Neumann [Wed, 25 May 2011 11:37:31 +0000 (13:37 +0200)]
ARM: pxa/raumfeld: adapt to upcoming hardware change

The backlight control is going to change back to PWM in the
upcoming Raumfeld Controller hardware revision.

Signed-off-by: Sven Neumann <s.neumann@raumfeld.com>
Acked-by: Daniel Mack <zonque@gmail.com>
Signed-off-by: Eric Miao <eric.y.miao@gmail.com>
12 years agoARM: pxa: fix gpio_to_chip() clash with gpiolib namespace
Linus Walleij [Mon, 13 Jun 2011 08:42:19 +0000 (10:42 +0200)]
ARM: pxa: fix gpio_to_chip() clash with gpiolib namespace

The PXA platform code has a static inline helper called
gpio_to_chip which clashes with the gpiolib namespace if we
try to expose the function with the same name from gpiolib,
and it's still confusing even if we don't do that. So rename
it to gpio_to_pxachip().

Reported-by: H Hartley Sweeten <hartleys@visionengravers.com>
Cc: Eric Miao <eric.miao@linaro.org>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Eric Miao <eric.y.miao@gmail.com>
12 years agoBluetooth: Fixes l2cap "command reject" reply according to spec
Ilia Kolomisnky [Sun, 10 Jul 2011 05:47:44 +0000 (08:47 +0300)]
Bluetooth: Fixes l2cap "command reject" reply according to spec

There can 3 reasons for the "command reject" reply produced
by the stack. Each such reply should be accompanied by the
relevand data ( as defined in spec. ). Currently there is one
instance of "command reject" reply with reason "invalid cid"
wich is fixed. Also, added clean-up definitions related to the
"command reject" replies.

Signed-off-by: Ilia Kolomisnky <iliak@ti.com>
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
12 years ago[CPUFREQ] fix cpumask memory leak in acpi-cpufreq on cpu hotplug.
Luming Yu [Fri, 8 Jul 2011 20:37:44 +0000 (16:37 -0400)]
[CPUFREQ] fix cpumask memory leak in acpi-cpufreq on cpu hotplug.

I came across a memory leak during a cyclic cpu-online-offline test.

Signed-off-by: Yu Luming <luming.yu@intel.com>
Cc: Len Brown <lenb@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Dave Jones <davej@redhat.com>
12 years agoMerge branch 'hwmon-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/groec...
Linus Torvalds [Sun, 10 Jul 2011 17:24:47 +0000 (10:24 -0700)]
Merge branch 'hwmon-for-linus' of git://git./linux/kernel/git/groeck/staging

* 'hwmon-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/staging:
  hwmon: (pmbus) Improve auto-detection of temperature status register
  hwmon: (lm95241) Fix negative temperature results
  hwmon: (lm95241) Fix chip detection code

12 years agohwmon: (pmbus) Improve auto-detection of temperature status register
Guenter Roeck [Sun, 3 Jul 2011 20:08:03 +0000 (13:08 -0700)]
hwmon: (pmbus) Improve auto-detection of temperature status register

It is possible that a PMBus device supports the READ_TEMPERATURE2 and/or
READ_TEMPERATURE3 registers but does not support READ_TEMPERATURE1.
Improve temperature status register detection to address this condition.

Reported-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com>
Acked-by: Jean Delvare <khali@linux-fr.org>
Cc: stable@kernel.org # 2.6.39+
12 years agohwmon: (lm95241) Fix negative temperature results
Guenter Roeck [Thu, 30 Jun 2011 09:09:37 +0000 (02:09 -0700)]
hwmon: (lm95241) Fix negative temperature results

Negative temperatures were returned in degrees C instead of milli-Degrees C.
Also, negative temperatures were reported for remote temperature sensors even
if the chip was configured for positive-only results.

Fix by detecting temperature modes, and by treating negative temperatures
similar to positive temperatures, with appropriate sign extension.

Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com>
Acked-by: Jean Delvare <khali@linux-fr.org>
Cc: stable@kernel.org # 2.6.30+
12 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6
Linus Torvalds [Sun, 10 Jul 2011 14:29:22 +0000 (07:29 -0700)]
Merge branch 'for-linus' of git://git./linux/kernel/git/tiwai/sound-2.6

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6:
  ALSA: hda - Fix a copmile warning
  ASoC: ak4642: fixup snd_soc_update_bits mask for PW_MGMT2
  ALSA: hda - Change all ADCs for dual-adc switching mode for Realtek
  ASoC: Manage WM8731 ACTIVE bit as a supply widget
  ASoC: Don't set invalid name string to snd_card->driver field
  ASoC: Ensure we delay long enough for WM8994 FLL to lock when starting
  ASoC: Tegra: I2S: Ensure clock is enabled when writing regs
  ASoC: Fix Blackfin I2S _pointer() implementation return in bounds values
  ASoC: tlv320aic3x: Do soft reset to codec when going to bias off state
  ASoC: tlv320aic3x: Don't sync first two registers from register cache
  audio: tlv320aic26: fix PLL register configuration

12 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jbarnes...
Linus Torvalds [Sun, 10 Jul 2011 14:28:51 +0000 (07:28 -0700)]
Merge branch 'for-linus' of git://git./linux/kernel/git/jbarnes/pci-2.6

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jbarnes/pci-2.6:
  PCI: conditional resource-reallocation through kernel parameter pci=realloc

12 years agoMerge branch 'fixes' of master.kernel.org:/home/rmk/linux-2.6-arm
Linus Torvalds [Sun, 10 Jul 2011 14:28:30 +0000 (07:28 -0700)]
Merge branch 'fixes' of /home/rmk/linux-2.6-arm

* 'fixes' of master.kernel.org:/home/rmk/linux-2.6-arm:
  ARM: 6994/1: smp_twd: Fix typo in 'twd_timer_rate' printing
  ARM: 6987/1: l2x0: fix disabling function to avoid deadlock
  ARM: 6966/1: ep93xx: fix inverted RTS/DTR signals on uart1
  ARM: 6980/1: mmci: use StartBitErr to detect bad connections
  ARM: 6979/1: mach-vt8500: add forgotten irq_data conversion
  ARM: move memory layout sanity checking before meminfo initialization
  ARM: 6990/1: MAINTAINERS: add entry for ARM PMU profiling and debugging
  ARM: 6989/1: perf: do not start the PMU when no events are present
  ARM: dmabounce: fix map_single() error return value

12 years agoMerge branch 'drm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/airlied...
Linus Torvalds [Sun, 10 Jul 2011 14:27:45 +0000 (07:27 -0700)]
Merge branch 'drm-fixes' of git://git./linux/kernel/git/airlied/drm-2.6

* 'drm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/airlied/drm-2.6:
  drm/radeon/kms: clean up multiple crtc handling for evergreen+ (v2)