<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/drivers/usb/host, branch v3.0.3</title>
<subtitle>Linux kernel source tree</subtitle>
<id>https://git.amat.us/linux/atom/drivers/usb/host?h=v3.0.3</id>
<link rel='self' href='https://git.amat.us/linux/atom/drivers/usb/host?h=v3.0.3'/>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/'/>
<updated>2011-08-17T17:55:51Z</updated>
<entry>
<title>xhci: Don't submit commands or URBs to halted hosts.</title>
<updated>2011-08-17T17:55:51Z</updated>
<author>
<name>Sarah Sharp</name>
<email>sarah.a.sharp@linux.intel.com</email>
</author>
<published>2011-07-01T20:35:40Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=d4194efe3582a8e17add88ad1fcf8e2fd00504ce'/>
<id>urn:sha1:d4194efe3582a8e17add88ad1fcf8e2fd00504ce</id>
<content type='text'>
commit 7bd89b4017f46a9b92853940fd9771319acb578a upstream.

Commit fccf4e86200b8f5edd9a65da26f150e32ba79808
"USB: Free bandwidth when usb_disable_device is called" caused a bit of an
issue when the xHCI host controller driver is unloaded.  It changed the
USB core to remove all endpoints when a USB device is disabled.  When the
driver is unloaded, it will remove the SuperSpeed split root hub, which
will disable all devices under that roothub and then halt the host
controller.  When the second High Speed split roothub is removed, the USB
core will attempt to disable the endpoints, which will submit a Configure
Endpoint command to a halted host controller.

The command will eventually time out, but it makes the xHCI driver unload
take *minutes* if there are a couple of USB 1.1/2.0 devices attached.  We
must halt the host controller when the SuperSpeed roothub is removed,
because we can't allow any interrupts from things like port status
changes.

Make several different functions not submit commands or URBs to the host
controller when the host is halted, by adding a check in
xhci_check_args().  xhci_check_args() is used by these functions:

xhci.c-int xhci_urb_enqueue()
xhci.c-int xhci_drop_endpoint()
xhci.c-int xhci_add_endpoint()
xhci.c-int xhci_check_bandwidth()
xhci.c-void xhci_reset_bandwidth()
xhci.c-static int xhci_check_streams_endpoint()
xhci.c-int xhci_discover_or_reset_device()

It's also used by xhci_free_dev().  However, we have to take special
care in that case, because we want the device memory to be freed if the
host controller is halted.

This patch should be backported to the 2.6.39 and 3.0 kernel.

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: xhci: fix OS want to own HC</title>
<updated>2011-08-17T17:55:51Z</updated>
<author>
<name>JiSheng Zhang</name>
<email>jszhang3@gmail.com</email>
</author>
<published>2011-07-16T03:04:19Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=2c97674e78c73410d4ac9f63643d05682b2e8f70'/>
<id>urn:sha1:2c97674e78c73410d4ac9f63643d05682b2e8f70</id>
<content type='text'>
commit 6768458b17f9bf48a4c3a34e49b20344091b5f7e upstream.

Software should set XHCI_HC_OS_OWNED bit to request ownership of xHC.

This patch should be backported to kernels as far back as 2.6.31.

Signed-off-by: JiSheng Zhang &lt;jszhang3@gmail.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>EHCI: fix direction handling for interrupt data toggles</title>
<updated>2011-08-05T04:58:41Z</updated>
<author>
<name>Alan Stern</name>
<email>stern@rowland.harvard.edu</email>
</author>
<published>2011-07-19T18:01:23Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=d10a6cb264a9a60097e46c93146259fd36ea4bf4'/>
<id>urn:sha1:d10a6cb264a9a60097e46c93146259fd36ea4bf4</id>
<content type='text'>
commit e04f5f7e423018bcec84c11af2058cdce87816f3 upstream.

This patch (as1480) fixes a rather obscure bug in ehci-hcd.  The
qh_update() routine needs to know the number and direction of the
endpoint corresponding to its QH argument.  The number can be taken
directly from the QH data structure, but the direction isn't stored
there.  The direction is taken instead from the first qTD linked to
the QH.

However, it turns out that for interrupt transfers, qh_update() gets
called before the qTDs are linked to the QH.  As a result, qh_update()
computes a bogus direction value, which messes up the endpoint toggle
handling.  Under the right combination of circumstances this causes
usb_reset_endpoint() not to work correctly, which causes packets to be
dropped and communications to fail.

Now, it's silly for the QH structure not to have direct access to all
the descriptor information for the corresponding endpoint.  Ultimately
it may get a pointer to the usb_host_endpoint structure; for now,
adding a copy of the direction flag solves the immediate problem.

This allows the Spyder2 color-calibration system (a low-speed USB
device that sends all its interrupt data packets with the toggle set
to 0 and hance requires constant use of usb_reset_endpoint) to work
when connected through a high-speed hub.  Thanks to Graeme Gill for
supplying the hardware that allowed me to track down this bug.

Signed-off-by: Alan Stern &lt;stern@rowland.harvard.edu&gt;
Reported-by: Graeme Gill &lt;graeme@argyllcms.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;

</content>
</entry>
<entry>
<title>EHCI: only power off port if over-current is active</title>
<updated>2011-08-05T04:58:40Z</updated>
<author>
<name>Sergei Shtylyov</name>
<email>sshtylyov@ru.mvista.com</email>
</author>
<published>2011-07-06T19:19:38Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=e151a2a6651a0a46fc03a845614b23c3b630042e'/>
<id>urn:sha1:e151a2a6651a0a46fc03a845614b23c3b630042e</id>
<content type='text'>
commit 81463c1d707186adbbe534016cd1249edeab0dac upstream.

MAX4967 USB power supply chip we use on our boards signals over-current when
power is not enabled; once it's enabled, over-current signal returns to normal.
That unfortunately caused the endless stream of "over-current change on port"
messages. The EHCI root hub code reacts on every over-current signal change
with powering off the port -- such change event is generated the moment the
port power is enabled, so once enabled the power is immediately cut off.
I think we should only cut off power when we're seeing the active over-current
signal, so I'm adding such check to that code. I also think that the fact that
we've cut off the port power should be reflected in the result of GetPortStatus
request immediately, hence I'm adding a PORTSCn register readback after write...

Signed-off-by: Sergei Shtylyov &lt;sshtylyov@ru.mvista.com&gt;
Acked-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: EHCI: go back to using the system clock for QH unlinks</title>
<updated>2011-08-05T04:58:32Z</updated>
<author>
<name>Alan Stern</name>
<email>stern@rowland.harvard.edu</email>
</author>
<published>2011-07-05T16:34:05Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=22007e1ddbe599373b116ecf3485ebf842405f73'/>
<id>urn:sha1:22007e1ddbe599373b116ecf3485ebf842405f73</id>
<content type='text'>
commit 004c19682884d4f40000ce1ded53f4a1d0b18206 upstream.

This patch (as1477) fixes a problem affecting a few types of EHCI
controller.  Contrary to what one might expect, these controllers
automatically stop their internal frame counter when no ports are
enabled.  Since ehci-hcd currently relies on the frame counter for
determining when it should unlink QHs from the async schedule, those
controllers run into trouble: The frame counter stops and the QHs
never get unlinked.

Some systems have also experienced other problems traced back to
commit b963801164618e25fbdc0cd452ce49c3628b46c8 (USB: ehci-hcd unlink
speedups), which made the original switch from using the system clock
to using the frame counter.  It never became clear what the reason was
for these problems, but evidently it is related to use of the frame
counter.

To fix all these problems, this patch more or less reverts that commit
and goes back to using the system clock.  But this can't be done
cleanly because other changes have since been made to the scan_async()
subroutine.  One of these changes involved the tricky logic that tries
to avoid rescanning QHs that have already been seen when the scanning
loop is restarted, which happens whenever an URB is given back.
Switching back to clock-based unlinks would make this logic even more
complicated.

Therefore the new code doesn't rescan the entire async list whenever a
giveback occurs.  Instead it rescans only the current QH and continues
on from there.  This requires the use of a separate pointer to keep
track of the next QH to scan, since the current QH may be unlinked
while the scanning is in progress.  That new pointer must be global,
so that it can be adjusted forward whenever the _next_ QH gets
unlinked.  (uhci-hcd uses this same trick.)

Simplification of the scanning loop removes a level of indentation,
which accounts for the size of the patch.  The amount of code changed
is relatively small, and it isn't exactly a reversion of the
b963801164 commit.

This fixes Bugzilla #32432.

Signed-off-by: Alan Stern &lt;stern@rowland.harvard.edu&gt;
Tested-by: Matej Kenda &lt;matejken@gmail.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;

