ac100:marvin24s-kernel.git
4 years agoblock: fix buffer overflow when printing partition UUIDs l4t-r16-r2-ac100
Tejun Heo [Tue, 15 May 2012 06:22:04 +0000 (08:22 +0200)]
block: fix buffer overflow when printing partition UUIDs

6d1d8050b4bc8 "block, partition: add partition_meta_info to hd_struct"
added part_unpack_uuid() which assumes that the passed in buffer has
enough space for sprintfing "%pU" - 37 characters including '\0'.

Unfortunately, b5af921ec0233 "init: add support for root devices
specified by partition UUID" supplied 33 bytes buffer to the function
leading to the following panic with stackprotector enabled.

  Kernel panic - not syncing: stack-protector: Kernel stack corrupted in: ffffffff81b14c7e

  [<ffffffff815e226b>] panic+0xba/0x1c6
  [<ffffffff81b14c7e>] ? printk_all_partitions+0x259/0x26xb
  [<ffffffff810566bb>] __stack_chk_fail+0x1b/0x20
  [<ffffffff81b15c7e>] printk_all_paritions+0x259/0x26xb
  [<ffffffff81aedfe0>] mount_block_root+0x1bc/0x27f
  [<ffffffff81aee0fa>] mount_root+0x57/0x5b
  [<ffffffff81aee23b>] prepare_namespace+0x13d/0x176
  [<ffffffff8107eec0>] ? release_tgcred.isra.4+0x330/0x30
  [<ffffffff81aedd60>] kernel_init+0x155/0x15a
  [<ffffffff81087b97>] ? schedule_tail+0x27/0xb0
  [<ffffffff815f4d24>] kernel_thread_helper+0x5/0x10
  [<ffffffff81aedc0b>] ? start_kernel+0x3c5/0x3c5
  [<ffffffff815f4d20>] ? gs_change+0x13/0x13

Increase the buffer size, remove the dangerous part_unpack_uuid() and
use snprintf() directly from printk_all_partitions().

Signed-off-by: Tejun Heo <tj@kernel.org>
Reported-by: Szymon Gruszczynski <sz.gruszczynski@googlemail.com>
Cc: Will Drewry <wad@chromium.org>
Cc: stable@vger.kernel.org
Signed-off-by: Jens Axboe <axboe@kernel.dk>
4 years agort2800usb: slow down TX status polling
Stanislaw Gruszka [Thu, 17 Oct 2013 10:04:31 +0000 (12:04 +0200)]
rt2800usb: slow down TX status polling

Polling TX statuses too frequently has two negative effects. First is
randomly peek CPU usage, causing overall system functioning delays.
Second bad effect is that device is not able to fill TX statuses in
H/W register on some workloads and we get lot of timeouts like below:

ieee80211 phy4: rt2800usb_entry_txstatus_timeout: Warning - TX status timeout for entry 7 in queue 2
ieee80211 phy4: rt2800usb_entry_txstatus_timeout: Warning - TX status timeout for entry 7 in queue 2
ieee80211 phy4: rt2800usb_txdone: Warning - Got TX status for an empty queue 2, dropping

This not only cause flood of messages in dmesg, but also bad throughput,
since rate scaling algorithm can not work optimally.

In the future, we should probably make polling interval be adjusted
automatically, but for now just increase values, this make mentioned
problems gone.

Resolve:
https://bugzilla.kernel.org/show_bug.cgi?id=62781

Cc: stable@vger.kernel.org
Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
4 years agort2x00: read 5GHz TX power values from the correct offset
Gabor Juhos [Sat, 22 Jun 2013 11:13:25 +0000 (13:13 +0200)]
rt2x00: read 5GHz TX power values from the correct offset

commit 0a6f3a8ebaf13407523c2c7d575b4ca2debd23ba upstream.

The current code uses the same index value both
for the channel information array and for the TX
power table. The index starts from 14, however the
index of the TX power table must start from zero.

Fix it, in order to get the correct TX power value
for a given channel.

The changes in rt61pci.c and rt73usb.c are compile
tested only.

Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
Acked-by: Stanislaw Gruszka <stf_xl@wp.pl>
Acked-by: Gertjan van Wingerde <gwingerde@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
4 years agort2x00: fix stop queue
Stanislaw Gruszka [Sun, 28 Jul 2013 11:17:22 +0000 (13:17 +0200)]
rt2x00: fix stop queue

commit e2288b66fe7ff0288382b2af671b4da558b44472 upstream.

Since we clear QUEUE_STARTED in rt2x00queue_stop_queue(), following
call to rt2x00queue_pause_queue() reduce to noop, i.e we do not
stop queue in mac80211.

To fix that introduce rt2x00queue_pause_queue_nocheck() function,
which will stop queue in mac80211 directly.

Note that rt2x00_start_queue() explicitly set QUEUE_PAUSED bit.

Note also that reordering operations i.e. first call to
rt2x00queue_pause_queue() and then clear QUEUE_STARTED bit, will race
with rt2x00queue_unpause_queue(), so calling ieee80211_stop_queue()
directly is the only available solution to fix the problem without
major rework.

Signed-off-by: Stanislaw Gruszka <stf_xl@wp.pl>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
4 years agort2x00: error in configurations with mesh support disabled
Felix Fietkau [Tue, 26 Feb 2013 15:09:55 +0000 (16:09 +0100)]
rt2x00: error in configurations with  mesh support disabled

commit 6ef9e2f6d12ce9e2120916804d2ddd46b954a70b upstream.

If CONFIG_MAC80211_MESH is not set, cfg80211 will now allow advertising
interface combinations with NL80211_IFTYPE_MESH_POINT present.
Add appropriate ifdefs to avoid running into errors.

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Acked-by: Gertjan van Wingerde <gwingerde@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
[lxiang: Backported for 3.4-stable. Removed code of simultaneous AP and mesh
 mode added in 4a5fc6d 3.9-rc1.]
Signed-off-by: Lingzhu Xiang <lxiang@redhat.com>
Reviewed-by: CAI Qian <caiqian@redhat.com>
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
4 years agoRevert "rt2x00: Don't let mac80211 send a BAR when an AMPDU subframe fails"
Marc Dietrich [Sun, 27 Oct 2013 13:24:27 +0000 (14:24 +0100)]
Revert "rt2x00: Don't let mac80211 send a BAR when an AMPDU subframe fails"

commit ab9d6e4ffe192427ce9e93d4f927b0faaa8a941e upstream.

This reverts commit 8c00581b4c3e0ed6d40e5f070496f01d8a3038c7.

4 years agort2800: validate step value for temperature compensation
Stanislaw Gruszka [Thu, 25 Oct 2012 07:51:39 +0000 (09:51 +0200)]
rt2800: validate step value for temperature compensation

commit bf7e1abe434ba9e22e8dc04a4cba4ab504b788b8 upstream.

Some hardware has correct (!= 0xff) value of tssi_bounds[4] in the
EEPROM, but step is equal to 0xff. This results on ridiculous delta
calculations and completely broke TX power settings.

Reported-and-tested-by: Pavel Lucik <pavel.lucik@gmail.com>
Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Acked-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
4 years agort2800usb: Added rx packet length validity check
Sergei Poselenov [Sun, 2 Sep 2012 09:14:32 +0000 (13:14 +0400)]
rt2800usb: Added rx packet length validity check

commit efd5d6b03bd9c9e0df646c56fb5f4f3e25e5c1ac upstream.

On our system (ARM Cortex-M3 SOC running linux-2.6.33)
frequent crashes were observed in the rt2800usb module
because of the invalid length of the received packet (3392,
46920...). This patch adds the sanity check on the packet
legth. Also, changed WARNING to ERROR in rt2x00lib_rxdone()
so that the bad packet condition would be noticed.

The fix was tested on the latest compat-wireless-3.5.1-1-snpc.

Signed-off-by: Sergei Poselenov <sposelenov@emcraft.com>
Acked-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
4 years agort2x00: Fix rfkill polling prior to interface start.
Gertjan van Wingerde [Fri, 31 Aug 2012 17:22:11 +0000 (19:22 +0200)]
rt2x00: Fix rfkill polling prior to interface start.

commit a396e10019eaf3809b0219c966865aaafec12630 upstream.

We need to program the rfkill switch GPIO pin direction to input at
device initialization time, not only when the interface is brought up.
Doing this only when the interface is brought up could lead to rfkill
detecting the switch is turned on erroneously and inability to create
the interface and bringing it up.

Reported-and-tested-by: Andreas Messer <andi@bastelmap.de>
Signed-off-by: Gertjan van Wingerde <gwingerde@gmail.com>
Acked-by: Ivo Van Doorn <ivdoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Conflicts:

drivers/net/wireless/rt2x00/rt2500usb.h

4 years agort2x00usb: fix indexes ordering on RX queue kick
Stanislaw Gruszka [Wed, 4 Jul 2012 11:10:02 +0000 (13:10 +0200)]
rt2x00usb: fix indexes ordering on RX queue kick

commit efd821182cec8c92babef6e00a95066d3252fda4 upstream.

On rt2x00_dmastart() we increase index specified by Q_INDEX and on
rt2x00_dmadone() we increase index specified by Q_INDEX_DONE. So entries
between Q_INDEX_DONE and Q_INDEX are those we currently process in the
hardware. Entries between Q_INDEX and Q_INDEX_DONE are those we can
submit to the hardware.

According to that fix rt2x00usb_kick_queue(), as we need to submit RX
entries that are not processed by the hardware. It worked before only
for empty queue, otherwise was broken.

Note that for TX queues indexes ordering are ok. We need to kick entries
that have filled skb, but was not submitted to the hardware, i.e.
started from Q_INDEX_DONE and have ENTRY_DATA_PENDING bit set.

From practical standpoint this fixes RX queue stall, usually reproducible
in AP mode, like for example reported here:
https://bugzilla.redhat.com/show_bug.cgi?id=828824

Reported-and-tested-by: Franco Miceli <fmiceli@plan.ceibal.edu.uy>
Reported-and-tested-by: Tom Horsley <horsley1953@gmail.com>
Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
5 years agoARM: tegra: paz00: copy uart init from cardhu
Marc Dietrich [Sun, 16 Jun 2013 17:30:45 +0000 (19:30 +0200)]
ARM: tegra: paz00: copy uart init from cardhu

May help in debugging suspend/resume problems. Zombah reported on IRC
that with this, he can see some usefull debugging output.

Signed-off-by: Marc Dietrich <marvin24@gmx.de>
5 years agoRevert "usb: gadget: fix otg hang with uboot"
Marc Dietrich [Mon, 27 May 2013 12:38:15 +0000 (14:38 +0200)]
Revert "usb: gadget: fix otg hang with uboot"

This reverts commit 32d41ead232679f4f971f12e8c18f53e6e949e2b.

zombah reported on IRC that this change causes random hangs. Revert until
the right fix is known

Signed-off-by: Marc Dietrich <marvin24@gmx.de>
5 years agoARM: tegra: paz00: update defconfig
Marc Dietrich [Sat, 20 Apr 2013 16:49:09 +0000 (18:49 +0200)]
ARM: tegra: paz00: update defconfig

- enable android gadget (needs oss-pcm compiled-in)

Signed-off-by: Marc Dietrich <marvin24@gmx.de>
5 years agoARM: tegra: paz00: update defconfig
Marc Dietrich [Mon, 8 Apr 2013 16:07:05 +0000 (18:07 +0200)]
ARM: tegra: paz00: update defconfig

Disable default EMC clock scaling (memory clock)
This still causes problems with some Micron based machines.
To enable, use tegra2_emc.emc_enable=1 on the kernel command line
(should be save for Hynix).

Disable mmc defereed resume. This caused resume problems on my machine.

Signed-off-by: Marc Dietrich <marvin24@gmx.de>
5 years agofix build error with gcc-4.7
Marc Dietrich [Tue, 2 Apr 2013 20:53:36 +0000 (22:53 +0200)]
fix build error with gcc-4.7

remove -Werror because of harmless err-out

Signed-off: Marc Dietrich <marvin24@gmx.de>
Signed-off-by: Marc Dietrich <marvin24@gmx.de>
5 years agousb: gadget: fix otg hang with uboot
Marc Dietrich [Sat, 6 Apr 2013 15:59:11 +0000 (17:59 +0200)]
usb: gadget: fix otg hang with uboot

zombah reported on IRC that irq trigger on rising edge instead of
high level fixes booting with uboot and build-in otg driver.

Signed-off-by: Marc Dietrich <marvin24@gmx.de>
5 years agoARM: tegra: paz00: correct core_off_timer
Marc Dietrich [Wed, 13 Mar 2013 21:20:38 +0000 (22:20 +0100)]
ARM: tegra: paz00: correct core_off_timer

Original source code said this should be zero. With this, I had
three successfull suspend/resume cycles in row ...

Signed-off-by: Marc Dietrich <marvin24@gmx.de>
5 years agoARM: tegra: usb_phy: prevent illegal access to registers
Rakesh Bodla [Fri, 20 Jul 2012 06:07:09 +0000 (11:37 +0530)]
ARM: tegra: usb_phy: prevent illegal access to registers

Adding the conditions to prevent illegal register access.

Bug 993380

Change-Id: I8e275846612cbac70c1f50251d5f5d0700e845b0
Signed-off-by: Rakesh Bodla <rbodla@nvidia.com>
Reviewed-on: http://git-master/r/117289
(cherry picked from commit c1513eaf68090a268f8ec1b2b6c7e7381c16dfdd)
Reviewed-on: http://git-master/r/117996
Reviewed-by: Automatic_Commit_Validation_User
Tested-by: Preetham Chandru <pchandru@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Matthew Pedro <mapedro@nvidia.com>
5 years agoARM: tegra: paz00: fix bootloader fb handover
Marc Dietrich [Fri, 1 Mar 2013 17:43:53 +0000 (18:43 +0100)]
ARM: tegra: paz00: fix bootloader fb handover

