usb: gadget: dummy_hcd: fix rescan logic for transfer
authorIgor Kotrasinski <i.kotrasinsk@samsung.com>
Tue, 15 Sep 2015 14:55:31 +0000 (16:55 +0200)
committerFelipe Balbi <balbi@ti.com>
Mon, 21 Sep 2015 19:42:36 +0000 (14:42 -0500)
commite42bd6a54b97e2a39b5004deac66a0fcd6ebbe75
treeab00000e596530e458e386eb2c9ae1d863d8e4af
parent5dda5be9d501084e8a6242e6dbeb8eea1daf01c8
usb: gadget: dummy_hcd: fix rescan logic for transfer

transfer() schedules a rescan for transfers larger than
maxpacket, which is wrong for transfers that are multiples
of maxpacket.

Rewrite to fix and clarify packet multiple / remainder
transfer logic.

Signed-off-by: Igor Kotrasinski <i.kotrasinsk@samsung.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
drivers/usb/gadget/udc/dummy_hcd.c