<feed xmlns='http://www.w3.org/2005/Atom'>
<title>u-boot.git/common/usb.c, branch v2010.06</title>
<subtitle>Unnamed repository; edit this file 'description' to name the repository.
</subtitle>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/'/>
<entry>
<title>USB: usb_control_msg wait for driver ISR to set status.</title>
<updated>2010-02-03T21:06:59+00:00</updated>
<author>
<name>Remy Bohmer</name>
<email>linux@bohmer.net</email>
</author>
<published>2010-02-01T18:40:47+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=84d36b30181acfb72f22d1105c15574b30ea2fa1'/>
<id>84d36b30181acfb72f22d1105c15574b30ea2fa1</id>
<content type='text'>
This patch changes usb_control_msg back to the state prior to commit
48867208444cb2a82e2af9c3249e90b7ed4a1751.

The USB driver ISR routine may update the status.

Signed-off-by: Daniel Hellstrom &lt;daniel@gaisler.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This patch changes usb_control_msg back to the state prior to commit
48867208444cb2a82e2af9c3249e90b7ed4a1751.

The USB driver ISR routine may update the status.

Signed-off-by: Daniel Hellstrom &lt;daniel@gaisler.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>USB Consolidate descriptor definitions</title>
<updated>2009-12-20T11:47:37+00:00</updated>
<author>
<name>Tom Rix</name>
<email>Tom.Rix@windriver.com</email>
</author>
<published>2009-10-31T17:37:38+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=8f8bd565f35ff8a068727bfcf8975c50df082043'/>
<id>8f8bd565f35ff8a068727bfcf8975c50df082043</id>
<content type='text'>
The header files usb.h and usbdescriptors.h have the same nameed
structure definitions for

usb_config_descriptor
usb_interface_descriptor
usb_endpoint_descriptor
usb_device_descriptor
usb_string_descriptor

These are out right duplicates in usb.h

usb_device_descriptor
usb_string_descriptor

This one has extra unused elements

usb_endpoint_descriptor

	unsigned char	bRefresh
	unsigned char	bSynchAddress;

These in usb.h have extra elements at the end of the usb 2.0
specified descriptor and are used.

usb_config_descriptor
usb_interface_descriptor

The change is to consolidate the definition of the descriptors
to usbdescriptors.h.  The dublicates in usb.h are removed.
The extra element structure will have their name shorted by
removing the '_descriptor' suffix.

So

usb_config_descriptor -&gt; usb_config
usb_interface_descriptor -&gt; usb_interface

For these, the common descriptor elements are accessed now
by an element 'desc'.

As an example

-	if (iface-&gt;bInterfaceClass != USB_CLASS_HUB)
+	if (iface-&gt;desc.bInterfaceClass != USB_CLASS_HUB)

This has been compile tested on MAKEALL arm, ppc and mips.

Signed-off-by: Tom Rix &lt;Tom.Rix@windriver.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The header files usb.h and usbdescriptors.h have the same nameed
structure definitions for

usb_config_descriptor
usb_interface_descriptor
usb_endpoint_descriptor
usb_device_descriptor
usb_string_descriptor

These are out right duplicates in usb.h

usb_device_descriptor
usb_string_descriptor

This one has extra unused elements

usb_endpoint_descriptor

	unsigned char	bRefresh
	unsigned char	bSynchAddress;

These in usb.h have extra elements at the end of the usb 2.0
specified descriptor and are used.

usb_config_descriptor
usb_interface_descriptor

The change is to consolidate the definition of the descriptors
to usbdescriptors.h.  The dublicates in usb.h are removed.
The extra element structure will have their name shorted by
removing the '_descriptor' suffix.

So

usb_config_descriptor -&gt; usb_config
usb_interface_descriptor -&gt; usb_interface

For these, the common descriptor elements are accessed now
by an element 'desc'.

As an example

-	if (iface-&gt;bInterfaceClass != USB_CLASS_HUB)
+	if (iface-&gt;desc.bInterfaceClass != USB_CLASS_HUB)

This has been compile tested on MAKEALL arm, ppc and mips.

Signed-off-by: Tom Rix &lt;Tom.Rix@windriver.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>usb_scan_devices: fix output with no devices</title>
<updated>2009-01-28T18:57:31+00:00</updated>
<author>
<name>Bryan Wu</name>
<email>bryan.wu@analog.com</email>
</author>
<published>2009-01-19T04:04:27+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=1a448db77b10153703bc5e4ad13dd55d88beb1d6'/>
<id>1a448db77b10153703bc5e4ad13dd55d88beb1d6</id>
<content type='text'>
We should check the return of usb_new_device() so that if no USB device is
found, we print out the right message rather than always saying "new usb
device found".

Signed-off-by: Bryan Wu &lt;bryan.wu@analog.com&gt;
Signed-off-by: Mike Frysinger &lt;vapier@gentoo.org&gt;
Signed-off-by: Remy Bohmer &lt;linux@bohmer.net&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
We should check the return of usb_new_device() so that if no USB device is
found, we print out the right message rather than always saying "new usb
device found".

