]> git.baikalelectronics.ru Git - 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)
commit120ab7eafd3f6e9111d164331f028a3318503877
treefa9c3414a5cdc802368f67c05b79a639a10ebba2
parent0a747663ceb6a1445bf52caeecf8399eda3586b8
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