<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/drivers/usb/chipidea/udc.c, branch linux-4.2.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-4.2.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-4.2.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2015-12-09T19:31:21Z</updated>
<entry>
<title>usb: chipidea: otg: gadget module load and unload support</title>
<updated>2015-12-09T19:31:21Z</updated>
<author>
<name>Li Jun</name>
</author>
<published>2014-12-12T01:11:42Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=da14c81586682c2648169a9874895cd26045c67c'/>
<id>urn:sha1:da14c81586682c2648169a9874895cd26045c67c</id>
<content type='text'>
commit 85da852df66e5e0d3aba761b0fece7c958ff0685 upstream.

This patch is to support load and unload gadget driver in full OTG mode.

Signed-off-by: Li Jun &lt;jun.li@freescale.com&gt;
Signed-off-by: Peter Chen &lt;peter.chen@freescale.com&gt;
Tested-by: Jiada Wang &lt;jiada_wang@mentor.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>usb: chipidea: udc: using the correct stall implementation</title>
<updated>2015-10-22T21:49:29Z</updated>
<author>
<name>Peter Chen</name>
</author>
<published>2015-08-24T06:10:07Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=52b0a92d5906aa881471d549fdf293fe3d563ef4'/>
<id>urn:sha1:52b0a92d5906aa881471d549fdf293fe3d563ef4</id>
<content type='text'>
commit 56ffa1d154c7e12af16273f0cdc42690dd05caf5 upstream.

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: Alan Stern &lt;stern@rowland.harvard.edu&gt;
Cc: Felipe Balbi &lt;balbi@ti.com&gt;
Signed-off-by: Peter Chen &lt;peter.chen@freescale.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>usb: chipidea: udc: bypass pullup DP when gadget connect in OTG fsm mode</title>
<updated>2015-04-08T06:13:02Z</updated>
<author>
<name>Li Jun</name>
</author>
<published>2015-03-23T08:03:35Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=9b6567e19bc55187bc1bb094b00a9f63acb30071'/>
<id>urn:sha1:9b6567e19bc55187bc1bb094b00a9f63acb30071</id>
<content type='text'>
By pass pullup DP in OTG fsm mode when do gadget connect, to let it handled
by OTG state machine.

This patch can fix the problem you found with my HNP polling patchset after
below 3 patches introduced:
467a78c usb: chipidea: udc: apply new usb_udc_vbus_handler interface
628ef0d usb: udc: add usb_udc_vbus_handler
dfea9c9 usb: udc: store usb_udc pointer in struct usb_gadget

Problem:
- Connect USB cable and MicroAB cable between two boards
- Boot up two boards
- load g_mass_storage at B-device side, the enumeration will success,
and A will see a usb mass-storage device
- load g_mass_storage at A-device side, the problem has occurred, the
connection will be lost at the beginning, then connect again.

This patch is based on
commit eff933c1d3a2e046492b3dfc86db813856553a29
(chipidea: pci: make it depends on NOP_USB_XCEIV)
on branch peter-usb-dev of
git://git.kernel.org/pub/scm/linux/kernel/git/peter.chen/usb.git

Signed-off-by: Li Jun &lt;jun.li@freescale.com&gt;
Signed-off-by: Peter Chen &lt;peter.chen@freescale.com&gt;
</content>
</entry>
<entry>
<title>Merge tag 'usb-for-v4.1' of git://git.kernel.org/pub/scm/linux/kernel/git/balbi/usb into usb-next</title>
<updated>2015-03-24T21:57:49Z</updated>
<author>
<name>Greg Kroah-Hartman</name>
</author>
<published>2015-03-24T21:57:49Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=1c41a9570a02cec80be5fb4f7f9cf206220d84a5'/>
<id>urn:sha1:1c41a9570a02cec80be5fb4f7f9cf206220d84a5</id>
<content type='text'>
Felipe writes:

usb: patches for v4.1 merge window

As usual, a big pile of commits. This time a total
of 111 non-merge commits.

Other than the usual set of cleanups and non-critical
fixes, we have some interesting work for AM335x's MUSB
babble recovery. Now that takes a lot less time and we
don't have to Reset MUSB all the time.

The printer gadget has been converted to configfs interface
and the atmel udc has learned suspend/resume with wakeup.

Signed-off-by: Felipe Balbi &lt;balbi@ti.com&gt;
</content>
</entry>
<entry>
<title>Merge 4.0-rc5 into usb-next</title>
<updated>2015-03-23T20:49:37Z</updated>
<author>
<name>Greg Kroah-Hartman</name>
</author>
<published>2015-03-23T20:49:37Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=cd0e075784f4bce97b4ed47d4b354f045e895546'/>
<id>urn:sha1:cd0e075784f4bce97b4ed47d4b354f045e895546</id>
<content type='text'>
We want the USB fixes in here as well to resolve merge conflicts.

Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>usb: chipidea: udc: apply new usb_udc_vbus_handler interface</title>
<updated>2015-03-19T16:26:19Z</updated>
<author>
<name>Peter Chen</name>
</author>
<published>2015-03-06T02:36:04Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=467a78c82ad5f9a3e3c80eb4ba17de6bb70e4f9b'/>
<id>urn:sha1:467a78c82ad5f9a3e3c80eb4ba17de6bb70e4f9b</id>
<content type='text'>
It can move all pullup/pulldown operation control to udc-core
through usb_gadget_connect/usb_gadget_disconnect according to
vbus status.

