<feed xmlns='http://www.w3.org/2005/Atom'>
<title>u-boot.git/drivers/usb/host, branch v2017.11-rc1</title>
<subtitle>Unnamed repository; edit this file 'description' to name the repository.</subtitle>
<id>http://cgit.235523.xyz/u-boot.git/atom/drivers/usb/host?h=v2017.11-rc1</id>
<link rel='self' href='http://cgit.235523.xyz/u-boot.git/atom/drivers/usb/host?h=v2017.11-rc1'/>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/'/>
<updated>2017-10-01T14:32:55Z</updated>
<entry>
<title>usb: xhci: Set 'Average TRB Length' to 8 for control endpoints</title>
<updated>2017-10-01T14:32:55Z</updated>
<author>
<name>Bin Meng</name>
<email>bmeng.cn@gmail.com</email>
</author>
<published>2017-09-18T13:40:50Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=fae35857e1c38776854442f59d6b56c17e93fc39'/>
<id>urn:sha1:fae35857e1c38776854442f59d6b56c17e93fc39</id>
<content type='text'>
Update the codes to conform with xHCI spec chapter 6.2.3.

Signed-off-by: Bin Meng &lt;bmeng.cn@gmail.com&gt;
</content>
</entry>
<entry>
<title>usb: xhci: Set 'Error Count' to 0 for isoch endpoints</title>
<updated>2017-10-01T14:32:54Z</updated>
<author>
<name>Bin Meng</name>
<email>bmeng.cn@gmail.com</email>
</author>
<published>2017-09-18T13:40:49Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=ab2b727dc03113fe35d6a9c937911055be3d3990'/>
<id>urn:sha1:ab2b727dc03113fe35d6a9c937911055be3d3990</id>
<content type='text'>
Per xHCI spec, 'Error Count' should be set to 0 for isoch endpoints.

Signed-off-by: Bin Meng &lt;bmeng.cn@gmail.com&gt;
</content>
</entry>
<entry>
<title>usb: xhci: Program max burst size for endpoint</title>
<updated>2017-10-01T14:32:54Z</updated>
<author>
<name>Bin Meng</name>
<email>bmeng.cn@gmail.com</email>
</author>
<published>2017-09-18T13:40:48Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=fa483b2c750f6ebdb5946f46b217aa3f9a449531'/>
<id>urn:sha1:fa483b2c750f6ebdb5946f46b217aa3f9a449531</id>
<content type='text'>
The 'Max Burst Size' indicates to the xHC the maximum number of
consecutive USB transactions that should be executed per scheduling
opportunity. This is a “zero-based” value, where 0 to 15 represents
burst sizes of 1 to 16, but at present this is always set to zero.
Let's program the required value according to real needs.

Signed-off-by: Bin Meng &lt;bmeng.cn@gmail.com&gt;
</content>
</entry>
<entry>
<title>usb: xhci: Honor endpoint's interval</title>
<updated>2017-10-01T14:32:54Z</updated>
<author>
<name>Bin Meng</name>
<email>bmeng.cn@gmail.com</email>
</author>
<published>2017-09-18T13:40:47Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=f51966bf7afe44151756e9a2432705bb56bc2007'/>
<id>urn:sha1:f51966bf7afe44151756e9a2432705bb56bc2007</id>
<content type='text'>
USB endpoint reports the period between consecutive requests to send
or receive data as bInverval in its endpoint descriptor. So far this
is ignored by xHCI driver and the 'Interval' field in xHC's endpoint
context is always programmed to zero which means 1ms for low speed
or full speed , or 125us for high speed or super speed. We should
honor the interval by getting it from endpoint descriptor.

Signed-off-by: Bin Meng &lt;bmeng.cn@gmail.com&gt;
</content>
</entry>
<entry>
<title>usb: xhci: Fix max packet size for full speed device endpoint 0</title>
<updated>2017-10-01T14:32:54Z</updated>
<author>
<name>Bin Meng</name>
<email>bmeng.cn@gmail.com</email>
</author>
<published>2017-09-18T13:40:44Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=b5aa857b95194c15126245e99a384ec2fd9536e8'/>
<id>urn:sha1:b5aa857b95194c15126245e99a384ec2fd9536e8</id>
<content type='text'>
In xhci_check_maxpacket(), the control endpoint 0 max packet size
is wrongly taken from the interface's endpoint descriptor. However
the default endpoint 0 does not come with an endpoint descriptor
hence is not included in the interface structure. Change to use
epmaxpacketin[0] instead.

The other bug in this routine is that when setting max packet size
to the xHC endpoint 0 context, it does not clear its previous value
at all before programming a new one.

