usb: gadget: Allow MBIM to queue packets before QBI is ready

A race condition between USB enumeration and QBI boot could
sometimes results in mbim packets lost. If USB enumeration
is finished before QBI opens the interface with the USB driver
then each MBIM packet received from the host before the interface
is opend would be dropped.
This change fix this issue so that the packets are queued and
are sent to QBI when its ready.

Change-Id: I9acf271c9a43a0cfa8bab9e97aac32c508fc6d6e
CRs-Fixed: 488231
Signed-off-by: Bar Weiner <bweiner@codeaurora.org>
ARM: 7301/1: Rename the T() macro to TUSER() to avoid namespace conflicts

This macro is used to generate unprivileged accesses (LDRT/STRT) to user
space.

Change-Id: Ied1f7d4fc83b3dad8ced8c0930f2738680867d93
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
Acked-by: Nicolas Pitre <nico@linaro.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Git-commit: 4e7682d077d693e34a993ae7a2831b522930ebcb
Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
Signed-off-by: Laura Abbott <lauraa@codeaurora.org>
ARM: 7527/1: uaccess: explicitly check __user pointer when !CPU_USE_DOMAINS

The {get,put}_user macros don't perform range checking on the provided
__user address when !CPU_HAS_DOMAINS.

This patch reworks the out-of-line assembly accessors to check the user
address against a specified limit, returning -EFAULT if is is out of
range.

[will: changed get_user register allocation to match put_user]
[rmk: fixed building on older ARM architectures]

CRs-Fixed: 504011
Change-Id: I3818045a136fcdf72deb1371b132e090fd7ed643
Reported-by: Catalin Marinas <catalin.marinas@arm.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
Cc: stable@vger.kernel.org
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Git-commit: 8404663f81d212918ff85f493649a7991209fa04
Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
Signed-off-by: Laura Abbott <lauraa@codeaurora.org>
Merge "usb: gadget: Allow MBIM to queue packets before QBI is ready"
Merge "ARM: 7301/1: Rename the T() macro to TUSER() to avoid namespace conflicts"
Merge "ARM: 7527/1: uaccess: explicitly check __user pointer when !CPU_USE_DOMAINS"