</content>
</entry>
<entry>
<title>USB: OHCI: fix another regression for NVIDIA controllers</title>
<updated>2011-08-05T04:58:32Z</updated>
<author>
<name>Alan Stern</name>
<email>stern@rowland.harvard.edu</email>
</author>
<published>2011-07-15T21:22:15Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=d05dcfcd0fea25eefa8b85926792b161239ac6b1'/>
<id>urn:sha1:d05dcfcd0fea25eefa8b85926792b161239ac6b1</id>
<content type='text'>
commit 6ea12a04d295235ed67010a09fdea58c949e3eb0 upstream.

The NVIDIA series of OHCI controllers continues to be troublesome.  A
few people using the MCP67 chipset have reported that even with the
most recent kernels, the OHCI controller fails to handle new
connections and spams the system log with "unable to enumerate USB
port" messages.  This is different from the other problems previously
reported for NVIDIA OHCI controllers, although it is probably related.

It turns out that the MCP67 controller does not like to be kept in the
RESET state very long.  After only a few seconds, it decides not to
work any more.  This patch (as1479) changes the PCI initialization
quirk code so that NVIDIA controllers are switched into the SUSPEND
state after 50 ms of RESET.  With no interrupts enabled and all the
downstream devices reset, and thus unable to send wakeup requests,
this should be perfectly safe (even for non-NVIDIA hardware).

The removal code in ohci-hcd hasn't been changed; it will still leave
the controller in the RESET state.  As a result, if someone unloads
ohci-hcd and then reloads it, the controller won't work again until
the system is rebooted.  If anybody complains about this, the removal
code can be updated similarly.

This fixes Bugzilla #22052.

Tested-by: Larry Finger &lt;Larry.Finger@lwfinger.net&gt;
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: r8a66597-hcd: fix cannot detect low/full speed device</title>
<updated>2011-06-27T20:46:44Z</updated>
<author>
<name>Yoshihiro Shimoda</name>
<email>yoshihiro.shimoda.uh@renesas.com</email>
</author>
<published>2011-06-21T04:24:42Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=87abd0a92c72eea71542d6c972c67e39e584e989'/>
<id>urn:sha1:87abd0a92c72eea71542d6c972c67e39e584e989</id>
<content type='text'>
This controller can control "Transaction Translators", but
the hcd-&gt;has_tt is not set.
Since the commit d199c96d41d80a567493e12b8e96ea056a1350c1
("USB: prevent buggy from crashing the USB stack") has checked it,
the driver could not work the low/full speed device.

Signed-off-by: Yoshihiro Shimoda &lt;yoshihiro.shimoda.uh@renesas.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;
</content>
</entry>
<entry>
<title>USB: ehci-ath79: fix a NULL pointer dereference</title>
<updated>2011-06-27T20:46:44Z</updated>
<author>
<name>Gabor Juhos</name>
<email>juhosg@openwrt.org</email>
</author>
<published>2011-06-20T15:22:36Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=c27d5368ef1f7ea40bcd1fb2626f4c99d77e0080'/>
<id>urn:sha1:c27d5368ef1f7ea40bcd1fb2626f4c99d77e0080</id>
<content type='text'>
Loading the ehci-hcd module on the ath79 platform causes
a NULL pointer dereference:

