<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/drivers/usb, branch v3.7.2</title>
<subtitle>Linux kernel source tree</subtitle>
<id>https://git.amat.us/linux/atom/drivers/usb?h=v3.7.2</id>
<link rel='self' href='https://git.amat.us/linux/atom/drivers/usb?h=v3.7.2'/>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/'/>
<updated>2013-01-11T17:18:49Z</updated>
<entry>
<title>xhci: Add Lynx Point LP to list of Intel switchable hosts</title>
<updated>2013-01-11T17:18:49Z</updated>
<author>
<name>Russell Webb</name>
<email>russell.webb@linux.intel.com</email>
</author>
<published>2012-11-09T21:58:49Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=27f0a83c49a639749f9e26c5af4b70164922f304'/>
<id>urn:sha1:27f0a83c49a639749f9e26c5af4b70164922f304</id>
<content type='text'>
commit bb1e5dd7113d2fd178d3af9aca8f480ae0468edf upstream.

Like Lynx Point, Lynx Point LP is also switchable.  See
1c12443ab8eba71a658fae4572147e56d1f84f66 for more details.

This patch should be backported to stable kernels as old as 3.0,
that contain commit 69e848c2090aebba5698a1620604c7dccb448684
"Intel xhci: Support EHCI/xHCI port switching."

Signed-off-by: Russell Webb &lt;russell.webb@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@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>usb: host: xhci: Stricter conditional for Z1 system models for Compliance Mode Patch</title>
<updated>2013-01-11T17:18:49Z</updated>
<author>
<name>Alexis R. Cortes</name>
<email>alexis.cortes@ti.com</email>
</author>
<published>2012-11-08T22:59:27Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=702b2581032ced74efff3f908a3c3133947198fc'/>
<id>urn:sha1:702b2581032ced74efff3f908a3c3133947198fc</id>
<content type='text'>
commit b0e4e606ff6ff26da0f60826e75577b56ba4e463 upstream.

This minor patch creates a more stricter conditional for the Z1 sytems for applying
the Compliance Mode Patch, this to avoid the quirk to be applied to models that
contain a "Z1" in their dmi product string but are different from Z1 systems.

This patch should be backported to stable kernels as old as 3.2, that
contain the commit 71c731a296f1b08a3724bd1b514b64f1bda87a23 "usb: host:
xhci: Fix Compliance Mode on SN65LVPE502CP Hardware"

Signed-off-by: Alexis R. Cortes &lt;alexis.cortes@ti.com&gt;
Signed-off-by: Sarah Sharp &lt;sarah.a.sharp@linux.intel.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>USB: fix endpoint-disabling for failed config changes</title>
<updated>2013-01-11T17:18:49Z</updated>
<author>
<name>Alan Stern</name>
<email>stern@rowland.harvard.edu</email>
</author>
<published>2012-11-07T15:31:30Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=d0abdff42cb550ae036f9ac3aa168ea7c867f464'/>
<id>urn:sha1:d0abdff42cb550ae036f9ac3aa168ea7c867f464</id>
<content type='text'>
commit 36caff5d795429c572443894e8789c2150dd796b upstream.

This patch (as1631) fixes a bug that shows up when a config change
fails for a device under an xHCI controller.  The controller needs to
be told to disable the endpoints that have been enabled for the new
config.  The existing code does this, but before storing the
information about which endpoints were enabled!  As a result, any
second attempt to install the new config is doomed to fail because
xhci-hcd will refuse to enable an endpoint that is already enabled.

The patch optimistically initializes the new endpoints' device
structures before asking the device to switch to the new config.  If
the request fails then the endpoint information is already stored, so
we can use usb_hcd_alloc_bandwidth() to disable the endpoints with no
trouble.  The rest of the error path is slightly more complex now; we
have to disable the new interfaces and call put_device() rather than
simply deallocating them.

Signed-off-by: Alan Stern &lt;stern@rowland.harvard.edu&gt;
Reported-and-tested-by: Matthias Schniedermeyer &lt;ms@citd.de&gt;
CC: Sarah Sharp &lt;sarah.a.sharp@linux.intel.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>xhci: fix null-pointer dereference when destroying half-built segment rings</title>
<updated>2013-01-11T17:18:48Z</updated>
<author>
<name>Julius Werner</name>
<email>jwerner@chromium.org</email>
</author>
<published>2012-11-01T19:47:59Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=3f853877eee9cf53adcce9a52b25db56ff763941'/>
<id>urn:sha1:3f853877eee9cf53adcce9a52b25db56ff763941</id>
<content type='text'>
commit 68e5254adb88bede68285f11fb442a4d34fb550c upstream.

xhci_alloc_segments_for_ring() builds a list of xhci_segments and links
the tail to head at the end (forming a ring). When it bails out for OOM
reasons half-way through, it tries to destroy its half-built list with
xhci_free_segments_for_ring(), even though it is not a ring yet. This
causes a null-pointer dereference upon hitting the last element.

Furthermore, one of its callers (xhci_ring_alloc()) mistakenly believes
the output parameters to be valid upon this kind of OOM failure, and
calls xhci_ring_free() on them. Since the (incomplete) list/ring should
already be destroyed in that case, this would lead to a use after free.

This patch fixes those issues by having xhci_alloc_segments_for_ring()
destroy its half-built, non-circular list manually and destroying the
invalid struct xhci_ring in xhci_ring_alloc() with a plain kfree().

This patch should be backported to kernels as old as 2.6.31, that
contains the commit 0ebbab37422315a5d0cb29792271085bafdf38c0 "USB: xhci:
Ring allocation and initialization."

A separate patch will need to be developed for kernels older than 3.4,
since the ring allocation code was refactored in that kernel.

Signed-off-by: Julius Werner &lt;jwerner@chromium.org&gt;
Signed-off-by: Sarah Sharp &lt;sarah.a.sharp@linux.intel.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>xHCI: Fix TD Size calculation on 1.0 hosts.</title>
<updated>2013-01-11T17:18:48Z</updated>
<author>
<name>Sarah Sharp</name>
<email>sarah.a.sharp@linux.intel.com</email>
</author>
<published>2012-10-25T22:56:40Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=056f8bdd03a4a9e3237295696909cee11a3bb651'/>
<id>urn:sha1:056f8bdd03a4a9e3237295696909cee11a3bb651</id>
<content type='text'>
commit 4525c0a10dff7ad3669763c28016c7daffc3900e upstream.

The xHCI 1.0 specification made a change to the TD Size field in TRBs.
The value is now the number of packets that remain to be sent in the TD,
not including this TRB.  The TD Size value for the last TRB in a TD must
always be zero.

The xHCI function xhci_v1_0_td_remainder() attempts to calculate this,
but it gets it wrong.  First, it erroneously reuses the old
xhci_td_remainder function, which will right shift the value by 10.  The
xHCI 1.0 spec as of June 2011 says nothing about right shifting by 10.
Second, it does not set the TD size for the last TRB in a TD to zero.

Third, it uses roundup instead of DIV_ROUND_UP.  The total packet count
is supposed to be the total number of bytes in this TD, divided by the
max packet size, rounded up.  DIV_ROUND_UP is the right function to use
in that case.

With the old code, a TD on an endpoint with max packet size 1024 would
be set up like so:
TRB 1, TRB length = 600 bytes, TD size = 0
TRB 1, TRB length = 200 bytes, TD size = 0
TRB 1, TRB length = 100 bytes, TD size = 0

With the new code, the TD would be set up like this:
TRB 1, TRB length = 600 bytes, TD size = 1
TRB 1, TRB length = 200 bytes, TD size = 1
TRB 1, TRB length = 100 bytes, TD size = 0

This commit should be backported to kernels as old as 3.0, that contain
the commit 4da6e6f247a2601ab9f1e63424e4d944ed4124f3 "xhci 1.0: Update TD
size field format."

Signed-off-by: Sarah Sharp &lt;sarah.a.sharp@linux.intel.com&gt;
Reported-by: Chintan Mehta &lt;chintan.mehta@sibridgetech.com&gt;
Reported-by: Shimmer Huang &lt;shimmering.h@gmail.com&gt;
Tested-by: Bhavik Kothari &lt;bhavik.kothari@sibridgetech.com&gt;
Tested-by: Shimmer Huang &lt;shimmering.h@gmail.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>xhci: Fix conditional check in bandwidth calculation.</title>
<updated>2013-01-11T17:18:48Z</updated>
<author>
<name>Sarah Sharp</name>
<email>sarah.a.sharp@linux.intel.com</email>
</author>
<published>2012-10-25T20:44:12Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=3f605c4b4424a7042bd3ba656af10e3a405d5663'/>
<id>urn:sha1:3f605c4b4424a7042bd3ba656af10e3a405d5663</id>
<content type='text'>
commit 392a07ae3316f2b90b39ce41e66d6f6b5c95de90 upstream.

David reports that at drivers/usb/host/xhci.c:2257:

static bool xhci_is_sync_in_ep(unsigned int ep_type)
{
    return (ep_type == ISOC_IN_EP || ep_type != INT_IN_EP);
}

The static analyser cppcheck says

[linux-3.7-rc2/drivers/usb/host/xhci.c:2257]: (style) Redundant condition: If ep_type == 5, the comparison ep_type != 7 is always true.

Maybe the original programmer intention was something like

static bool xhci_is_sync_in_ep(unsigned int ep_type)
{
    return (ep_type == ISOC_IN_EP || ep_type == INT_IN_EP);
}

Fix this.

This patch should be backported to stable kernels as old as 3.2, that
contain the commit 2b69899934c63b7b9432568584fb4c4a2924f40c "xhci: USB
3.0 BW checking."

Signed-off-by: Sarah Sharp &lt;sarah.a.sharp@linux.intel.com&gt;
Reported-by: David Binderman &lt;dcb314@hotmail.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>Revert "usb: musb: dsps: remove explicit NOP device creation"</title>
<updated>2013-01-11T17:18:48Z</updated>
<author>
<name>Afzal Mohammed</name>
<email>afzal@ti.com</email>
</author>
<published>2012-11-06T15:17:24Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=2a90b6baab1021ebbd7fdbb4b894ea315650d360'/>
<id>urn:sha1:2a90b6baab1021ebbd7fdbb4b894ea315650d360</id>
<content type='text'>
commit d75542263a0b005876d112bbf9ffb23180cc3149 upstream.

This reverts commit d8c3ef256f88b7c6ecd673d03073b5645be9c5e4.

Above mentioned change was made along with multi usb phy change and
adding DT support for nop transceiver. But other two changes did not
make it to mainline. This in effect makes dsps musb wrapper unusable
even for single instance.

Hence revert it so that at least single instance can be supported.

Signed-off-by: Afzal Mohammed &lt;afzal@ti.com&gt;
Signed-off-by: Felipe Balbi &lt;balbi@ti.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>usb: musb: cppi_dma: export cppi_interrupt()</title>
<updated>2013-01-11T17:18:47Z</updated>
<author>
<name>Sergei Shtylyov</name>
<email>sshtylyov@ru.mvista.com</email>
</author>
<published>2012-11-05T19:26:40Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=d18d223714855658c62d17fdd8721bb00ad3cd69'/>
<id>urn:sha1:d18d223714855658c62d17fdd8721bb00ad3cd69</id>
<content type='text'>
commit 8b416b0b25d5d8ddb3a91c1d20e1373582c50405 upstream.

Now that DaVinci glue layer can be modular, we must export cppi_interrupt()
that it may call...

Signed-off-by: Sergei Shtylyov &lt;sshtylyov@ru.mvista.com&gt;
Signed-off-by: Felipe Balbi &lt;balbi@ti.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>usb: gadget: network: fix bind() error path</title>
<updated>2013-01-11T17:18:35Z</updated>
<author>
<name>Sebastian Andrzej Siewior</name>
<email>bigeasy@linutronix.de</email>
</author>
<published>2012-10-22T20:15:00Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=192847f2597e954488a175e40607dcb396bec6c1'/>
<id>urn:sha1:192847f2597e954488a175e40607dcb396bec6c1</id>
<content type='text'>
commit e79cc615a9bb44da72c499ccfa2c9c4bbea3aa84 upstream.

I think this is wrong since 72c973dd ("usb: gadget: add
usb_endpoint_descriptor to struct usb_ep"). If we fail to allocate an ep
or bail out early we shouldn't check for the descriptor which is
assigned at ep_enable() time.

Signed-off-by: Sebastian Andrzej Siewior &lt;bigeasy@linutronix.de&gt;
Cc: Tatyana Brokhman &lt;tlinder@codeaurora.org&gt;
Signed-off-by: Felipe Balbi &lt;balbi@ti.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>usb: gadget: uvc: fix error path in uvc_function_bind()</title>
<updated>2013-01-11T17:18:35Z</updated>
<author>
<name>Sebastian Andrzej Siewior</name>
<email>bigeasy@linutronix.de</email>
</author>
<published>2012-10-22T20:15:05Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=065f5561a20659cf17aae5f72b32b5c2695c8e00'/>
<id>urn:sha1:065f5561a20659cf17aae5f72b32b5c2695c8e00</id>
<content type='text'>
commit 0f9df939385527049c8062a099fbfa1479fe7ce0 upstream.

The "video-&gt;minor = -1" assigment is done in V4L2 by
video_register_device() so it is removed here.
Now. uvc_function_bind() calls in error case uvc_function_unbind() for
cleanup. The problem is that uvc_function_unbind() frees the uvc struct
and uvc_bind_config() does as well in error case of usb_add_function().
Removing kfree() in usb_add_function() would make the patch smaller but
it would look odd because the new allocated memory is not cleaned up.
However it is not guaranteed that if we call usb_add_function() we also
get to the bind function.
Therefore the patch extracts the conditional cleanup from
uvc_function_unbind() applies to uvc_function_bind().
uvc_function_unbind() now contains only the complete cleanup which is
required once everything has been registrated.

Signed-off-by: Sebastian Andrzej Siewior &lt;bigeasy@linutronix.de&gt;
Cc: Laurent Pinchart &lt;laurent.pinchart@ideasonboard.com&gt;
Cc: Bhupesh Sharma &lt;bhupesh.sharma@st.com&gt;
Signed-off-by: Felipe Balbi &lt;balbi@ti.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

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