]> git.karo-electronics.de Git - linux-beck.git/log
linux-beck.git
13 years agoUSB: ftdi_sio.c:Fill MSR fields of the ftdi async_icount structure
Uwe Bonnes [Mon, 10 Oct 2011 15:24:46 +0000 (17:24 +0200)]
USB: ftdi_sio.c:Fill MSR fields of the ftdi async_icount structure

Signed-off-by: Uwe Bonnes <bon@elektron.ikp.physik.tu-darmstadt.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agoUSB: ftdi_sio.c: Fill LSR fields of the ftdi async_icount structure
Uwe Bonnes [Mon, 10 Oct 2011 15:24:34 +0000 (17:24 +0200)]
USB: ftdi_sio.c: Fill LSR fields of the ftdi async_icount structure

Signed-off-by: Uwe Bonnes <bon@elektron.ikp.physik.tu-darmstadt.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agoUSB: ftdi_sio.c:Fill TX field of the ftdi async_icount structure
Uwe Bonnes [Mon, 10 Oct 2011 15:24:27 +0000 (17:24 +0200)]
USB: ftdi_sio.c:Fill TX field of the ftdi async_icount structure

Signed-off-by: Uwe Bonnes <bon@elektron.ikp.physik.tu-darmstadt.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agoUSB: ftdi_sio.c: Fill the RX field of the ftdi async_icount structure
Uwe Bonnes [Mon, 10 Oct 2011 15:24:16 +0000 (17:24 +0200)]
USB: ftdi_sio.c: Fill the RX field of the ftdi async_icount structure

Signed-off-by: Uwe Bonnes <bon@elektron.ikp.physik.tu-darmstadt.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agoUSB: ftdi_sio.c: Basic icount infrastructure for ftdi_sio
Uwe Bonnes [Mon, 10 Oct 2011 15:24:08 +0000 (17:24 +0200)]
USB: ftdi_sio.c: Basic icount infrastructure for ftdi_sio

Signed-off-by: Uwe Bonnes <bon@elektron.ikp.physik.tu-darmstadt.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agousb/isp1760: Let OF bindings depend on general CONFIG_OF instead of PPC_OF .
Joachim Foerster [Mon, 10 Oct 2011 16:06:54 +0000 (18:06 +0200)]
usb/isp1760: Let OF bindings depend on general CONFIG_OF instead of PPC_OF .

To be able to use the driver on other OF-aware architectures, too.
And add necessary OF related #includes to fix compilation error.

Signed-off-by: Joachim Foerster <joachim.foerster@missinglinkelectronics.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agoUSB: ftdi_sio: Support TI/Luminary Micro Stellaris BD-ICDI Board
Peter Stuge [Mon, 10 Oct 2011 01:34:54 +0000 (03:34 +0200)]
USB: ftdi_sio: Support TI/Luminary Micro Stellaris BD-ICDI Board

Some Stellaris evaluation kits have the JTAG/SWD FTDI chip onboard,
and some, like EK-LM3S9B90, come with a separate In-Circuit Debugger
Interface Board. The ICDI board can also be used stand-alone, for
other boards and chips than the kit it came with. The ICDI has both
old style 20-pin JTAG connector and new style JTAG/SWD 10-pin 1.27mm
pitch connector.

Tested with EK-LM3S9B90, where the BD-ICDI board is included.

Signed-off-by: Peter Stuge <peter@stuge.se>
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agoUSB: Fix runtime wakeup on OHCI
Matthew Garrett [Thu, 6 Oct 2011 19:35:43 +0000 (15:35 -0400)]
USB: Fix runtime wakeup on OHCI

At least some OHCI hardware (such as the MCP89) fails to flag any change
in the host status register or the port status registers when receiving
a remote wakeup while in D3 state. This results in the controller being
resumed but no device state change being noticed, at which point the
controller is put back to sleep again. Since there doesn't seem to be any
reliable way to identify the state change, just unconditionally resume the
hub. It'll be put back to sleep in the near future anyway if there are no
active devices attached to it.

Signed-off-by: Matthew Garrett <mjg@redhat.com>
Cc: stable <stable@vger.kernel.org>
Cc: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agoxHCI/USB: Make xHCI driver have a BOS descriptor.
Sarah Sharp [Thu, 6 Oct 2011 18:54:23 +0000 (11:54 -0700)]
xHCI/USB: Make xHCI driver have a BOS descriptor.

To add USB 3.0 link power management (LPM), we need to know what the U1
and U2 exit latencies are for the xHCI host controller.  External USB 3.0
hubs report these values through the SuperSpeed Capabilities descriptor in
the BOS descriptor.  Make the USB 3.0 roothub for the xHCI host behave
like an external hub and return the BOS descriptors.

The U1 and U2 exit latencies will vary across each host controller, so we
need to dynamically fill those values in by reading the exit latencies out
of the xHC registers.  Make the roothub code in the USB core handle
hub_control() returning the length of the data copied.

Signed-off-by: Sarah Sharp <sarah.a.sharp@linux.intel.com>
Acked-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agousb: gadget: add new usb gadget for ACM and mass storage
Klaus Schwarzkopf [Mon, 10 Oct 2011 08:32:23 +0000 (10:32 +0200)]
usb: gadget: add new usb gadget for ACM and mass storage

This driver provides two functions in one configuration:
a mass storage, and a ACM (serial port) link.
Heavily based on multi.c and cdc2.c

Signed-off-by: Klaus Schwarzkopf <schwarzkopf@sensortherm.de>
Signed-off-by: Felipe Balbi <balbi@ti.com>
13 years agousb: gadget: mv_udc: fix compile warning
Felipe Balbi [Thu, 13 Oct 2011 17:27:54 +0000 (20:27 +0300)]
usb: gadget: mv_udc: fix compile warning

| drivers/usb/gadget/mv_udc_core.c: In function 'handle_setup_packet':
| drivers/usb/gadget/mv_udc_core.c:1556:6: warning: 'status' may be \
used uninitialized in this function

Signed-off-by: Felipe Balbi <balbi@ti.com>
13 years agousb: gadget: mv_udc: add clock gating support
Neil Zhang [Wed, 12 Oct 2011 08:49:39 +0000 (16:49 +0800)]
usb: gadget: mv_udc: add clock gating support

This patch is going to support clock gating when vbus detection is
posible. Clock and phy will be on only when usb gadget is used(vbus valid).

Signed-off-by: Neil Zhang <zhangwm@marvell.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
13 years agousb: gadget: mv_udc: add test mode support
Neil Zhang [Wed, 12 Oct 2011 08:49:38 +0000 (16:49 +0800)]
usb: gadget: mv_udc: add test mode support

Add test mode support for marvell udc driver.

Signed-off-by: Neil Zhang <zhangwm@marvell.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
13 years agousb: gadget: mv_udc: use DMA API for status_req's dma address
Neil Zhang [Wed, 12 Oct 2011 08:49:37 +0000 (16:49 +0800)]
usb: gadget: mv_udc: use DMA API for status_req's dma address

use DMA API for status_req's dma address, it is needed by dtd.

Signed-off-by: Neil Zhang <zhangwm@marvell.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
13 years agousb: gadget: mv_udc: fix dtd dma confusion
Neil Zhang [Wed, 12 Oct 2011 08:49:36 +0000 (16:49 +0800)]
usb: gadget: mv_udc: fix dtd dma confusion

The controller will prime failure sometimes when do the iperf test.
Add delay to wait controller release dtd dma before we free it.
Then the issue is gone.

Signed-off-by: Neil Zhang <zhangwm@marvell.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
13 years agousb: gadget: mv_udc: add shutdown function for it
Neil Zhang [Wed, 12 Oct 2011 08:49:35 +0000 (16:49 +0800)]
usb: gadget: mv_udc: add shutdown function for it

put the device in idle when shutdown.

Signed-off-by: Neil Zhang <zhangwm@marvell.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
13 years agousb: gadget: mv_udc: correct ep0 state
Neil Zhang [Wed, 12 Oct 2011 08:49:34 +0000 (16:49 +0800)]
usb: gadget: mv_udc: correct ep0 state

This patch is going to correct the ep0 state, and the unexpected
ep0 package warning can be removed.

Signed-off-by: Neil Zhang <zhangwm@marvell.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
13 years agousb: gadget: mv_udc: rewrite fifo flush
Neil Zhang [Wed, 12 Oct 2011 08:49:33 +0000 (16:49 +0800)]
usb: gadget: mv_udc: rewrite fifo flush

1: Add parameter check.
2: For controller endpoint, we need to flush in and out directions.
3: delete redundant code, make it more readable.

Signed-off-by: Neil Zhang <zhangwm@marvell.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
13 years agousb: gadget: mv_udc: set unused endpoint with right type
Neil Zhang [Wed, 12 Oct 2011 08:49:32 +0000 (16:49 +0800)]
usb: gadget: mv_udc: set unused endpoint with right type

According to the comment right above the code, we should use
USB_ENDPOINT_XFER_BULK instead.

Signed-off-by: Neil Zhang <zhangwm@marvell.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
13 years agousb: gadget: mv_udc: add missing spinlock in ep enable/disable
Neil Zhang [Wed, 12 Oct 2011 08:49:31 +0000 (16:49 +0800)]
usb: gadget: mv_udc: add missing spinlock in ep enable/disable

The ep enable / disable functions can be called from interrupt
context, and they are not race safe on SMP systems. The critical
data can be modified in more than one routing.
Make them race safe by using IRQ-safe spinlock functions.

Signed-off-by: Neil Zhang <zhangwm@marvell.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
13 years agousb: gadget: mv_udc: fix bug when handle setup package.
Neil Zhang [Wed, 12 Oct 2011 08:49:30 +0000 (16:49 +0800)]
usb: gadget: mv_udc: fix bug when handle setup package.

For the code doesn't restrict controller ep must be ep0, so we will go
through all the eps and check if there is a setup package received.
And also we just need to acknowledge the corresponding bit in
ENDPTSETUPSTAT register.

Signed-off-by: Neil Zhang <zhangwm@marvell.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
13 years agousb: gadget: mv_udc: init next dtd ptr for dqh when init ep0
Neil Zhang [Wed, 12 Oct 2011 08:49:29 +0000 (16:49 +0800)]
usb: gadget: mv_udc: init next dtd ptr for dqh when init ep0

Set next dtd ptr to EP_QUEUE_HEAD_NEXT_TERMINATE for dqh when init ep0.
It means the dQH is empty.

Signed-off-by: Neil Zhang <zhangwm@marvell.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
13 years agousb: gadget: mv_udc: ep0 needn't set toggle flag
Neil Zhang [Wed, 12 Oct 2011 08:49:28 +0000 (16:49 +0800)]
usb: gadget: mv_udc: ep0 needn't set toggle flag

According to ChipIdea datasheet, there is no toggle flag for ep0.

Signed-off-by: Neil Zhang <zhangwm@marvell.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
13 years agousb: gadget: mv_udc: fix a clerical error
Neil Zhang [Wed, 12 Oct 2011 08:49:27 +0000 (16:49 +0800)]
usb: gadget: mv_udc: fix a clerical error

The max size of data payload is in bit0 - bit10, so we need use 0x7ff
as the bitmask to fetch from usb_endpoint_descriptor.wMaxPacketSize.

Signed-off-by: Neil Zhang <zhangwm@marvell.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
13 years agousb: gadget: mv_udc: fix kernel panic on some platforms
Neil Zhang [Wed, 12 Oct 2011 08:49:26 +0000 (16:49 +0800)]
usb: gadget: mv_udc: fix kernel panic on some platforms

Some platforms will use usb to download images, the controller may not
be stopped correctly when start kernel. In some cases, it may have some
pending interrupts, and they will be triggered immediately when we finish
requesting irq in function probe. But we haven't finished the device
initialization at this time. So let's stop udc here to avoid this case
occurred.

Signed-off-by: Neil Zhang <zhangwm@marvell.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
13 years agousb: gadget: mv_udc: add section information
Neil Zhang [Wed, 12 Oct 2011 08:49:25 +0000 (16:49 +0800)]
usb: gadget: mv_udc: add section information

Tag the probe function as __devinit.
Tag the remove function as __devexit.

Signed-off-by: Neil Zhang <zhangwm@marvell.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
13 years agousb: gadget: mv_udc: refine the driver structure
Neil Zhang [Wed, 12 Oct 2011 08:49:24 +0000 (16:49 +0800)]
usb: gadget: mv_udc: refine the driver structure

This patch do the following things:

1. Add header and Copyright for marvell usb driver.
2. Add mv_usb.h in include/linux/platform_data, make the driver
   fits all the marvell platform using the same ChipIdea usb ip.
3. Some SOC may has mutiple clock sources, so let me define it
   in mv_usb_platform_data and give two helper functions named
   udc_clock_enable/udc_clock_disable to deal with the clocks.
4. Different SOCs will have some difference in PHY initialization,
   so we will remove file mv_udc_phy.c and add two funtions in
   mv_usb_platform_data, let the platform relative driver to realize it.
5. Rewrite probe function according to the modification list above. Find
   it will kernel panic when probe failed. The root cause is as follows:
When probe failed, the error handle may call device_unregister()
which in return will call gadget_release.In current code,
gadget_release have two issues:
1: the_controller is a NULL pointer.
2: if we free udc here, then the following code in probe
   will access NULL pointer.

Signed-off-by: Neil Zhang <zhangwm@marvell.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
13 years agousb: gadget: renesas_usbhs: fix compile warning
Felipe Balbi [Thu, 13 Oct 2011 17:00:03 +0000 (20:00 +0300)]
usb: gadget: renesas_usbhs: fix compile warning

| drivers/usb/renesas_usbhs/fifo.c: In function ‘usbhsf_dma_prepare_push’:
| drivers/usb/renesas_usbhs/fifo.c:823:7: warning: cast from pointer \
to integer of different size [-Wpointer-to-int-cast]
| drivers/usb/renesas_usbhs/fifo.c: In function ‘usbhsf_dma_try_pop’:
| drivers/usb/renesas_usbhs/fifo.c:900:7: warning: cast from pointer \
to integer of different size [-Wpointer-to-int-cast]

Signed-off-by: Felipe Balbi <balbi@ti.com>
13 years agousb: gadget: renesas_usbhs: drop dependency
Felipe Balbi [Thu, 13 Oct 2011 16:45:17 +0000 (19:45 +0300)]
usb: gadget: renesas_usbhs: drop dependency

that driver can compile cleanly on x86 without
any issues.

Signed-off-by: Felipe Balbi <balbi@ti.com>
13 years agousb: gadget: renesas_usbhs: fixup driver compile style
Kuninori Morimoto [Thu, 13 Oct 2011 04:02:44 +0000 (21:02 -0700)]
usb: gadget: renesas_usbhs: fixup driver compile style

In current renesas-usbhs,
there was inconsistency about the style of kernel module or built-in.
This patch solve it.

[ balbi@ti.com : fix compile issue when building modules ]

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
13 years agousb: gadget: renesas_usbhs: bugfix: don't modify platform data
Kuninori Morimoto [Thu, 13 Oct 2011 04:02:22 +0000 (21:02 -0700)]
usb: gadget: renesas_usbhs: bugfix: don't modify platform data

renesas_usbhs has default callback functions and settings.
And it tried overwrite to platform private data
if platform doesn't have them.
So, if renesas_usbhs was compiled as module,
it will be hung-up on 2nd insmod.
This patch fixup it.
Special thanks to Bastian

Reported-by: Bastian Hecht <hechtb@googlemail.com>
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
13 years agousb: gadget: renesas_usbhs: add mod_host support
Kuninori Morimoto [Tue, 11 Oct 2011 05:07:40 +0000 (22:07 -0700)]
usb: gadget: renesas_usbhs: add mod_host support

This is mod_host prototype support for renesas_usbhs driver.
It doesn't support USB-Hub, and USB-DMAC for now.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
13 years agousb: gadget: renesas_usbhs: usbhs_dcp_control_transfer_done() cares mod_host
Kuninori Morimoto [Tue, 11 Oct 2011 05:07:20 +0000 (22:07 -0700)]
usb: gadget: renesas_usbhs: usbhs_dcp_control_transfer_done() cares mod_host

CCPL setting is needed on only mod_gadget.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
13 years agousb: gadget: renesas_usbhs: add data/status stage handler
Kuninori Morimoto [Tue, 11 Oct 2011 05:07:08 +0000 (22:07 -0700)]
usb: gadget: renesas_usbhs: add data/status stage handler

mod_host needs data/status stage handler

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
13 years agousb: gadget: renesas_usbhs: add INTSTS1 interrupt support
Kuninori Morimoto [Tue, 11 Oct 2011 05:06:57 +0000 (22:06 -0700)]
usb: gadget: renesas_usbhs: add INTSTS1 interrupt support

mod_host use INTSTS1 interrupt

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
13 years agousb: gadget: renesas_usbhs: add usbhs_set_device_speed() support for host
Kuninori Morimoto [Tue, 11 Oct 2011 05:06:46 +0000 (22:06 -0700)]
usb: gadget: renesas_usbhs: add usbhs_set_device_speed() support for host

mod_host needs device speed setup function

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
13 years agousb: gadget: renesas_usbhs: make sure SOF packet sending-out control
Kuninori Morimoto [Tue, 11 Oct 2011 05:06:35 +0000 (22:06 -0700)]
usb: gadget: renesas_usbhs: make sure SOF packet sending-out control

It is enabled to set SOF packet output bit when USBRST bit was set.
And USBRST bit should be set 0 when SOF packet was output.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
13 years agousb: gadget: renesas_usbhs: support otg pin control
Kuninori Morimoto [Tue, 11 Oct 2011 05:06:12 +0000 (22:06 -0700)]
usb: gadget: renesas_usbhs: support otg pin control

some renesas_usbhs device is supporting OTG external device interface.
In that device, it is necessary to control PWEN/EXTLP on DVSTCTR.
This patch support it.
But renesas_usbhs driver doesn't have OTG support for now.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
13 years agousb: gadget: renesas_usbhs: disable pipe on top of interrupt
Kuninori Morimoto [Tue, 11 Oct 2011 05:05:51 +0000 (22:05 -0700)]
usb: gadget: renesas_usbhs: disable pipe on top of interrupt

When data read interrupt happened, the pipe is BUF which means "enable".
then, next un-necessary interrupt/token might be
issued again when all data were popped from fifo.
It will cause un-understandable bug.
This patch decides pipe disable on top of read interrupt.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
13 years agousb: gadget: renesas_usbhs: modify pipe sequence settings
Kuninori Morimoto [Tue, 11 Oct 2011 05:05:30 +0000 (22:05 -0700)]
usb: gadget: renesas_usbhs: modify pipe sequence settings

renesas_usbhs can manually set DATA0/DATA1.
This patch is prepare for mod_host support

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
13 years agousb: gadget: renesas_usbhs: disable auto paket start on usbhs_pkt_push()
Kuninori Morimoto [Tue, 11 Oct 2011 05:04:53 +0000 (22:04 -0700)]
usb: gadget: renesas_usbhs: disable auto paket start on usbhs_pkt_push()

Automatically packet start by usbhs_pkt_push() was useful.
But the pushed packet will be called twice
if new packet was pushed on usbhs_pkt :: done callback.
(1st is called by usbhs_pkt_push(), 2nd is called by usbhsf_pkt_handler())

This patch disables automatic packet start,
and clarified packet start timing.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
13 years agousb: gadget: renesas_usbhs: move done callback to struct usbhs_pkt
Kuninori Morimoto [Tue, 11 Oct 2011 05:04:41 +0000 (22:04 -0700)]
usb: gadget: renesas_usbhs: move done callback to struct usbhs_pkt

transfer done function was registered in struct struct usbhs_pipe_info.
It was good for mod_gadget, but not good for mod_host.
This function move it to struct usbhs_pkt.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
13 years agousb: gadget: renesas_usbhs: add usbhs_pipe_name()
Kuninori Morimoto [Tue, 11 Oct 2011 05:04:23 +0000 (22:04 -0700)]
usb: gadget: renesas_usbhs: add usbhs_pipe_name()

pipe name is usefull function for mod_xxx

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
13 years agousb: gadget: renesas_usbhs: add device select support in usbhs_pipe_config_update()
Kuninori Morimoto [Tue, 11 Oct 2011 05:04:00 +0000 (22:04 -0700)]
usb: gadget: renesas_usbhs: add device select support in usbhs_pipe_config_update()

device select method will be used on mod_host

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
13 years agousb: gadget: renesas_usbhs: add struct usbhs_priv to packet done function
Kuninori Morimoto [Tue, 11 Oct 2011 05:03:39 +0000 (22:03 -0700)]
usb: gadget: renesas_usbhs: add struct usbhs_priv to packet done function

There was no method to get struct usbhs_priv when
packet transfer done function was called.
This patch allow that callback function receive it.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
13 years agousb: gadget: renesas_usbhs: add usbhs_dcp_dir_for_host()
Kuninori Morimoto [Tue, 11 Oct 2011 05:02:57 +0000 (22:02 -0700)]
usb: gadget: renesas_usbhs: add usbhs_dcp_dir_for_host()

renesas_usbhs device needs special bit settings
if it was mod_host and dcp pipe.
This patch support it.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
13 years agousb: gadget: renesas_usbhs: remove unneeded parameter from usbhs_mod_is_host()
Kuninori Morimoto [Tue, 11 Oct 2011 05:02:45 +0000 (22:02 -0700)]
usb: gadget: renesas_usbhs: remove unneeded parameter from usbhs_mod_is_host()

it was possible to get usbhs_mod from usbhs_priv.
this patch remove unneeded parameter.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
13 years agousb: gadget: renesas_usbhs: move usbhs_usbreq_get/set_val() to common.c
Kuninori Morimoto [Tue, 11 Oct 2011 05:02:33 +0000 (22:02 -0700)]
usb: gadget: renesas_usbhs: move usbhs_usbreq_get/set_val() to common.c

usbhs_usbreq_get/set_val() functions were in pipe.c file,
but it is irrelevant to pipe.
this patch move it to common.c

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
13 years agousb: gadget: renesas_usbhs: move usbhsp_type() to usbhs_pipe_type()
Kuninori Morimoto [Tue, 11 Oct 2011 05:02:21 +0000 (22:02 -0700)]
usb: gadget: renesas_usbhs: move usbhsp_type() to usbhs_pipe_type()

Pipe type check macro will be used in other files.
This patch move local macro to global macro.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
13 years agousb: gadget: renesas_usbhs: add usbhs_bus_get_speed()
Kuninori Morimoto [Tue, 11 Oct 2011 05:01:51 +0000 (22:01 -0700)]
usb: gadget: renesas_usbhs: add usbhs_bus_get_speed()

