<feed xmlns='http://www.w3.org/2005/Atom'>
<title>user/sven/linux.git/include/linux/usb/hcd.h, branch v3.3.5</title>
<subtitle>Linux Kernel
</subtitle>
<id>https://git.stealer.net/cgit.cgi/user/sven/linux.git/atom?h=v3.3.5</id>
<link rel='self' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/atom?h=v3.3.5'/>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/'/>
<updated>2012-05-07T15:53:23Z</updated>
<entry>
<title>USB: EHCI: fix crash during suspend on ASUS computers</title>
<updated>2012-05-07T15:53:23Z</updated>
<author>
<name>Alan Stern</name>
<email>stern@rowland.harvard.edu</email>
</author>
<published>2012-04-24T18:07:22Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=1ce9245f5aff46201fa81fdd3f796a6c9f3ad1ab'/>
<id>urn:sha1:1ce9245f5aff46201fa81fdd3f796a6c9f3ad1ab</id>
<content type='text'>
commit 151b61284776be2d6f02d48c23c3625678960b97 upstream.

This patch (as1545) fixes a problem affecting several ASUS computers:
The machine crashes or corrupts memory when going into suspend if the
ehci-hcd driver is bound to any controllers.  Users have been forced
to unbind or unload ehci-hcd before putting their systems to sleep.

After extensive testing, it was determined that the machines don't
like going into suspend when any EHCI controllers are in the PCI D3
power state.  Presumably this is a firmware bug, but there's nothing
we can do about it except to avoid putting the controllers in D3
during system sleep.

The patch adds a new flag to indicate whether the problem is present,
and avoids changing the controller's power state if the flag is set.
Runtime suspend is unaffected; this matters only for system suspend.
However as a side effect, the controller will not respond to remote
wakeup requests while the system is asleep.  Hence USB wakeup is not
functional -- but of course, this is already true in the current state
of affairs.

This fixes Bugzilla #42728.

Signed-off-by: Alan Stern &lt;stern@rowland.harvard.edu&gt;
Tested-by: Steven Rostedt &lt;rostedt@goodmis.org&gt;
Tested-by: Andrey Rahmatullin &lt;wrar@wrar.name&gt;
Tested-by: Oleksij Rempel (fishor) &lt;bug-track@fisher-privat.net&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>USB: Remove the SAW_IRQ hcd flag</title>
<updated>2011-11-15T00:46:06Z</updated>
<author>
<name>Alan Stern</name>
<email>stern@rowland.harvard.edu</email>
</author>
<published>2011-11-03T16:03:38Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=968b822c0023861ef6e4e15bb68582b36e89ad29'/>
<id>urn:sha1:968b822c0023861ef6e4e15bb68582b36e89ad29</id>
<content type='text'>
The HCD_FLAG_SAW_IRQ flag was introduced in order to catch IRQ routing
errors: If an URB was unlinked and the host controller hadn't gotten
any IRQs, it seemed likely that the IRQs were directed to the wrong
vector.

This warning hasn't come up in many years, as far as I know; interrupt
routing now seems to be well under control.  Therefore there's no
reason to keep the flag around any more.  This patch (as1495) finally
removes 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: fix ehci alignment error</title>
<updated>2011-10-10T23:43:53Z</updated>
<author>
<name>Harro Haan</name>
<email>hrhaan@gmail.com</email>
</author>
<published>2011-10-10T12:38:27Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=276532ba9666b36974cbe16f303fc8be99c9da17'/>
<id>urn:sha1:276532ba9666b36974cbe16f303fc8be99c9da17</id>
<content type='text'>
The Kirkwood gave an unaligned memory access error on
line 742 of drivers/usb/host/echi-hcd.c:
"ehci-&gt;last_periodic_enable = ktime_get_real();"

Signed-off-by: Harro Haan &lt;hrhaan@gmail.com&gt;
Cc: stable &lt;stable@kernel.org&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>xHCI: set USB2 hardware LPM</title>
<updated>2011-09-26T22:51:10Z</updated>
<author>
<name>Andiry Xu</name>
<email>andiry.xu@amd.com</email>
</author>
<published>2011-09-23T21:19:52Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=65580b4321eb36f16ae8b5987bfa1bb948fc5112'/>
<id>urn:sha1:65580b4321eb36f16ae8b5987bfa1bb948fc5112</id>
<content type='text'>
If the device pass the USB2 software LPM and the host supports hardware
LPM, enable hardware LPM for the device to let the host decide when to
put the link into lower power state.

If hardware LPM is enabled for a port and driver wants to put it into
suspend, it must first disable hardware LPM, resume the port into U0,
and then suspend the port.

