linux/drivers/usb/chipidea
Peter Chen 3d94dce3f2 usb: chipidea: udc: using the correct stall implementation
[ Upstream commit 56ffa1d154 ]

According to spec, there are functional and protocol stalls.

For functional stall, it is for bulk and interrupt endpoints,
below are cases for it:
- Host sends SET_FEATURE request for Set-Halt, the udc driver
needs to set stall, and return true unconditionally.
- The gadget driver may call usb_ep_set_halt to stall certain
endpoints, if there is a transfer in pending, the udc driver
should not set stall, and return -EAGAIN accordingly.
These two kinds of stall need to be cleared by host using CLEAR_FEATURE
request (Clear-Halt).

For protocol stall, it is for control endpoint, this stall will
be set if the control request has failed. This stall will be
cleared by next setup request (hardware will do it).

It fixed usbtest (drivers/usb/misc/usbtest.c) Test 13 "set/clear halt"
test failure, meanwhile, this change has been verified by
USB2 CV Compliance Test and MSC Tests.

Cc: <stable@vger.kernel.org> #3.10+
Cc: Alan Stern <stern@rowland.harvard.edu>
Cc: Felipe Balbi <balbi@ti.com>
Signed-off-by: Peter Chen <peter.chen@freescale.com>
Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
History 2015-10-27 22:14:05 -04:00
..
bits.h usb: chipidea: OTG fsm timers initialization 2014-04-24 12:56:35 -07:00
ci.h usb: chipidea: enhance kernel-doc format 2014-09-23 21:32:31 -07:00
ci_hdrc_imx.c chipidea: usbmisc_imx: Add USB support for VF610 SoCs 2014-09-23 21:32:30 -07:00
ci_hdrc_imx.h chipidea: usbmisc_imx: Add USB support for VF610 SoCs 2014-09-23 21:32:30 -07:00
ci_hdrc_msm.c usb: chipidea: msm: Initialize PHY on reset event 2014-09-10 17:30:39 -07:00
ci_hdrc_pci.c usb: chipidea: remove DEFINE_PCI_DEVICE_TABLE macro 2013-12-03 10:22:52 -08:00
ci_hdrc_zevio.c usb: chipidea: add support for USB OTG controller on LSI Zevio SoCs 2014-03-12 12:32:21 -07:00
core.c usb: chipidea: Fix oops when removing the ci_hdrc module 2014-10-27 10:01:05 +08:00
debug.c usb: chipidea: debug: fix sparse non static symbol warnings 2014-07-22 16:31:37 -07:00
debug.h usb: chipidea: drop "13xxx" infix 2013-06-24 16:16:55 -07:00
host.c usb: rename phy to usb_phy in HCD 2014-09-29 11:52:59 -04:00
host.h usb: chipidea: add role init and destroy APIs 2013-08-14 12:37:19 -07:00
Kconfig usb: chipidea: USB_CHIPIDEA should depend on HAS_DMA 2013-09-25 17:30:39 -07:00
Makefile usb: chipidea: usb OTG fsm initialization. 2014-04-24 12:56:34 -07:00
otg.c usb: chipidea: add sys inputs for OTG fsm input 2014-04-24 12:56:35 -07:00
otg.h usb: chipidea: using one inline function to cover queue work operations 2014-05-23 11:35:02 +09:00
otg_fsm.c usb: chipidea: otg: remove mutex unlock and lock while stop and start role 2015-05-17 19:12:38 -04:00
otg_fsm.h usb: chipidea: add sys inputs for OTG fsm input 2014-04-24 12:56:35 -07:00
udc.c usb: chipidea: udc: using the correct stall implementation 2015-10-27 22:14:05 -04:00
udc.h usb: chipidea: add role init and destroy APIs 2013-08-14 12:37:19 -07:00
usbmisc_imx.c chipidea: usbmisc_imx: Add USB support for VF610 SoCs 2014-09-23 21:32:30 -07:00