current mod_gadget had got usb speed on
usbhsg_irq_dev_state() which is status change interrupt callback function.
And the usb speed data was included in its parameter.

But this style works for mod_gadget,
but doesn't work for mod_host which
isn't interrupted when device status was changed.

This patch add usbhs_bus_get_speed() to solve this issue.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
13 years agousb: gadget: renesas_usbhs: add bus control functions
Kuninori Morimoto [Tue, 11 Oct 2011 05:01:40 +0000 (22:01 -0700)]
usb: gadget: renesas_usbhs: add bus control functions

this patch add DVSTCTR control function for HOST support

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
13 years agousb: gadget: renesas_usbhs: change usbhsc_bus_ctrl() to usbsc_set_buswait()
Kuninori Morimoto [Tue, 11 Oct 2011 05:01:28 +0000 (22:01 -0700)]
usb: gadget: renesas_usbhs: change usbhsc_bus_ctrl() to usbsc_set_buswait()

renesas_usbhs will have register DVSTCTR control function for HOST support.
This patch changes usbhsc_bus_ctrl() to usbsc_set_buswait(),
to remove DVSTCTR access from it,

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
13 years agousb: gadget: renesas_usbhs: tidyup INTENB0 method
Kuninori Morimoto [Tue, 11 Oct 2011 05:01:15 +0000 (22:01 -0700)]
usb: gadget: renesas_usbhs: tidyup INTENB0 method

This patch tidyup Interrupt Enable Register 0 (INTENB0)
which has relationship with picky BEMPENB/BRDYENB.

 - add explain comment
 - ignore nonsense 0 write case

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
13 years agousb: gadget: renesas_usbhs: struct usbhs_pipe hold handler
Kuninori Morimoto [Tue, 11 Oct 2011 05:00:59 +0000 (22:00 -0700)]
usb: gadget: renesas_usbhs: struct usbhs_pipe hold handler

packet handler had moved to struct usbhs_pipe from struct usbhsg_uep.
it is preparation of mod_host support

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
13 years agousb: gadget: renesas_usbhs: each pipe hold maxpacket size
Kuninori Morimoto [Tue, 11 Oct 2011 05:00:42 +0000 (22:00 -0700)]
usb: gadget: renesas_usbhs: each pipe hold maxpacket size

Current renesas_usbhs pipe accessed DCPMAXP/PIPEMAXP register
to get own maxpacket size every time.
But maxpacket size isn't changed after pipe start,
and register access is too slow.

This patch adds new maxp variable to keep own maxpacket.
And un-used function are removed.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
13 years agousb: gadget: renesas_usbhs: remove desc from usbhs_pipe_malloc
Kuninori Morimoto [Tue, 11 Oct 2011 04:59:46 +0000 (21:59 -0700)]
usb: gadget: renesas_usbhs: remove desc from usbhs_pipe_malloc

Current usbhs_pipe_malloc() used usb_endpoint_descriptor to
get necessary information.
It was very good for mod_gadget which allocate pipe in runtime,
but is not good for mod_host which allocate pipe in initial timing.
This patch remove usb_endpoint_descriptor from usbhs_pipe_malloc()

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
13 years agousb: gadget: renesas_usbhs: move USBHSF_PKT_xxx to pipe.c
Kuninori Morimoto [Tue, 11 Oct 2011 04:58:45 +0000 (21:58 -0700)]
usb: gadget: renesas_usbhs: move USBHSF_PKT_xxx to pipe.c

There is no longer necessity that USBHSF_PKT_xxx are in fifo.h.
it are used in only fifo.c now.
This patch move it.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
13 years agousb: gadget: renesas_usbhs: add suspend/resume support
Kuninori Morimoto [Tue, 11 Oct 2011 04:58:19 +0000 (21:58 -0700)]
usb: gadget: renesas_usbhs: add suspend/resume support

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
13 years agousb: gadget: storage: add superspeed support
Felipe Balbi [Wed, 3 Aug 2011 11:33:27 +0000 (14:33 +0300)]
usb: gadget: storage: add superspeed support

this patch adds superspeed descriptors for the
storage gadgets.

Acked-by: Michal Nazarewicz <mina86@mina86.com>
Acked-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Felipe Balbi <balbi@ti.com>
13 years agousb: gadget: fix typo for default U1/U2 exit latencies
Felipe Balbi [Mon, 10 Oct 2011 06:43:44 +0000 (09:43 +0300)]
usb: gadget: fix typo for default U1/U2 exit latencies

s/DEFULT/DEFAULT/, no functional changes.

Signed-off-by: Felipe Balbi <balbi@ti.com>
13 years agousb: gadget: r8a66597: convert to new style
Felipe Balbi [Mon, 10 Oct 2011 14:18:51 +0000 (17:18 +0300)]
usb: gadget: r8a66597: convert to new style

convert to new style UDC registration and remove
the global 'the_controller' pointer.

Signed-off-by: Felipe Balbi <balbi@ti.com>
13 years agousb: gadget: renesas: convert to new style
Felipe Balbi [Mon, 10 Oct 2011 14:11:20 +0000 (17:11 +0300)]
usb: gadget: renesas: convert to new style

using udc_start()/udc_stop() as we should.

Signed-off-by: Felipe Balbi <balbi@ti.com>
13 years agousb: gadget: net2280: convert to new style
Felipe Balbi [Mon, 10 Oct 2011 07:37:17 +0000 (10:37 +0300)]
usb: gadget: net2280: convert to new style

with this patch we can finally remove the global
"the_controller" pointer.

Signed-off-by: Felipe Balbi <balbi@ti.com>
13 years agousb: gadget: net2272: convert to new style
Felipe Balbi [Mon, 10 Oct 2011 07:33:47 +0000 (10:33 +0300)]
usb: gadget: net2272: convert to new style

