Skip to content

Commit

Permalink
Modify detection method for usb-dwc3 and provide more info when it fa…
Browse files Browse the repository at this point in the history
…ils (Bugfix) (#903)
  • Loading branch information
LiaoU3 authored Jan 10, 2024
1 parent 36d08c9 commit f5179b5
Showing 1 changed file with 14 additions and 6 deletions.
20 changes: 14 additions & 6 deletions providers/iiotg/units/usb-dwc3/jobs.pxu
Original file line number Diff line number Diff line change
Expand Up @@ -3,22 +3,31 @@ _summary: Detect if the USB DWC3 drivers are loaded
category_id: usb-dwc3
imports: from com.canonical.plainbox import manifest
requires:
device.driver == 'dwc3-pci'
manifest.has_usb_dwc3_controller == 'True'
flags: simple fail-on-resource
plugin: shell
flags: simple
command:
if ! lspci -v | grep dwc3-pci; then
echo "Cannot find the 'dwc3-pci' driver be used!"
echo "Please make sure this feature is supported on this platform and check the value of xDCI in BIOS setting."
exit 1
fi
echo "dwc3-pci driver loaded"

id: usb-dwc3/module-detect
_summary: Detect if the USB DWC3 module is loaded
category_id: usb-dwc3
imports: from com.canonical.plainbox import manifest
requires:
module.name == 'dwc3_pci'
manifest.has_usb_dwc3_controller == 'True'
flags: simple fail-on-resource
plugin: shell
flags: simple
command:
echo "dwc3_pci module loaded"
if ! lsmod | grep dwc3_pci; then
echo "Cannot find the 'dwc3_pci' module be loaded!"
echo "Please make sure this feature is supported on this platform and check the value of xDCI in BIOS setting."
exit 1
fi

id: usb-dwc3/mass-storage
_summary: Check DUT can be detected as mass storage device
Expand Down Expand Up @@ -63,4 +72,3 @@ command:
fi
user: root
estimated_duration: 1s

0 comments on commit f5179b5

Please sign in to comment.