CPU 0 Unable to handle kernel paging request at virtual address 00000000, epc == c0252928, ra == c00de968
Oops[#1]:
Cpu 0
$ 0   : 00000000 00000070 00000001 00000000
$ 4   : 802cf870 0000117e ffffffff 8019c7bc
$ 8   : 0000000a 00000002 00000001 fffffffb
$12   : 8026ef20 0000000f ffffff80 802dad3c
$16   : 8077a2d4 8077a200 c00f3484 8019ed84
$20   : c00f0000 00000003 000000a0 80262c2c
$24   : 00000002 80079da0
$28   : 80788000 80789c80 80262b14 c00de968
Hi    : 00000000
Lo    : b61f0000
epc   : c0252928 __mod_vermagic5+0xc260/0xc7e8 [ehci_hcd]
    Not tainted
ra    : c00de968 usb_add_hcd+0x2a4/0x858 [usbcore]
Status: 1000c003    KERNEL EXL IE
Cause : 00800008
BadVA : 00000000
PrId  : 00019374 (MIPS 24Kc)
Modules linked in: ehci_hcd(+) pppoe pppox ipt_REJECT xt_TCPMSS ipt_LOG
xt_comment xt_multiport xt_mac xt_limit iptable_mangle iptable_filte
r ip_tables xt_tcpudp x_tables ppp_async ppp_generic slhc ath mac80211
usbcore nls_base input_polldev crc_ccitt cfg80211 compat input_core a
rc4 aes_generic crypto_algapi
Process insmod (pid: 379, threadinfo=80788000, task=80ca2180,
tls=77fe52d0)
Stack : c0253184 80c57d80 80789cac 8077a200 00000001 8019edc0 807fa800 8077a200
        8077a290 c00f3484 8019ed84 c00f0000 00000003 000000a0 80262c2c c00de968
        802d0000 800878cc c0253228 c02528e4 c0253184 80c57d80 80bf6800 80ca2180
        8007b75c 00000000 8077a200 802cf830 802d0000 00000003 fffffff4 00000015
        00000348 00000124 800b189c c024bb4c c0255000 801a27e8 c0253228 c02528e4
        ...
Call Trace:
[&lt;c0252928&gt;] __mod_vermagic5+0xc260/0xc7e8 [ehci_hcd]

It is caused by:

  commit c430131a02d677aa708f56342c1565edfdacb3c0
  Author: Jan Andersson &lt;jan@gaisler.com&gt;
  Date:   Tue May 3 20:11:57 2011 +0200

      USB: EHCI: Support controllers with big endian capability regs

      The two first HC capability registers (CAPLENGTH and HCIVERSION)
      are defined as one 8-bit and one 16-bit register. Most HC
      implementations have selected to treat these registers as part
      of a 32-bit register, giving the same layout for both big and
      small endian systems.

      This patch adds a new quirk, big_endian_capbase, to support
      controllers with big endian register interfaces that treat
      HCIVERSION and CAPLENGTH as individual registers.

      Signed-off-by: Jan Andersson &lt;jan@gaisler.com&gt;
      Acked-by: Alan Stern &lt;stern@rowland.harvard.edu&gt;
      Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;

The reading of the HC capability register has been moved by that
commit to a place where the ehci-&gt;caps field is not initialized
yet. This patch moves the reading of the register back to the
original place.

Acked-by: Jan Andersson &lt;jan@gaisler.com&gt;
Cc: Alan Stern &lt;stern@rowland.harvard.edu&gt;
Signed-off-by: Gabor Juhos &lt;juhosg@openwrt.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;
</content>
</entry>
<entry>
<title>usb/isp1760: Fix bug preventing the unlinking of control urbs</title>
<updated>2011-06-27T20:46:43Z</updated>
<author>
<name>Arvid Brodin</name>
<email>arvid.brodin@enea.com</email>
</author>
<published>2011-06-17T16:45:37Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=8b1ab60c767f33d79894ef66037ef851a7a88fc8'/>
<id>urn:sha1:8b1ab60c767f33d79894ef66037ef851a7a88fc8</id>
<content type='text'>
Both control and bulk transfers use isp1760 slots of type ATL, but the
driver unlink code for ATL slots only acts on urbs describing a bulk
transfer, letting the code for INT slots take care of the unlink instead,
which often ended up removing the interrupt transfer for root hub events
instead. That's not good, and gets fixed by this patch.

Signed-off-by: Arvid Brodin &lt;arvid.brodin@enea.com&gt;
Cc: Sebastian Andrzej Siewior &lt;bigeasy@linutronix.de&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;
</content>
</entry>
<entry>
<title>Merge branch 'for-usb-linus' of git+ssh://master.kernel.org/pub/scm/linux/kernel/git/sarah/xhci into usb-linus</title>
<updated>2011-06-27T20:36:47Z</updated>
<author>
<name>Greg Kroah-Hartman</name>
<email>gregkh@suse.de</email>
</author>
<published>2011-06-27T20:35:23Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=95a2424ff9221624c3944f3732f6cfacbb522ae4'/>
<id>urn:sha1:95a2424ff9221624c3944f3732f6cfacbb522ae4</id>
<content type='text'>
* 'for-usb-linus' of git+ssh://master.kernel.org/pub/scm/linux/kernel/git/sarah/xhci:
  USB: Fix up URB error codes to reflect implementation.
  xhci: Always set urb-&gt;status to zero for isoc endpoints.
  xhci: Add reset on resume quirk for asrock p67 host
  xHCI 1.0: Incompatible Device Error
  xHCI 1.0: Force Stopped Event(FSE)
  xhci: Don't warn about zeroed bMaxBurst descriptor field.
  USB: Free bandwidth when usb_disable_device is called.
  xhci: Reject double add of active endpoints.
</content>
</entry>
</feed>