Signed-off-by: Andiry Xu &lt;andiry.xu@amd.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: Make core allocate resources per PCI-device.</title>
<updated>2011-03-14T01:23:06Z</updated>
<author>
<name>Sarah Sharp</name>
<email>sarah.a.sharp@linux.intel.com</email>
</author>
<published>2010-10-28T22:40:26Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=c56354378426e550aaf6ddf3983f502a8fddeab5'/>
<id>urn:sha1:c56354378426e550aaf6ddf3983f502a8fddeab5</id>
<content type='text'>
Introduce the notion of a PCI device that may be associated with more than
one USB host controller driver (struct usb_hcd).  This patch is the start
of the work to separate the xHCI host controller into two roothubs: a USB
3.0 roothub with SuperSpeed-only ports, and a USB 2.0 roothub with
HS/FS/LS ports.

One usb_hcd structure is designated to be the "primary HCD", and a pointer
is added to the usb_hcd structure to keep track of that.  A new function
call, usb_hcd_is_primary_hcd() is added to check whether the USB hcd is
marked as the primary HCD (or if it is not part of a roothub pair).  To
allow the USB core and xHCI driver to access either roothub in a pair, a
"shared_hcd" pointer is added to the usb_hcd structure.

Add a new function, usb_create_shared_hcd(), that does roothub allocation
for paired roothubs.  It will act just like usb_create_hcd() did if the
primary_hcd pointer argument is NULL.  If it is passed a non-NULL
primary_hcd pointer, it sets usb_hcd-&gt;shared_hcd and usb_hcd-&gt;primary_hcd
fields.  It will also skip the bandwidth_mutex allocation, and set the
secondary hcd's bandwidth_mutex pointer to the primary HCD's mutex.

IRQs are only allocated once for the primary roothub.

Introduce a new usb_hcd driver flag that indicates the host controller
driver wants to create two roothubs.  If the HCD_SHARED flag is set, then
the USB core PCI probe methods will allocate a second roothub, and make
sure that second roothub gets freed during rmmod and in initialization
error paths.

When usb_hc_died() is called with the primary HCD, make sure that any
roothubs that share that host controller are also marked as being dead.

Signed-off-by: Sarah Sharp &lt;sarah.a.sharp@linux.intel.com&gt;
</content>
</entry>
<entry>
<title>usb: Store bus type in usb_hcd, not in driver flags.</title>
<updated>2011-03-14T01:07:15Z</updated>
<author>
<name>Sarah Sharp</name>
<email>sarah.a.sharp@linux.intel.com</email>
</author>
<published>2010-12-02T22:45:18Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=83de4b2b90887b5b317d8313864fe4cc5db35280'/>
<id>urn:sha1:83de4b2b90887b5b317d8313864fe4cc5db35280</id>
<content type='text'>
The xHCI driver essentially has both a USB 2.0 and a USB 3.0 roothub.  So
setting the HCD_USB3 bits in the hcd-&gt;driver-&gt;flags is a bit misleading.
Add a new field to usb_hcd, bcdUSB.  Store the result of
hcd-&gt;driver-&gt;flags &amp; HCD_MASK in it.  Later, when we have the xHCI driver
register the two roothubs, we'll set the usb_hcd-&gt;bcdUSB field to HCD_USB2
for the USB 2.0 roothub, and HCD_USB3 for the USB 3.0 roothub.

Signed-off-by: Sarah Sharp &lt;sarah.a.sharp@linux.intel.com&gt;
</content>
</entry>
<entry>
<title>usb: Change usb_hcd-&gt;bandwidth_mutex to a pointer.</title>
<updated>2011-03-14T01:07:14Z</updated>
<author>
<name>Sarah Sharp</name>
<email>sarah.a.sharp@linux.intel.com</email>
</author>
<published>2010-10-15T15:55:24Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=d673bfcbfffdeb56064a6b1ee047b85590bed76c'/>
<id>urn:sha1:d673bfcbfffdeb56064a6b1ee047b85590bed76c</id>
<content type='text'>
Change the bandwith_mutex in struct usb_hcd to a pointer.  This will allow
the pointer to be shared across usb_hcds for the upcoming work to split
the xHCI driver roothub into a USB 2.0/1.1 and a USB 3.0 bus.

Signed-off-by: Sarah Sharp &lt;sarah.a.sharp@linux.intel.com&gt;
</content>
</entry>
<entry>
<title>USB: Remove bitmap #define from hcd.h</title>
<updated>2011-03-14T01:07:07Z</updated>
<author>
<name>Sarah Sharp</name>
<email>sarah.a.sharp@linux.intel.com</email>
</author>
<published>2010-11-30T23:55:51Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=da13051cc756756f10b2da8ea97b05bdf84bd7bb'/>
<id>urn:sha1:da13051cc756756f10b2da8ea97b05bdf84bd7bb</id>
<content type='text'>
Using a #define to redefine a common variable name is a bad thing,
especially when the #define is in a header.  include/linux/usb/hcd.h
redefined bitmap to DeviceRemovable to avoid typing a long field in the
hub descriptor.  This has unintended side effects for files like
drivers/usb/core/devio.c that include that file, since another header
included after hcd.h has different variables named bitmap.

