Skip to content

Commit

Permalink
Use new pc_usb_host_drv in all recipes and tests
Browse files Browse the repository at this point in the history
* Switch from the legacy usb_host driver to the new PC version
  in recipes and automated tests
* Update documentation snippets
* Remove outdated, unused usb_rndis run-script

Fix #4416
  • Loading branch information
skalk authored and nfeske committed Feb 21, 2022
1 parent a30c428 commit 14d1ca1
Show file tree
Hide file tree
Showing 16 changed files with 44 additions and 216 deletions.
4 changes: 2 additions & 2 deletions repos/base/run/platform_drv.inc
Expand Up @@ -9,7 +9,7 @@ proc have_platform_drv {} {
proc usb_host_drv_binary { } {
if {[have_board rpi]} { return legacy_rpi_usb_host_drv }
if {[have_board imx6q_sabrelite]} { return legacy_imx6q_sabrelite_usb_host_drv }
if {[have_board pc]} { return legacy_pc_usb_host_drv }
if {[have_board pc]} { return pc_usb_host_drv }
return no_usb_drv_available
}

Expand Down Expand Up @@ -41,8 +41,8 @@ proc acpi_drv_name { } {

proc platform_drv_build_components {} {
set drv_build_components ""
lappend_if [have_platform_drv] drv_build_components drivers/platform
if {[have_board pc]} {
lappend drv_build_components drivers/platform/legacy/x86
lappend drv_build_components server/report_rom
if {[acpi_drv_name] eq "acpi_drv"} {
lappend drv_build_components drivers/acpi
Expand Down
10 changes: 6 additions & 4 deletions repos/dde_linux/run/usb_hid_raw.run
Expand Up @@ -283,6 +283,8 @@ run_genode_until {\[init -\> event_dump\] Input event #11.*\n} 40 [output_spawn_
# pay only attention to the output of init and its children
grep_output {^\[init }

unify_output { dev_info:} ""
unify_output { usb [0-9\-]+:} ""
unify_output { number [0-9]+} ""
unify_output {(?n)on usb-usbbus.*$} ""
unify_output {(?n)using .*$} ""
Expand All @@ -299,10 +301,10 @@ compare_output_to {
[init -> event_dump] Input event #3 REL_MOTION -1+0 key count: 1
[init -> event_dump] Input event #4 REL_MOTION +0+1 key count: 1
[init -> event_dump] Input event #5 RELEASE BTN_LEFT key count: 0
[init -> usb_drv] dev_info: USB disconnect, device
[init -> usb_drv] dev_info: new full-speed USB device
[init -> usb_hid_drv] dev_info: input: USB HID v1.11 Keyboard [HID 03eb:204d]
[init -> usb_hid_drv] dev_info: input: USB HID v1.11 Mouse [HID 03eb:204d]
[init -> usb_drv] USB disconnect, device
[init -> usb_drv] new full-speed USB device
[init -> usb_hid_drv] input: USB HID v1.11 Keyboard [HID 03eb:204d]
[init -> usb_hid_drv] input: USB HID v1.11 Mouse [HID 03eb:204d]
[init -> event_dump] Input event #6 PRESS KEY_X 65534 key count: 1
[init -> event_dump] Input event #7 RELEASE KEY_X key count: 0
[init -> event_dump] Input event #8 PRESS BTN_LEFT 65534 key count: 1
Expand Down
9 changes: 4 additions & 5 deletions repos/dde_linux/run/usb_hid_reconnect.run
Expand Up @@ -21,7 +21,7 @@ if {![have_include "power_on/qemu"]} {

set build_components {
core init timer
drivers/usb_host
drivers/usb_host/pc
drivers/usb_hid
server/event_dump
server/dynamic_rom
Expand Down Expand Up @@ -72,10 +72,10 @@ append config {
</start>

<start name="usb_drv" caps="150">
<binary name="} [usb_host_drv_binary] {"/>
<binary name="pc_usb_host_drv"/>
<resource name="RAM" quantum="12M"/>
<provides> <service name="Usb"/> </provides>
<config uhci="no" ohci="no" ehci="no" xhci="yes" bios_handoff="yes">
<config bios_handoff="yes">
<report devices="yes"/>
<policy label_prefix="usb_hid_drv" class="0x3"/>
</config>
Expand Down Expand Up @@ -154,9 +154,8 @@ install_config $config
# generic modules
set boot_modules {
core ld.lib.so init timer event_dump dynamic_rom
usb_hid_drv
usb_hid_drv pc_usb_host_drv
}
append boot_modules [usb_host_drv_binary]

append_platform_drv_boot_modules

Expand Down
1 change: 0 additions & 1 deletion repos/dde_linux/run/usb_net.run
Expand Up @@ -71,7 +71,6 @@ append_if [have_spec x86] config {
append config {
</config>
<route>
<service name="Report"> <child name="report_rom"/> </service>
<any-service> <parent/> <any-child/> </any-service>
</route>
</start>
Expand Down
172 changes: 0 additions & 172 deletions repos/dde_linux/run/usb_rndis.run

This file was deleted.

2 changes: 1 addition & 1 deletion repos/gems/recipes/pkg/drivers_managed-pc/archives
@@ -1,7 +1,7 @@
_/src/platform_drv
_/src/acpi_drv
_/src/ps2_drv
_/src/legacy_usb_host_drv
_/src/pc_usb_host_drv
_/src/usb_hid_drv
_/src/usb_block_drv
_/src/vesa_drv
Expand Down
2 changes: 1 addition & 1 deletion repos/gems/sculpt/drivers/pc
Expand Up @@ -133,7 +133,7 @@
</start>

<start name="usb_drv" caps="200">
<binary name="legacy_pc_usb_host_drv"/>
<binary name="pc_usb_host_drv"/>
<resource name="RAM" quantum="16M"/>
<provides> <service name="Usb"/> </provides>
<route>
Expand Down
9 changes: 4 additions & 5 deletions repos/gems/src/app/driver_manager/main.cc
Expand Up @@ -712,14 +712,13 @@ void Driver_manager::Main::_generate_usb_drv_config(Reporter &usb_drv_config,
{
Reporter::Xml_generator xml(usb_drv_config, [&] () {

xml.attribute("uhci", true);
xml.attribute("ehci", true);
xml.attribute("ohci", _use_ohci);
xml.attribute("xhci", true);
xml.attribute("capslock_led", "rom");
xml.attribute("numlock_led", "rom");

xml.node("report", [&] () { xml.attribute("devices", true); });
xml.node("report", [&] () {
xml.attribute("config", true);
xml.attribute("devices", true);
});

/* incorporate user-managed policy */
policy.with_raw_content([&] (char const *start, size_t length) {
Expand Down
2 changes: 1 addition & 1 deletion repos/libports/run/smartcard.run
Expand Up @@ -77,7 +77,7 @@ append config {
<binary name="} [usb_host_drv_binary] {"/>
<resource name="RAM" quantum="16M"/>
<provides><service name="Usb"/></provides>
<config uhci="yes" ehci="yes" xhci="yes" bios_handoff="yes">
<config bios_handoff="yes">
<report devices="yes"/>
<policy label="test-smartcard -> usb_device"
vendor_id="} [smartcard_vendor_id] {" product_id="} [smartcard_product_id] {"/>
Expand Down
10 changes: 6 additions & 4 deletions repos/libports/run/webcam.run
@@ -1,3 +1,5 @@
assert_spec x86

set build_components { }

# fuji4
Expand Down Expand Up @@ -25,7 +27,8 @@ import_from_depot [depot_user]/src/[base_src] \
[depot_user]/src/nitpicker \
[depot_user]/src/dynamic_rom \
[depot_user]/src/rom_reporter \
[depot_user]/src/legacy_usb_host_drv \
[depot_user]/src/report_rom \
[depot_user]/src/pc_usb_host_drv \
[depot_user]/src/vesa_drv \
[depot_user]/src/test-capture \
[depot_user]/pkg/usb_webcam
Expand Down Expand Up @@ -66,12 +69,11 @@ append config {
</start>

<start name="usb_drv" priority="0" caps="200">
<binary name="legacy_pc_usb_host_drv"/>
<binary name="pc_usb_host_drv"/>
<resource name="RAM" quantum="16M"/>
<!-- <resource name="CPU" quantum="10"/> -->
<provides><service name="Usb"/></provides>
<config uhci="yes" ehci="yes" xhci="yes" bios_handoff="no">
<report devices="no"/>
<config bios_handoff="no">
<policy label_suffix="usb_webcam -> usb_device"
vendor_id="} [libuvc_vendor_id] {" product_id="} [libuvc_product_id] {"/>
</config>
Expand Down
2 changes: 1 addition & 1 deletion repos/os/recipes/pkg/drivers_interactive-pc/archives
@@ -1,7 +1,7 @@
_/src/platform_drv
_/src/acpi_drv
_/src/ps2_drv
_/src/legacy_usb_host_drv
_/src/pc_usb_host_drv
_/src/usb_hid_drv
_/src/vesa_drv
_/src/report_rom
Expand Down
4 changes: 2 additions & 2 deletions repos/os/recipes/raw/drivers_interactive-pc/drivers.config
Expand Up @@ -107,10 +107,10 @@
</start>

<start name="usb_drv" caps="150">
<binary name="legacy_pc_usb_host_drv"/>
<binary name="pc_usb_host_drv"/>
<resource name="RAM" quantum="16M"/>
<provides> <service name="Usb"/> </provides>
<config uhci="yes" ohci="yes" ehci="yes" xhci="yes">
<config>
<report devices="yes"/>
<policy label_prefix="usb_hid_drv" class="0x3"/>
</config>
Expand Down
9 changes: 3 additions & 6 deletions repos/os/src/app/usb_report_filter/README
Expand Up @@ -59,12 +59,9 @@ following USB driver configuration:

!<start name="usb_drv">
![...]
! <config uhci="yes" ehci="yes" xhci="yes">
! <hid/>
! <raw>
! <report devices="yes"/>
! <policy label="vbox -> usb-1-3" vendor_id="0x1b1c" product_id="0x1a09" bus="0x0001" device="0x0003"/>
! </raw>
! <config>
! <report devices="yes"/>
! <policy label="vbox -> usb-1-3" vendor_id="0x1b1c" product_id="0x1a09" bus="0x0001" device="0x0003"/>
! </config>
!</start>

Expand Down
2 changes: 1 addition & 1 deletion repos/os/src/drivers/usb_block/README
Expand Up @@ -29,7 +29,7 @@ driver:
!<start name="usb_drv">
! <resource name="RAM" quantum="12M"/>
! <provides><service name="Usb"/></provides>
! <config uhci="yes" ehci="yes" xhci="yes">
! <config>
! <raw>
! <policy label="usb_block_drv -> usb_stick" vendor_id="0x13fe" product_id="0x5200"/>
! </raw>
Expand Down

0 comments on commit 14d1ca1

Please sign in to comment.