]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/commit
usb:hsotg:samsung: Cable disconnection recovery code
authorLukasz Majewski <l.majewski@samsung.com>
Fri, 4 May 2012 12:17:08 +0000 (14:17 +0200)
committerFelipe Balbi <balbi@ti.com>
Fri, 4 May 2012 12:53:14 +0000 (15:53 +0300)
commit12a1f4dc0dfe4c72e565dc02d6a1c021f3f98b61
treefa9c3414a5cdc802368f67c05b79a639a10ebba2
parent5e891342fd0761fed36c187587115e706c0fa358
usb:hsotg:samsung: Cable disconnection recovery code

This code allows Samsung SoC's to recover its state when
device is disconnected and connected during transfer.

It is necessary, in such a scenario, to reinitialize the USB core
to assure correct initial state of the driver.
This operation is needed since the disconnect interrupt is only
available at HOST mode, which is not supported by this driver.

A simple mechanism with jiffies has been used to perform core reset
only once.

Tested with:
- DFU gadget (various size of the sent data - also packet = MPS)
- Ethernet gadget (CDC and RNDIS)
- Multi Function Gadget (g_multi)

HW:
- Samsung's C210 Universal rev.0

Signed-off-by: Lukasz Majewski <l.majewski@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
drivers/usb/gadget/s3c-hsotg.c