HID: logitech: don't use stack based dj_report structures

On a system with a logitech wireless keyboard/mouse and DMA-API debugging
enabled, this warning appears at boot:

kernel: WARNING: at lib/dma-debug.c:929 check_for_stack.part.12+0x70/0xa7()
kernel: Hardware name: MS-7593
kernel: uhci_hcd 0000:00:1d.1: DMA-API: device driver maps memory fromstack [addr=ffff8801b0079c29]

Make logi_dj_recv_query_paired_devices and logi_dj_recv_switch_to_dj_mode
use a structure allocated with kzalloc rather than a stack based one.

Signed-off-by: Marc Dionne <marc.c.dionne@gmail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
usb: gadget: Complete fsl qe/udc driver conversion

commit ec39e2ae (usb: gadget: Update fsl_qe_udc to use
usb_endpoint_descriptor inside the struct usb_ep) did
not completely convert the fsl gadget drivers to use
the desc in usb_ep as described in commit messages.

Fix the macros that were still referencing the old
pointer.

Signed-off-by: Ben Collins <bcollins@ubuntu.com>
Cc: Ido Shayevitz <idos@codeaurora.org>

[ balbi@ti.com : brush up commit log a bit ]

Signed-off-by: Felipe Balbi <balbi@ti.com>
usb: dwc3: fix giveback of queued request in ep_dequeue

In case of ep_dequeue , if dequeued request was submitted for dma
transfer, then endpoint is stopped. Once endpoint is stooped, callback
for the dequeued request must be called.

Signed-off-by: Pratyush Anand <pratyush.anand@st.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
ALSA: snd_usb_audio: ignore ctrl errors on QuickCam E3500

if this cam is pluged in, pulse audio can't initiate capture
device.
dmesg has lots of messages like:
"cannot set freq 16000 to ep 0x86"

Setting ignore_ctl_error=1 fixes this problem.

Signed-off-by: Oleksij Rempel <bug-track@fisher-privat.net>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
ALSA: snd_usb_audio: ignore ctrl errors on QuickCam Pro for Notebooks

This webcam works mostly ok, exept with skype.
Skype sends lots of ctrl messages to dynamically ajust
record level. If for some reasons it pokes some error
every thing goes broken:
- first pulseaudio blocks sound for all apps
- then video is reseted
- then skype freez

dmesg has lots of messages like:
cannot set freq 16000 to ep 0x86"

Setting ignore_ctl_error=1 fixes this problem.

Signed-off-by: Oleksij Rempel <bug-track@fisher-privat.net>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
USB: option: add id for Cellient MEN-200

Add vendor and product ID to option.c driver
for Cellient MEN-200 EVDO Rev.B 450MHz data module.
http://cellient.com

Signed-off-by: Dmitry Shmygov <shmygov@rambler.ru>
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
ALSA: hda - Fix ALC272X codec detection

The codec ALC272X is a special codec for some Dell machines, and its
detection got broken in the recent kernel because SSID check (required
by ALC272X check) was moved to the later point.  Now we need to move
this codec check to the right place, too.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
ALSA: HDA: Add inverted internal mic quirk for Lenovo S205

The Lenovo Ideapad S205 has an internal mic where the right channel
is phase inverted.

BugLink: https://bugs.launchpad.net/bugs/884652
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
usb: otg: twl6030-usb: Fix twl writes

There were mistakes in writing to few twl
registers. There was interchange in the
parameters being passed to twl6030_writeb().

Signed-off-by: Moiz Sonasath <m-sonasath@ti.com>
Signed-off-by: Ruslan Bilovol <ruslan.bilovol@ti.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
usb: gadget: lpc32xx_udc: fix build error with debugfs enabled

If CONFIG_USB_GADGET_DEBUG_FILES is enabled, lpc32xx_udc breaks
compilation because of a missing include file.

Signed-off-by: Alexandre Pereira da Silva <aletes.xgr@gmail.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
usb: musb: host: release dma channels if no active io

Currently DMA channels are allocated and they remain allocated
even if there is no active data transfer. Added channel_release()
whenever there is no pending request.

Signed-off-by: Ajay Kumar Gupta <ajay.gupta@ti.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
SCSI & usb-storage: add try_rc_10_first flag

Several bug reports have been received recently for USB mass-storage
devices that don't handle READ CAPACITY(16) commands properly.  They
report bogus sizes, in some cases becoming unusable as a result.

