usb: dwc_otg_310: gadget: stop current transfer on dequeue
authorWu Liang feng <wulf@rock-chips.com>
Wed, 2 Sep 2015 02:07:56 +0000 (10:07 +0800)
committerWu Liang feng <wulf@rock-chips.com>
Sun, 6 Sep 2015 07:53:33 +0000 (15:53 +0800)
commit288180cba4c2a5d7bdd54093a5f7b00bfe73187b
tree8bb3748cce3a95fff531582aa1d476692e4d2b11
parent468345a5026c858f295dedfc5644c8b63a5948c8
usb: dwc_otg_310: gadget: stop current transfer on dequeue

If the request being dequeued is already started, disable endpoint
to stop the transfer and then call dwc_otg_request_done().
Endpoint will be re-enabled on next call to dwc_otg_ep_start_transfer().

TEST=use RK3128/RK3288/RK3368 board, adb root and then adb reboot,
check if usb_req->buf is used after free.

Change-Id: I8c9304f29c578f679ad0841350920f1350bd32df
Signed-off-by: Wu Liang feng <wulf@rock-chips.com>
drivers/usb/dwc_otg_310/dwc_otg_pcd.c