<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/drivers/usb/core/hub.c, branch linux-4.2.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-4.2.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-4.2.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2015-07-22T21:46:50Z</updated>
<entry>
<title>usb: core: lpm: set lpm_capable for root hub device</title>
<updated>2015-07-22T21:46:50Z</updated>
<author>
<name>Lu Baolu</name>
</author>
<published>2015-06-16T01:08:26Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=2d2a316765d956bc5cb6bb367b2ec52ca59ab8e9'/>
<id>urn:sha1:2d2a316765d956bc5cb6bb367b2ec52ca59ab8e9</id>
<content type='text'>
Commit 25cd2882e2fc ("usb/xhci: Change how we indicate a host supports
Link PM.") removed the code to set lpm_capable for USB 3.0 super-speed
root hub. The intention of that change was to avoid touching usb core
internal field, a.k.a. lpm_capable, and let usb core to set it by
checking U1 and U2 exit latency values in the descriptor.

Usb core checks and sets lpm_capable in hub_port_init(). Unfortunately,
root hub is a special usb device as it has no parent. Hub_port_init()
will never be called for a root hub device. That means lpm_capable will
by no means be set for the root hub. As the result, lpm isn't functional
at all in Linux kernel.

This patch add the code to check and set lpm_capable when registering a
root hub device. It could be back-ported to kernels as old as v3.15,
that contains the Commit 25cd2882e2fc ("usb/xhci: Change how we indicate
a host supports Link PM.").

Cc: stable@vger.kernel.org # 3.15
Reported-by: Kevin Strasser &lt;kevin.strasser@linux.intel.com&gt;
Signed-off-by: Lu Baolu &lt;baolu.lu@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: core: Fix USB 3.0 devices lost in NOTATTACHED state after a hub port reset</title>
<updated>2015-05-31T06:51:23Z</updated>
<author>
<name>Robert Schlabbach</name>
</author>
<published>2015-05-25T22:27:30Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=fb6d1f7df5d25299fd7b3e84b72b8851d3634764'/>
<id>urn:sha1:fb6d1f7df5d25299fd7b3e84b72b8851d3634764</id>
<content type='text'>
Fix USB 3.0 devices lost in NOTATTACHED state after a hub port reset.

Dissolve the function hub_port_finish_reset() completely and divide the
actions to be taken into those which need to be done after each reset
attempt and those which need to be done after the full procedure is
complete, and place them in the appropriate places in hub_port_reset().
Also, remove an unneeded forward declaration of hub_port_reset().

Verbose Problem Description:

USB 3.0 devices may be "lost for good" during a hub port reset.
This makes Linux unable to boot from USB 3.0 devices in certain
constellations of host controllers and devices, because the USB device is
lost during initialization, preventing the rootfs from being mounted.

The underlying problem is that in the affected constellations, during the
processing inside hub_port_reset(), the hub link state goes from 0 to
SS.inactive after the initial reset, and back to 0 again only after the
following "warm" reset.

However, hub_port_finish_reset() is called after each reset attempt and
sets the state the connected USB device based on the "preliminary" status
of the hot reset to USB_STATE_NOTATTACHED due to SS.inactive, yet when
the following warm reset is complete and hub_port_finish_reset() is
called again, its call to set the device to USB_STATE_DEFAULT is blocked
by usb_set_device_state() which does not allow taking USB devices out of
USB_STATE_NOTATTACHED state.

Thanks to Alan Stern for guiding me to the proper solution and how to
submit it.

Link: http://lkml.kernel.org/r/trinity-25981484-72a9-4d46-bf17-9c1cf9301a31-1432073240136%20()%203capp-gmx-bs27
Signed-off-by: Robert Schlabbach &lt;robert_s@gmx.net&gt;
Cc: stable &lt;stable@vger.kernel.org&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: hub.c: move assignment out of if () block</title>
<updated>2015-05-10T14:01:10Z</updated>
<author>
<name>Greg Kroah-Hartman</name>
</author>
<published>2015-04-30T09:32:53Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=d544d273f398a40f71012cfd165dba6ef73690c9'/>
<id>urn:sha1:d544d273f398a40f71012cfd165dba6ef73690c9</id>
<content type='text'>
We should not be doing assignments within an if () block
so fix up the code to not do this.

change was created using Coccinelle.

Acked-by: Alan Stern &lt;stern@rowland.harvard.edu&gt;
CC: Dan Williams &lt;dan.j.williams@intel.com&gt;
CC: Petr Mladek &lt;pmladek@suse.cz&gt;
CC: Peter Chen &lt;peter.chen@freescale.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
Reviewed-by: Felipe Balbi &lt;balbi@ti.com&gt;
</content>
</entry>
<entry>
<title>usb: Enable LPM for USB 2.01+ full-speed devices</title>
<updated>2015-05-07T23:43:44Z</updated>
<author>
<name>Rupesh Tatiya</name>
</author>
<published>2015-04-14T11:06:55Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=a8425292816ceaa8c49e29d2114e85d85a73e080'/>
<id>urn:sha1:a8425292816ceaa8c49e29d2114e85d85a73e080</id>
<content type='text'>
USB 2.01+ full-speed devices can have extended descriptor as well
and can support LPM.

Signed-off-by: Rupesh Tatiya &lt;rtatiya@codeaurora.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>usb: Set unused ports to "fixed" rather than "unknown"</title>
<updated>2015-05-07T23:43:43Z</updated>
<author>
<name>Matthew Garrett</name>
</author>
<published>2015-04-08T23:36:01Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=58339c2e8b6181e6ffb2ef0dccc4d010b8acd013'/>
<id>urn:sha1:58339c2e8b6181e6ffb2ef0dccc4d010b8acd013</id>
<content type='text'>
The Microsoft document "Using ACPI to Configure USB Ports on a Computer"
makes it clear that the removable flag will be cleared on ports that are
marked as unused by the firmware. Handle this case to match.

Signed-off-by: Matthew Garrett &lt;mjg59@coreos.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>usb: Prefer firmware values when determining whether a port is removable</title>
<updated>2015-05-07T23:43:42Z</updated>
<author>
<name>Matthew Garrett</name>
</author>
<published>2015-04-08T23:36:00Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=92bfbf71350b320f718a35446f017fbefd51d850'/>
<id>urn:sha1:92bfbf71350b320f718a35446f017fbefd51d850</id>
<content type='text'>
Windows appears to pay more attention to the ACPI values than any hub
configuration, so prefer the firmware's opinion on whether a port is
fixed or removable before falling back to the hub values.

Signed-off-by: Matthew Garrett &lt;mjg59@coreos.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>usb: core: hub: use new USB_RESUME_TIMEOUT</title>
<updated>2015-04-07T17:58:36Z</updated>
<author>
<name>Felipe Balbi</name>
</author>
<published>2015-02-13T21:38:33Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=bbc78c07a51f6fd29c227b1220a9016e585358ba'/>
<id>urn:sha1:bbc78c07a51f6fd29c227b1220a9016e585358ba</id>
<content type='text'>
Make sure we're using the new macro, so our
resume signaling will always pass certification.

Cc: &lt;stable@vger.kernel.org&gt; # v3.10+
Signed-off-by: Felipe Balbi &lt;balbi@ti.com&gt;
</content>
</entry>
<entry>
<title>Merge tag 'usb-3.20-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb</title>
<updated>2015-02-15T18:24:55Z</updated>
<author>
<name>Linus Torvalds</name>
</author>
<published>2015-02-15T18:24:55Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=e29876723f7cb7728f0d6a674d23f92673e9f112'/>
<id>urn:sha1:e29876723f7cb7728f0d6a674d23f92673e9f112</id>
<content type='text'>
Pull USB patches from Greg KH:
 "Here's the big pull request for the USB driver tree for 3.20-rc1.

  Nothing major happening here, just lots of gadget driver updates, new
  device ids, and a bunch of cleanups.

  All of these have been in linux-next for a while with no reported
  issues"

* tag 'usb-3.20-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb: (299 commits)
  usb: musb: fix device hotplug behind hub
  usb: dwc2: Fix a bug in reading the endpoint directions from reg.
  staging: emxx_udc: fix the build error
  usb: Retry port status check on resume to work around RH bugs
  Revert "usb: Reset USB-3 devices on USB-3 link bounce"
  uhci-hub: use HUB_CHAR_*
  usb: kconfig: replace PPC_OF with PPC
  ehci-pci: disable for Intel MID platforms (update)
  usb: gadget: Kconfig: use bool instead of boolean
  usb: musb: blackfin: remove incorrect __exit_p()
  USB: fix use-after-free bug in usb_hcd_unlink_urb()
  ehci-pci: disable for Intel MID platforms
  usb: host: pci_quirks: joing string literals
  USB: add flag for HCDs that can't receive wakeup requests (isp1760-hcd)
  USB: usbfs: allow URBs to be reaped after disconnection
  cdc-acm: kill unnecessary messages
  cdc-acm: add sanity checks
  usb: phy: phy-generic: Fix USB PHY gpio reset
  usb: dwc2: fix USB core dependencies
  usb: renesas_usbhs: fix NULL pointer dereference in dma_release_channel()
  ...
</content>
</entry>
<entry>
<title>USB / PM: Remove unneeded #ifdef and associated dead code</title>
<updated>2015-02-08T22:42:25Z</updated>
<author>
<name>Andreas Ruprecht</name>
</author>
<published>2015-02-08T19:36:38Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=f6a55884d76c5f493538866793fddd47b4ecf646'/>
<id>urn:sha1:f6a55884d76c5f493538866793fddd47b4ecf646</id>
<content type='text'>
In commit ceb6c9c862c8 ("USB / PM: Drop CONFIG_PM_RUNTIME from the
USB core"), all occurrences of CONFIG_PM_RUNTIME in the USB core
code were replaced by CONFIG_PM. This created the following structure
of #ifdef blocks in drivers/usb/core/hub.c:

 [...]
 #ifdef CONFIG_PM
 #ifdef CONFIG_PM
 /* always on / undead */
 #else
 /* dead */
 #endif
 [...]

This patch removes unnecessary inner "#ifdef CONFIG_PM" as well as
the corresponding dead #else block. This inconsistency was found using
the undertaker-checkpatch tool.

Signed-off-by: Andreas Ruprecht &lt;rupran@einserver.de&gt;
Signed-off-by: Rafael J. Wysocki &lt;rafael.j.wysocki@intel.com&gt;
</content>
</entry>
<entry>
<title>usb: Retry port status check on resume to work around RH bugs</title>
<updated>2015-02-03T23:28:32Z</updated>
<author>
<name>Julius Werner</name>
</author>
<published>2015-01-27T21:20:12Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=7fa40910e0bf5ef32eca49595d950cb24f6402bf'/>
<id>urn:sha1:7fa40910e0bf5ef32eca49595d950cb24f6402bf</id>
<content type='text'>
The EHCI controller on the RK3288 SoC is violating basic parts of the
USB spec and thereby unable to properly resume a suspended port. It does
not start SOF generation within 3ms of finishing resume signaling, so
the attached device will drop of the bus again. This is a particular
problem with runtime PM, where accessing the device will trigger a
resume that immediately makes it unavailable (and reenumerate with a new
handle).

Thankfully, the persist feature is generally able to work around stuff
like that. Unfortunately, it doesn't quite work in this particular case
because the controller will turn off the CurrentConnectStatus bit for an
instant while the device is reconnecting, which causes the kernel to
conclude that it permanently disappeared. This patch adds a tiny retry
mechanism to the core port resume code which will catch this case and
shouldn't have any notable impact on other controllers.

Signed-off-by: Julius Werner &lt;jwerner@chromium.org&gt;
Acked-by: Alan Stern &lt;stern@rowland.harvard.edu&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
</feed>
