<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/drivers/usb/gadget/composite.c, branch linux-4.2.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-4.2.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-4.2.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2015-07-06T17:34:08Z</updated>
<entry>
<title>usb: gadget: composite: Fix NULL pointer dereference</title>
<updated>2015-07-06T17:34:08Z</updated>
<author>
<name>Kishon Vijay Abraham I</name>
</author>
<published>2015-06-11T16:42:11Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=b4c21f0bdd2c0cd5d5be1bb56f0a28dae5041eed'/>
<id>urn:sha1:b4c21f0bdd2c0cd5d5be1bb56f0a28dae5041eed</id>
<content type='text'>
commit f563d230903210acc ("usb: gadget: composite: add req_match method
to usb_function") accesses cdev-&gt;config even before set config
is invoked causing a NULL pointer dereferencing error while running
Lecroy Mass Storage Compliance test.

Fix it here by accessing cdev-&gt;config only if it is non NULL.

Fixes: commit f563d230903210acc ("usb: gadget: composite: add req_match
method to usb_function").

Signed-off-by: Kishon Vijay Abraham I &lt;kishon@ti.com&gt;
Signed-off-by: Felipe Balbi &lt;balbi@ti.com&gt;
</content>
</entry>
<entry>
<title>usb: gadget: Fix typo fond in Documentation/Docbook/gadget.xml</title>
<updated>2015-03-11T15:19:35Z</updated>
<author>
<name>Masanari Iida</name>
</author>
<published>2015-03-10T13:37:46Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=06ed0de5188c9ef6553b2824b6cdd767ad46ece5'/>
<id>urn:sha1:06ed0de5188c9ef6553b2824b6cdd767ad46ece5</id>
<content type='text'>
This patch fix some spelling typo found in gadget.xml.
It is because this file is generated from comments in sources,
I had to fix comments in the source, instead of xml file itself.

Signed-off-by: Masanari Iida &lt;standby24x7@gmail.com&gt;
Signed-off-by: Felipe Balbi &lt;balbi@ti.com&gt;
</content>
</entry>
<entry>
<title>usb: gadget: composite: add req_match method to usb_function</title>
<updated>2015-03-10T20:33:39Z</updated>
<author>
<name>Andrzej Pietrasiewicz</name>
</author>
<published>2015-03-03T09:52:23Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=f563d230903210acc2336af58e422216b68ded76'/>
<id>urn:sha1:f563d230903210acc2336af58e422216b68ded76</id>
<content type='text'>
Non-standard requests can encode the actual interface number in a
non-standard way. For example composite_setup() assumes
that it is w_index &amp;&amp; 0xFF, but the printer function encodes the interface
number in a context-dependet way (either w_index or w_index &gt;&gt; 8).
This can lead to such requests being directed to wrong functions.

This patch adds req_match() method to usb_function. Its purpose is to
verify that a given request can be handled by a given function.
If any function within a configuration provides the method and it returns
true, then it is assumed that the right function is found.

If a function uses req_match(), it should try as hard as possible to
determine if the request is meant for it.

If no functions in a configuration provide req_match or none of them
returns true, then fall back to the usual approach.

Signed-off-by: Andrzej Pietrasiewicz &lt;andrzej.p@samsung.com&gt;
Signed-off-by: Felipe Balbi &lt;balbi@ti.com&gt;
</content>
</entry>
<entry>
<title>usb: gadget: composite: don't try standard handling for non-standard requests</title>
<updated>2015-03-10T20:33:33Z</updated>
<author>
<name>Andrzej Pietrasiewicz</name>
</author>
<published>2015-03-03T09:52:04Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=232c0102e84b7fce634c8902a5fa30ca2b3342ac'/>
<id>urn:sha1:232c0102e84b7fce634c8902a5fa30ca2b3342ac</id>
<content type='text'>
If a non-standard request is processed and its parameters just happen
to match those of some standard request, the logic of composite_setup()
can be fooled, so don't even try any switch cases, just go to the
proper place where unknown requests are handled.

Signed-off-by: Andrzej Pietrasiewicz &lt;andrzej.p@samsung.com&gt;
Signed-off-by: Felipe Balbi &lt;balbi@ti.com&gt;
</content>
</entry>
<entry>
<title>usb: gadget: Fix os desc test</title>
<updated>2015-01-27T15:34:58Z</updated>
<author>
<name>Mario Schuknecht</name>
</author>
<published>2015-01-26T19:30:27Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=df6738d0d23321da834e9025845e26e09b0f6615'/>
<id>urn:sha1:df6738d0d23321da834e9025845e26e09b0f6615</id>
<content type='text'>
USB vendor type is encoded in field bmRequestType. Make test USB_TYPE_VENDOR
with bRequestType instead of bRequest.

Signed-off-by: Mario Schuknecht &lt;mario.schuknecht@dresearch-fe.de&gt;
Signed-off-by: Felipe Balbi &lt;balbi@ti.com&gt;
</content>
</entry>
<entry>
<title>usb: gadget: configfs: add suspend/resume</title>
<updated>2014-11-03T16:00:59Z</updated>
<author>
<name>Andrzej Pietrasiewicz</name>
</author>
<published>2014-10-08T10:03:36Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=3a571870856f63064a3a45d7ffa2526d597b7fbe'/>
<id>urn:sha1:3a571870856f63064a3a45d7ffa2526d597b7fbe</id>
<content type='text'>
USB gadgets composed with configfs lack suspend and resume
methods. This patch uses composite_suspend()/composite_resume()
the same way e.g. composite_setup() or composite_disconnect()
are used in a configfs-based gadget.

Signed-off-by: Andrzej Pietrasiewicz &lt;andrzej.p@samsung.com&gt;
Signed-off-by: Felipe Balbi &lt;balbi@ti.com&gt;
</content>
</entry>
<entry>
<title>usb: gadget: composite: conditionally dequeue os_desc and setup requests</title>
<updated>2014-11-03T16:00:55Z</updated>
<author>
<name>Felipe Balbi</name>
</author>
<published>2014-09-18T15:01:55Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=a7c12eaf2e5eea0c15242ebb7d1d3b6e7fcb62bb'/>
<id>urn:sha1:a7c12eaf2e5eea0c15242ebb7d1d3b6e7fcb62bb</id>
<content type='text'>
In case we unload a gadget driver while any of
os_desc_req or req are still pending, we need
to make sure to dequeue them.

By using our setup_pending and os_desc_pending
flags we achieve that in a way that doesn't
cause any regressions because we won't dequeue
a request which was already completed.

The original idea came from Li Jun's commit
f2267089ea17fa97b796b1b4247e3f8957655df3
(usb: gadget: composite: dequeue cdev-&gt;req
before free it in composite_dev_cleanup) which,
unfortunately, caused two regressions (kfree()
being called before usb_ep_dequeue() and calling
usb_ep_dequeue() when the request was already
completed). That commit also didn't take care
of os_desc_req which can fall into the same
situation so we must care for that one too.

Note that in order to make code slightly easier
to read, we introduce composite_ep_queue() which
hides details about how to fiddle with our pending
flags.

Signed-off-by: Felipe Balbi &lt;balbi@ti.com&gt;
</content>
</entry>
<entry>
<title>usb: gadget: composite: set our req-&gt;context to cdev</title>
<updated>2014-11-03T16:00:55Z</updated>
<author>
<name>Felipe Balbi</name>
</author>
<published>2014-09-18T14:54:54Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=57943716ff1b0733ab0d9879e572bad04166660a'/>
<id>urn:sha1:57943716ff1b0733ab0d9879e572bad04166660a</id>
<content type='text'>
by doing that we will be able to match our
requests against req and os_desc_req and also
clear our pending flags from complete callback.

Signed-off-by: Felipe Balbi &lt;balbi@ti.com&gt;
</content>
</entry>
<entry>
<title>usb: gadget: composite: enable BESL support</title>
<updated>2014-10-23T14:55:41Z</updated>
<author>
<name>Felipe Balbi</name>
</author>
<published>2014-09-30T21:08:03Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=a6615937bcd9234e6d6bb817c3701fce44d0a84d'/>
<id>urn:sha1:a6615937bcd9234e6d6bb817c3701fce44d0a84d</id>
<content type='text'>
According to USB 2.0 ECN Errata for Link Power
Management (USB2-LPM-Errata-final.pdf), BESL
must be enabled if LPM is enabled.

This helps with USB30CV TD 9.21 LPM L1
Suspend Resume Test.

Signed-off-by: Felipe Balbi &lt;balbi@ti.com&gt;
</content>
</entry>
<entry>
<title>Revert "usb: gadget: composite: dequeue cdev-&gt;req before free it in composite_dev_cleanup"</title>
<updated>2014-09-23T14:56:21Z</updated>
<author>
<name>Felipe Balbi</name>
</author>
<published>2014-09-18T14:31:32Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=bf17eba7ae1e813b0ad67cb1078dcbd7083b906e'/>
<id>urn:sha1:bf17eba7ae1e813b0ad67cb1078dcbd7083b906e</id>
<content type='text'>
This reverts commit f2267089ea17fa97b796b1b4247e3f8957655df3.

That commit causes more problem than fixes. Firstly, kfree()
should be called after usb_ep_dequeue() and secondly, the way
things are, we will try to dequeue a request that has already
completed much more frequently than one which is pending.

Cc: Li Jun &lt;b47624@freescale.com&gt;
Signed-off-by: Felipe Balbi &lt;balbi@ti.com&gt;
Cc: stable &lt;stable@vger.kernel.org&gt; # 3.17
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
</feed>
