OMAP4: hsmmc: fix race conditions in suspend/resume path

using mmc_host_enable/disable causes race conditions. By using
runtime pm framework during hsmmc suspend/resume, clock management
integrity is kept, thereby avoid race conditions

Change-Id: I34dac7d3aaacab82b82dedff610b3a5060cf72ce
Signed-off-by: Mahesh Renduchintala <mahesh@ti.com>
net: wireless: bcmdhd: Ignore error if "chanspecs" command is not supported

Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
net: wireless: bcmdhd: Skip inaccurate wl_construct_reginfo() call

Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
OMAP: mcspi: Perform NULL pointer check before accessing cd->swap_datalines

Signed-off-by: Barbaros Tokaoglu <barbarost@gmail.com>
Toro: Update USB gadget for DM feature

1. Add RNDIS+DM composite for modem logging

Change-Id: I21cd2809a9ffc48900e7fa188ff8cc471fffa301
Signed-off-by: Benoit Goby <benoit@android.com>
Signed-off-by: sujin119.kim <sujin119.kim@samsung.com>
Merge branch 'android-3.0' into android-omap-3.0
Merge branch 'android-omap-3.0' into android-omap-tuna-3.0

Conflicts:
	drivers/net/wireless/bcmdhd/wl_cfg80211.c
Merge branch 'android-3.0' into android-omap-3.0
Merge branch 'linux-omap-3.0' into android-omap-3.0
Merge branch 'android-omap-3.0' into android-omap-tuna-3.0
Revert "OMAP4: hsmmc: fix race conditions in suspend/resume path"

This reverts commit 1b8153cc8ca36697f4d1dbf36916fbe506d6cd95.

Change-Id: If8c8bf0db3d25be38ce2a4743260838d7089aceb
Signed-off-by: Todd Poynor <toddpoynor@google.com>
USB: gadget: f_audio_source: Fix use after free in audio_unbind

When USB was disconnected, we were freeing our audio_dev struct in audio_unbind
before the audio system had cleaned up, resulting in a hang in audio_pcm_close.
We now statically allocate the audio_dev struct to avoid this problem.

Change-Id: I58ad21eaa20dcf4aa74ee614ef3b6ed2c91d52a1
Signed-off-by: Mike Lockwood <lockwood@google.com>
USB: gadget: f_audio_source: Fix compilation error

Change-Id: I1b785c47bda03208d396473a9d1c94631f5624d9
Signed-off-by: Mike Lockwood <lockwood@google.com>
net: wireless: bcmdhd: Report proper mcs rate mask

Setting proper mcs rate mask allows to connect in 802.11n-only mode

Change-Id: Iffd47a60c92a74d29e42d81d79fa64463f5895c5
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
tuna: add boostpulse duration

This makes up for the portions missing that would've been written
by Narayanan Gopalakrishnan but they were missing (duration, and boost
time) and also adds the ability to set duration (which was originally
created by cyanogen)

Change-Id: I5428d4edb9e7c903435c368d3539f353234b083a
vfs: dcache: fix deadlock in tree traversal

commit 8110e16d42d587997bcaee0c864179e6d93603fe upstream.

IBM reported a deadlock in select_parent().  This was found to be caused
by taking rename_lock when already locked when restarting the tree
traversal.

There are two cases when the traversal needs to be restarted:

 1) concurrent d_move(); this can only happen when not already locked,
    since taking rename_lock protects against concurrent d_move().

 2) racing with final d_put() on child just at the moment of ascending
    to parent; rename_lock doesn't protect against this rare race, so it
    can happen when already locked.

Because of case 2, we need to be able to handle restarting the traversal
when rename_lock is already held.  This patch fixes all three callers of
try_to_ascend().

IBM reported that the deadlock is gone with this patch.

[ I rewrote the patch to be smaller and just do the "goto again" if the
  lock was already held, but credit goes to Miklos for the real work.
   - Linus ]

Signed-off-by: Miklos Szeredi <mszeredi@suse.cz>
Cc: Al Viro <viro@ZenIV.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
dm: handle requests beyond end of device instead of using BUG_ON

commit ba1cbad93dd47223b1f3b8edd50dd9ef2abcb2ed upstream.

The access beyond the end of device BUG_ON that was introduced to
dm_request_fn via commit 29e4013de7ad950280e4b2208 ("dm: implement
REQ_FLUSH/FUA support for request-based dm") was an overly
drastic (but simple) response to this situation.

I have received a report that this BUG_ON was hit and now think
it would be better to use dm_kill_unmapped_request() to fail the clone
and original request with -EIO.

map_request() will assign the valid target returned by
dm_table_find_target to tio->ti.  But when the target
isn't valid tio->ti is never assigned (because map_request isn't
called); so add a check for tio->ti != NULL to dm_done().

Reported-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: Mike Snitzer <snitzer@redhat.com>
Signed-off-by: Jun'ichi Nomura <j-nomura@ce.jp.nec.com>
Signed-off-by: Alasdair G Kergon <agk@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
USB: option: blacklist QMI interface on ZTE MF683

commit 160c9425ac52cb30502be2d9c5e848cec91bb115 upstream.

Interface #5 on ZTE MF683 is a QMI/wwan interface.

Signed-off-by: Bjørn Mork <bjorn@mork.no>
Cc: Shawn J. Goff <shawn7400@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
USB: ftdi_sio: add TIAO USB Multi-Protocol Adapter (TUMPA) support

commit 54575b05af36959dfb6a49a3e9ca0c2b456b7126 upstream.

TIAO/DIYGADGET USB Multi-Protocol Adapter (TUMPA) is an FTDI FT2232H
based device which provides an easily accessible JTAG, SPI, I2C, serial
breakout.

http://www.diygadget.com/tiao-usb-multi-protocol-adapter-jtag-spi-i2c-serial.html
http://www.tiaowiki.com/w/TIAO_USB_Multi_Protocol_Adapter_User%27s_Manual

FTDI FT2232H provides two serial channels (A and B), but on the TUMPA
channel A is dedicated to JTAG/SPI while channel B can be used for
UART/RS-232: use the ftdi_jtag_quirk to expose only channel B as
a usb-serial interface to userspace.

Signed-off-by: Antonio Ospite <ospite@studenti.unina.it>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
USB: qcaux: add Pantech vendor class match

commit c638eb2872b3af079501e7ee44cbb8a5cce9b4b5 upstream.

The three Pantech devices UML190 (106c:3716), UML290 (106c:3718) and
P4200 (106c:3721) all use the same subclasses to identify vendor
specific functions.  Replace the existing device specific entries
with generic vendor matching, adding support for the P4200.

Signed-off-by: Bjørn Mork <bjorn@mork.no>
Cc: Thomas Schäfer <tschaefer@t-online.de>
Acked-by: Dan Williams <dcbw@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>