usb: gadget: udc: renesas_usb3: Fix return value of usb3_write_pipe()
authorYoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
Mon, 25 Sep 2017 08:01:25 +0000 (17:01 +0900)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 12 Oct 2017 09:51:15 +0000 (11:51 +0200)
commitd21653d09a0b5f93cbfdcbec5701665a3d3c9feb
treeff31aec6d6d21769ee67bcabe02385a0e2a31b4b
parentdb73b389775a6a43ae5bea5b95ade16d5557c3e2
usb: gadget: udc: renesas_usb3: Fix return value of usb3_write_pipe()

commit 447b8a01b84f048d93d43bfe1fcaa4fcc56595cc upstream.

This patch fixes an issue that this driver cannot go status stage
in control read when the req.zero is set to 1 and the len in
usb3_write_pipe() is set to 0. Otherwise, if we use g_ncm driver,
usb enumeration takes long time (5 seconds or more).

Fixes: 746bfe63bba3 ("usb: gadget: renesas_usb3: add support for Renesas USB3.0 peripheral controller")
Signed-off-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/gadget/udc/renesas_usb3.c