Skip to content

Commit

Permalink
Merge pull request #2544 from hathach/hil-pi4-usbreset-hub2.0
Browse files Browse the repository at this point in the history
use usbreset to reset built-in usb 2.0 hub VIA Labs before each test
  • Loading branch information
hathach authored Mar 26, 2024
2 parents 0cb7204 + 7f1e327 commit 925ad67
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 10 deletions.
16 changes: 11 additions & 5 deletions .github/workflows/build_esp.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
16 changes: 11 additions & 5 deletions .github/workflows/cmake_arm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 925ad67

Please sign in to comment.