with this patch we can finally remove the global
"the controller" pointer.

Signed-off-by: Felipe Balbi <balbi@ti.com>
13 years agousb: gadget: langwell: convert to new style
Felipe Balbi [Sat, 8 Oct 2011 10:17:34 +0000 (13:17 +0300)]
usb: gadget: langwell: convert to new style

with this patch we can finally remove the global
"the_controller" pointer.

Signed-off-by: Felipe Balbi <balbi@ti.com>
13 years agousb: gadget: langwell: don't use the_controller when it's not needed
Felipe Balbi [Sat, 8 Oct 2011 10:08:01 +0000 (13:08 +0300)]
usb: gadget: langwell: don't use the_controller when it's not needed

in most cases, we can fetch our structure by
calling dev_get_drvdata().

Signed-off-by: Felipe Balbi <balbi@ti.com>
13 years agousb: gadget: at91_udc: change french comments to english
Robert Schwebel [Thu, 6 Oct 2011 19:36:26 +0000 (21:36 +0200)]
usb: gadget: at91_udc: change french comments to english

While being there, change C++ style comments to /* */.

Signed-off-by: Robert Schwebel <r.schwebel@pengutronix.de>
Cc: Greg Kroah-Hartman <gregkh@suse.de>
Cc: linux-usb@vger.kernel.org
Signed-off-by: Felipe Balbi <balbi@ti.com>
13 years agousb: gadget: pxa25x: is_vbus_present is gone
Arnd Bergmann [Sat, 1 Oct 2011 20:03:33 +0000 (22:03 +0200)]
usb: gadget: pxa25x: is_vbus_present is gone

A recent commit obsoleted the is_vbus_present function, so
we must not use it any more.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Felipe Balbi <balbi@ti.com>
13 years agousb: gadget: storage: fix mass storage gadgets to work with Synopsys UDC
Paul Zimmerman [Fri, 30 Sep 2011 22:26:06 +0000 (15:26 -0700)]
usb: gadget: storage: fix mass storage gadgets to work with Synopsys UDC

The Synopsys USB device controller requires all OUT transfer request
lengths to be aligned to max packet size. The mass storage gadgets do
not meet this requirement for Super Speed. The gadgets already have a
function which performs this alignment for CBW packets, so use it for
data packets too.

The alternative would be to implement bounce buffers in the DWC3
driver, but that could have a significant impact on performance.

This version is based upon a more-correct patch written by Alan
Stern.

Signed-off-by: Paul Zimmerman <paulz@synopsys.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
13 years agoUSB: gadget: f_midi: allow a dynamic number of input and output ports
Daniel Mack [Wed, 28 Sep 2011 14:41:34 +0000 (16:41 +0200)]
USB: gadget: f_midi: allow a dynamic number of input and output ports

The code in the MIDI gadget was already sort of prepared for multi-port
configuration, so the streaming logic itself didn't need much tweaking.
However, the descriptors change when the number of ports do, and so some
rework of the the preparation algorithms were necessary.

Successfully tested on Linux and Max OS X hosts for both input and
output streams.

Signed-off-by: Daniel Mack <zonque@gmail.com>
Cc: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: Felipe Balbi <balbi@ti.com>
13 years agoUSB: gadget: midi: refactor the device code
Daniel Mack [Wed, 28 Sep 2011 14:41:33 +0000 (16:41 +0200)]
USB: gadget: midi: refactor the device code

Make use of the newly added MIDI function in f_midi.c and strip down
the MIDI gadget code radically. Also use the generic framework function
to avoid code duplication and rename some symbols to bring them in sync
with other code in the gadget framework.

[ balbi@ti.com : fix Section mismatch warnings.
rebased on top of usb_speed_string() patch to
avoid conflicts. ]

Signed-off-by: Daniel Mack <zonque@gmail.com>
Cc: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: Felipe Balbi <balbi@ti.com>
13 years agoUSB: gadget: midi: add midi function driver
Daniel Mack [Wed, 28 Sep 2011 14:41:32 +0000 (16:41 +0200)]
USB: gadget: midi: add midi function driver

This patch adds f_midi.c to implement a USB gadget function that works
with the composite framework, so it can be combined with other USB
functions.

The code for the ALSA/MIDI logic was taken from the midi device gadget,
other parts have been rewritten to benefit from the dynamic descriptor
allocation features.

This was successfully tested on an OMAP3 board.

Signed-off-by: Daniel Mack <zonque@gmail.com>
Cc: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: Felipe Balbi <balbi@ti.com>
13 years agousb gadget: fix langwell_udc.c build error
Randy Dunlap [Fri, 7 Oct 2011 20:57:42 +0000 (13:57 -0700)]
usb gadget: fix langwell_udc.c build error

Move function to fix langwell_udc.c build error:

drivers/usb/gadget/langwell_udc.c: In function 'show_langwell_udc':
drivers/usb/gadget/langwell_udc.c:1693:3: error: implicit declaration of function 'lpm_device_speed'
drivers/usb/gadget/langwell_udc.c: At top level:
drivers/usb/gadget/langwell_udc.c:2637:37: error: conflicting types for 'lpm_device_speed'
drivers/usb/gadget/langwell_udc.c:1693:20: note: previous implicit declaration of 'lpm_device_speed' was here

Signed-off-by: Randy Dunlap <rdunlap@xenotime.net>
Acked-by: Felipe Balbi <balbi@ti.com>
Cc: linux-usb@vger.kernel.org

13 years agousb: gadget: r8a66597-udc: add support for SUDMAC
Yoshihiro Shimoda [Fri, 30 Sep 2011 11:07:38 +0000 (20:07 +0900)]
usb: gadget: r8a66597-udc: add support for SUDMAC

SH7757 has a USB function with internal DMA controller (SUDMAC).
This patch supports the SUDMAC. The SUDMAC is incompatible with
general-purpose DMAC. So, it doesn't use dmaengine.

