<feed xmlns='http://www.w3.org/2005/Atom'>
<title>lwn.git/drivers/usb/core/urb.c, branch v3.0.35</title>
<subtitle>Linux kernel documentation tree maintained by Jonathan Corbet</subtitle>
<id>http://mirrors.hust.edu.cn/git/lwn.git/atom?h=v3.0.35</id>
<link rel='self' href='http://mirrors.hust.edu.cn/git/lwn.git/atom?h=v3.0.35'/>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/'/>
<updated>2011-03-14T01:23:57+00:00</updated>
<entry>
<title>USB: Add support for SuperSpeed isoc endpoints</title>
<updated>2011-03-14T01:23:57+00:00</updated>
<author>
<name>Paul Zimmerman</name>
<email>Paul.Zimmerman@synopsys.com</email>
</author>
<published>2011-03-01T02:11:27+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=500132a0f26ad7d9916102193cbc6c1b1becb373'/>
<id>urn:sha1:500132a0f26ad7d9916102193cbc6c1b1becb373</id>
<content type='text'>
Use the Mult and bMaxBurst values from the endpoint companion
descriptor to calculate the max length of an isoc transfer.

Add USB_SS_MULT macro to access Mult field of bmAttributes, at
Sarah's suggestion.

This patch should be queued for the 2.6.36 and 2.6.37 stable trees, since
those were the first kernels to have isochronous support for SuperSpeed
devices.

Signed-off-by: Paul Zimmerman &lt;paulz@synopsys.com&gt;
Signed-off-by: Sarah Sharp &lt;sarah.a.sharp@linux.intel.com&gt;
Cc: stable@kernel.org
</content>
</entry>
<entry>
<title>USB: output an error message when the pipe type doesn't match the endpoint type</title>
<updated>2010-10-22T17:21:27+00:00</updated>
<author>
<name>Simon Arlott</name>
<email>simon@fire.lp0.eu</email>
</author>
<published>2010-08-30T21:50:20+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=f7dd64916bb6cfae8c96eaa3c754c30b5046586f'/>
<id>urn:sha1:f7dd64916bb6cfae8c96eaa3c754c30b5046586f</id>
<content type='text'>
Commit f661c6f8c67bd55e93348f160d590ff9edf08904 adds a check of the pipe type if
CONFIG_USB_DEBUG is enabled, but it doesn't output anything if this scenario
occurs.

Signed-off-by: Simon Arlott &lt;simon@fire.lp0.eu&gt;
Cc: Alan Stern &lt;stern@rowland.harvard.edu&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;

</content>
</entry>
<entry>
<title>USB: fix thread-unsafe anchor utiliy routines</title>
<updated>2010-08-10T21:35:45+00:00</updated>
<author>
<name>Christian Lamparter</name>
<email>chunkeey@googlemail.com</email>
</author>
<published>2010-08-03T00:32:28+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=b3e670443b7fb8a2d29831b62b44a039c283e351'/>
<id>urn:sha1:b3e670443b7fb8a2d29831b62b44a039c283e351</id>
<content type='text'>
This patch fixes a race condition in two utility routines
related to the removal/unlinking of urbs from an anchor.

If two threads are concurrently accessing the same anchor,
both could end up with the same urb - thinking they are
the exclusive owner.

Alan Stern pointed out a related issue in
usb_unlink_anchored_urbs:

"The URB isn't removed from the anchor until it completes
 (as a by-product of completion, in fact), which might not
 be for quite some time after the unlink call returns.
 In the meantime, the subroutine will keep trying to unlink
 it, over and over again."

Cc: stable &lt;stable@kernel.org&gt;
Cc: Oliver Neukum &lt;oneukum@suse.de&gt;
Cc: Greg Kroah-Hartman &lt;greg@kroah.com&gt;
Acked-by: Alan Stern &lt;stern@rowland.harvard.edu&gt;
Signed-off-by: Christian Lamparter &lt;chunkeey@googlemail.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;


</content>
</entry>
<entry>
<title>USB: Add a usb_pipe_endpoint() convenience function</title>
<updated>2010-05-20T20:21:41+00:00</updated>
<author>
<name>Matthew Wilcox</name>
<email>willy@linux.intel.com</email>
</author>
<published>2010-04-30T19:11:29+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=fe54b058de9d1df5fef9e2a559651f4b7c9f04b1'/>
<id>urn:sha1:fe54b058de9d1df5fef9e2a559651f4b7c9f04b1</id>
<content type='text'>
Converting a pipe number to a struct usb_host_endpoint pointer is a little
messy.  Introduce a new convenience function to hide the mess.

Signed-off-by: Matthew Wilcox &lt;willy@linux.intel.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;

</content>
</entry>
<entry>
<title>USB: fix usbmon and DMA mapping for scatter-gather URBs</title>
<updated>2010-05-20T20:21:37+00:00</updated>
<author>
<name>Alan Stern</name>
<email>stern@rowland.harvard.edu</email>
</author>
<published>2010-04-02T17:27:28+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=ff9c895f07d36193c75533bda8193bde8ca99d02'/>
<id>urn:sha1:ff9c895f07d36193c75533bda8193bde8ca99d02</id>
<content type='text'>
This patch (as1368) fixes a rather obscure bug in usbmon: When tracing
URBs sent by the scatter-gather library, it accesses the data buffers
while they are still mapped for DMA.

The solution is to move the mapping and unmapping out of the s-g
library and into the usual place in hcd.c.  This requires the addition
of new URB flag bits to describe the kind of mapping needed, since we
have to call dma_map_sg() if the HCD supports native scatter-gather
operation and dma_map_page() if it doesn't.  The nice thing about
having the new flags is that they simplify the testing for unmapping.

The patch removes the only caller of usb_buffer_[un]map_sg(), so those
functions are #if'ed out.  A later patch will remove them entirely.

As a result of this change, urb-&gt;sg will be set in situations where
it wasn't set previously.  Hence the xhci and whci drivers are
adjusted to test urb-&gt;num_sgs instead, which retains its original
meaning and is nonzero only when the HCD has to handle a scatterlist.

Finally, even when a submission error occurs we don't want to hand
URBs to usbmon before they are unmapped.  The submission path is
rearranged so that map_urb_for_dma() is called only for non-root-hub
URBs and unmap_urb_for_dma() is called immediately after a submission
error.  This simplifies the error handling.

Signed-off-by: Alan Stern &lt;stern@rowland.harvard.edu&gt;
CC: &lt;stable@kernel.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;


</content>
</entry>
<entry>
<title>USB: remove uses of URB_NO_SETUP_DMA_MAP</title>
<updated>2010-05-20T20:21:31+00:00</updated>
<author>
<name>Alan Stern</name>
<email>stern@rowland.harvard.edu</email>
</author>
<published>2010-03-05T20:10:17+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=0ede76fcec5415ef82a423a95120286895822e2d'/>
<id>urn:sha1:0ede76fcec5415ef82a423a95120286895822e2d</id>
<content type='text'>
This patch (as1350) removes all usages of coherent buffers for USB
control-request setup-packet buffers.  There's no good reason to
reserve coherent memory for these things; control requests are hardly
ever used in large quantity (the major exception is firmware
transfers, and they aren't time-critical).  Furthermore, only seven
drivers used it.  We might as well always use streaming DMA mappings
for setup-packet buffers, and remove some extra complexity from
usbcore.

The DMA-mapping portion of hcd.c is currently in flux.  A separate
patch will be submitted to remove support for URB_NO_SETUP_DMA_MAP
after everything else settles down.  The removal should go smoothly,
as by then nobody will be using it.

Signed-off-by: Alan Stern &lt;stern@rowland.harvard.edu&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;

</content>
</entry>
<entry>
<title>USB: make hcd.h public (drivers dependency)</title>
<updated>2010-05-20T20:21:30+00:00</updated>
<author>
<name>Eric Lescouet</name>
<email>Eric.Lescouet@virtuallogix.com</email>
</author>
<published>2010-04-24T21:21:52+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=27729aadd31dafddaaf64c24f8ef6d0ff750f3aa'/>
<id>urn:sha1:27729aadd31dafddaaf64c24f8ef6d0ff750f3aa</id>
<content type='text'>
The usbcore headers: hcd.h and hub.h are shared between usbcore,
HCDs and a couple of other drivers (e.g. USBIP modules).
So, it makes sense to move them into a more public location and
to cleanup dependency of those modules on kernel internal headers.
This patch moves hcd.h from drivers/usb/core into include/linux/usb/

Signed-of-by: Eric Lescouet &lt;eric@lescouet.org&gt;
Cc: Alan Stern &lt;stern@rowland.harvard.edu&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;

</content>
</entry>
<entry>
<title>USB: Fix usb_fill_int_urb for SuperSpeed devices</title>
<updated>2010-03-19T14:24:23+00:00</updated>
<author>
<name>Matthew Wilcox</name>
<email>willy@linux.intel.com</email>
</author>
<published>2010-03-16T19:55:44+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=f09a15e6e69884cedec4d1c022089a973aa01f1e'/>
<id>urn:sha1:f09a15e6e69884cedec4d1c022089a973aa01f1e</id>
<content type='text'>
USB 3 and Wireless USB specify a logarithmic encoding of the endpoint
interval that matches the USB 2 specification.  usb_fill_int_urb() didn't
know that and was filling in the interval as if it was USB 1.1.  Fix
usb_fill_int_urb() for SuperSpeed devices, but leave the wireless case
alone, because David Vrabel wants to keep the old encoding.

Update the struct urb kernel doc to note that SuperSpeed URBs must have
urb-&gt;interval specified in microframes.

Add a missing break statement in the usb_submit_urb() interrupt URB
checking, since wireless USB and SuperSpeed USB encode urb-&gt;interval
differently.  This allows xHCI roothubs to actually register with khubd.

Signed-off-by: Matthew Wilcox &lt;willy@linux.intel.com&gt;
Signed-off-by: Sarah Sharp &lt;sarah.a.sharp@linux.intel.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;

</content>
</entry>
<entry>
<title>USB: rename USB_SPEED_VARIABLE to USB_SPEED_WIRELESS</title>
<updated>2010-03-02T22:53:36+00:00</updated>
<author>
<name>Greg Kroah-Hartman</name>
<email>gregkh@suse.de</email>
</author>
<published>2010-01-14T19:08:04+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=551cdbbeb118bd5ed301f8749aef69219284399b'/>
<id>urn:sha1:551cdbbeb118bd5ed301f8749aef69219284399b</id>
<content type='text'>
It's really the wireless speed, so rename the thing to make
more sense.  Based on a recommendation from David Vrabel

Cc: David Vrabel &lt;david.vrabel@csr.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;

</content>
</entry>
<entry>
<title>USB: check the endpoint type against the pipe type</title>
<updated>2010-03-02T22:53:07+00:00</updated>
<author>
<name>Alan Stern</name>
<email>stern@rowland.harvard.edu</email>
</author>
<published>2009-12-11T21:20:20+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=f661c6f8c67bd55e93348f160d590ff9edf08904'/>
<id>urn:sha1:f661c6f8c67bd55e93348f160d590ff9edf08904</id>
<content type='text'>
This patch (as1316) adds some error checking to usb_submit_urb().
It's conditional on CONFIG_USB_DEBUG, so it won't affect normal users.
The new check makes sure that the actual type of the endpoint
described by urb-&gt;pipe agrees with the type encoded in the pipe value.

The USB error code documentation is updated to include the code
returned by the new check, and the usbfs SUBMITURB handler is updated
to use the correct pipe type when legacy user code tries to submit a
bulk transfer to an interrupt endpoint.

Signed-off-by: Alan Stern &lt;stern@rowland.harvard.edu&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;


</content>
</entry>
</feed>