Remove the bitmap #define and replace instances of it in the host
controller code.  Cleanup the spaces around function calls and square
brackets while we're at it.

Signed-off-by: Sarah Sharp &lt;sarah.a.sharp@linux.intel.com&gt;
Cc: Nobuhiro Iwamatsu &lt;nobuhiro.iwamatsu.yj@renesas.com&gt;
Cc: Inaky Perez-Gonzalez &lt;inaky.perez-gonzalez@intel.com&gt;
Cc: Tony Olech &lt;tony.olech@elandigitalsystems.com&gt;
Cc: "Robert P. J. Day" &lt;rpjday@crashcourse.ca&gt;
Cc: Max Vozeler &lt;mvz@vozeler.com&gt;
Cc: Tejun Heo &lt;tj@kernel.org&gt;
Cc: Yoshihiro Shimoda &lt;yoshihiro.shimoda.uh@renesas.com&gt;
Cc: Rodolfo Giometti &lt;giometti@linux.it&gt;
Cc: Mike Frysinger &lt;vapier@gentoo.org&gt;
Cc: Anton Vorontsov &lt;avorontsov@mvista.com&gt;
Cc: Sebastian Siewior &lt;bigeasy@linutronix.de&gt;
Cc: Lothar Wassmann &lt;LW@KARO-electronics.de&gt;
Cc: Olav Kongas &lt;ok@artecdesign.ee&gt;
Cc: Martin Fuzzey &lt;mfuzzey@gmail.com&gt;
Cc: Alan Stern &lt;stern@rowland.harvard.edu&gt;
Cc: David Brownell &lt;dbrownell@users.sourceforge.net&gt;
</content>
</entry>
<entry>
<title>USB: move usbcore away from hcd-&gt;state</title>
<updated>2011-03-07T20:14:06Z</updated>
<author>
<name>Alan Stern</name>
<email>stern@rowland.harvard.edu</email>
</author>
<published>2011-03-07T16:11:52Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=9b37596a2e860404503a3f2a6513db60c296bfdc'/>
<id>urn:sha1:9b37596a2e860404503a3f2a6513db60c296bfdc</id>
<content type='text'>
The hcd-&gt;state variable is a disaster.  It's not clearly owned by
either usbcore or the host controller drivers, and they both change it
from time to time, potentially stepping on each other's toes.  It's
not protected by any locks.  And there's no mechanism to prevent it
from going through an invalid transition.

This patch (as1451) takes a first step toward fixing these problems.
As it turns out, usbcore uses hcd-&gt;state for essentially only two
things: checking whether the controller's root hub is running and
checking whether the controller has died.  Therefore the patch adds
two new atomic bitflags to the hcd structure, to store these pieces of
information.  The new flags are used only by usbcore, and a private
spinlock prevents invalid combinations (a dead controller's root hub
cannot be running).

The patch does not change the places where usbcore sets hcd-&gt;state,
since HCDs may depend on them.  Furthermore, there is one place in
usb_hcd_irq() where usbcore still must use hcd-&gt;state: An HCD's
interrupt handler can implicitly indicate that the controller died by
setting hcd-&gt;state to HC_STATE_HALT.  Nevertheless, the new code is a
big improvement over the current code.

The patch makes one other change.  The hcd_bus_suspend() and
hcd_bus_resume() routines now check first whether the host controller
has died; if it has then they return immediately without calling the
HCD's bus_suspend or bus_resume methods.

This fixes the major problem reported in Bugzilla #29902: The system
fails to suspend after a host controller dies during system resume.

Signed-off-by: Alan Stern &lt;stern@rowland.harvard.edu&gt;
Tested-by: Alex Terekhov &lt;a.terekhov@gmail.com&gt;
CC: &lt;stable@kernel.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;
</content>
</entry>
<entry>
<title>Merge 2.6.38-rc5 into usb-next</title>
<updated>2011-02-17T17:56:55Z</updated>
<author>
<name>Greg Kroah-Hartman</name>
<email>gregkh@suse.de</email>
</author>
<published>2011-02-17T17:56:40Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=66b0835e2bb3d345f060a47bb8c8f883bd25ec2b'/>
<id>urn:sha1:66b0835e2bb3d345f060a47bb8c8f883bd25ec2b</id>
<content type='text'>
This is needed to resolve some merge conflicts that were found
in the USB host controller patches, and reported by Stephen Rothwell.

Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;
</content>
</entry>
</feed>
