From: bugzilla-daemon@kernel.org
To: linux-usb@vger.kernel.org
Subject: [Bug 220491] usb_storage connected SD card disconnects/reconnects on resume from suspend
Date: Wed, 03 Sep 2025 05:39:05 +0000 [thread overview]
Message-ID: <bug-220491-208809-hLyyOGCIch@https.bugzilla.kernel.org/> (raw)
In-Reply-To: <bug-220491-208809@https.bugzilla.kernel.org/>
https://bugzilla.kernel.org/show_bug.cgi?id=220491
Michał Pecio (michal.pecio@gmail.com) changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |michal.pecio@gmail.com
--- Comment #21 from Michał Pecio (michal.pecio@gmail.com) ---
We have those PORTSC messages telling what the xHCI controller thinks about the
state of particular root hub ports and what gets sometimes written to change
this state. See xHCI spec 5.4.8 for the meaning of those bits. Note that the
kernel doesn't write back exactly the same things it reads, because some bits
(notably PED) are "write 1 to clear" or other oddities, see section 5.1.1 for
the meaning of bit attributes.
In this latest case, I suppose you mean device on port 3-2.
Suspending:
[ 1097.437841] xhci_hcd 0000:00:14.0: Set port 3-2 link state, portsc: 0x1203,
write 0x11261
1203 seems to be the normal working state for a SuperSpeed device:
12 - SuperSpeed, port power on, top bit of link state is 0
0 - link state U0, not currently resetting
3 - no overcurrent, port is enabled and connected
11261 requests transition to U3 (port suspend).
But after resuming things get a little different:
[ 1097.766164] xhci_hcd 0000:00:14.0: Port change event, 3-2, id 6, portsc:
0x100080
That's a lot of zeros here. Link disabled, port disabled, not connected, not
powered, no overcurrent but overcurrent status has changed since the last time
the change bit was cleared or observed clear.
So I can't be sure what happens here, I'm far from expert on USB 3.0 link
management and xHCI root hubs, but it looks like hardware took action to
completely disable this port in the meantime, possibly due to actual
overcurrent or some HW bug or other problem.
Then we see:
[ 1098.777817] xhci_hcd 0000:00:14.0: set port power 3-2 ON, portsc: 0x100080
[ 1098.881792] xhci_hcd 0000:00:14.0: Get port status 3-2 read: 0x1002a0,
return 0x802a0
[ 1099.080653] xhci_hcd 0000:00:14.0: Port change event, 3-2, id 6, portsc:
0x21203
The value written by the kernel isn't logged, but a moment later we see
'powered up' and the link advancing to RxDetect state and then it's up and
running.
Then it looks like USB core registers disconnection, resets the port and the
device works normally from there.
--
You may reply to this email to add a comment.
You are receiving this mail because:
You are watching the assignee of the bug.
next prev parent reply other threads:[~2025-09-03 5:39 UTC|newest]
Thread overview: 57+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-08-26 3:34 [Bug 220491] New: usb_storage connected SD card disconnects/reconnects on resume from suspend bugzilla-daemon
2025-08-26 3:38 ` [Bug 220491] " bugzilla-daemon
2025-08-26 10:41 ` bugzilla-daemon
2025-08-26 15:05 ` bugzilla-daemon
2025-08-26 16:18 ` bugzilla-daemon
2025-08-26 17:24 ` bugzilla-daemon
2025-08-27 1:55 ` bugzilla-daemon
2025-08-27 3:49 ` bugzilla-daemon
2025-08-27 8:28 ` bugzilla-daemon
2025-08-27 16:26 ` bugzilla-daemon
2025-08-27 16:34 ` bugzilla-daemon
2025-08-27 17:01 ` bugzilla-daemon
2025-08-28 2:47 ` bugzilla-daemon
2025-08-28 17:33 ` bugzilla-daemon
2025-08-28 18:11 ` bugzilla-daemon
2025-08-29 17:37 ` bugzilla-daemon
2025-08-29 18:31 ` bugzilla-daemon
2025-09-02 21:23 ` bugzilla-daemon
2025-09-02 21:24 ` bugzilla-daemon
2025-09-02 21:45 ` bugzilla-daemon
2025-09-03 2:26 ` bugzilla-daemon
2025-09-03 5:39 ` bugzilla-daemon [this message]
2025-09-03 6:12 ` bugzilla-daemon
2025-09-03 12:58 ` bugzilla-daemon
2025-09-03 14:09 ` bugzilla-daemon
2025-09-03 15:29 ` bugzilla-daemon
2025-09-03 16:36 ` bugzilla-daemon
2025-09-03 16:43 ` bugzilla-daemon
2025-09-03 17:12 ` bugzilla-daemon
2025-09-03 19:00 ` bugzilla-daemon
2025-09-03 21:04 ` bugzilla-daemon
2025-09-03 21:08 ` bugzilla-daemon
2025-09-03 21:13 ` bugzilla-daemon
2025-09-03 21:22 ` bugzilla-daemon
2025-09-04 0:59 ` bugzilla-daemon
2025-09-04 1:00 ` bugzilla-daemon
2025-09-04 1:29 ` bugzilla-daemon
2025-09-04 2:49 ` bugzilla-daemon
2025-09-04 5:11 ` bugzilla-daemon
2025-09-04 6:05 ` bugzilla-daemon
2025-09-04 15:17 ` bugzilla-daemon
2025-09-04 23:03 ` bugzilla-daemon
2025-09-05 1:35 ` bugzilla-daemon
2025-09-05 11:53 ` bugzilla-daemon
2025-09-05 18:30 ` bugzilla-daemon
2025-09-05 21:44 ` bugzilla-daemon
2025-09-08 13:39 ` bugzilla-daemon
2025-09-08 22:41 ` bugzilla-daemon
2025-09-08 23:01 ` bugzilla-daemon
2025-09-08 23:04 ` bugzilla-daemon
2025-09-09 4:38 ` bugzilla-daemon
2025-09-09 16:03 ` bugzilla-daemon
2025-09-09 21:05 ` bugzilla-daemon
2025-09-09 21:16 ` bugzilla-daemon
2025-09-09 22:25 ` bugzilla-daemon
2025-09-23 8:49 ` bugzilla-daemon
2025-09-29 22:19 ` bugzilla-daemon
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=bug-220491-208809-hLyyOGCIch@https.bugzilla.kernel.org/ \
--to=bugzilla-daemon@kernel.org \
--cc=linux-usb@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox