Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add xHCI host dead troubleshooting #577

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 37 additions & 0 deletions f3discovery/src/appendix/1-general-troubleshooting/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -216,3 +216,40 @@ $ rustup update nightly

$ rustup target add thumbv7em-none-eabihf
```

## Kernel problems

### lsusb don't show STM32F after STM32F got stuck, even reconnect

#### Symptoms

Sometime you might make STM32 freeze, and it lost connect even if you reconnect the USB

and got something like these in `dmesg`:

```
[ 700.256746] xhci_hcd 0000:06:00.4: xHCI host not responding to stop endpoint command
[ 700.260711] xhci_hcd 0000:06:00.4: xHCI host controller not responding, assume dead
[ 700.260711] xhci_hcd 0000:06:00.4: HC died; cleaning up
```

#### Cause

STM32 got freezed, kernel can not get the response from it, so remove it.
Reconnect USB port won't make kernet to try connect it again.

#### Fix

Linux:

- Get the ID from `dmesg`, the id is "0000:06:00.4" for below example:

```
[ 700.256746] xhci_hcd 0000:06:00.4: xHCI host not responding to stop endpoint command
[ 700.260711] xhci_hcd 0000:06:00.4: xHCI host controller not responding, assume dead
[ 700.260711] xhci_hcd 0000:06:00.4: HC died; cleaning up
```

- go to `/sys/bus/pci/drivers/xhci_hcd/`
- unbind it with ID, `echo -n "0000:06:00.4" > unbind`
- rebind it, `echo -n "0000:06:00.4" > bind`
Loading