<feed xmlns='http://www.w3.org/2005/Atom'>
<title>lwn.git/drivers/usb/gadget/composite.c, branch standardize-docs</title>
<subtitle>Linux kernel documentation tree maintained by Jonathan Corbet</subtitle>
<id>http://mirrors.hust.edu.cn/git/lwn.git/atom?h=standardize-docs</id>
<link rel='self' href='http://mirrors.hust.edu.cn/git/lwn.git/atom?h=standardize-docs'/>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/'/>
<updated>2017-06-20T03:39:34+00:00</updated>
<entry>
<title>Merge tag 'usb-for-v4.13' of git://git.kernel.org/pub/scm/linux/kernel/git/balbi/usb into usb-testing</title>
<updated>2017-06-20T03:39:34+00:00</updated>
<author>
<name>Greg Kroah-Hartman</name>
<email>gregkh@linuxfoundation.org</email>
</author>
<published>2017-06-20T03:39:34+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=24040a58379e2f2fa6aa9466911b758073b6bdfa'/>
<id>urn:sha1:24040a58379e2f2fa6aa9466911b758073b6bdfa</id>
<content type='text'>
Felipe writes:

usb: changes for v4.13 merge window

This time around we have a total of 57 non-merge commits. A list of
most important changes follows:

- Improvements to dwc3 tracing interface
- Initial dual-role support for dwc3
- Improvements to how we handle DMA resources in dwc3
- A new f_uac1 implementation which much more flexible
- Removal of AVR32 bits
- Improvements to f_mass_storage driver
</content>
</entry>
<entry>
<title>usb: gadget: composite: make sure to reactivate function on unbind</title>
<updated>2017-06-06T11:50:54+00:00</updated>
<author>
<name>Felipe Balbi</name>
<email>felipe.balbi@linux.intel.com</email>
</author>
<published>2017-06-06T11:47:29+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=0e3e97526a850f97c9fe8b646937b3a2bef58290'/>
<id>urn:sha1:0e3e97526a850f97c9fe8b646937b3a2bef58290</id>
<content type='text'>
If a function sets bind_deactivated flag, upon removal we will be left
with an unbalanced deactivation. Let's make sure that we conditionally
call usb_function_activate() from usb_remove_function() and make sure
usb_remove_function() is called from remove_config().

Signed-off-by: Felipe Balbi &lt;felipe.balbi@linux.intel.com&gt;
</content>
</entry>
<entry>
<title>usb: gadget: Allow a non-SuperSpeed gadget to support LPM</title>
<updated>2017-06-02T08:22:32+00:00</updated>
<author>
<name>John Youn</name>
<email>johnyoun@synopsys.com</email>
</author>
<published>2017-04-28T08:55:20+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=a9548c55295a4268f9187e1ec93264a0682fa745'/>
<id>urn:sha1:a9548c55295a4268f9187e1ec93264a0682fa745</id>
<content type='text'>
This commit allows a gadget that does not support SuperSpeed to indicate
that it supports LPM. It does this by setting the 'lpm_capable' flag in
the gadget structure.

If a gadget sets this, the composite gadget framework will set the
bcdUSB to 0x0201 to indicate that this supports BOS descriptors, and
also return a USB 2.0 Extension descriptor as part of the BOS descriptor
set.

See USB 2.0 LPM ECN Section 3.

Signed-off-by: John Youn &lt;johnyoun@synopsys.com&gt;
Signed-off-by: Sevak Arakelyan &lt;sevaka@synopsys.com&gt;
Signed-off-by: Felipe Balbi &lt;felipe.balbi@linux.intel.com&gt;
</content>
</entry>
<entry>
<title>usb: gadget: composite: Exclude SS Dev Cap Desc</title>
<updated>2017-06-02T08:22:32+00:00</updated>
<author>
<name>John Youn</name>
<email>johnyoun@synopsys.com</email>
</author>
<published>2017-04-28T08:55:14+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=0b67a6be14be5fb050b0358022c497d0619ebc40'/>
<id>urn:sha1:0b67a6be14be5fb050b0358022c497d0619ebc40</id>
<content type='text'>
Don't send the SuperSpeed USB Device Capability descriptor if
the gadget is not capable of SuperSpeed.

Signed-off-by: John Youn &lt;johnyoun@synopsys.com&gt;
Signed-off-by: Sevak Arakelyan &lt;sevaka@synopsys.com&gt;
Signed-off-by: Felipe Balbi &lt;felipe.balbi@linux.intel.com&gt;
</content>
</entry>
<entry>
<title>usb: gadget: composite: Fix function used to free memory</title>
<updated>2017-01-12T07:58:05+00:00</updated>
<author>
<name>Christophe JAILLET</name>
<email>christophe.jaillet@wanadoo.fr</email>
</author>
<published>2017-01-04T05:30:16+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=990758c53eafe5a220a780ed12e7b4d51b3df032'/>
<id>urn:sha1:990758c53eafe5a220a780ed12e7b4d51b3df032</id>
<content type='text'>
'cdev-&gt;os_desc_req' has been allocated with 'usb_ep_alloc_request()' so
'usb_ep_free_request()' should be used to free it.

Signed-off-by: Christophe JAILLET &lt;christophe.jaillet@wanadoo.fr&gt;
Signed-off-by: Felipe Balbi &lt;felipe.balbi@linux.intel.com&gt;
</content>
</entry>
<entry>
<title>usb: gadget: composite: Test get_alt() presence instead of set_alt()</title>
<updated>2017-01-02T08:55:28+00:00</updated>
<author>
<name>Krzysztof Opasiak</name>
<email>k.opasiak@samsung.com</email>
</author>
<published>2016-12-20T18:52:16+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=7e4da3fcf7c9fe042f2f7cb7bf23861a899b4a8f'/>
<id>urn:sha1:7e4da3fcf7c9fe042f2f7cb7bf23861a899b4a8f</id>
<content type='text'>
By convention (according to doc) if function does not provide
get_alt() callback composite framework should assume that it has only
altsetting 0 and should respond with error if host tries to set
other one.

After commit dd4dff8b035f ("USB: composite: Fix bug: should test
set_alt function pointer before use it")
we started checking set_alt() callback instead of get_alt().
This check is useless as we check if set_alt() is set inside
usb_add_function() and fail if it's NULL.

Let's fix this check and move comment about why we check the get
method instead of set a little bit closer to prevent future false
fixes.

Fixes: dd4dff8b035f ("USB: composite: Fix bug: should test set_alt function pointer before use it")
Cc: stable &lt;stable@vger.kernel.org&gt;
Signed-off-by: Krzysztof Opasiak &lt;k.opasiak@samsung.com&gt;
Signed-off-by: Felipe Balbi &lt;felipe.balbi@linux.intel.com&gt;
</content>
</entry>
<entry>
<title>usb: gadget: composite: use kasprintf() instead of open coding it</title>
<updated>2016-11-03T08:38:36+00:00</updated>
<author>
<name>Juergen Gross</name>
<email>jgross@suse.com</email>
</author>
<published>2016-10-10T10:48:36+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=5002c93135947881f4f35caadf7292f40df7ef6b'/>
<id>urn:sha1:5002c93135947881f4f35caadf7292f40df7ef6b</id>
<content type='text'>
Let's not reimplement generic kernel helpers,
instead call kasprintf().

[ felipe.balbi@linux.intel.com: better commit log ]

Signed-off-by: Juergen Gross &lt;jgross@suse.com&gt;
Signed-off-by: Felipe Balbi &lt;felipe.balbi@linux.intel.com&gt;
</content>
</entry>
<entry>
<title>usb: gadget: composite: remove unnecessary &amp; operation</title>
<updated>2016-11-03T08:38:24+00:00</updated>
<author>
<name>Felipe Balbi</name>
<email>felipe.balbi@linux.intel.com</email>
</author>
<published>2016-09-28T11:17:38+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=9ad587710a2f7704d47ddb49ce60c909be836c2b'/>
<id>urn:sha1:9ad587710a2f7704d47ddb49ce60c909be836c2b</id>
<content type='text'>
Now that usb_endpoint_maxp() only returns the lowest
11 bits from wMaxPacketSize, we can remove the &amp;
operation from this driver.

Signed-off-by: Felipe Balbi &lt;felipe.balbi@linux.intel.com&gt;
</content>
</entry>
<entry>
<title>usb: gadget: composite: always set ep-&gt;mult to a sensible value</title>
<updated>2016-10-31T09:15:33+00:00</updated>
<author>
<name>Felipe Balbi</name>
<email>felipe.balbi@linux.intel.com</email>
</author>
<published>2016-09-28T09:33:31+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=eaa496ffaaf19591fe471a36cef366146eeb9153'/>
<id>urn:sha1:eaa496ffaaf19591fe471a36cef366146eeb9153</id>
<content type='text'>
ep-&gt;mult is supposed to be set to Isochronous and
Interrupt Endapoint's multiplier value. This value
is computed from different places depending on the
link speed.

If we're dealing with HighSpeed, then it's part of
bits [12:11] of wMaxPacketSize. This case wasn't
taken into consideration before.

While at that, also make sure the ep-&gt;mult defaults
to one so drivers can use it unconditionally and
assume they'll never multiply ep-&gt;maxpacket to zero.

Cc: &lt;stable@vger.kernel.org&gt;
Signed-off-by: Felipe Balbi &lt;felipe.balbi@linux.intel.com&gt;
</content>
</entry>
<entry>
<title>usb: gadget: composite: correctly initialize ep-&gt;maxpacket</title>
<updated>2016-10-31T09:15:33+00:00</updated>
<author>
<name>Felipe Balbi</name>
<email>felipe.balbi@linux.intel.com</email>
</author>
<published>2016-09-28T07:38:11+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=e8f29bb719b47a234f33b0af62974d7a9521a52c'/>
<id>urn:sha1:e8f29bb719b47a234f33b0af62974d7a9521a52c</id>
<content type='text'>
usb_endpoint_maxp() returns wMaxPacketSize in its
raw form. Without taking into consideration that it
also contains other bits reserved for isochronous
endpoints.

This patch fixes one occasion where this is a
problem by making sure that we initialize
ep-&gt;maxpacket only with lower 10 bits of the value
returned by usb_endpoint_maxp(). Note that seperate
patches will be necessary to audit all call sites of
usb_endpoint_maxp() and make sure that
usb_endpoint_maxp() only returns lower 10 bits of
wMaxPacketSize.

Cc: &lt;stable@vger.kernel.org&gt;
Signed-off-by: Felipe Balbi &lt;felipe.balbi@linux.intel.com&gt;
</content>
</entry>
</feed>