Signed-off-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
13 years agousb: gadget: r8a66597-udc: use dev_*() instead of printk()
Yoshihiro Shimoda [Fri, 30 Sep 2011 11:07:30 +0000 (20:07 +0900)]
usb: gadget: r8a66597-udc: use dev_*() instead of printk()

This patch also fix the balance of braces.

Signed-off-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
13 years agousb: gadget: r8a66597-udc: add function for external controller
Yoshihiro Shimoda [Fri, 30 Sep 2011 11:07:21 +0000 (20:07 +0900)]
usb: gadget: r8a66597-udc: add function for external controller

R8A66597 has the pin of WR0 and WR1. So, if one write-pin of CPU
connects to the pins, we have to change the setting of FIFOSEL
register in the controller. If we don't change the setting,
the controller cannot send the data of odd length.

Signed-off-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
13 years agousb: gadget: r8a66597-udc: change prototype of r8a66597_write_fifo
Yoshihiro Shimoda [Fri, 30 Sep 2011 11:07:08 +0000 (20:07 +0900)]
usb: gadget: r8a66597-udc: change prototype of r8a66597_write_fifo

Signed-off-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
13 years agoUSB: fix ehci alignment error
Harro Haan [Mon, 10 Oct 2011 12:38:27 +0000 (14:38 +0200)]
USB: fix ehci alignment error

The Kirkwood gave an unaligned memory access error on
line 742 of drivers/usb/host/echi-hcd.c:
"ehci->last_periodic_enable = ktime_get_real();"

Signed-off-by: Harro Haan <hrhaan@gmail.com>
Cc: stable <stable@kernel.org>
Acked-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agoUSB: ftdi_sio: add PID for Sony Ericsson Urban
Hakan Kvist [Mon, 3 Oct 2011 11:41:15 +0000 (13:41 +0200)]
USB: ftdi_sio: add PID for Sony Ericsson Urban

Add PID 0xfc8a, 0xfc8b for device Sony Ericsson Urban

Signed-off-by: Hakan Kvist <hakan.kvist@sonyericsson.com>
Signed-off-by: Oskar Andero <oskar.andero@sonyericsson.com>
Cc: stable <stable@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agousb: Add module.h to various dwc3 drivers
Paul Gortmaker [Fri, 30 Sep 2011 22:08:59 +0000 (18:08 -0400)]
usb: Add module.h to various dwc3 drivers

These files uses the full set of MODULE_ macros and so need to
include module.h directly.

Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agousb: dwc3: convert structures into bitshifts
Felipe Balbi [Fri, 30 Sep 2011 07:58:51 +0000 (10:58 +0300)]
usb: dwc3: convert structures into bitshifts

our parameter structures need to be written to
HW, so instead of assuming little endian, we
convert those into bit shifts.

Signed-off-by: Felipe Balbi <balbi@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agousb: dwc3: gadget: allow clock gating to work
Felipe Balbi [Fri, 30 Sep 2011 07:58:50 +0000 (10:58 +0300)]
usb: dwc3: gadget: allow clock gating to work

The dwc3 core has internal clock gating support.

Let's allow that to happen by clearing the disable
bit in GCTL register.

Signed-off-by: Felipe Balbi <balbi@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agousb: dwc3: core: cache GHWPARAMS* registers
Felipe Balbi [Fri, 30 Sep 2011 07:58:49 +0000 (10:58 +0300)]
usb: dwc3: core: cache GHWPARAMS* registers

cache the contents of GHWPARAMS* registers in
our device structure for easy access.

Signed-off-by: Felipe Balbi <balbi@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agousb: dwc3: add struct dwc3_hwparams
Felipe Balbi [Fri, 30 Sep 2011 07:58:48 +0000 (10:58 +0300)]
usb: dwc3: add struct dwc3_hwparams

That structure will hold a copy of readonly
GHWPARAMS* registers for ease accessing by
the driver.

Signed-off-by: Felipe Balbi <balbi@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agousb: dwc3: gadget: implement streams support
Felipe Balbi [Fri, 30 Sep 2011 07:58:47 +0000 (10:58 +0300)]
usb: dwc3: gadget: implement streams support

The following patch adds support for streams
to dwc3 driver.

While at that, also fix one small issue on
endpoint disable where we should clear all
flags not only ENABLED.

Reviewied-by: Paul Zimmerman <paulz@synopsys.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agousb: dwc3: gadget: add support for Bursts
Felipe Balbi [Fri, 30 Sep 2011 07:58:46 +0000 (10:58 +0300)]
usb: dwc3: gadget: add support for Bursts

We already have the value from gadget drivers,
just need to pass it to our controller.

Signed-off-by: Felipe Balbi <balbi@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agousb: dwc3: gadget: fix DMA offset calculation
Paul Zimmerman [Fri, 30 Sep 2011 07:58:45 +0000 (10:58 +0300)]
usb: dwc3: gadget: fix DMA offset calculation

Fix offset calculation in dwc3_trb_dma_offset()

Signed-off-by: Paul Zimmerman <paulz@synopsys.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agousb: dwc3: gadget: make DWC3_EP_WEDGE do the right thing
Paul Zimmerman [Fri, 30 Sep 2011 07:58:44 +0000 (10:58 +0300)]
usb: dwc3: gadget: make DWC3_EP_WEDGE do the right thing

This makes DWC3_EP_WEDGE do the right thing, which is
prevent DWC3_EP_WEDGE from ever being cleared by a
ClearFeature(HALT) command.

[ balbi@ti.com : allowed set_wedge to send SetHalt command
to controller ]

