<feed xmlns='http://www.w3.org/2005/Atom'>
<title>u-boot.git/drivers/usb/gadget, branch v2010.12</title>
<subtitle>Unnamed repository; edit this file 'description' to name the repository.</subtitle>
<id>http://cgit.235523.xyz/u-boot.git/atom/drivers/usb/gadget?h=v2010.12</id>
<link rel='self' href='http://cgit.235523.xyz/u-boot.git/atom/drivers/usb/gadget?h=v2010.12'/>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/'/>
<updated>2010-11-17T20:02:18Z</updated>
<entry>
<title>Switch from archive libraries to partial linking</title>
<updated>2010-11-17T20:02:18Z</updated>
<author>
<name>Sebastien Carlier</name>
<email>sebastien.carlier@gmail.com</email>
</author>
<published>2010-11-05T14:48:07Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=6d8962e814c15807dd6ac5757904be2a02d187b8'/>
<id>urn:sha1:6d8962e814c15807dd6ac5757904be2a02d187b8</id>
<content type='text'>
Before this commit, weak symbols were not overridden by non-weak symbols
found in archive libraries when linking with recent versions of
binutils.  As stated in the System V ABI, "the link editor does not
extract archive members to resolve undefined weak symbols".

This commit changes all Makefiles to use partial linking (ld -r) instead
of creating library archives, which forces all symbols to participate in
linking, allowing non-weak symbols to override weak symbols as intended.
This approach is also used by Linux, from which the gmake function
cmd_link_o_target (defined in config.mk and used in all Makefiles) is
inspired.

The name of each former library archive is preserved except for
extensions which change from ".a" to ".o".  This commit updates
references accordingly where needed, in particular in some linker
scripts.

This commit reveals board configurations that exclude some features but
include source files that depend these disabled features in the build,
resulting in undefined symbols.  Known such cases include:
- disabling CMD_NET but not CMD_NFS;
- enabling CONFIG_OF_LIBFDT but not CONFIG_QE.

Signed-off-by: Sebastien Carlier &lt;sebastien.carlier@gmail.com&gt;
</content>
</entry>
<entry>
<title>Coding Style cleanup</title>
<updated>2010-10-27T20:48:30Z</updated>
<author>
<name>Wolfgang Denk</name>
<email>wd@denx.de</email>
</author>
<published>2010-10-27T20:48:30Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=071bc923308832bbc541a887fece767d79a6dc7a'/>
<id>urn:sha1:071bc923308832bbc541a887fece767d79a6dc7a</id>
<content type='text'>
Signed-off-by: Wolfgang Denk &lt;wd@denx.de&gt;
</content>
</entry>
<entry>
<title>USB-CDC: Prevent rx_req being enqueued twice</title>
<updated>2010-10-13T10:07:58Z</updated>
<author>
<name>Vitaly Kuzmichev</name>
<email>vkuzmichev@mvista.com</email>
</author>
<published>2010-09-22T09:13:56Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=98fae9707fd83a61ec29d9c42c15267a735f9b71'/>
<id>urn:sha1:98fae9707fd83a61ec29d9c42c15267a735f9b71</id>
<content type='text'>
After gadget reinitializaton (after tftp has been done once)
packet_received may become equal to 1 due to nuking OUT_EP
while disabling it in eth_reset_config.

rx_submit called from usb_eth_init queues rx_req first time.
But the first call of usb_eth_recv from NetLoop queues rx_req
again due to packet_received = 1.

The following flow shows the path of functions calls when
this happens:

 net/net.c:NetLoop
 |
 +-net/eth.c:eth_init
 |   ether.c:usb_eth_init
 |   |
 |   +-udc_driver:usb_gadget_handle_interrupts
 |   |   udc_driver:...
 |   |     ether.c:eth_setup
 |   |       ether.c:eth_set_config
 |   |         ether.c:eth_reset_config
 |   |           udc_driver:usb_ep_disable
 |   |             udc_driver:nuke
 |   |               ether.c:rx_complete
 |   |                 ether.c: packet_received = 1;
 |   |
 |   +-ether.c:rx_submit
 |       udc_driver:usb_ep_queue --- The first time when rx_req is queued
 |
 +-net/eth.c:eth_rx
     ether.c:usb_eth_recv
     |
     +-udc_driver:usb_gadget_handle_interrupts
     |   udc_driver:... --- no interrupts, returning
     +-ether.c: if (packet_received) { ...
         ether.c:rx_submit
           udc_driver:usb_ep_queue --- The second time!

Signed-off-by: Vitaly Kuzmichev &lt;vkuzmichev@mvista.com&gt;
</content>
</entry>
<entry>
<title>USB-CDC: Fix tx/rx_req memory leaks</title>
<updated>2010-10-13T10:07:58Z</updated>
<author>
<name>Vitaly Kuzmichev</name>
<email>vkuzmichev@mvista.com</email>
</author>
<published>2010-09-22T09:13:55Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=ac5d32d15c3f950d983740aed5403f570ac15c62'/>
<id>urn:sha1:ac5d32d15c3f950d983740aed5403f570ac15c62</id>
<content type='text'>
Remove and fix needless and destructive operations with tx/rx_req.

1) 'req' in rx_complete is always not NULL and always equals to rx_req
2) Free allocated tx_req if rx_req allocation has failed
3) Do not zero out tx/rx_req in usb_eth_init, leave this for
eth_reset_config which will be called at the next use of usb0
4) Additional check in usb_eth_recv is not required

Signed-off-by: Vitaly Kuzmichev &lt;vkuzmichev@mvista.com&gt;
</content>
</entry>
<entry>
<title>USB-CDC: Fix coding style issues</title>
<updated>2010-09-20T19:57:17Z</updated>
<author>
<name>Vitaly Kuzmichev</name>
<email>vkuzmichev@mvista.com</email>
</author>
<published>2010-09-13T14:37:11Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=6142e0ae0fcf8bf5a7a8d785061197ace8955cb6'/>
<id>urn:sha1:6142e0ae0fcf8bf5a7a8d785061197ace8955cb6</id>
<content type='text'>
Fixes most of checkpatch warnings and errors in USB gadget stack.

The most frequently encountered problems are:
1) "(foo*)", "foo * bar", "foo* bar"
2) C99 // comments
3) No spaces before/after/around '?', ':', '=', '==', ',', '&amp;', '('
4) Spaces before '['
5) Spaces between function names and '('
6) Block braces in wrong places
7) Spaces before tabs
8) Macros with complex values not enclosed in parenthesis
9) Multiline comments start just after /*

Signed-off-by: Vitaly Kuzmichev &lt;vkuzmichev@mvista.com&gt;
</content>
</entry>
<entry>
<title>USB-CDC: called handle_interrupts inside usb_eth_send</title>
<updated>2010-09-20T19:57:17Z</updated>
<author>
<name>Stefano Babic</name>
<email>sbabic@denx.de</email>
</author>
<published>2010-08-15T12:19:00Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=a170f2c7973728f2e9e1b66214b0c14062c78398'/>
<id>urn:sha1:a170f2c7973728f2e9e1b66214b0c14062c78398</id>
<content type='text'>
The patch removes an endless loop  in the usb_eth_send
if the tx_complete is not called before going
in the loop. The driver interrupt routine is called
allowing the driver to check if the TX is completed.

Signed-off-by: Stefano Babic &lt;sbabic@denx.de&gt;
</content>
</entry>
<entry>
<title>USB-CDC: correct wrong alignment in ether.c</title>
<updated>2010-09-20T19:57:17Z</updated>
<author>
<name>Stefano Babic</name>
<email>sbabic@denx.de</email>
</author>
<published>2010-08-15T12:18:59Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=80460772197ea33d9e0023b1c359f5916a760fa1'/>
<id>urn:sha1:80460772197ea33d9e0023b1c359f5916a760fa1</id>
<content type='text'>
The buffer for the status request must be word aligned
because it is accessed with 32 bit pointer in the
eth_status_complete function.

Signed-off-by: Stefano Babic &lt;sbabic@denx.de&gt;
</content>
</entry>
<entry>
<title>USB-CDC: change simple_strtol to simple_strtoul</title>
<updated>2010-09-20T19:57:17Z</updated>
<author>
<name>Vitaly Kuzmichev</name>
<email>vkuzmichev@mvista.com</email>
</author>
<published>2010-08-13T13:02:41Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=c0ef51318813c062052f91ef7c15b75bbbf15767'/>
<id>urn:sha1:c0ef51318813c062052f91ef7c15b75bbbf15767</id>
<content type='text'>
The patch is based on commit bb9496c6f7e853e5d4edd5397c9d45f1968d623c
(done by Julia Lawall &lt;julia@diku.dk&gt;) from linux-2.6.git.

Since num is unsigned, it would seem better to use simple_strtoul that
simple_strtol.

Signed-off-by: Vitaly Kuzmichev &lt;vkuzmichev@mvista.com&gt;
</content>
</entry>
<entry>
<title>USB-CDC: ethernet error path potential oops fix</title>
<updated>2010-09-20T19:57:17Z</updated>
<author>
<name>Vitaly Kuzmichev</name>
<email>vkuzmichev@mvista.com</email>
</author>
<published>2010-08-13T13:02:29Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=d5292c1647d3a711a05ac99ab2077698b3b4a8a0'/>
<id>urn:sha1:d5292c1647d3a711a05ac99ab2077698b3b4a8a0</id>
<content type='text'>
Fix potential oops on rare error path.
The patch is based on commit e7b13ec9235b9fded90f826ceeb8c34548631351
(done by David Brownell &lt;david-b@pacbell.net&gt;) from linux-2.6.git.

Description of the issue taken from linux kernel bugzilla:
(https://bugzilla.kernel.org/show_bug.cgi?id=9594)

The potential error can be tracked down as follows:

(1) line 807: let the second conjunct on the "if" statment be false
    meaning "dev-&gt;status_ep" is null. This means the "if" evaluates
    to false.

follow thru the code until...

(2) line 808: usb_ep_disable(dev-&gt;status_ep) passes in a null argument,
    however "usb_ep_disable" cannot handle that:

(from include/linux/usb/gadget.h)
191 static inline int
192 usb_ep_disable (struct usb_ep *ep)
193 {
194         return ep-&gt;ops-&gt;disable (ep);
195 }

--

Signed-off-by: Vitaly Kuzmichev &lt;vkuzmichev@mvista.com&gt;
</content>
</entry>
<entry>
<title>USB-CDC: Correct stat_req initialization</title>
<updated>2010-09-20T19:57:17Z</updated>
<author>
<name>Vitaly Kuzmichev</name>
<email>vkuzmichev@mvista.com</email>
</author>
<published>2010-08-13T13:01:06Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=df559c1d21ba1a9ee0dcec57567907888484d877'/>
<id>urn:sha1:df559c1d21ba1a9ee0dcec57567907888484d877</id>
<content type='text'>
Fix possible oops on stat_req-&gt;buf initialization and fix ep0 and
status_ep confusion (last one is just intended for stat_req keeping).

Signed-off-by: Vitaly Kuzmichev &lt;vkuzmichev@mvista.com&gt;
Signed-off-by: Stefano Babic &lt;sbabic@denx.de&gt;
</content>
</entry>
</feed>
