Merge pull request #2544 from hathach/hil-pi4-usbreset-hub2.0

use usbreset to reset built-in usb 2.0 hub VIA Labs before each test
This commit is contained in:
Ha Thach 2024-03-26 17:30:44 +07:00 committed by GitHub
commit 925ad67f97
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 22 additions and 10 deletions

View File

@ -86,11 +86,17 @@ jobs:
# USB bus on rpi4 is not stable, reset it before testing
- name: Reset USB bus
run: |
for port in $(lspci | grep USB | cut -d' ' -f1); do
echo -n "0000:${port}"| sudo tee /sys/bus/pci/drivers/xhci_hcd/unbind;
sleep 0.1;
echo -n "0000:${port}" | sudo tee /sys/bus/pci/drivers/xhci_hcd/bind;
done
lsusb
lsusb -t
# reset VIA Labs 2.0 hub
sudo usbreset 001/002
# legacy code
#for port in $(lspci | grep USB | cut -d' ' -f1); do
# echo -n "0000:${port}"| sudo tee /sys/bus/pci/drivers/xhci_hcd/unbind;
# sleep 0.1;
# echo -n "0000:${port}" | sudo tee /sys/bus/pci/drivers/xhci_hcd/bind;
#done
- name: Checkout test/hil
uses: actions/checkout@v4

View File

@ -141,11 +141,17 @@ jobs:
# USB bus on rpi4 is not stable, reset it before testing
- name: Reset USB bus
run: |
for port in $(lspci | grep USB | cut -d' ' -f1); do
echo -n "0000:${port}"| sudo tee /sys/bus/pci/drivers/xhci_hcd/unbind;
sleep 0.1;
echo -n "0000:${port}" | sudo tee /sys/bus/pci/drivers/xhci_hcd/bind;
done
lsusb
lsusb -t
# reset VIA Labs 2.0 hub
sudo usbreset 001/002
# legacy code
#for port in $(lspci | grep USB | cut -d' ' -f1); do
# echo -n "0000:${port}"| sudo tee /sys/bus/pci/drivers/xhci_hcd/unbind;
# sleep 0.1;
# echo -n "0000:${port}" | sudo tee /sys/bus/pci/drivers/xhci_hcd/bind;
#done
- name: Checkout test/hil
uses: actions/checkout@v4