Created attachment 83699
0001-lib-Add-VFS5011-driver.patch
Sorry to take so long to resend the patch.
@@ +1000,5 @@
>> +
>> + struct fpi_ssm *ssm;
>> + ssm = fpi_ssm_new(dev->dev, open_loop, DEV_OPEN_NUM_STATES);
>> + ssm->priv = dev;
>> + fpi_ssm_start(ssm, open_loop_complete);
>
>And no one waits for this ssm (and async USB reqs) to complete here. It's a race >condition I've described earlier. Please move device initialization into >dev_activate().
The code is required and I can imagine the race condition you mentioned, but the fingerprint device won't work if move the code to dev_activate() function.
So, I add a check in dev_activate() function to make sure open_loop_complete() have finished to continue.
And you had mentioned that do we need to do reset in dev_open()
r = libusb_reset_device(dev->udev);
if (r != 0) { fp_err("Failed to reset the device"); return r;
}
I checked if I removed the code, the device doesn't work.
I'm learning libfprint by modifying the code, so please give me more explicit advise, so that I can know how to fix it.
Thanks.
Created attachment 83699 Add-VFS5011- driver. patch
0001-lib-
Sorry to take so long to resend the patch.
@@ +1000,5 @@ new(dev- >dev, open_loop, DEV_OPEN_ NUM_STATES) ; complete) ; complete( ) have finished to continue.
>> +
>> + struct fpi_ssm *ssm;
>> + ssm = fpi_ssm_
>> + ssm->priv = dev;
>> + fpi_ssm_start(ssm, open_loop_
>
>And no one waits for this ssm (and async USB reqs) to complete here. It's a race >condition I've described earlier. Please move device initialization into >dev_activate().
The code is required and I can imagine the race condition you mentioned, but the fingerprint device won't work if move the code to dev_activate() function.
So, I add a check in dev_activate() function to make sure open_loop_
And you had mentioned that do we need to do reset in dev_open() reset_device( dev->udev) ;
fp_err( "Failed to reset the device");
return r;
r = libusb_
if (r != 0) {
}
I checked if I removed the code, the device doesn't work.
I'm learning libfprint by modifying the code, so please give me more explicit advise, so that I can know how to fix it.
Thanks.