The bugs were triggered by commit
09b6b51b0b6c1b9bb61815baf205e4d74c89ff04 (SCSI & usb-storage: add
flags for VPD pages and REPORT LUNS), which caused usb-storage to stop
overriding the SCSI level reported by devices.  By default, the sd
driver will try READ CAPACITY(16) first for any device whose level is
above SCSI_SPC_2.

It seems likely that any device large enough to require the use of
READ CAPACITY(16) (i.e., 2 TB or more) would be able to handle READ
CAPACITY(10) commands properly.  Indeed, I don't know of any devices
that don't handle READ CAPACITY(10) properly.

Therefore this patch (as1559) adds a new flag telling the sd driver
to try READ CAPACITY(10) before READ CAPACITY(16), and sets this flag
for every USB mass-storage device.  If a device really is larger than
2 TB, sd will fall back to READ CAPACITY(16) just as it used to.

This fixes Bugzilla #43391.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Acked-by: Hans de Goede <hdegoede@redhat.com>
CC: "James E.J. Bottomley" <JBottomley@parallels.com>
CC: Matthew Dharm <mdharm-usb@one-eyed-alien.net>
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
usb-storage: revert commit afff07e61a52 (Add 090c:1000 to unusal-devs)

This patch (as1560) reverts commit
afff07e61a5243e14ee3f0a272a0380cd744a8a3 (usb-storage: Add 090c:1000
to unusal-devs).  It is no longer needed, because usb-storage now
tells the sd driver to try READ CAPACITY(10) before READ CAPACITY(16)
for every USB mass-storage device.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Acked-by: Hans de Goede <hdegoede@redhat.com>
CC: Matthew Dharm <mdharm-usb@one-eyed-alien.net>
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Merge tag 'fixes-for-v3.5-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/balbi/usb into usb-linus

usb: fixes for v3.5-rc3

A few remaining fixes for our v3.5 cycle containing a fix
for a long standing bug which would cause musb to starve its
dma channels by never releasing them, a build fix on lpc32xx_udc,
another fix to Ido's endpoint descriptor series on fsl udc, a
fix to the order of arguments on twl6030-usb driver and a
fix to dwc3's dequeue method.

All patches have been pending on the list for quite a while.
m68knommu: define a local devm_clk_get() function

Commit f4d40de39a23f0c39cca55ac63e1175c69c3d2f7 ("net fec: do not depend
on grouped clocks") breaks compilation of the FEC driver for non iMX
platforms in linux-3.5-rc1. For example when compiling for ColdFire I get:

      LD      vmlinux
    drivers/built-in.o: In function `fec_probe':
    fec.c:(.devinit.text+0x1e0): undefined reference to `devm_clk_get'

Define a simple devm_clk_get() function for the m68knommu architecture.

Signed-off-by: Greg Ungerer <gerg@uclinux.org>
drm/udl: Make sure to get correct endian keys from vendor descriptor

This is a port of
commit b49f184b640dcfab7ede394cf2a1ff4fe3d154f5
Author: Ben Collins <bcollins@ubuntu.com>
from udlfb to udl kms driver.

The driver was not using le16_to_cpu when reading keys from the vendor
descriptor, causing incorrect parsing. Mainly, sku_pixel_limit was not
being parsed on big-endian systems. This would result in a blank screen
on big-endian CPUs where the DL chips's max mode was smaller than the
monitor's native mode.

Signed-off-by: Dave Airlie <airlied@redhat.com>
ALSA: usb-audio: add BOSS GT-100 support

Reported-by: John McFarland <mcfarljm@gmail.com>
Tested-by: John McFarland <mcfarljm@gmail.com>
Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
ASoC: wm8994: remove duplicate code

It seems that the code duplication was added at a merge operation.

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
ALSA: hda - Remove obsoleted CONFIG_SND_HDA_ENABLE_REALTEK_QUIRKS

I simply forgot to remove this entry although all Realtek quirks have
been dropped.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
HID: magicmouse: Correct report range of major / minor axes

In patch "HID: magicmouse: Adjust major / minor axes to scale",
touch_major and touch_minor axes are scaled by a factor of
four when reported but the max touch_major/minor is not scaled
accordingly. This patch scales the max touch_major/minor to
be consistent with the reported value.

Signed-off-by: Yufeng Shen <miletus@chromium.org>
Acked-by: Henrik Rydberg <rydberg@euromail.se>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>