Unverified Commit 64f54a4c authored by openeuler-ci-bot's avatar openeuler-ci-bot Committed by Gitee
Browse files

!88 [openEuler-1.0-LTS] XHCI:Fix some device identify fail when enable xHCI runtime suspend

Merge Pull Request from: @leoliu-oc 
 
If plug out device form xhci with runtime suspend enabled. On the one hand, driver will disconnect this device and send disabled slot command to xhci.

On the other hand, without no device connect to xhci, PM core will call xhci suspend function to let xhci go to D3 to save power. However there is a temporal competition to get xhci lock between disable slot command interrupt and xhci suspend. If xhci suspend function get xhci lock first, then this function will clear xhci command ring. It will get error command trb when driver to handle disable slot command interrupt. This is a serious error for driver and driver will cleanup xhci. So,any device connect to this xhci port again will not be recognized.

In order to fix this issues, we let disable slot command interrupt ISR to get xhci lock first. So, add a delay in xhci suspend function before to get xhci lock.

### ISSUE
https://gitee.com/openeuler/kernel/issues/I54V16

### Test
#### Plug test:
- Enable xHCI RTD3 (Take xHCI's BDF[00:12.0] as an example: echo auto >/sys/bus/pci/devices/0000:00:12.0/power/control)
- Unplug the connected device and insert it again after 2S, Check whether the device can be recognized.

#### Sx state test:
- Let the system enter Sx state, Then insert device to see if it can be recognized.

If the device can be correctly identified, the test can be considered as passed.

### Known Issue
N/A

### Default config change
N/A 
 
Link:https://gitee.com/openeuler/kernel/pulls/88

 
Reviewed-by: default avatarLaibin Qiu <qiulaibin@huawei.com>
Signed-off-by: default avatarXie XiuQi <xiexiuqi@huawei.com>
parents 4ba4caa5 b6b793f4
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment