-
Notifications
You must be signed in to change notification settings - Fork 410
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix capturing emulation data for dell-dock #6985
base: main
Are you sure you want to change the base?
Conversation
@@ -3031,8 +3031,10 @@ fu_engine_prepare(FuEngine *self, | |||
!fu_device_has_flag(device, FWUPD_DEVICE_FLAG_EMULATED)) { | |||
if (!fu_engine_backends_save_phase(self, error)) | |||
return FALSE; | |||
if (!fu_engine_backends_clear_phase(self, error)) | |||
return FALSE; | |||
if (fu_device_get_composite_id(device) == NULL) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess I'm missing the why -- how do you think it should work differently from a 40,000ft view for composite updates?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The problem for composite updates is that you can't clear the USB events for a given device in between stages because a bunch of devices may use that USB device. With 52790d8 reverted, you end up with:
In the client:
Failed to query dock info: write over HID-I2C failed: failed after 5 retries: failed to SetReport: no matching event for ControlTransfer:Direction=0x01,RequestType=0x01,Recipient=0x01,Request=0x09,Value=0x0200,Idx=0x0000,Data=QMYAAAAAGgDsAIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEYAQEABwAFBwQAAAEiAAABVwAAYAABADYBAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA,Length=0xc0
In the daemon:
12:13:26.826 FuEngine failed to cleanup failed composite action: failed to composite_cleanup using dell_dock: write over HID-I2C failed: failed after 5 retries: failed to SetReport: no matching event for ControlTransfer:Direction=0x01,RequestType=0x01,Recipient=0x01,Request=0x09,Value=0x0200,Idx=0x0000,Data=QMYAAAAAAwDsAIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA0BAgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA,Length=0xc0
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess another way to look at it is that there is mismatch in the engine for the concept of "install phase" for composite device. A given device goes through all the install phases, it's not a full engine state.
fu_engine_install_releases
: Iterates over releases/devices. Callsfu_engine_install_release
fu_engine_install_release
: Goes over one release/device. Callsfu_engine_install_blob
fu_engine_install_blob
: Goes over one device w/ a blob. Callsfu_engine_backends_save_phase
a bunch of times for each install phase.
6440ffc
to
a0bc0bc
Compare
Clearing events for all USB devices on each device add causes the data to get lost for a composite device. Split up the clear phase to a separate step that is only called when doing an actual update.
a0bc0bc
to
dddc824
Compare
Using a proxy and composite devices leads to some mismatches with how emulation data is captured. These commits help it.
I captured this using an old WD19TB I found.
Here is the emulation file I captured. Assuming all is good @hughsie can you please add it to the matching LVFS upload and then build the device-test using it so we can have coverage in our tests?
wd19tb.zip
Type of pull request: