<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/drivers/usb, branch v3.8.3</title>
<subtitle>Linux kernel source tree</subtitle>
<id>https://git.amat.us/linux/atom/drivers/usb?h=v3.8.3</id>
<link rel='self' href='https://git.amat.us/linux/atom/drivers/usb?h=v3.8.3'/>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/'/>
<updated>2013-03-14T18:26:37Z</updated>
<entry>
<title>USB: Fix connected device switch to Inactive state.</title>
<updated>2013-03-14T18:26:37Z</updated>
<author>
<name>Sarah Sharp</name>
<email>sarah.a.sharp@linux.intel.com</email>
</author>
<published>2013-03-08T00:23:43Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=d79303047f25957a3e00d25cc1eddb82b3ee0f89'/>
<id>urn:sha1:d79303047f25957a3e00d25cc1eddb82b3ee0f89</id>
<content type='text'>
[This is upstream commit d3b9d7a9051d7024a93c76a84b2f84b3b66ad6d5.
It needs to be backported to kernels as old as 3.2, because it fixes the
buggy commit 65bdac5effd15d6af619b3b7218627ef4d84ed6a "USB: Handle warm
reset failure on empty port."]

A USB 3.0 device can transition to the Inactive state if a U1 or U2 exit
transition fails.  The current code in hub_events simply issues a warm
reset, but does not call any pre-reset or post-reset driver methods (or
unbind/rebind drivers without them).  Therefore the drivers won't know
their device has just been reset.

hub_events should instead call usb_reset_device.  This means
hub_port_reset now needs to figure out whether it should issue a warm
reset or a hot reset.

Remove the FIXME note about needing disconnect() for a NOTATTACHED
device.  This patch fixes that.

Signed-off-by: Sarah Sharp &lt;sarah.a.sharp@linux.intel.com&gt;
Acked-by: Alan Stern &lt;stern@rowland.harvard.edu&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>USB: Rip out recursive call on warm port reset.</title>
<updated>2013-03-14T18:26:37Z</updated>
<author>
<name>Sarah Sharp</name>
<email>sarah.a.sharp@linux.intel.com</email>
</author>
<published>2013-03-08T00:23:39Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=2373f5aef636cde0cdb552ee0cf7a15c99d43283'/>
<id>urn:sha1:2373f5aef636cde0cdb552ee0cf7a15c99d43283</id>
<content type='text'>
[This is upstream commit a24a6078754f28528bc91e7e7b3e6ae86bd936d8.
It needs to be backported to kernels as old as 3.2, because it fixes the
buggy commit 65bdac5effd15d6af619b3b7218627ef4d84ed6a "USB: Handle warm
reset failure on empty port."]

When a hot reset fails on a USB 3.0 port, the current port reset code
recursively calls hub_port_reset inside hub_port_wait_reset.  This isn't
ideal, since we should avoid recursive calls in the kernel, and it also
doesn't allow us to issue multiple warm resets on reset failures.

Rip out the recursive call.  Instead, add code to hub_port_reset to
issue a warm reset if the hot reset fails, and try multiple warm resets
before giving up on the port.

In hub_port_wait_reset, remove the recursive call and re-indent.  The
code is basically the same, except:

1. It bails out early if the port has transitioned to Inactive or
Compliance Mode after the reset completed.

2. It doesn't consider a connect status change to be a failed reset.  If
multiple warm resets needed to be issued, the connect status may have
changed, so we need to ignore that and look at the port link state
instead.  hub_port_reset will now do that.

3. It unconditionally sets udev-&gt;speed on all types of successful
resets.  The old recursive code would set the port speed when the second
hub_port_reset returned.

The old code did not handle connected devices needing a warm reset well.
There were only two situations that the old code handled correctly: an
empty port needing a warm reset, and a hot reset that migrated to a warm
reset.

When an empty port needed a warm reset, hub_port_reset was called with
the warm variable set.  The code in hub_port_finish_reset would skip
telling the USB core and the xHC host that the device was reset, because
otherwise that would result in a NULL pointer dereference.

When a USB 3.0 device reset migrated to a warm reset, the recursive call
made the call stack look like this:

hub_port_reset(warm = false)
        hub_wait_port_reset(warm = false)
                hub_port_reset(warm = true)
                        hub_wait_port_reset(warm = true)
                        hub_port_finish_reset(warm = true)
                        (return up the call stack to the first wait)

        hub_port_finish_reset(warm = false)

The old code didn't want to notify the USB core or the xHC host of device reset
twice, so it only did it in the second call to hub_port_finish_reset,
when warm was set to false.  This was necessary because
before patch two ("USB: Ignore xHCI Reset Device status."), the USB core
would pay attention to the xHC Reset Device command error status, and
the second call would always fail.

Now that we no longer have the recursive call, and warm can change from
false to true in hub_port_reset, we need to have hub_port_finish_reset
unconditionally notify the USB core and the xHC of the device reset.

In hub_port_finish_reset, unconditionally clear the connect status
change (CSC) bit for USB 3.0 hubs when the port reset is done.  If we
had to issue multiple warm resets for a device, that bit may have been
set if the device went into SS.Inactive and then was successfully warm
reset.

Signed-off-by: Sarah Sharp &lt;sarah.a.sharp@linux.intel.com&gt;
Acked-by: Alan Stern &lt;stern@rowland.harvard.edu&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>USB: Prepare for refactoring by adding extra udev checks.</title>
<updated>2013-03-14T18:26:37Z</updated>
<author>
<name>Sarah Sharp</name>
<email>sarah.a.sharp@linux.intel.com</email>
</author>
<published>2013-03-08T00:23:34Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=1d4b0111773fea4159e056aa8384d561c5d0fe0e'/>
<id>urn:sha1:1d4b0111773fea4159e056aa8384d561c5d0fe0e</id>
<content type='text'>
[This is upstream commit 2d4fa940f99663c82ba55b2244638833b388e4e2.
It needs to be backported to kernels as old as 3.2, because it fixes the
buggy commit 65bdac5effd15d6af619b3b7218627ef4d84ed6a "USB: Handle warm
reset failure on empty port."]

The next patch will refactor the hub port code to rip out the recursive
call to hub_port_reset on a failed hot reset.  In preparation for that,
make sure all code paths can deal with being called with a NULL udev.
The usb_device will not be valid if warm reset was issued because a port
transitioned to the Inactive or Compliance Mode on a device connect.

This patch should have no effect on current behavior.

Signed-off-by: Sarah Sharp &lt;sarah.a.sharp@linux.intel.com&gt;
Acked-by: Alan Stern &lt;stern@rowland.harvard.edu&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>USB: Don't use EHCI port sempahore for USB 3.0 hubs.</title>
<updated>2013-03-14T18:26:37Z</updated>
<author>
<name>Sarah Sharp</name>
<email>sarah.a.sharp@linux.intel.com</email>
</author>
<published>2013-03-08T00:23:30Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=4b996365813db4759bf923cec9647e92ca1c213d'/>
<id>urn:sha1:4b996365813db4759bf923cec9647e92ca1c213d</id>
<content type='text'>
[This is upstream commit 0fe51aa5eee51db7c7ecd201d42a977ad79c58b6.
It needs to be backported to kernels as old as 3.2, because it fixes the
buggy commit 65bdac5effd15d6af619b3b7218627ef4d84ed6a "USB: Handle warm
reset failure on empty port."]

The EHCI host controller needs to prevent EHCI initialization when the
UHCI or OHCI companion controller is in the middle of a port reset.  It
uses ehci_cf_port_reset_rwsem to do this.  USB 3.0 hubs can't be under
an EHCI host controller, so it makes no sense to down the semaphore for
USB 3.0 hubs.  It also makes the warm port reset code more complex.

Don't down ehci_cf_port_reset_rwsem for USB 3.0 hubs.

Signed-off-by: Sarah Sharp &lt;sarah.a.sharp@linux.intel.com&gt;
Acked-by: Alan Stern &lt;stern@rowland.harvard.edu&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>USB: EHCI: revert "remove ASS/PSS polling timeout"</title>
<updated>2013-03-14T18:26:09Z</updated>
<author>
<name>Alan Stern</name>
<email>stern@rowland.harvard.edu</email>
</author>
<published>2013-02-26T18:43:41Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=83bdd77f08b688915b17a63e73b2808da83c1d3a'/>
<id>urn:sha1:83bdd77f08b688915b17a63e73b2808da83c1d3a</id>
<content type='text'>
commit 221f8dfca89276d8aec54c6d07fbe20c281668f0 upstream.

This patch (as1649) reverts commit
55bcdce8a8228223ec4d17d8ded8134ed265d2c5 (USB: EHCI: remove ASS/PSS
polling timeout).  That commit was written under the assumption that
some controllers may take a very long time to turn off their async and
periodic schedules.  It now appears that in fact the schedules do get
turned off reasonably quickly, but some controllers occasionally leave
the schedules' status bits turned on and consequently ehci-hcd can't
tell that the schedules are off.

VIA controllers in particular have this problem.  ehci-hcd tells the
hardware to turn off the async schedule, the schedule does get turned
off, but the status bit remains on.  Since the EHCI spec requires that
the schedules not be re-enabled until the previous disable has taken
effect, with an unlimited timeout the async schedule never gets turned
back on.  The resulting symptom is that the system is unable to
communicate with USB devices.

Signed-off-by: Alan Stern &lt;stern@rowland.harvard.edu&gt;
Reported-and-tested-by: Ronald &lt;ronald645@gmail.com&gt;
Reported-and-tested-by: Paul Hartman &lt;paul.hartman@gmail.com&gt;
Reported-and-tested-by: Dieter Nützel &lt;dieter@nuetzel-hh.de&gt;
Reported-and-tested-by: Jean Delvare &lt;khali@linux-fr.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>usb: dwc3: gadget: change HIRD threshold to 12</title>
<updated>2013-03-03T22:03:33Z</updated>
<author>
<name>Felipe Balbi</name>
<email>balbi@ti.com</email>
</author>
<published>2013-01-24T09:56:11Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=e3d7ed9c659eebbf83fc20e8c80bb3c58a24028d'/>
<id>urn:sha1:e3d7ed9c659eebbf83fc20e8c80bb3c58a24028d</id>
<content type='text'>
commit 1a947746dbe1486d0e305ab512ddf085b7874cb3 upstream.

First of all, that 28 value makes no sense as
HIRD threshold is a 4-bit value, second of all
it's causing issues for OMAP5.

Using 12 because commit cbc725b3 (usb: dwc3:
keep default hird threshold value as 4b1100)
had the intention of setting the maximum allowed
value of 0xc.

Also, original code has been wrong forever, so
this should be backported as far back as
possible.

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: dwc3: gadget: fix skip LINK_TRB on ISOC</title>
<updated>2013-03-03T22:03:32Z</updated>
<author>
<name>Pratyush Anand</name>
<email>pratyush.anand@st.com</email>
</author>
<published>2013-01-14T10:29:35Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=d7c430bd3285dcdbdbe3c0d71a42b6fde442733e'/>
<id>urn:sha1:d7c430bd3285dcdbdbe3c0d71a42b6fde442733e</id>
<content type='text'>
commit 915e202aeeb59e272992a6364c910aaef3073544 upstream.

When we reach to link trb, we just need to increase free_slot and then
calculate TRB. Return is not correct, as it will cause wrong TRB DMA
address to fetch in case of update transfer.

Signed-off-by: Pratyush Anand &lt;pratyush.anand@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>
<entry>
<title>usb: dwc3: gadget: fix isoc END TRANSFER Condition</title>
<updated>2013-03-03T22:03:32Z</updated>
<author>
<name>Pratyush Anand</name>
<email>pratyush.anand@st.com</email>
</author>
<published>2013-01-14T10:29:34Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=3f08ff607d29c29c63e90bc650356aa476e5054d'/>
<id>urn:sha1:3f08ff607d29c29c63e90bc650356aa476e5054d</id>
<content type='text'>
commit cdc359dd87ab6c39a67dab724fd0b61c16e6f08b upstream.

There were still some corner cases where isoc transfer was not able to
restart, specially when missed isoc does not happen , and in fact gadget does
not queue any new request during giveback.

Cleanup function calls giveback first, which provides a way to queue
another request to gadget. But gadget did not had any data. So , it did
not call ep_queue. To twist it further, gadget did not queue till
cleanup for last queued TRB is called. If we ever reach this scenario,
we must call END TRANSFER, so that we receive a new  xfernotready with
information about current microframe number.

Also insure that there is no request submitted to core when issuing END
TRANSFER.

Signed-off-by: Pratyush Anand &lt;pratyush.anand@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>
<entry>
<title>usb: dwc3: gadget: fix missed isoc</title>
<updated>2013-03-03T22:03:32Z</updated>
<author>
<name>Pratyush Anand</name>
<email>pratyush.anand@st.com</email>
</author>
<published>2013-01-14T10:29:32Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=2f097fdb6b0d09084143d38fc43db86937610324'/>
<id>urn:sha1:2f097fdb6b0d09084143d38fc43db86937610324</id>
<content type='text'>
commit 7efea86c2868b8fd9df65e589e33aebe498ce21d upstream.

There are two reasons to generate missed isoc.

1. when the host does not poll for all the data.
2. because of application-side delays that prevent all the data from
being transferred in programmed microframe.

Current code was able to handle first case only.  This patch handles
scenario 2 as well.Scenario 2 sometime may occur with complex gadget
application, however it can be easily reproduced for testing purpose as
follows:

a. use isoc binterval as 1 in f_sourcesink.
b. use pattern=0
c. introduce a delay of 150us deliberately in source_sink_complete, so
that after few frames it lands into scenario 2.
d. now run testusb 16 (isoc in  test). You will notice that if this
patch is not applied then isoc transfer is not able to recover after
first missed.

Current patch's approach is as under:

If missed isoc occurs and there is no request queued then issue END
TRANSFER, so that core generates next xfernotready and we will issue a
fresh START TRANSFER.
If there are still queued request then wait, do not issue either END or
UPDATE TRANSFER, just attach next request in request_list during giveback.
If any future queued request is successfully transferred then we will issue
UPDATE TRANSFER for all request in the request_list.

Signed-off-by: Pratyush Anand &lt;pratyush.anand@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>
<entry>
<title>usb: dwc3: Enable usb2 LPM only when connected as usb2.0</title>
<updated>2013-03-03T22:03:32Z</updated>
<author>
<name>Pratyush Anand</name>
<email>pratyush.anand@st.com</email>
</author>
<published>2013-01-14T10:29:31Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=d1e2a92b95b9cf0e76a5b65282e313acdc3de2b2'/>
<id>urn:sha1:d1e2a92b95b9cf0e76a5b65282e313acdc3de2b2</id>
<content type='text'>
commit 2b758350af19db9a5c98241cf222c2e211d7a912 upstream.

Synopsys says:
The HIRD Threshold field must be set to ‘0’ when the device core is
operating in super speed mode.

This patch implements above statement.

Acked-by: Paul Zimmerman &lt;paulz@synopsys.com&gt;
Signed-off-by: Pratyush Anand &lt;pratyush.anand@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>
