<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/drivers/usb/host, branch v6.4</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/
</subtitle>
<id>https://git.shady.money/linux/atom?h=v6.4</id>
<link rel='self' href='https://git.shady.money/linux/atom?h=v6.4'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/'/>
<updated>2023-05-16T14:57:49Z</updated>
<entry>
<title>xhci: Fix incorrect tracking of free space on transfer rings</title>
<updated>2023-05-16T14:57:49Z</updated>
<author>
<name>Mathias Nyman</name>
<email>mathias.nyman@linux.intel.com</email>
</author>
<published>2023-05-15T13:40:59Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=fe82f16aafdaf8002281d3b9524291d4a4a28460'/>
<id>urn:sha1:fe82f16aafdaf8002281d3b9524291d4a4a28460</id>
<content type='text'>
This incorrect tracking caused unnecessary ring expansion in some
usecases which over days of use consume a lot of memory.

xhci driver tries to keep track of free transfer blocks (TRBs) on the
ring buffer, but failed to add back some cancelled transfers that were
turned into no-op operations instead of just moving past them.

This can happen if there are several queued pending transfers which
then are cancelled in reverse order.

Solve this by counting the numer of steps we move the dequeue pointer
once we complete a transfer, and add it to the number of free trbs
instead of just adding the trb number of the current transfer.
This way we ensure we count the no-op trbs on the way as well.

Fixes: 55f6153d8cc8 ("xhci: remove extra loop in interrupt context")
Cc: stable@vger.kernel.org
Reported-by: Miller Hunter &lt;MillerH@hearthnhome.com&gt;
Closes: https://bugzilla.kernel.org/show_bug.cgi?id=217242
Tested-by: Miller Hunter &lt;MillerH@hearthnhome.com&gt;
Signed-off-by: Mathias Nyman &lt;mathias.nyman@linux.intel.com&gt;
Link: https://lore.kernel.org/r/20230515134059.161110-3-mathias.nyman@linux.intel.com
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>xhci-pci: Only run d3cold avoidance quirk for s2idle</title>
<updated>2023-05-16T14:57:49Z</updated>
<author>
<name>Mario Limonciello</name>
<email>mario.limonciello@amd.com</email>
</author>
<published>2023-05-15T13:40:58Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=2a821fc3136d5d99dcb9de152be8a052ca27d870'/>
<id>urn:sha1:2a821fc3136d5d99dcb9de152be8a052ca27d870</id>
<content type='text'>
Donghun reports that a notebook that has an AMD Ryzen 5700U but supports
S3 has problems with USB after resuming from suspend. The issue was
bisected down to commit d1658268e439 ("usb: pci-quirks: disable D3cold on
xhci suspend for s2idle on AMD Renoir").

As this issue only happens on S3, narrow the broken D3cold quirk to only
run in s2idle.

Fixes: d1658268e439 ("usb: pci-quirks: disable D3cold on xhci suspend for s2idle on AMD Renoir")
Reported-and-tested-by: Donghun Yoon &lt;donghun.yoon@lge.com&gt;
Cc: stable@vger.kernel.org
Signed-off-by: Mario Limonciello &lt;mario.limonciello@amd.com&gt;
Signed-off-by: Mathias Nyman &lt;mathias.nyman@linux.intel.com&gt;
Link: https://lore.kernel.org/r/20230515134059.161110-2-mathias.nyman@linux.intel.com
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>USB: UHCI: adjust zhaoxin UHCI controllers OverCurrent bit value</title>
<updated>2023-05-13T08:55:45Z</updated>
<author>
<name>Weitao Wang</name>
<email>WeitaoWang-oc@zhaoxin.com</email>
</author>
<published>2023-04-23T10:59:52Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=dddb342b5b9e482bb213aecc08cbdb201ea4f8da'/>
<id>urn:sha1:dddb342b5b9e482bb213aecc08cbdb201ea4f8da</id>
<content type='text'>
OverCurrent condition is not standardized in the UHCI spec.
Zhaoxin UHCI controllers report OverCurrent bit active off.
In order to handle OverCurrent condition correctly, the uhci-hcd
driver needs to be told to expect the active-off behavior.

Suggested-by: Alan Stern &lt;stern@rowland.harvard.edu&gt;
Cc: stable@vger.kernel.org
Signed-off-by: Weitao Wang &lt;WeitaoWang-oc@zhaoxin.com&gt;
Acked-by: Alan Stern &lt;stern@rowland.harvard.edu&gt;
Link: https://lore.kernel.org/r/20230423105952.4526-1-WeitaoWang-oc@zhaoxin.com
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>usb: xhci-mtk: add optional frame count clock</title>
<updated>2023-04-20T08:13:39Z</updated>
<author>
<name>Chunfeng Yun</name>
<email>chunfeng.yun@mediatek.com</email>
</author>
<published>2023-04-07T06:24:06Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=6a14ffc05c60fb4d5b7beb95460ac5642293e03f'/>
<id>urn:sha1:6a14ffc05c60fb4d5b7beb95460ac5642293e03f</id>
<content type='text'>
Add optional clock frmcnt_ck used on 4nm or advanced process SoC

Reviewed-by: AngeloGioacchino Del Regno &lt;angelogioacchino.delregno@collabora.com&gt;
Signed-off-by: Chunfeng Yun &lt;chunfeng.yun@mediatek.com&gt;
Link: https://lore.kernel.org/r/20230407062406.12575-2-chunfeng.yun@mediatek.com
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>usb: xhci: plat: Add USB 3.0 phy support</title>
<updated>2023-04-20T08:13:21Z</updated>
<author>
<name>Stanley Chang</name>
<email>stanley_chang@realtek.com</email>
</author>
<published>2023-04-07T06:07:31Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=9134c1fd05034dd29a1a2f010abd178af409171e'/>
<id>urn:sha1:9134c1fd05034dd29a1a2f010abd178af409171e</id>
<content type='text'>
For Realtek SoC, the usb xhci uses different driver for u2phy and u3phy.
Therefore, add a hook to retrieve the USB 3.0 PHY to XHCI plat.

Signed-off-by: Stanley Chang &lt;stanley_chang@realtek.com&gt;
Link: https://lore.kernel.org/r/20230407060731.20537-1-stanley_chang@realtek.com
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>usb: host: xhci-plat: Use dev_is_pci() helper</title>
<updated>2023-04-20T08:13:12Z</updated>
<author>
<name>Nobuhiro Iwamatsu</name>
<email>nobuhiro1.iwamatsu@toshiba.co.jp</email>
</author>
<published>2023-04-05T23:46:05Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=f3588ea40aa17273c3303789b1828b3aa6b80748'/>
<id>urn:sha1:f3588ea40aa17273c3303789b1828b3aa6b80748</id>
<content type='text'>
Use common dev_is_pci() helper for checking PCI devices.
And if CONFIG_PCI is not defined, dev_is_pci returns false. Therefore,
CONFIG_PCI is also unnecessary, so remove it.

Signed-off-by: Nobuhiro Iwamatsu &lt;nobuhiro1.iwamatsu@toshiba.co.jp&gt;
Link: https://lore.kernel.org/r/20230405234605.2310155-1-nobuhiro1.iwamatsu@toshiba.co.jp
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>xhci: fix debugfs register accesses while suspended</title>
<updated>2023-04-20T08:13:06Z</updated>
<author>
<name>Johan Hovold</name>
<email>johan+linaro@kernel.org</email>
</author>
<published>2023-04-05T09:03:42Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=735baf1b23458f71a8b15cb924af22c9ff9cd125'/>
<id>urn:sha1:735baf1b23458f71a8b15cb924af22c9ff9cd125</id>
<content type='text'>
Wire up the debugfs regset device pointer so that the controller is
resumed before accessing registers to avoid crashing or locking up if it
happens to be runtime suspended.

Fixes: 02b6fdc2a153 ("usb: xhci: Add debugfs interface for xHCI driver")
Cc: stable@vger.kernel.org # 4.15: 30332eeefec8: debugfs: regset32: Add Runtime PM support
Cc: stable@vger.kernel.org # 4.15
Signed-off-by: Johan Hovold &lt;johan+linaro@kernel.org&gt;
Link: https://lore.kernel.org/r/20230405090342.7363-1-johan+linaro@kernel.org
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>Merge 6.3-rc6 into usb-next</title>
<updated>2023-04-10T06:56:59Z</updated>
<author>
<name>Greg Kroah-Hartman</name>
<email>gregkh@linuxfoundation.org</email>
</author>
<published>2023-04-10T06:56:59Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=8e86652e3e7152bba80c3b4d03814e40ede1abc7'/>
<id>urn:sha1:8e86652e3e7152bba80c3b4d03814e40ede1abc7</id>
<content type='text'>
We need the USB fixes in here for testing, and this resolves two merge
conflicts, one pointed out by linux-next:

	drivers/usb/dwc3/dwc3-pci.c
	drivers/usb/host/xhci-pci.c

Reported-by: Stephen Rothwell &lt;sfr@canb.auug.org.au&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>xhci: Free the command allocated for setting LPM if we return early</title>
<updated>2023-03-30T14:42:17Z</updated>
<author>
<name>Mathias Nyman</name>
<email>mathias.nyman@linux.intel.com</email>
</author>
<published>2023-03-30T14:30:56Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=f6caea4855553a8b99ba3ec23ecdb5ed8262f26c'/>
<id>urn:sha1:f6caea4855553a8b99ba3ec23ecdb5ed8262f26c</id>
<content type='text'>
The command allocated to set exit latency LPM values need to be freed in
case the command is never queued. This would be the case if there is no
change in exit latency values, or device is missing.

Reported-by: Mirsad Goran Todorovac &lt;mirsad.todorovac@alu.unizg.hr&gt;
Link: https://lore.kernel.org/linux-usb/24263902-c9b3-ce29-237b-1c3d6918f4fe@alu.unizg.hr
Tested-by: Mirsad Goran Todorovac &lt;mirsad.todorovac@alu.unizg.hr&gt;
Fixes: 5c2a380a5aa8 ("xhci: Allocate separate command structures for each LPM command")
Cc: &lt;Stable@vger.kernel.org&gt;
Signed-off-by: Mathias Nyman &lt;mathias.nyman@linux.intel.com&gt;
Link: https://lore.kernel.org/r/20230330143056.1390020-4-mathias.nyman@linux.intel.com
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>Revert "usb: xhci-pci: Set PROBE_PREFER_ASYNCHRONOUS"</title>
<updated>2023-03-30T14:42:02Z</updated>
<author>
<name>Mathias Nyman</name>
<email>mathias.nyman@linux.intel.com</email>
</author>
<published>2023-03-30T14:30:55Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=8e77d3d59d7b5da13deda1d832c51b8bbdbe2037'/>
<id>urn:sha1:8e77d3d59d7b5da13deda1d832c51b8bbdbe2037</id>
<content type='text'>
This reverts commit 4c2604a9a6899bab195edbee35fc8d64ce1444aa.

Asynch probe caused regression in a setup with both Renesas and Intel xHC
controllers. Devices connected to the Renesas disconnected shortly after
boot. With Asynch probe the busnumbers got interleaved.

xhci_hcd 0000:00:14.0: new USB bus registered, assigned bus number 1
xhci_hcd 0000:04:00.0: new USB bus registered, assigned bus number 2
xhci_hcd 0000:00:14.0: new USB bus registered, assigned bus number 3
xhci_hcd 0000:04:00.0: new USB bus registered, assigned bus number 4

Reason why this commit causes regression is still unknown, but revert it
while debugging the issue.

Fixes: 4c2604a9a689 ("usb: xhci-pci: Set PROBE_PREFER_ASYNCHRONOUS")
Cc: stable &lt;stable@kernel.org&gt;
Link: https://lore.kernel.org/linux-usb/20230307132120.5897c5af@deangelis.fenrir.org.uk
Signed-off-by: Mathias Nyman &lt;mathias.nyman@linux.intel.com&gt;
Link: https://lore.kernel.org/r/20230330143056.1390020-3-mathias.nyman@linux.intel.com
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
</feed>