Signed-off-by: Peter Chen &lt;peter.chen@freescale.com&gt;
Signed-off-by: Felipe Balbi &lt;balbi@ti.com&gt;
</content>
</entry>
<entry>
<title>usb: chipidea: Add errata for revision 2.40a</title>
<updated>2015-03-18T15:19:10Z</updated>
<author>
<name>Sanchayan Maity</name>
</author>
<published>2015-02-11T04:44:56Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=06bdfcdb139e95edbebeb719200de5d535afe526'/>
<id>urn:sha1:06bdfcdb139e95edbebeb719200de5d535afe526</id>
<content type='text'>
At chipidea revision 2.40a, there is a below errata:

9000531823  B2-Medium  Adding a dTD to a Primed Endpoint May Not Get Recognized

Title: Adding a dTD to a Primed Endpoint May Not Get Recognized

Impacted Configuration: All device mode configurations.

Description:
There is an issue with the add dTD tripwire semaphore (ATDTW bit in USBCMD register)
that can cause the controller to ignore a dTD that is added to a primed endpoint.
When this happens, the software can read the tripwire bit and the status bit at '1'
even though the endpoint is unprimed.

After executing a dTD, the device controller endpoint state machine executes a final
read of the dTD terminate bit to check if the application added a dTD to the linked
list at the last moment. This read is done in the finpkt_read_latest_next_td (44) state.
After the read is performed, if the terminate bit is still set, the state machine moves
to unprime the endpoint. The decision to unprime the endpoint is done in the
checkqh_decision (59) state, based on the value of the terminate bit.
Before reaching the checkqh_decision state, the state machine traverses the
writeqhtd_status (57), writeqh_status (56), and release_prime_mask (42) states.
As shown in the waveform, the ep_addtd_tripwire_clr signal is not set to clear
the tripwire bit in these states.

Workaround:
The software must implement a periodic poll cycle, and check for each dTD
pending on execution (Active = 1), if the enpoint is primed. It can do this by reading
the corresponding bits in the ENDPTPRIME and ENDPTSTAT registers. If these bits are
read at 0, the software needs to re-prime the endpoint by writing 1 to the corresponding
bit in the ENDPTPRIME register. This can be done for every microframe, every frame or
with a larger interval, depending on the urgency of transfer execution for the application.

Tested-by: Stefan Agner &lt;stefan@agner.ch&gt;
Signed-off-by: Peter Chen &lt;peter.chen@freescale.com&gt;
Signed-off-by: Sanchayan Maity &lt;maitysanchayan@gmail.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>usb: chipidea: udc: return immediately if re-enable non-empty endpoint</title>
<updated>2015-03-18T15:19:08Z</updated>
<author>
<name>Peter Chen</name>
</author>
<published>2015-02-11T04:44:41Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=d5d1e1bed4da02bd7a2352ab495721e31a7d95e4'/>
<id>urn:sha1:d5d1e1bed4da02bd7a2352ab495721e31a7d95e4</id>
<content type='text'>
Some gadget driver (like uac1) will try to enable endpoint again even
the ep is not empty, it will cause the ep reset again and may affect
the dTD list which has already queued.

It returns -EBUSY immediately, and indicate the endpoint is in use.
In this way, the ep's behavior will not be affected, and the gadget
driver is also notified.

Cc: Xuebing Wang &lt;xbing6@gmail.com&gt;
Signed-off-by: Peter Chen &lt;peter.chen@freescale.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>usb: chipidea: otg: add a_alt_hnp_support response for B device</title>
<updated>2015-03-15T09:27:20Z</updated>
<author>
<name>Li Jun</name>
</author>
<published>2015-03-08T08:05:01Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=d20f7807996c69537e07443ef8dec4e01a28b099'/>
<id>urn:sha1:d20f7807996c69537e07443ef8dec4e01a28b099</id>
<content type='text'>
This patch adds response to a_alt_hnp_support set feature request from legacy
A device, that is, B-device can provide a message to the user indicating that
the user needs to connect the B-device to an alternate port on the A-device.
A device sets this feature indicates to the B-device that it is connected
to an A-device port that is not capable of HNP, but that the A-device does have
an alternate port that is capable of HNP.

[Peter]
Without this patch, the OTG B device can't be enumerated on
non-HNP port at A device, see below log:
[    2.287464] usb 1-1: Dual-Role OTG device on non-HNP port
[    2.293105] usb 1-1: can't set HNP mode: -32
[    2.417422] usb 1-1: new high-speed USB device number 4 using ci_hdrc
[    2.460635] usb 1-1: Dual-Role OTG device on non-HNP port
[    2.466424] usb 1-1: can't set HNP mode: -32
[    2.587464] usb 1-1: new high-speed USB device number 5 using ci_hdrc
[    2.630649] usb 1-1: Dual-Role OTG device on non-HNP port
[    2.636436] usb 1-1: can't set HNP mode: -32
[    2.641003] usb usb1-port1: unable to enumerate USB device

Cc: stable &lt;stable@vger.kernel.org&gt;
Acked-by: Peter Chen &lt;peter.chen@freescale.com&gt;
Signed-off-by: Li Jun &lt;b47624@freescale.com&gt;
Signed-off-by: Peter Chen &lt;peter.chen@freescale.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>usb: chipidea: udc: add set_selfpowered gaget ops</title>
<updated>2015-01-29T16:32:37Z</updated>
<author>
<name>Peter Chen</name>
</author>
<published>2015-01-28T08:32:25Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=1009f9a36d30f87676ede4c69f97a4eb45001f15'/>
<id>urn:sha1:1009f9a36d30f87676ede4c69f97a4eb45001f15</id>
<content type='text'>
The gadget power property will be used at get_status request.

Signed-off-by: Peter Chen &lt;peter.chen@freescale.com&gt;
Signed-off-by: Felipe Balbi &lt;balbi@ti.com&gt;
</content>
</entry>
</feed>
