<feed xmlns='http://www.w3.org/2005/Atom'>
<title>u-boot.git/drivers/usb/gadget/composite.c, branch v2016.03</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/composite.c?h=v2016.03</id>
<link rel='self' href='http://cgit.235523.xyz/u-boot.git/atom/drivers/usb/gadget/composite.c?h=v2016.03'/>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/'/>
<updated>2016-03-01T13:47:26Z</updated>
<entry>
<title>usb: gadget: composite: Correct recovery path for register</title>
<updated>2016-03-01T13:47:26Z</updated>
<author>
<name>Sam Protsenko</name>
<email>semen.protsenko@linaro.org</email>
</author>
<published>2016-02-16T17:59:19Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=8038f6d2881d58f5322109a2f5ec2de5aaa6fc30'/>
<id>urn:sha1:8038f6d2881d58f5322109a2f5ec2de5aaa6fc30</id>
<content type='text'>
In case when usb_composite_register() failed once (for whatever reason),
it will fail further even if all conditions are correct. Example:

    =&gt; fastboot 2
    Invalid Controller Index
    couldn't find an available UDC
    g_dnl_register: failed!, error: -19
    exit not allowed from main input shell.

    =&gt; fastboot 0
    g_dnl_register: failed!, error: -22
    exit not allowed from main input shell.

Despite that 0 is correct index for USB controller, "fastboot 0" command
will fail, because "composite" structure wasn't cleared properly on
previous fail (on "fastboot 2" command).

This patch fixes that erroneous behavior, allowing us to use composite
even after previous failure.

Signed-off-by: Sam Protsenko &lt;semen.protsenko@linaro.org&gt;
</content>
</entry>
<entry>
<title>Use correct spelling of "U-Boot"</title>
<updated>2016-02-06T11:00:59Z</updated>
<author>
<name>Bin Meng</name>
<email>bmeng.cn@gmail.com</email>
</author>
<published>2016-02-06T03:30:11Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=a187559e3d586891c917279044c5386d1b2adc6e'/>
<id>urn:sha1:a187559e3d586891c917279044c5386d1b2adc6e</id>
<content type='text'>
Correct spelling of "U-Boot" shall be used in all written text
(documentation, comments in source files etc.).

Signed-off-by: Bin Meng &lt;bmeng.cn@gmail.com&gt;
Reviewed-by: Heiko Schocher &lt;hs@denx.de&gt;
Reviewed-by: Simon Glass &lt;sjg@chromium.org&gt;
Reviewed-by: Minkyu Kang &lt;mk7.kang@samsung.com&gt;
</content>
</entry>
<entry>
<title>usb: gadget: don't leak configs when unbinding</title>
<updated>2015-09-11T21:15:21Z</updated>
<author>
<name>Stephen Warren</name>
<email>swarren@nvidia.com</email>
</author>
<published>2015-09-05T04:03:42Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=44bfb43f9afab9b2944bb98bc0d514303f029ff9'/>
<id>urn:sha1:44bfb43f9afab9b2944bb98bc0d514303f029ff9</id>
<content type='text'>
By the time g_dnl_unbind() is run, cdev-&gt;config has been set to NULL,
so the free() there does nothing, and the config struct is leaked.
Equally, struct usb_gadget contains a linked list of config structs, so
the code should iterate over them all and free each one, rather than
freeing one particular config struct.

composite_unbind() already iterates over the list of config structs, and
unlinks each from the linked list. Fix this loop to free() each struct as
it's unlinked and otherwise forgotten.

Signed-off-by: Stephen Warren &lt;swarren@nvidia.com&gt;
Acked-by: Lukasz Majewski &lt;l.majewski@samsung.com&gt;
Tested-by: Lukasz Majewski &lt;l.majewski@samsung.com&gt;
</content>
</entry>
<entry>
<title>usb: composite: Add .reset callback to usb_gadget_driver structure</title>
<updated>2015-04-14T03:48:12Z</updated>
<author>
<name>Lukasz Majewski</name>
<email>l.majewski@samsung.com</email>
</author>
<published>2015-03-03T16:32:07Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=6d691732073f79138648fc6e8ad1569f7a2898a6'/>
<id>urn:sha1:6d691732073f79138648fc6e8ad1569f7a2898a6</id>
<content type='text'>
DWC3 UDC driver requires presence of .reset callback in a composite driver.
This setting is similar to the one nowadays present in linux kernel.

Signed-off-by: Lukasz Majewski &lt;l.majewski@samsung.com&gt;
</content>
</entry>
<entry>
<title>usb: gadget: defer setting maxpacket till -&gt;setup()</title>
<updated>2015-04-14T03:48:11Z</updated>
<author>
<name>Kishon Vijay Abraham I</name>
<email>kishon@ti.com</email>
</author>
<published>2015-02-23T13:10:17Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=04afd5b59b2edcb0bd035f126bdbe27c31782772'/>
<id>urn:sha1:04afd5b59b2edcb0bd035f126bdbe27c31782772</id>
<content type='text'>
Taken from linux kernel with commit
commit 765f5b830e547229bb752e7b232ee83e2b3d49d5
Author: Sebastian Andrzej Siewior &lt;bigeasy@linutronix.de&gt;
Date:   Thu Jun 23 14:26:11 2011 +0200

usb: gadget: defer setting maxpacket till -&gt;setup()

Signed-off-by: Kishon Vijay Abraham I &lt;kishon@ti.com&gt;
Reviewed-by: Lukasz Majewski &lt;l.majewski@samsung.com&gt;
</content>
</entry>
<entry>
<title>usb: gadget: composite: Fix NULL pointer crash in USB compliance test</title>
<updated>2015-01-18T11:31:00Z</updated>
<author>
<name>Stefan Roese</name>
<email>sr@denx.de</email>
</author>
<published>2015-01-09T13:54:55Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=87ed6b1067a8b8cf2bf3fd900080164cef8e0b77'/>
<id>urn:sha1:87ed6b1067a8b8cf2bf3fd900080164cef8e0b77</id>
<content type='text'>
On the DXR2 board (AM335x using MUSB) the USB compliance test suite
(USB 2.0 Command Verifier) will cause the board to crash and reset
upon the "BOS Descriptor Test - Addressed state". Here the output
from the DRX2 while running this test:

GADGET DRIVER: usb_dnl_dfu
musb-hdrc: peripheral reset irq lost!
composite_setup (776)
data abort
pc : [&lt;87f693ac&gt;]          lr : [&lt;87f6911c&gt;]
sp : 86f33a58  ip : 00000000     fp : 86f3bbac
r10: 00000f00  r9 : 86f33ef4     r8 : 86f37da8
r7 : 00000005  r6 : 86f33a90     r5 : 00000000  r4 : 86f37e30
r3 : 00000000  r2 : 00000000     r1 : 87f9c888  r0 : 00000016
Flags: Nzcv  IRQs off  FIQs on  Mode SVC_32
Resetting CPU ...

resetting ...

By adding the case statement for USB_DT_BOS and therefore not running
into the default case (jump to unkown label) this crash is fixed.

Signed-off-by: Stefan Roese &lt;sr@denx.de&gt;
Cc: Roger Meier &lt;r.meier@siemens.com&gt;
Cc: Samuel Egli &lt;samuel.egli@siemens.com&gt;
Cc: Enrico Leto &lt;enrico.leto@siemens.com&gt;
Acked-by: Heiko Schocher &lt;hs@denx.de&gt;
Cc: Lukasz Majewski &lt;l.majewski@samsung.com&gt;
Cc: Marek Vasut &lt;marex@denx.de&gt;
</content>
</entry>
<entry>
<title>linux/kernel.h: sync min, max, min3, max3 macros with Linux</title>
<updated>2014-11-23T11:48:30Z</updated>
<author>
<name>Masahiro Yamada</name>
<email>yamada.m@jp.panasonic.com</email>
</author>
<published>2014-11-06T18:03:31Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=b41411954d4ccf6ddaa581178462017557b82b5d'/>
<id>urn:sha1:b41411954d4ccf6ddaa581178462017557b82b5d</id>
<content type='text'>
U-Boot has never cared about the type when we get max/min of two
values, but Linux Kernel does.  This commit gets min, max, min3, max3
macros synced with the kernel introducing type checks.

Many of references of those macros must be fixed to suppress warnings.
We have two options:
 - Use min, max, min3, max3 only when the arguments have the same type
   (or add casts to the arguments)
 - Use min_t/max_t instead with the appropriate type for the first
   argument

Signed-off-by: Masahiro Yamada &lt;yamada.m@jp.panasonic.com&gt;
Acked-by: Pavel Machek &lt;pavel@denx.de&gt;
Acked-by: Lukasz Majewski &lt;l.majewski@samsung.com&gt;
Tested-by: Lukasz Majewski &lt;l.majewski@samsung.com&gt;
[trini: Fixup arch/blackfin/lib/string.c]
Signed-off-by: Tom Rini &lt;trini@ti.com&gt;
</content>
</entry>
<entry>
<title>Add GPL-2.0+ SPDX-License-Identifier to source files</title>
<updated>2013-07-24T13:44:38Z</updated>
<author>
<name>Wolfgang Denk</name>
<email>wd@denx.de</email>
</author>
<published>2013-07-08T07:37:19Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=1a4596601fd395f3afb8f82f3f840c5e00bdd57a'/>
<id>urn:sha1:1a4596601fd395f3afb8f82f3f840c5e00bdd57a</id>
<content type='text'>
Signed-off-by: Wolfgang Denk &lt;wd@denx.de&gt;
[trini: Fixup common/cmd_io.c]
Signed-off-by: Tom Rini &lt;trini@ti.com&gt;
</content>
</entry>
<entry>
<title>usb:composite: use memcpy to avoid unaligned access</title>
<updated>2013-06-30T16:41:07Z</updated>
<author>
<name>Piotr Wilczek</name>
<email>p.wilczek@samsung.com</email>
</author>
<published>2013-04-10T12:07:51Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=12595e99e40ba4d0a08744e375f4e2144dc5acb6'/>
<id>urn:sha1:12595e99e40ba4d0a08744e375f4e2144dc5acb6</id>
<content type='text'>
This patch memcpy is used instead of an assignment to
avoid unaligned access execption on some ARM platforms.

Signed-off-by: Piotr Wilczek &lt;p.wilczek@samsung.com&gt;
Signed-off-by: Kyungmin Park &lt;kyungmin.park@samsung.com&gt;
CC: Lukasz Majewski &lt;l.majewski@samsung.com&gt;
Tested-by: Heiko Schocher &lt;hs@denx.de&gt;
Acked-by: Heiko Schocher &lt;hs@denx.de&gt;
</content>
</entry>
<entry>
<title>usb, composite: after unregister gadget driver set composite to NULL</title>
<updated>2013-06-12T20:22:52Z</updated>
<author>
<name>Heiko Schocher</name>
<email>hs@denx.de</email>
</author>
<published>2013-06-04T09:21:32Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=c67b0e42a59c7ef15495bfde006398abaf2f562f'/>
<id>urn:sha1:c67b0e42a59c7ef15495bfde006398abaf2f562f</id>
<content type='text'>
Without this, second usb_composite_register() call fails always
with -EINVAL.

Signed-off-by: Heiko Schocher &lt;hs@denx.de&gt;
Cc: Lukasz Majewski &lt;l.majewski@samsung.com&gt;
Cc: Kyungmin Park &lt;kyungmin.park@samsung.com&gt;
Cc: Marek Vasut &lt;marex@denx.de&gt;
</content>
</entry>
</feed>