Seems NV fixed this upstream, so remove the workaround.

Signed-off-by: Marc Dietrich <marvin24@gmx.de>
5 years agoARM: tegra: paz00: guess some 166 MHz clock timings for Micron
Marc Dietrich [Sun, 20 Jan 2013 15:12:43 +0000 (16:12 +0100)]
ARM: tegra: paz00: guess some 166 MHz clock timings for Micron

This was initially taken from Colibri and adjusted a bit to get
it booting. Needs a lot of testing!

Signed-off-by: Marc Dietrich <marvin24@gmx.de>
5 years agoARM: tegra: paz00: fix pll_c_out1 when booting with fastboot
Marc Dietrich [Sun, 20 Jan 2013 15:11:29 +0000 (16:11 +0100)]
ARM: tegra: paz00: fix pll_c_out1 when booting with fastboot

The last fix for u-boot clock setup broke booting with fastboot.
Urg. I should have just applied the original patch from stuw.
Noted by zombah on IRC.

Signed-off-by: Marc Dietrich <marvin24@gmx.de>
5 years agoARM: tegra: paz00: fix boot with uboot
Marc Dietrich [Sat, 29 Dec 2012 19:53:37 +0000 (20:53 +0100)]
ARM: tegra: paz00: fix boot with uboot

Seems u-boot doesn't initialize all clocks the way fastboot did. This
caused hang on usb init. Setting pll_c_out1 to 240Mhz fixes this.

Found by Stuw <danindrey@mail.ru> on IRC.

Signed-off-by: Marc Dietrich <marvin24@gmx.de>
5 years agostaging: nvec: fix event reports
Marc Dietrich [Thu, 27 Dec 2012 16:33:48 +0000 (17:33 +0100)]
staging: nvec: fix event reports

arr, first I exchanged the nvec bit masks for power and lid switch,
and then I made the stupid && vs. & error. I wonder how this could
ever have worked.

Signed-off-by: Marc Dietrich <marvin24@gmx.de>
5 years agoARM: tegra: emc: use straps for none lpddr2 machines
Marc Dietrich [Fri, 14 Dec 2012 22:35:38 +0000 (23:35 +0100)]
ARM: tegra: emc: use straps for none lpddr2 machines

3.1 kernel used a ram detection method which only works on lpddr
ram chips, while we have ordinary ddr2 ram. So fallback to legacy
strap probe.

NOTE: Micron RAM has only one frequency for now, to emc scaling doesn't
make much sense.

Hynix machines have two, but may crash!!! If this happens to you, please
report!!!

Signed-off-by: Marc Dietrich <marvin24@gmx.de>
5 years agoCHROMIUM: video: tegra: Calculate HDMI audio CTS/N values
Stephen Warren [Mon, 25 Jul 2011 20:05:44 +0000 (14:05 -0600)]
CHROMIUM: video: tegra: Calculate HDMI audio CTS/N values

The current table-drive approach for determining the CTS and N values
required for HDMI audio limits audio availability to a small set of pixel
clock frequencies. Allow audio in other cases by calculating the CTS and N
value dynamically where the tables don't contain pre-calculated values.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
BUG=chrome-os-partner:4249
TEST=Boot ChromeOS
  Plug in HDMI monitor
  Boot ChromeOS
  Log in to ChromeOS UI
  Log in over serial console as user chronos
  export DISPLAY=:0
  export XAUTHORITY=/home/chronos/.Xauthority
  # Without the following, one/both of them reset the display back to
  # 1080p after each xrandr command of yours
  sudo stop powerd
  sudo stop powerm
  # Just to keep things simple
  xrandr --output LVDS-1 --off
  # Use a long 44.1KHz audio file here
  aplay -D hw:0,1 /foo.wav &
  # Alternatively, use speaker-test:
  speaker-test -D hw:0,1 -c 2 -r 44100 -t sine &
  # List supported modes, hopefully the list includes entries that weren't
  # supported before Robert's changes to support abitrary HDMI modes
  xrandr -q
  # For each mode $mode:
    xrandr --output HDMI-1 --mode $mode --refresh $refresh
    # Observe audio still playing

Change-Id: I30d3f63278a85673a722c17b437fba33d956f7e7
Reviewed-on: http://gerrit.chromium.org/gerrit/5265
Tested-by: Stephen Warren <swarren@nvidia.com>
Reviewed-by: Robert Morell <rmorell@nvidia.com>
Reviewed-by: Doug Anderson <dianders@chromium.org>
Conflicts:

drivers/video/tegra/dc/hdmi.c

5 years agoCHROMIUM: video: tegra: Modify tegra_dc_hdmi_setup_audio prototype
Stephen Warren [Mon, 25 Jul 2011 16:24:29 +0000 (10:24 -0600)]
CHROMIUM: video: tegra: Modify tegra_dc_hdmi_setup_audio prototype

A future change will modify tegra_dc_hdmi_setup_audio() to dynamically
calculate CTS and N values. This will be simpler if the function simply
returns those individual values directly through "out parameters" rather
than having to return a pointer to a structure containing those values.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
BUG=chrome-os-partner:4249
TEST=Compile the kernel for Tegra

Change-Id: If9eba4cf1edbd82e32a3b0a5351c3ac87c40ae14
Reviewed-on: http://gerrit.chromium.org/gerrit/5264
Reviewed-by: Robert Morell <rmorell@nvidia.com>
Tested-by: Stephen Warren <swarren@nvidia.com>
Reviewed-by: Taylor Hutt <thutt@chromium.org>
Conflicts:

drivers/video/tegra/dc/hdmi.c

5 years agobackport: CHROMIUM: video: tegra: Determine best PLL, divider for HDMI
Marc Dietrich [Sat, 8 Dec 2012 19:12:03 +0000 (20:12 +0100)]
backport: CHROMIUM: video: tegra: Determine best PLL, divider for HDMI

Original commit message:
------
This code iterates through the available values for the PLL driving
display over HDMI and determines the best rate and divider, if any, for
the desired mode.

Signed-off-by: Robert Morell <rmorell@nvidia.com>
-------

adapted to our kernel and ...

Signed-off-by: Marc Dietrich <marvin24@gmx.de>
5 years agoARM: tegra: paz00: Add spdif_out to clock init
zombah [Mon, 24 Sep 2012 21:41:32 +0000 (01:41 +0400)]
ARM: tegra: paz00: Add spdif_out to clock init

clk_disable need it

Signed-off-by: zombah <zombah@gmail.com>
5 years agoASoC: tegra: alc5632: Enable HDMI/SPDIF output
zombah [Mon, 24 Sep 2012 21:22:00 +0000 (01:22 +0400)]
ASoC: tegra: alc5632: Enable HDMI/SPDIF output

Signed-off-by: zombah <zombah@gmail.com>
5 years agoARM: tegra: paz00: add memory clock scaler
Marc Dietrich [Sun, 18 Sep 2011 16:55:31 +0000 (18:55 +0200)]
ARM: tegra: paz00: add memory clock scaler

