<feed xmlns='http://www.w3.org/2005/Atom'>
<title>u-boot.git/include/usb.h, branch v2009.01</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: descriptor handling</title>
<updated>2008-12-09T20:26:45+00:00</updated>
<author>
<name>Stefan Althoefer</name>
<email>stefan.althoefer@web.de</email>
</author>
<published>2008-12-07T18:39:11+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=d2776827315c3d469b8cb4cec14d58877798daa2'/>
<id>d2776827315c3d469b8cb4cec14d58877798daa2</id>
<content type='text'>
Hi,

I found a bug when working with the u-boot USB subsystem on IXP425 processor
(big endian Xscale aka ARMv5).
I recognized that the second usb_endpoint_descriptor of the attached memory
stick was corrupted.

The reason for this are the packed structures below (either u-boot and
u-boot-usb):

--------------
/* Endpoint descriptor */
struct usb_endpoint_descriptor {
	unsigned char  bLength;
	unsigned char  bDescriptorType;
	unsigned char  bEndpointAddress;
	unsigned char  bmAttributes;
	unsigned short wMaxPacketSize;
	unsigned char  bInterval;
	unsigned char  bRefresh;
	unsigned char  bSynchAddress;

} __attribute__ ((packed));
/* Interface descriptor */
struct usb_interface_descriptor {
	unsigned char  bLength;
	unsigned char  bDescriptorType;
	unsigned char  bInterfaceNumber;
	unsigned char  bAlternateSetting;
	unsigned char  bNumEndpoints;
	unsigned char  bInterfaceClass;
	unsigned char  bInterfaceSubClass;
	unsigned char  bInterfaceProtocol;
	unsigned char  iInterface;

	unsigned char  no_of_ep;
	unsigned char  num_altsetting;
	unsigned char  act_altsetting;
	struct usb_endpoint_descriptor ep_desc[USB_MAXENDPOINTS];
} __attribute__ ((packed));
------------

As usb_endpoint_descriptor is only 7byte in length, the start of all
odd ep_desc[] structures is not word aligned. This makes wMaxPacketSize
of these structures also not word aligned.

ARMv5 Architecture however does not support non-aligned multibyte
data type (see A2.8 of ARM Architecture Reference Manual).

Signed-off-by: Stefan Althoefer &lt;stefan.althoefer@web.de&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>
Hi,

I found a bug when working with the u-boot USB subsystem on IXP425 processor
(big endian Xscale aka ARMv5).
I recognized that the second usb_endpoint_descriptor of the attached memory
stick was corrupted.

The reason for this are the packed structures below (either u-boot and
u-boot-usb):

--------------
/* Endpoint descriptor */
struct usb_endpoint_descriptor {
	unsigned char  bLength;
	unsigned char  bDescriptorType;
	unsigned char  bEndpointAddress;
	unsigned char  bmAttributes;
	unsigned short wMaxPacketSize;
	unsigned char  bInterval;
	unsigned char  bRefresh;
	unsigned char  bSynchAddress;

} __attribute__ ((packed));
/* Interface descriptor */
struct usb_interface_descriptor {
	unsigned char  bLength;
	unsigned char  bDescriptorType;
	unsigned char  bInterfaceNumber;
	unsigned char  bAlternateSetting;
	unsigned char  bNumEndpoints;
	unsigned char  bInterfaceClass;
	unsigned char  bInterfaceSubClass;
	unsigned char  bInterfaceProtocol;
	unsigned char  iInterface;

	unsigned char  no_of_ep;
	unsigned char  num_altsetting;
	unsigned char  act_altsetting;
	struct usb_endpoint_descriptor ep_desc[USB_MAXENDPOINTS];
} __attribute__ ((packed));
------------

As usb_endpoint_descriptor is only 7byte in length, the start of all
odd ep_desc[] structures is not word aligned. This makes wMaxPacketSize
of these structures also not word aligned.

ARMv5 Architecture however does not support non-aligned multibyte
data type (see A2.8 of ARM Architecture Reference Manual).

Signed-off-by: Stefan Althoefer &lt;stefan.althoefer@web.de&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: add support for R8A66597 usb controller</title>
<updated>2008-08-07T15:37:36+00:00</updated>
<author>
<name>Yoshihiro Shimoda</name>
<email>shimoda.yoshihiro@renesas.com</email>
</author>
<published>2008-07-09T12:07:38+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=fd0f2f3796ff2a7a32d35deb1b7996e485849df7'/>
<id>fd0f2f3796ff2a7a32d35deb1b7996e485849df7</id>
<content type='text'>
add support for Renesas R8A66597 usb controller.
This patch supports USB Host mode.

Signed-off-by: Yoshihiro Shimoda &lt;shimoda.yoshihiro@renesas.com&gt;
Signed-off-by: Markus Klotzbuecher &lt;mk@denx.de&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
add support for Renesas R8A66597 usb controller.
This patch supports USB Host mode.

Signed-off-by: Yoshihiro Shimoda &lt;shimoda.yoshihiro@renesas.com&gt;
Signed-off-by: Markus Klotzbuecher &lt;mk@denx.de&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix compilation error in cmd_usb.c</title>
<updated>2008-03-26T23:12:56+00:00</updated>
<author>
<name>Anatolij Gustschin</name>
<email>agust@denx.de</email>
</author>
<published>2008-03-26T16:47:44+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=e813eae3bfeba9c0bda9d1bf9fc3d081f790972f'/>
<id>e813eae3bfeba9c0bda9d1bf9fc3d081f790972f</id>
<content type='text'>
This patch fixes compilation error
cmd_usb.c: In function 'do_usb':
cmd_usb.c:552: error: void value not ignored as it ought to be

Signed-off-by: Anatolij Gustschin &lt;agust@denx.de&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This patch fixes compilation error
cmd_usb.c: In function 'do_usb':
cmd_usb.c:552: error: void value not ignored as it ought to be

Signed-off-by: Anatolij Gustschin &lt;agust@denx.de&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>USB event poll support</title>
<updated>2007-06-06T08:08:13+00:00</updated>
<author>
<name>Zhang Wei</name>
<email>wei.zhang@freescale.com</email>
</author>
<published>2007-06-06T08:08:13+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=fdcfaa1b02268b2899e374b35adf936c911a47eb'/>
<id>fdcfaa1b02268b2899e374b35adf936c911a47eb</id>
<content type='text'>
This patch adds USB event poll support, which could be used in usbkbd
and other usb devices driver when the asynchronous interrupt
processing is supported.

Signed-off-by: Zhang Wei &lt;wei.zhang@freescale.com
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This patch adds USB event poll support, which could be used in usbkbd
and other usb devices driver when the asynchronous interrupt
processing is supported.

Signed-off-by: Zhang Wei &lt;wei.zhang@freescale.com
</pre>
</div>
</content>
</entry>
<entry>
<title>Support for the Philips ISP116x HCD (Host Controller Driver)</title>
<updated>2007-04-03T12:27:18+00:00</updated>
<author>
<name>Rodolfo Giometti</name>
<email>giometti@enneenne.com</email>
</author>
<published>2007-04-03T12:27:18+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=822af351ad2babc7d99033361a5fcacd30f6bc78'/>
<id>822af351ad2babc7d99033361a5fcacd30f6bc78</id>
<content type='text'>
Signed-off-by: Rodolfo Giometti &lt;giometti@enneenne.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Signed-off-by: Rodolfo Giometti &lt;giometti@enneenne.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix some endianness issues related to the generic ohci driver</title>
<updated>2006-11-27T10:46:46+00:00</updated>
<author>
<name>Markus Klotzbuecher</name>
<email>mk@denx.de</email>
</author>
<published>2006-11-27T10:46:46+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=ae3b770e4eae8e98b6e9e29662e18c47fdf0171f'/>
<id>ae3b770e4eae8e98b6e9e29662e18c47fdf0171f</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Introduced the configuration option CONFIG_USB_OHCI_NEW in order to be able</title>
<updated>2006-11-27T10:44:58+00:00</updated>
<author>
<name>Markus Klotzbuecher</name>
<email>mk@denx.de</email>
</author>
<published>2006-11-27T10:44:58+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=7b59b3c7a8ce2e4b567abf99c1cd667bf35b9418'/>
<id>7b59b3c7a8ce2e4b567abf99c1cd667bf35b9418</id>
<content type='text'>
to choose between the old and the generic OHCI drivers.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
to choose between the old and the generic OHCI drivers.
</pre>
</div>
</content>
</entry>
<entry>
<title>Add rudimentary handling of alternate settings of USB interfaces - to fix</title>
<updated>2006-08-01T22:54:18+00:00</updated>
<author>
<name>Bartlomiej Sieka</name>
<email>tur@semihalf.com</email>
</author>
<published>2006-08-01T22:54:18+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=7455af41d19d5e0194e23f3b06f1bf64e3430d62'/>
<id>7455af41d19d5e0194e23f3b06f1bf64e3430d62</id>
<content type='text'>
problems with some USB storage devices. Some code readability improvements.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
problems with some USB storage devices. Some code readability improvements.
</pre>
</div>
</content>
</entry>
</feed>