Signed-off-by: Bin Meng &lt;bmeng.cn@gmail.com&gt;
</content>
</entry>
<entry>
<title>usb: xhci: Add interrupt transfer support</title>
<updated>2017-10-01T14:32:53Z</updated>
<author>
<name>Bin Meng</name>
<email>bmeng.cn@gmail.com</email>
</author>
<published>2017-09-18T13:40:41Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=1897d60130976ece389d5875187b78ba0d41428f'/>
<id>urn:sha1:1897d60130976ece389d5875187b78ba0d41428f</id>
<content type='text'>
xHCI uses normal TRBs for both bulk and interrupt. This adds the
missing interrupt transfer support to xHCI so that devices like
USB keyboard that uses interrupt transfer can work.

Signed-off-by: Bin Meng &lt;bmeng.cn@gmail.com&gt;
</content>
</entry>
<entry>
<title>usb: xhci: Don't assume LS/FS devices are always behind a HS hub</title>
<updated>2017-10-01T14:32:52Z</updated>
<author>
<name>Bin Meng</name>
<email>bmeng.cn@gmail.com</email>
</author>
<published>2017-09-18T13:40:39Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=8a0e6d83070a977442aaba2c5a74cbe34e157012'/>
<id>urn:sha1:8a0e6d83070a977442aaba2c5a74cbe34e157012</id>
<content type='text'>
At present xHCI driver assumes LS/FS devices are attached directly
to a HS hub. If they are connected to a LS/FS hub, the driver will
fail to perform the USB enumeration process on such devices.

This is fixed by looking from the device itself all the way up to
the HS hub where the TT that serves the device is located.

Signed-off-by: Bin Meng &lt;bmeng.cn@gmail.com&gt;
</content>
</entry>
<entry>
<title>dm: usb: emul: Drop usb_emul_reset()</title>
<updated>2017-10-01T14:32:51Z</updated>
<author>
<name>Bin Meng</name>
<email>bmeng.cn@gmail.com</email>
</author>
<published>2017-10-01T13:19:44Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=ad56e4b684a97565cdce15c28df1ccff9032d594'/>
<id>urn:sha1:ad56e4b684a97565cdce15c28df1ccff9032d594</id>
<content type='text'>
With the root hub unbinding in usb_stop(), there is no need to do
a Sandbox-specific reset operation. usb_emul_reset() is no longer
used anywhere, drop it.

Signed-off-by: Bin Meng &lt;bmeng.cn@gmail.com&gt;
</content>
</entry>
<entry>
<title>dm: usb: Remove no longer needed blk_unbind_all()</title>
<updated>2017-10-01T14:32:51Z</updated>
<author>
<name>Bin Meng</name>
<email>bmeng.cn@gmail.com</email>
</author>
<published>2017-10-01T13:19:43Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=ad0a9378bf5cc9280e117b7db94b6bfa1b6e8e76'/>
<id>urn:sha1:ad0a9378bf5cc9280e117b7db94b6bfa1b6e8e76</id>
<content type='text'>
With the root hub unbinding in usb_stop(), there is no need to do
a blk uclass specific unbind operation.

Signed-off-by: Bin Meng &lt;bmeng.cn@gmail.com&gt;
</content>
</entry>
<entry>
<title>dm: usb: Fix broken usb_stop()</title>
<updated>2017-10-01T14:32:51Z</updated>
<author>
<name>Bin Meng</name>
<email>bmeng.cn@gmail.com</email>
</author>
<published>2017-10-01T13:19:42Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=d4efefe32ea8a45b7b30f4769b3928c28e181c73'/>
<id>urn:sha1:d4efefe32ea8a45b7b30f4769b3928c28e181c73</id>
<content type='text'>
At present we only do device_remove() during usb stop. The DM API
device_remove() only marks the device state as inactivated, but
still keeps its USB topology (eg: parent, children, etc) in the DM
device structure. There is no issue if we only start USB subsystem
once and never stop it. But a big issue occurs when we do 'usb stop'
and 'usb start' multiple times.

Strange things may be observed with current implementation, like:
- the enumeration may report only 1 mass storage device is detected,
  but the total number of USB devices is correct.
- USB keyboard does not work anymore after a bunch of 'usb reset'
  even if 'usb tree' shows it is correctly identified.
- read/write flash drive via 'fatload usb' may complain "Bad device"

In fact, every time when USB host controller starts the enumeration
process, it takes random time for each USB port to show up online,
hence each USB device may appear in a different order from previous
enumeration, and gets assigned to a totally different USB address.
As a result, we end up using a stale USB topology in the DM device
structure which still reflects the previous enumeration result, and
it may create an exact same DM device name like generic_bus_0_dev_7
that is already in the DM device structure. And since the DM device
structure is there, there is no device_bind() call to bind driver to
the device during current enumeration process, eventually creating
an inconsistent software representation of the hardware topology, a
non-working USB subsystem.

The fix is to clear the unused USB topology in the usb_stop(), by
calling device_unbind() on each controller's root hub device, and
the unbinding will unbind all of its children automatically.

For Sandbox, we need scan the device tree each time when we start
the USB stack, in order to re-create the emulated USB devices and
bind drivers for them before we actually do the driver probe.

Signed-off-by: Bin Meng &lt;bmeng.cn@gmail.com&gt;
</content>
</entry>
</feed>
