Hello, I'm trying to configure my usb driver to accept multiple possible vendor/product combinations. I found the component usb_report_filter, which as I understand consumes a usb devices report, and produces a usb configuration file with a matching policy and a report that my component can use to request the device. The report to my driver looks like this:
<usb_devices> <device label="usb-1-2" vendor_id="0xcf3" product_id="0x9271" bus="0x1" dev="0x2"/> </usb_devices>
and it makes sense so my driver requests a device called "usb-1-2". The corresponding usb configuration is:
<config bios_handoff="true"><report devices="yes" config="yes"/> <raw> <report devices="yes"/> <policy label="wifi_drv -> usb-1-2" vendor_id="0xcf3" product_id="0x9271" bus="0x1" dev="0x2"/> </raw> </config>
This seems like almost what I want, but somehow the <policy> node within the <raw> node seems to stop the driver from accepting this connection - I get a warning saying:
[init -> usb_host_drv -> usb_drv] Warning: no policy defined for label 'wifi_drv -> usb-1-2'
Am I using the component right? Is there a better way to do this? I followed the example in repos/ports/run/vbox5_genode_usb_hid_raw.run.
Thanks, Colin
Hello,
with commit [0] the usb_filter_rom README states that the <raw> node is gone, if I'm not mistaken. Are you on an older Genode release (before this commit) or something current ?
Cheers,
Alex.
[0] https://github.com/genodelabs/genode/commit/14d1ca17a98e46d8570e1ee3506c8642...
On 11.05.23 05:22, Colin Parker wrote:
Hello, I'm trying to configure my usb driver to accept multiple possible vendor/product combinations. I found the component usb_report_filter, which as I understand consumes a usb devices report, and produces a usb configuration file with a matching policy and a report that my component can use to request the device. The report to my driver looks like this:
<usb_devices> <device label="usb-1-2" vendor_id="0xcf3" product_id="0x9271" bus="0x1" dev="0x2"/> </usb_devices>
and it makes sense so my driver requests a device called "usb-1-2". The corresponding usb configuration is:
<config bios_handoff="true"><report devices="yes" config="yes"/> <raw> <report devices="yes"/> <policy label="wifi_drv -> usb-1-2" vendor_id="0xcf3" product_id="0x9271" bus="0x1" dev="0x2"/> </raw>
</config>
This seems like almost what I want, but somehow the <policy> node within the <raw> node seems to stop the driver from accepting this connection - I get a warning saying:
[init -> usb_host_drv -> usb_drv] Warning: no policy defined for label 'wifi_drv -> usb-1-2'
Am I using the component right? Is there a better way to do this? I followed the example in repos/ports/run/vbox5_genode_usb_hid_raw.run.
Thanks, Colin
Genode users mailing list users@lists.genode.org https://lists.genode.org/listinfo/users
Thanks for your message. However, I am still confused.
with commit [0] the usb_filter_rom README states that the <raw> node is
gone, if I'm not mistaken. Are you on an older Genode release (before this commit) or something current ?
[0] https://github.com/genodelabs/genode/commit/14d1ca17a98e46d8570e1ee3506c8642...
It is indeed stated in the README this way in my version, which contains both commit [0] and the more recent commit [1] below (which only seems to address format strings and doesn't affect the <raw> node that I can see). But my confusion is because commit [0] does not have any changes to "repos/os/src/app/usb_report_filter/main.cc", so I don't understand how/why the behavior of the component can change to match the change in README. Further, a search for "raw" through main.cc reveals code (lines 173-192) that appears to generate the <raw> node, so I assume this feature is used in at least some cases still? BTW the only difference from my version of usb_report_filter to current master is that I enable "verbose" to try to figure out what's going on.
[1] https://github.com/genodelabs/genode/commit/ecd0066e806741c39e72f7f274d5626d...