Signed-off-by: Bryan Wu &lt;bryan.wu@analog.com&gt;
Signed-off-by: Mike Frysinger &lt;vapier@gentoo.org&gt;
Signed-off-by: Remy Bohmer &lt;linux@bohmer.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>USB: Add high-speed (480Mb/s) to all USB related outputs</title>
<updated>2009-01-28T18:57:31+00:00</updated>
<author>
<name>Stefan Roese</name>
<email>sr@denx.de</email>
</author>
<published>2009-01-22T09:11:21+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=f1c1f540243438246aefb703fdcf16957e3a72e1'/>
<id>f1c1f540243438246aefb703fdcf16957e3a72e1</id>
<content type='text'>
With this patch the USB related connection speed output ("usb tree" command and
debug output) is now high-speed enabled.

This patch also fixes a compilation warning when debugging is enabled.

Signed-off-by: Stefan Roese &lt;sr@denx.de&gt;
Signed-off-by: Remy Bohmer &lt;linux@bohmer.net&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
With this patch the USB related connection speed output ("usb tree" command and
debug output) is now high-speed enabled.

This patch also fixes a compilation warning when debugging is enabled.

Signed-off-by: Stefan Roese &lt;sr@denx.de&gt;
Signed-off-by: Remy Bohmer &lt;linux@bohmer.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>USB change speed</title>
<updated>2009-01-28T18:57:28+00:00</updated>
<author>
<name>Michael Trimarchi</name>
<email>trimarchi@gandalf.sssup.it</email>
</author>
<published>2008-12-18T09:05:37+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=366523c26b6320af171459b19e6e0e9e3baa83ca'/>
<id>366523c26b6320af171459b19e6e0e9e3baa83ca</id>
<content type='text'>
USB changes the speed according to the port status

Signed-off-by: Michael Trimarchi &lt;trimarchimichael@yahoo.it&gt;
Signed-off-by: Remy Bohmer &lt;linux@bohmer.net&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
USB changes the speed according to the port status

Signed-off-by: Michael Trimarchi &lt;trimarchimichael@yahoo.it&gt;
Signed-off-by: Remy Bohmer &lt;linux@bohmer.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Prepare USB layer for ehci</title>
<updated>2009-01-28T18:57:27+00:00</updated>
<author>
<name>Michael Trimarchi</name>
<email>trimarchi@gandalf.sssup.it</email>
</author>
<published>2008-11-28T12:19:19+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=3e126484df7868e341545cce740b24b62b0cd3b7'/>
<id>3e126484df7868e341545cce740b24b62b0cd3b7</id>
<content type='text'>
Prepare USB layer for ehci support

Signed-off-by: Michael Trimarchi &lt;trimarchi@gandalf.sssup.it&gt;
Signed-off-by: Remy Böhmer &lt;linux@bohmer.net&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Prepare USB layer for ehci support

Signed-off-by: Michael Trimarchi &lt;trimarchi@gandalf.sssup.it&gt;
Signed-off-by: Remy Böhmer &lt;linux@bohmer.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>USB style patch, 80 chars strict</title>
<updated>2008-11-28T20:24:12+00:00</updated>
<author>
<name>Michael Trimarchi</name>
<email>trimarchi@gandalf.sssup.it</email>
</author>
<published>2008-11-26T16:41:34+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=de39f8c19d7c12017248c49d432dcb81db68f724'/>
<id>de39f8c19d7c12017248c49d432dcb81db68f724</id>
<content type='text'>
USB Code style patch

Signed-off-by: Michael Trimarchi &lt;trimarchi@gandalf.sssup.it&gt;
Signed-off-by: Remy Böhmer &lt;linux@bohmer.net&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
USB Code style patch

Signed-off-by: Michael Trimarchi &lt;trimarchi@gandalf.sssup.it&gt;
Signed-off-by: Remy Böhmer &lt;linux@bohmer.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>fix USB initialisation procedure</title>
<updated>2008-10-14T14:42:44+00:00</updated>
<author>
<name>Remy Bohmer</name>
<email>linux@bohmer.net</email>
</author>
<published>2008-10-10T08:23:21+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=48867208444cb2a82e2af9c3249e90b7ed4a1751'/>
<id>48867208444cb2a82e2af9c3249e90b7ed4a1751</id>
<content type='text'>
The max packet size is encoded as 0,1,2,3 for 8,16,32,64 bytes.
At some places directly 8,16,32,64 was used instead of the encoded
value. Made a enum for the options to make this more clear and to help
preventing similar errors in the future.

After fixing this bug it became clear that another bug existed where
the 'pipe' is and-ed with PIPE_* flags, where it should have been
'usb_pipetype(pipe)', or even better usb_pipeint(pipe).

Also removed the triple 'get_device_descriptor' sequence, it has no use,
and Windows nor Linux behaves that way.
There is also a poll going on with a timeout when usb_control_msg() fails.
However, the poll is useless, because the flag will never be set on a error,
because there is no code that runs in a parallel that can set this flag.
Changed this to something more logical.

Tested on AT91SAM9261ek and compared the flow on the USB bus to what
Linux is doing. There is no difference anymore in the early initialisation
sequence.

Signed-off-by: Remy Bohmer &lt;linux@bohmer.net&gt;
Signed-off-by: Markus Klotzbuecher &lt;mk@denx.de&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The max packet size is encoded as 0,1,2,3 for 8,16,32,64 bytes.
At some places directly 8,16,32,64 was used instead of the encoded
value. Made a enum for the options to make this more clear and to help
preventing similar errors in the future.

After fixing this bug it became clear that another bug existed where
the 'pipe' is and-ed with PIPE_* flags, where it should have been
'usb_pipetype(pipe)', or even better usb_pipeint(pipe).

Also removed the triple 'get_device_descriptor' sequence, it has no use,
and Windows nor Linux behaves that way.
There is also a poll going on with a timeout when usb_control_msg() fails.
However, the poll is useless, because the flag will never be set on a error,
because there is no code that runs in a parallel that can set this flag.
Changed this to something more logical.

Tested on AT91SAM9261ek and compared the flow on the USB bus to what
Linux is doing. There is no difference anymore in the early initialisation
sequence.

Signed-off-by: Remy Bohmer &lt;linux@bohmer.net&gt;
Signed-off-by: Markus Klotzbuecher &lt;mk@denx.de&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>USB layer of U-Boot causes USB protocol errors while using USB memory sticks</title>
<updated>2008-09-17T13:41:21+00:00</updated>
<author>
<name>Remy Bohmer</name>
<email>linux@bohmer.net</email>
</author>
<published>2008-09-16T12:55:44+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=c9e8436b10cca53fca4904ecbadcd6231ad72c38'/>
<id>c9e8436b10cca53fca4904ecbadcd6231ad72c38</id>
<content type='text'>
There are several differences between Linux, Windows and U-boot for initialising the
USB devices. While analysing the behaviour of U-boot it turned out that U-boot does
things really different, and some are wrong (compared to the USB standard).

This patch fixes some errors:
* The NEW_init procedure that was already in the code is good, while the old procedure
  is wrong. See code comments for more info.
* On a Control request the data returned by the device can be more than 8 bytes, while
  the host limits it to 8 bytes. This caused the host to generate a DataOverrun error.
  This results in a lot of USB sticks not being recognised, and the transmission ended
  frequently with a CTL:TIMEOUT Error.
* Added a flag CONFIG_LEGACY_USB_INIT_SEQ to allow users to use the old init procedure.

Signed-off-by: Remy Bohmer &lt;linux@bohmer.net&gt;
Signed-off-by: Markus Klotzbuecher &lt;mk@denx.de&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
There are several differences between Linux, Windows and U-boot for initialising the
USB devices. While analysing the behaviour of U-boot it turned out that U-boot does
things really different, and some are wrong (compared to the USB standard).

This patch fixes some errors:
* The NEW_init procedure that was already in the code is good, while the old procedure
  is wrong. See code comments for more info.
* On a Control request the data returned by the device can be more than 8 bytes, while
  the host limits it to 8 bytes. This caused the host to generate a DataOverrun error.
  This results in a lot of USB sticks not being recognised, and the transmission ended
  frequently with a CTL:TIMEOUT Error.
* Added a flag CONFIG_LEGACY_USB_INIT_SEQ to allow users to use the old init procedure.

Signed-off-by: Remy Bohmer &lt;linux@bohmer.net&gt;
Signed-off-by: Markus Klotzbuecher &lt;mk@denx.de&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Refactoring parts of the common USB OHCI code</title>
<updated>2008-09-17T13:41:16+00:00</updated>
<author>
<name>Remy Bohmer</name>
<email>linux@bohmer.net</email>
</author>
<published>2008-09-16T12:55:43+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=6f5794a6f78b313231256958fd73673c6aacc116'/>
<id>6f5794a6f78b313231256958fd73673c6aacc116</id>
<content type='text'>
This patch refactors some large routines of the USB OHCI code by
making some routines smaller and more readable which helps
debugging and understanding the code. (Makes the code looks
somewhat more like the Linux implementation.)

Also made entire file compliant to Linux Coding Rules (checkpatch.pl compliant)

Signed-off-by: Remy Bohmer &lt;linux@bohmer.net&gt;
Signed-off-by: Markus Klotzbuecher &lt;mk@denx.de&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This patch refactors some large routines of the USB OHCI code by
making some routines smaller and more readable which helps
debugging and understanding the code. (Makes the code looks
somewhat more like the Linux implementation.)

Also made entire file compliant to Linux Coding Rules (checkpatch.pl compliant)

Signed-off-by: Remy Bohmer &lt;linux@bohmer.net&gt;
Signed-off-by: Markus Klotzbuecher &lt;mk@denx.de&gt;
</pre>
</div>
</content>
</entry>
</feed>