This adds the (non-working) memory clock scaler. It just prints out
the memory type for now. Still waiting for proper DRAM timings...

5 years agoARM: tegra: paz00: add temperature sensor
Marc Dietrich [Wed, 14 Nov 2012 18:54:18 +0000 (19:54 +0100)]
ARM: tegra: paz00: add temperature sensor

Somehow I've forgotten to port this from 3.0 kernels ...

Signed-off-by: Marc Dietrich <marvin24@gmx.de>
5 years agoARM: tegra: paz00: use 60Hz panel timings
Marc Dietrich [Wed, 14 Nov 2012 18:09:20 +0000 (19:09 +0100)]
ARM: tegra: paz00: use 60Hz panel timings

Timimg comes from LTN101NT05-U4.pdf found on "all-seeing Trash Heap".
(note: we have -U3 rev, but seems not to matter).

Signed-off-by: Marc Dietrich <marvin24@gmx.de>
5 years agoARM: tegra: paz00: get rid of tegra_gpio_enable/disable
Marc Dietrich [Wed, 14 Nov 2012 18:04:10 +0000 (19:04 +0100)]
ARM: tegra: paz00: get rid of tegra_gpio_enable/disable

Similar to other board...

Signed-off-by: Marc Dietrich <marvin24@gmx.de>
5 years agoRevert "hrtimer: Fix extra wakeups from __remove_hrtimer()"
Marc Dietrich [Wed, 14 Nov 2012 18:01:29 +0000 (19:01 +0100)]
Revert "hrtimer: Fix extra wakeups from __remove_hrtimer()"

This reverts commit eb5f9ebf61f88796a19df09751762b9e086a5214.

Possible fixed random CPU stalls.

Signed-off-by: Marc Dietrich <marvin24@gmx.de>
5 years agoARM: tegra: paz00: fix wake gpio key
Marc Dietrich [Fri, 19 Oct 2012 15:16:14 +0000 (17:16 +0200)]
ARM: tegra: paz00: fix wake gpio key

This is obviously wrong, but hey, does it change something?

Signed-off-by: Marc Dietrich <marvin24@gmx.de>
5 years agoASoC: tegra: alc5632: make missing speaker gpio non-fatal
Marc Dietrich [Sat, 13 Oct 2012 17:17:14 +0000 (19:17 +0200)]
ASoC: tegra: alc5632: make missing speaker gpio non-fatal

This is just for cases you don't want paz00 board support.

Signed-off-by: Marc Dietrich <marvin24@gmx.de>
5 years agoARM: tegra: paz00: register nvec early
Marc Dietrich [Sat, 13 Oct 2012 17:14:56 +0000 (19:14 +0200)]
ARM: tegra: paz00: register nvec early

By doing this, nvec suspend will get called late, so everything
should be down except ec.

Signed-off-by: Marc Dietrich <marvin24@gmx.de>
5 years agostaging: nvec: make event driver configurable
Marc Dietrich [Sat, 13 Oct 2012 15:09:02 +0000 (17:09 +0200)]
staging: nvec: make event driver configurable

This adds platform data to the events driver. This way, board files
(and later device tree) can configure which events to program and
react on.

Signed-off-by: Marc Dietrich <marvin24@gmx.de>
5 years agoARM: tegra: paz00: update defconfig
Marc Dietrich [Fri, 12 Oct 2012 16:37:58 +0000 (18:37 +0200)]
ARM: tegra: paz00: update defconfig