Signed-off-by: Paul Zimmerman <paulz@synopsys.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agousb: dwc3: gadget: driver should not wait for RxFIFO to drain
Paul Zimmerman [Fri, 30 Sep 2011 07:58:43 +0000 (10:58 +0300)]
usb: dwc3: gadget: driver should not wait for RxFIFO to drain

An older version of the databook said to wait for the FIFO to
drain, but that has been removed from the newer databooks.

Waiting for RxFIFO to drain caused problems when testing against
one of the host controllers available in the market.

After talking to one of the RTL engineers, he stated that we
should _not_ wait for RxFIFO to drain.

Signed-off-by: Paul Zimmerman <paulz@synopsys.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agousb: dwc3: gadget: fix DEPSTARTCFG for non-EP0 EPs
Paul Zimmerman [Fri, 30 Sep 2011 07:58:42 +0000 (10:58 +0300)]
usb: dwc3: gadget: fix DEPSTARTCFG for non-EP0 EPs

DEPSTARTCFG for non-EP0 EPs must only be sent once per config

[ balbi@ti.com : changed config_start to start_config_issued ]

Signed-off-by: Paul Zimmerman <paulz@synopsys.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agousb: dwc: remove "All rights reserved" statement.
Sebastian Andrzej Siewior [Fri, 30 Sep 2011 07:58:41 +0000 (10:58 +0300)]
usb: dwc: remove "All rights reserved" statement.

Some people think that this line is not compatible with the GPL. The
statement was required due to the Buenos Aires Convention and is now
deprecated. I remove it because it is said that it is pointless nowdays.

Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Signed-off-by: Felipe Balbi <balbi@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agousb: dwc3: ep0: fix debug output
Sebastian Andrzej Siewior [Fri, 30 Sep 2011 07:58:40 +0000 (10:58 +0300)]
usb: dwc3: ep0: fix debug output

Use "ep0in" and "ep0out" instead "ep1in" and "ep0out" which is confusing
and not consistent with the remaining output.

Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Signed-off-by: Felipe Balbi <balbi@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agousb: dwc3: ep0: remove second giveback in error case
Sebastian Andrzej Siewior [Fri, 30 Sep 2011 07:58:39 +0000 (10:58 +0300)]
usb: dwc3: ep0: remove second giveback in error case

We already give requests back in dwc3_ep0_stall_and_restart() so
doing it again here will most likely corrupt the list.

Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Signed-off-by: Felipe Balbi <balbi@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agousb: dwc3: ep0: fix debug message
Felipe Balbi [Fri, 30 Sep 2011 07:58:38 +0000 (10:58 +0300)]
usb: dwc3: ep0: fix debug message

The way it was before was really meaningless.
Now it looks saner.

Signed-off-by: Felipe Balbi <balbi@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agousb: dwc3: ep0: ignore direction on 2-stage transfer
Felipe Balbi [Fri, 30 Sep 2011 07:58:37 +0000 (10:58 +0300)]
usb: dwc3: ep0: ignore direction on 2-stage transfer

We don't need to care about direction on a two stage
transfer.

Signed-off-by: Felipe Balbi <balbi@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agousb: dwc3: ep0: Make USB30CV happy with SetAddress
Felipe Balbi [Fri, 30 Sep 2011 07:58:36 +0000 (10:58 +0300)]
usb: dwc3: ep0: Make USB30CV happy with SetAddress

According to USB 3.0 Specification, a SetAddress()
while device is in Configured State has an unspecified
behavior (see Section 9.4.6). Still USB30CV wasn't
happy with my Stall reply.

To make that thing happy, just accept the SetAddress()
always. No problems have been observed thus far.

Signed-off-by: Felipe Balbi <balbi@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agoUSB: add quirk for Logitech C300 web cam
Jon Levell [Thu, 29 Sep 2011 19:42:52 +0000 (20:42 +0100)]
USB: add quirk for Logitech C300 web cam

My webcam is a Logitech C300 and I get "chipmunk"ed squeaky sound.
The following trivial patch fixes it.

Signed-off-by: Jon Levell <linuxusb@coralbark.net>
Cc: stable <stable@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agouser namespace: usb: make usb urbs user namespace aware (v2)
Serge Hallyn [Mon, 26 Sep 2011 15:45:18 +0000 (10:45 -0500)]
user namespace: usb: make usb urbs user namespace aware (v2)

Add to the dev_state and alloc_async structures the user namespace
corresponding to the uid and euid.  Pass these to kill_pid_info_as_uid(),
which can then implement a proper, user-namespace-aware uid check.

Changelog:
Sep 20: Per Oleg's suggestion: Instead of caching and passing user namespace,
uid, and euid each separately, pass a struct cred.
Sep 26: Address Alan Stern's comments: don't define a struct cred at
usbdev_open(), and take and put a cred at async_completed() to
ensure it lasts for the duration of kill_pid_info_as_cred().

Signed-off-by: Serge Hallyn <serge.hallyn@canonical.com>
Cc: Oleg Nesterov <oleg@redhat.com>
Cc: "Eric W. Biederman" <ebiederm@xmission.com>
Cc: Tejun Heo <tj@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agoUSB: message: cleanup min_t() cast in usb_sg_init()
Dan Carpenter [Tue, 27 Sep 2011 06:25:19 +0000 (09:25 +0300)]
USB: message: cleanup min_t() cast in usb_sg_init()

"length" is type size_t so the cast to unsigned int truncates the
upper bytes.  This isn't an issue in real life (I've checked the
callers) but it's a bit messy.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agoUSB: qcserial: add device ID for "HP un2430 Mobile Broadband Module"
Rigbert Hamisch [Tue, 27 Sep 2011 08:46:43 +0000 (10:46 +0200)]
USB: qcserial: add device ID for "HP un2430 Mobile Broadband Module"

add device ID for "HP un2430 Mobile Broadband Module"

Signed-off-by: Rigbert Hamisch <rigbert@gmx.de>
Cc: stable <stable@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>