enable:
- compile in usb storage (we have no modules in initrd due to
size restrictions
- s/CONFIG_NVEC_LEDS/CONFIG_NVEC_PAZ00/

Signed-off-by: Marc Dietrich <marvin24@gmx.de>
5 years agoASoC: tegra: paz00: use dsp_a format on mono playback
Marc Dietrich [Wed, 10 Oct 2012 17:31:38 +0000 (19:31 +0200)]
ASoC: tegra: paz00: use dsp_a format on mono playback

This fixes the error messages meant to fixed in the previous reverted
commit.

Signed-off-by: Marc Dietrich <marvin24@gmx.de>
5 years agoRevert "ASoC: tegra: only stereo is supported"
Marc Dietrich [Wed, 10 Oct 2012 16:43:07 +0000 (18:43 +0200)]
Revert "ASoC: tegra: only stereo is supported"

This reverts commit 4c646377834bb5c39d76f28c8407cd86fef3b71d.

5 years agoASoC: tegra+alc5632: add speaker enable gpio
Marc Dietrich [Mon, 28 May 2012 15:17:32 +0000 (17:17 +0200)]
ASoC: tegra+alc5632: add speaker enable gpio

This patch adds the possibility to toggle a speaker amplifier on playback
which is controlled by a gpio.

Signed-off-by: Marc Dietrich <marvin24@gmx.de>
5 years agostaging: nvec: remove mute function from events driver
Marc Dietrich [Sun, 7 Oct 2012 16:23:03 +0000 (18:23 +0200)]
staging: nvec: remove mute function from events driver

This will get done by the sound board driver in the next commit.

Signed-off-by: Marc Dietrich <marvin24@gmx.de>
5 years agostaging: nvec: add gpio driver to oem driver
Marc Dietrich [Sun, 7 Oct 2012 16:20:40 +0000 (18:20 +0200)]
staging: nvec: add gpio driver to oem driver

This will enable control of the amp mute gpio connected to the ec.

Signed-off-by: Marc Dietrich <marvin24@gmx.de>
5 years agostaging: nvec: don't reset the mouse on init
Marc Dietrich [Sun, 24 Jun 2012 19:56:58 +0000 (21:56 +0200)]
staging: nvec: don't reset the mouse on init

Let the subsystem decide when to reset the mouse. This may avoid
timeouts during init.

Signed-off-by: Marc Dietrich <marvin24@gmx.de>
5 years agostaging: nvec: move led init out of probe to its own function
Marc Dietrich [Sun, 7 Oct 2012 15:43:41 +0000 (17:43 +0200)]
staging: nvec: move led init out of probe to its own function

Moves the led init to its own function. This is in preparation to
the following speaker mute inclusion via a gpio driver.

Signed-off-by: Marc Dietrich <marvin24@gmx.de>
5 years agostaging: nvec: add remove function to nvec childs
Marc Dietrich [Sun, 24 Jun 2012 21:25:21 +0000 (23:25 +0200)]
staging: nvec: add remove function to nvec childs

This patch cleanups registered devices on remove.

Signed-off-by: Marc Dietrich <marvin24@gmx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: nvec: cleanup powermanagement callbacks
Marc Dietrich [Sun, 24 Jun 2012 21:25:19 +0000 (23:25 +0200)]
staging: nvec: cleanup powermanagement callbacks

Simplify powermanagement initialization by using pm_ops macro.

Signed-off-by: Marc Dietrich <marvin24@gmx.de>
5 years agostaging: nvec: cleanup driver registration
Marc Dietrich [Sun, 24 Jun 2012 21:25:18 +0000 (23:25 +0200)]
staging: nvec: cleanup driver registration

This patch simplifies code by using the module_platform_driver
macro.

Signed-off-by: Marc Dietrich <marvin24@gmx.de>
5 years agostaging: nvec: convert to devm_ functions
Marc Dietrich [Sun, 24 Jun 2012 21:25:16 +0000 (23:25 +0200)]
staging: nvec: convert to devm_ functions

This patch cleanups the nvec and its childs by replacing calls to
resource allocations by their devm_* equivalents.

Signed-off-by: Marc Dietrich <marvin24@gmx.de>
5 years agostaging: nvec: use dev_warn instead of printk
Marc Dietrich [Sun, 24 Jun 2012 21:25:17 +0000 (23:25 +0200)]
staging: nvec: use dev_warn instead of printk

Replace a printk in nvec core driver with dev_warn.

Signed-off-by: Marc Dietrich <marvin24@gmx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: nvec: rename led driver to board specific paz00 driver
Marc Dietrich [Sun, 7 Oct 2012 14:51:40 +0000 (16:51 +0200)]
staging: nvec: rename led driver to board specific paz00 driver

The led driver used OEM commands which are not part of the nvec protocol
definition. Therefore it is renamed to nvec_paz00 to reflect that it only
applies to PAZ00 board based devices.

Signed-off-by: Marc Dietrich <marvin24@gmx.de>
5 years agostaging: nvec: cleanup the string mess
Marc Dietrich [Thu, 28 Jun 2012 18:08:35 +0000 (20:08 +0200)]
staging: nvec: cleanup the string mess

Replace the various command strings by named constants.

Signed-off-by: Marc Dietrich <marvin24@gmx.de>
5 years agostaging: nvec: move toggle global event reporting to its own function
Marc Dietrich [Sat, 23 Jun 2012 18:47:34 +0000 (20:47 +0200)]
staging: nvec: move toggle global event reporting to its own function

Cleanup toggle of global event reporting by moving it to its own function.
This simplifies the following cleanup.

Signed-off-by: Marc Dietrich <marvin24@gmx.de>
5 years agofuse: register_filesystem() called too early
Al Viro [Tue, 13 Dec 2011 17:25:27 +0000 (12:25 -0500)]
fuse: register_filesystem() called too early

same story as with ubifs

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
5 years agofuse: llseek fix race
Miklos Szeredi [Tue, 13 Dec 2011 10:40:59 +0000 (11:40 +0100)]
fuse: llseek fix race

Fix race between lseek(fd, 0, SEEK_CUR) and read/write.  This was fixed in
generic code by commit 5b6f1eb97d (vfs: lseek(fd, 0, SEEK_CUR) race condition).

Signed-off-by: Miklos Szeredi <mszeredi@suse.cz>
5 years agoARM: tegra: paz00: update defconfig
Marc Dietrich [Mon, 24 Sep 2012 19:19:49 +0000 (21:19 +0200)]
ARM: tegra: paz00: update defconfig

This one
enables TEGRA__AVP_KERNEL_ON_MMU
disables CONFIG_TEGRA_NVAVP

as in tegra_defconfig and noted by fly-away on IRC.

This makes video playback with nvgstplayer working here.

Signed-off-by: Marc Dietrich <marvin24@gmx.de>
5 years agoARM: tegra: paz00: remove wakelocks from config again
Marc Dietrich [Fri, 21 Sep 2012 17:53:57 +0000 (19:53 +0200)]
ARM: tegra: paz00: remove wakelocks from config again

These didn't fix resume, but caused more harm instead.

Signed-off-by: Marc Dietrich <marvin24@gmx.de>
5 years agostaging: nvec: check for error on sync write
Marc Dietrich [Mon, 17 Sep 2012 16:42:51 +0000 (18:42 +0200)]
staging: nvec: check for error on sync write

This prevents oops if tx buffer is full. Well, we are lost anyway
here, but better than nothing.

Signed-off-by: Marc Dietrich <marvin24@gmx.de>
5 years agoARM: tegra: paz00: add sm0/1 slew rates to regulator
Marc Dietrich [Mon, 17 Sep 2012 16:38:58 +0000 (18:38 +0200)]
ARM: tegra: paz00: add sm0/1 slew rates to regulator

copied from ventana, no fallout issues yet.

Signed-off-by: Marc Dietrich <marvin24@gmx.de>
5 years agoARM: tegra: paz00: disable direct tps power off
Marc Dietrich [Sun, 16 Sep 2012 17:22:21 +0000 (19:22 +0200)]
ARM: tegra: paz00: disable direct tps power off

Doh! We don't power off with tps directly. Let nvec do this job.

Signed-off-by: Marc Dietrich <marvin24@gmx.de>
5 years agoARM: tegra: paz00: update defconfig
Marc Dietrich [Sun, 16 Sep 2012 14:32:13 +0000 (16:32 +0200)]
ARM: tegra: paz00: update defconfig

enable:
- frontswap
- wakelocks (for earlysuspend)
- cpuquite (shutdown single cpu cores?)

Signed-off-by: Marc Dietrich <marvin24@gmx.de>
5 years agopower: wakelocks: fix console early suspend
Marc Dietrich [Sun, 16 Sep 2012 14:28:34 +0000 (16:28 +0200)]
power: wakelocks: fix console early suspend

This miscompiles because the inteface was changed.

Signed-off-by: Marc Dietrich <marvin24@gmx.de>
5 years agostaging: nvec: add earlysuspend/lateresume to the ps2 driver
Marc Dietrich [Sun, 16 Sep 2012 14:26:28 +0000 (16:26 +0200)]
staging: nvec: add earlysuspend/lateresume to the ps2 driver

This moves mouse enable/disable to earlysuspend/lateresume calls.
It needs CONFIG_WAKELOCKS. This seems to make resumes more reliable.

Signed-off-by: Marc Dietrich <marvin24@gmx.de>
5 years agoARM: tegra: paz00: fix cpu suspend timers
Marc Dietrich [Sun, 16 Sep 2012 10:28:27 +0000 (12:28 +0200)]
ARM: tegra: paz00: fix cpu suspend timers

This syncs cpu_timer and cpu_off_timer with the original source
values (instead of just copying the harmony values).

Signed-off-by: Marc Dietrich <marvin24@gmx.de>
5 years agoARM: tegra: paz00: disable unused regulators
Marc Dietrich [Sun, 16 Sep 2012 10:27:36 +0000 (12:27 +0200)]
ARM: tegra: paz00: disable unused regulators

This disables unused regulators on boot.

Signed-off-by: Marc Dietrich <marvin24@gmx.de>
5 years agoARM: tegra: paz00: i2c addresses for new i2c slaves
Marc Dietrich [Wed, 12 Sep 2012 17:28:24 +0000 (19:28 +0200)]
ARM: tegra: paz00: i2c addresses for new i2c slaves

Assign 0xFC as i2c slave address for all new i2c slaves (pick from
ventana). This may reduce confusion of the slave controller because
it sits on the same bus than the master.

Signed-off-by: Marc Dietrich <marvin24@gmx.de>
5 years agoARM: tegra: paz00: make sure to register backlight after DCs
Marc Dietrich [Fri, 7 Sep 2012 16:49:23 +0000 (18:49 +0200)]
ARM: tegra: paz00: make sure to register backlight after DCs

Copied over from ventana

"Register backlight device after tegradc.0 and tegradc.1. This makes
sure turning on/off backlight in correct sequence and eliminates the
flicker during suspending and resuming."

Signed-off-by: Marc Dietrich <marvin24@gmx.de>
5 years agoARM: tegra: paz00: report wake gpio status to gpio_keys
Marc Dietrich [Fri, 7 Sep 2012 16:34:55 +0000 (18:34 +0200)]
ARM: tegra: paz00: report wake gpio status to gpio_keys

This was just copied over from ventana to let the gpio_keys driver
report "key pressed/released" after resume. Can't see any impact.

Signed-off-by: Marc Dietrich <marvin24@gmx.de>
5 years agoARM: tegra: ventana: get rid of gpio enable/disable calls
Marc Dietrich [Fri, 7 Sep 2012 16:02:47 +0000 (18:02 +0200)]
ARM: tegra: ventana: get rid of gpio enable/disable calls

see other boards: gpio_enable/disable is auto-called by request/free.

Signed-off-by: Marc Dietrich <marvin24@gmx.de>
5 years agoARM: tegra: paz00: update defconfig
Marc Dietrich [Fri, 7 Sep 2012 13:13:52 +0000 (15:13 +0200)]
ARM: tegra: paz00: update defconfig

- update to r16 kernel
- disable VT_HW_CONSOLE_BINDING to fix console=tty0 oops

Signed-off-by: Marc Dietrich <marvin24@gmx.de>
5 years agoARM: tegra: fix compilation of with newer gcc
Marc Dietrich [Fri, 7 Sep 2012 12:49:35 +0000 (14:49 +0200)]
ARM: tegra: fix compilation of with newer gcc

on tegra2, phys_addr_t is u32, hence use %x instead of %lx.

Signed-off-by: Marc Dietrich <marvin24@gmx.de>
5 years agoARM: tegra: paz00: update panel code
Marc Dietrich [Wed, 5 Sep 2012 17:48:22 +0000 (19:48 +0200)]
ARM: tegra: paz00: update panel code

This was broken after r16 rebase (grhost is replaced by host1x) and
nvmap was moved to include/linux where it belongs.

Signed-off-by: Marc Dietrich <marvin24@gmx.de>
5 years agostaging: nvec: release sync write lock in error case
Marc Dietrich [Sun, 19 Aug 2012 15:51:52 +0000 (17:51 +0200)]
staging: nvec: release sync write lock in error case

We forgot to release the sync write lock in case the async write
fails. Found by rpiloose on IRC.

Signed-off-by: Marc Dietrich <marvin24@gmx.de>
5 years agostaging: nvec: try to fix mouse suspend/resume
Marc Dietrich [Sun, 22 Jul 2012 12:37:06 +0000 (14:37 +0200)]
staging: nvec: try to fix mouse suspend/resume

this time I got it right - I swear ...

Signed-off-by: Marc Dietrich <marvin24@gmx.de>
5 years agoupdate defconfig ...
Marc Dietrich [Wed, 15 Aug 2012 17:39:39 +0000 (19:39 +0200)]
update defconfig ...

Signed-off-by: Marc Dietrich <marvin24@gmx.de>
5 years agoARM: tegra: paz00: mark emmc as internal
Marc Dietrich [Sun, 29 Jul 2012 12:30:00 +0000 (14:30 +0200)]
ARM: tegra: paz00: mark emmc as internal

This reduces some warnings during boot.

Signed-off-by: Marc Dietrich <marvin24@gmx.de>
5 years agoARM: tegra: paz00: fix copy'n paste error
Marc Dietrich [Fri, 3 Aug 2012 18:05:43 +0000 (20:05 +0200)]
ARM: tegra: paz00: fix copy'n paste error

Fix bogis vbus gpio copied from ventana.

Signed-off-by: Marc Dietrich <marvin24@gmx.de>
5 years agostaging: nvec: fix bus clock
Marc Dietrich [Sun, 29 Jul 2012 09:59:46 +0000 (11:59 +0200)]
staging: nvec: fix bus clock

This was set to a too high value in the clock table. Also later on
the nvec didn't got the right clock at all (used the controller clock)
instead of the bus clock. Urg.

I failed to used clk_add_alias so I just added a dup clock as the
vibrante slave driver does it for tegra3.

Signed-off-by: Marc Dietrich <marvin24@gmx.de>
5 years agoARM: tegra: paz00: port to new usb interface
Marc Dietrich [Wed, 25 Jul 2012 18:45:11 +0000 (20:45 +0200)]
ARM: tegra: paz00: port to new usb interface

Signed-off-by: Marc Dietrich <marvin24@gmx.de>
5 years agoARM: tegra: paz00: disable copy of bootloader framebuffer
Marc Dietrich [Sat, 21 Jul 2012 19:07:58 +0000 (21:07 +0200)]
ARM: tegra: paz00: disable copy of bootloader framebuffer

Disable copy of the bootloader framebuffer to kernel framebuffer.
This avoids corruption our nice Toshiba logo.

Signed-off-by: Marc Dietrich <marvin24@gmx.de>
5 years agoARM: tegra: paz00: update defconfig
Marc Dietrich [Fri, 13 Jul 2012 17:34:22 +0000 (19:34 +0200)]
ARM: tegra: paz00: update defconfig

- remove some useless sound / camera drivers
- enable zsmalloc

Signed-off-by: Marc Dietrich <marvin24@gmx.de>
5 years agoARM: tegra: paz00: skip framebuffer copy if no boot framebuffer is available
Marc Dietrich [Fri, 13 Jul 2012 17:17:47 +0000 (19:17 +0200)]
ARM: tegra: paz00: skip framebuffer copy if no boot framebuffer is available

This fixes boots using u-boot which does not yet supply a boot framebuffer.

Signed-off-by: Marc Dietrich <marvin24@gmx.de>
5 years agostaging: nvec: fix clock enable on resume
Marc Dietrich [Wed, 11 Jul 2012 19:59:34 +0000 (21:59 +0200)]
staging: nvec: fix clock enable on resume

I don't know why the clock was disabled and enabled shortly after,
but we failed to enable it on resume. So remove the clock disable.

This fixes 2nd and later suspend/resume fails.

Signed-off-by: Marc Dietrich <marvin24@gmx.de>
5 years agovideo: tegra: make carveout heap relocations less noisy
Marc Dietrich [Sun, 8 Jul 2012 18:27:39 +0000 (20:27 +0200)]
video: tegra: make carveout heap relocations less noisy

Reduce kern log spam.

Signed-off-by: Marc Dietrich <marvin24@gmx.de>
5 years agoASoC: tegra: only stereo is supported
Marc Dietrich [Sun, 8 Jul 2012 17:30:25 +0000 (19:30 +0200)]
ASoC: tegra: only stereo is supported

Report min/max_channels = 2 to limit output to stereo only. Otherwise
we get a lot of errors in the kernel log.

*** This is an upstream candidate! ***

Signed-off-by: Marc Dietrich <marvin24@gmx.de>
5 years agort2x00: Add support for BUFFALO WLI-UC-GNM2 to rt2800usb.
Jeongdo Son [Thu, 14 Jun 2012 17:28:01 +0000 (02:28 +0900)]
rt2x00: Add support for BUFFALO WLI-UC-GNM2 to rt2800usb.

This is a RT3070 based device.

Signed-off-by: Jeongdo Son <sohn9086@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: Marc Dietrich <marvin24@gmx.de>
5 years agort2x00 : RT3290 chip support v4
Woody Hung [Wed, 13 Jun 2012 07:01:16 +0000 (15:01 +0800)]
rt2x00 : RT3290 chip support v4

This patch support the new chipset rt3290 wifi implementation in rt2x00.
It initailize the related mac, bbp and rf register in startup phase.
And this patch modify the efuse read/write method for the different efuse data offset of rt3290.

Signed-off-by: Woody Hung <Woody.Hung@mediatek.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: Marc Dietrich <marvin24@gmx.de>
5 years agort2x00:Add RT5392 chipset support
Zero.Lin [Tue, 29 May 2012 08:11:09 +0000 (16:11 +0800)]
rt2x00:Add RT5392 chipset support

Signed-off-by: Zero.Lin <Zero.Lin@mediatek.com>
Reviewed-by: Stanislaw Gruszka <sgruszka@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: Marc Dietrich <marvin24@gmx.de>
5 years agort2x00: claim RSN IBSS support
Stanislaw Gruszka [Mon, 28 May 2012 09:53:11 +0000 (11:53 +0200)]
rt2x00: claim RSN IBSS support

Similar like other drivers, do not configure group keys to the hardware
(on Ad-Hoc mode) to make IBSS RSN work.

Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Acked-by: Helmut Schaa <helmut.schaa@googlemail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: Marc Dietrich <marvin24@gmx.de>
5 years agort2x00: Add support for RT5360 based PCI devices.
villacis@palosanto.com [Wed, 16 May 2012 19:07:12 +0000 (21:07 +0200)]
rt2x00: Add support for RT5360 based PCI devices.

This chip is used at least by the D-Link DWA-525 adapter.

Signed-off-by: Alex Villac<ED>s Lasso <a_villacis@palosanto.com>
Signed-off-by: Gertjan van Wingerde <gwingerde@gmail.com>
Acked-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: Marc Dietrich <marvin24@gmx.de>
5 years agort2800usb: 2001:3c17 is an RT3370 device
Albert Pool [Mon, 14 May 2012 16:08:32 +0000 (18:08 +0200)]
rt2800usb: 2001:3c17 is an RT3370 device

D-Link DWA-123 rev A1

Signed-off-by: Albert Pool<albertpool@solcon.nl>
Cc: <stable@vger.kernel.org>
Acked-by: Gertjan van Wingerde <gwingerde@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: Marc Dietrich <marvin24@gmx.de>
5 years agort2x00: use atomic variable for seqno
Stanislaw Gruszka [Fri, 1 Jun 2012 09:29:40 +0000 (11:29 +0200)]
rt2x00: use atomic variable for seqno

Remove spinlock as atomic_t can be used instead. Note we use only 16
lower bits, upper bits are changed but we impilcilty cast to u16.

This fix possible deadlock on IBSS mode reproted by lockdep:

=================================
[ INFO: inconsistent lock state ]
3.4.0-wl+ #4 Not tainted
---------------------------------
inconsistent {IN-SOFTIRQ-W} -> {SOFTIRQ-ON-W} usage.
kworker/u:2/30374 [HC0[0]:SC0[0]:HE1:SE1] takes:
 (&(&intf->seqlock)->rlock){+.?...}, at: [<f9979a20>] rt2x00queue_create_tx_descriptor+0x380/0x490 [rt2x00lib]
{IN-SOFTIRQ-W} state was registered at:
  [<c04978ab>] __lock_acquire+0x47b/0x1050
  [<c0498504>] lock_acquire+0x84/0xf0
  [<c0835733>] _raw_spin_lock+0x33/0x40
  [<f9979a20>] rt2x00queue_create_tx_descriptor+0x380/0x490 [rt2x00lib]
  [<f9979f2a>] rt2x00queue_write_tx_frame+0x1a/0x300 [rt2x00lib]
  [<f997834f>] rt2x00mac_tx+0x7f/0x380 [rt2x00lib]
  [<f98fe363>] __ieee80211_tx+0x1b3/0x300 [mac80211]
  [<f98ffdf5>] ieee80211_tx+0x105/0x130 [mac80211]
  [<f99000dd>] ieee80211_xmit+0xad/0x100 [mac80211]
  [<f9900519>] ieee80211_subif_start_xmit+0x2d9/0x930 [mac80211]
  [<c0782e87>] dev_hard_start_xmit+0x307/0x660
  [<c079bb71>] sch_direct_xmit+0xa1/0x1e0
  [<c0784bb3>] dev_queue_xmit+0x183/0x730
  [<c078c27a>] neigh_resolve_output+0xfa/0x1e0
  [<c07b436a>] ip_finish_output+0x24a/0x460
  [<c07b4897>] ip_output+0xb7/0x100
  [<c07b2d60>] ip_local_out+0x20/0x60
  [<c07e01ff>] igmpv3_sendpack+0x4f/0x60
  [<c07e108f>] igmp_ifc_timer_expire+0x29f/0x330
  [<c04520fc>] run_timer_softirq+0x15c/0x2f0
  [<c0449e3e>] __do_softirq+0xae/0x1e0
irq event stamp: 18380437
hardirqs last  enabled at (18380437): [<c0526027>] __slab_alloc.clone.3+0x67/0x5f0
hardirqs last disabled at (18380436): [<c0525ff3>] __slab_alloc.clone.3+0x33/0x5f0
softirqs last  enabled at (18377616): [<c0449eb3>] __do_softirq+0x123/0x1e0
softirqs last disabled at (18377611): [<c041278d>] do_softirq+0x9d/0xe0

other info that might help us debug this:
 Possible unsafe locking scenario:

       CPU0
       ----
  lock(&(&intf->seqlock)->rlock);
  <Interrupt>
    lock(&(&intf->seqlock)->rlock);

 *** DEADLOCK ***

4 locks held by kworker/u:2/30374:
 #0:  (wiphy_name(local->hw.wiphy)){++++.+}, at: [<c045cf99>] process_one_work+0x109/0x3f0
 #1:  ((&sdata->work)){+.+.+.}, at: [<c045cf99>] process_one_work+0x109/0x3f0
 #2:  (&ifibss->mtx){+.+.+.}, at: [<f98f005b>] ieee80211_ibss_work+0x1b/0x470 [mac80211]
 #3:  (&intf->beacon_skb_mutex){+.+...}, at: [<f997a644>] rt2x00queue_update_beacon+0x24/0x50 [rt2x00lib]

stack backtrace:
Pid: 30374, comm: kworker/u:2 Not tainted 3.4.0-wl+ #4
Call Trace:
 [<c04962a6>] print_usage_bug+0x1f6/0x220
 [<c0496a12>] mark_lock+0x2c2/0x300
 [<c0495ff0>] ? check_usage_forwards+0xc0/0xc0
 [<c04978ec>] __lock_acquire+0x4bc/0x1050
 [<c0527890>] ? __kmalloc_track_caller+0x1c0/0x1d0
 [<c0777fb6>] ? copy_skb_header+0x26/0x90
 [<c0498504>] lock_acquire+0x84/0xf0
 [<f9979a20>] ? rt2x00queue_create_tx_descriptor+0x380/0x490 [rt2x00lib]
 [<c0835733>] _raw_spin_lock+0x33/0x40
 [<f9979a20>] ? rt2x00queue_create_tx_descriptor+0x380/0x490 [rt2x00lib]
 [<f9979a20>] rt2x00queue_create_tx_descriptor+0x380/0x490 [rt2x00lib]
 [<f997a5cf>] rt2x00queue_update_beacon_locked+0x5f/0xb0 [rt2x00lib]
 [<f997a64d>] rt2x00queue_update_beacon+0x2d/0x50 [rt2x00lib]
 [<f9977e3a>] rt2x00mac_bss_info_changed+0x1ca/0x200 [rt2x00lib]
 [<f9977c70>] ? rt2x00mac_remove_interface+0x70/0x70 [rt2x00lib]
 [<f98e4dd0>] ieee80211_bss_info_change_notify+0xe0/0x1d0 [mac80211]
 [<f98ef7b8>] __ieee80211_sta_join_ibss+0x3b8/0x610 [mac80211]
 [<c0496ab4>] ? mark_held_locks+0x64/0xc0
 [<c0440012>] ? virt_efi_query_capsule_caps+0x12/0x50
 [<f98efb09>] ieee80211_sta_join_ibss+0xf9/0x140 [mac80211]
 [<f98f0456>] ieee80211_ibss_work+0x416/0x470 [mac80211]
 [<c0496d8b>] ? trace_hardirqs_on+0xb/0x10
 [<c077683b>] ? skb_dequeue+0x4b/0x70
 [<f98f207f>] ieee80211_iface_work+0x13f/0x230 [mac80211]
 [<c045cf99>] ? process_one_work+0x109/0x3f0
 [<c045d015>] process_one_work+0x185/0x3f0
 [<c045cf99>] ? process_one_work+0x109/0x3f0
 [<f98f1f40>] ? ieee80211_teardown_sdata+0xa0/0xa0 [mac80211]
 [<c045ed86>] worker_thread+0x116/0x270
 [<c045ec70>] ? manage_workers+0x1e0/0x1e0
 [<c0462f64>] kthread+0x84/0x90
 [<c0462ee0>] ? __init_kthread_worker+0x60/0x60
 [<c083d382>] kernel_thread_helper+0x6/0x10

Cc: stable@vger.kernel.org
Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Acked-by: Helmut Schaa <helmut.schaa@googlemail.com>
Acked-by: Gertjan van Wingerde <gwingerde@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: Marc Dietrich <marvin24@gmx.de>
5 years agort2x00:Add RT539b chipset support
Zero.Lin [Thu, 10 May 2012 02:06:31 +0000 (10:06 +0800)]
rt2x00:Add RT539b chipset support

Signed-off-by: Zero.Lin <Zero.Lin@mediatek.com>
Acked-by: Gertjan van Wingerde <gwingerde@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: Marc Dietrich <marvin24@gmx.de>
5 years agort2x00: Add debugfs access for rfcsr register
Anisse Astier [Thu, 19 Apr 2012 13:53:10 +0000 (15:53 +0200)]
rt2x00: Add debugfs access for rfcsr register

RFCSR is only used in rt2800. For other chipsets, the debug struct
for rfcsr should be zeroed, which isn't be an issue, since the code
can now cope with that.

Signed-off-by: Anisse Astier <anisse@astier.eu>
Acked-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: Marc Dietrich <marvin24@gmx.de>
5 years agort2x00: debugfs support - allow a register to be empty
Anisse Astier [Thu, 19 Apr 2012 13:04:52 +0000 (15:04 +0200)]
rt2x00: debugfs support - allow a register to be empty

Allow a register to be unspecified, therefore not creating its debugfs
file entry.

Signed-off-by: Anisse Astier <anisse@astier.eu>
Acked-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: Marc Dietrich <marvin24@gmx.de>
5 years agort2800: add chipset revision RT5390R support
Anisse Astier [Mon, 23 Apr 2012 10:33:11 +0000 (12:33 +0200)]
rt2800: add chipset revision RT5390R support

About 70% of the chips with revision RT5390R initialize incorrectly, using
the auxiliary antenna instead of the main one. The net result is that
signal reception is very poor (no AP further than 1M).

This chipset differs from RT5390 and RT5390F by its support of hardware
antenna diversity. Therefore antenna selection should be done
differently, by disabling software features and previously selected
antenna.

This changeset does just that, and makes all RT5390R work properly.

This is based on Ralink's 2012_03_22_RT5572_Linux_STA_v2.6.0.0_DPO
driver.

Signed-off-by: Anisse Astier <anisse@astier.eu>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: Marc Dietrich <marvin24@gmx.de>
5 years agort2x00: Use GFP_KERNEL for rx buffer allocation on USB devices
Helmut Schaa [Thu, 19 Apr 2012 11:24:10 +0000 (13:24 +0200)]
rt2x00: Use GFP_KERNEL for rx buffer allocation on USB devices

Since the RX path on USB devices is handled in process context we can
use GFP_KERNEL for RX buffer allocation. This should reduce the
likelihood of allocation failures.

Signed-off-by: Helmut Schaa <helmut.schaa@googlemail.com>
Acked-by: Gertjan van Wingerde <gwingerde@gmail.com>
Tested-By: Marc Dietrich <marvin24@gmx.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: Marc Dietrich <marvin24@gmx.de>
5 years agort2800: debugfs register access: BBP is 256 bytes big
Anisse Astier [Thu, 19 Apr 2012 09:20:32 +0000 (11:20 +0200)]
rt2800: debugfs register access: BBP is 256 bytes big

We're already using BBP for values > 128. Make that explicit and allow
debugfs access.

Signed-off-by: Anisse Astier <anisse@astier.eu>
Acked-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: Marc Dietrich <marvin24@gmx.de>
5 years agoASoC: alc5632: sync with mainline
Marc Dietrich [Fri, 6 Jul 2012 19:15:49 +0000 (21:15 +0200)]
ASoC: alc5632: sync with mainline

I don't know where this I2S Pwr stuff came from.

Signed-off-by: Marc Dietrich <marvin24@gmx.de>