Skip to content

firehose: treat -ENODEV on commit=1 as success after UFS provisioning - #322

Merged
igoropaniuk merged 1 commit into
linux-msm:masterfrom
JohnSagaQuic:UFS_Provisioning_EID
Oct 2, 2026
Merged

igoropaniuk merged 1 commit into
linux-msm:masterfrom
JohnSagaQuic:UFS_Provisioning_EID

Conversation

@JohnSagaQuic

@JohnSagaQuic JohnSagaQuic commented Sep 15, 2026 •

Copy link
Copy Markdown

firehose: treat -ENODEV on commit=1 as success after UFS provisioning
Some UFS programmers reset the device right after committing the
configuration descriptor, dropping the USB link before sending the
ACK, so qdl reports a failure although provisioning succeeded.

Map LIBUSB_ERROR_NO_DEVICE to -ENODEV in usb_read() and, when the
device disappears after commit=1, treat it as success and skip the
final reset. Any real descriptor error would already have been
NAKed during the earlier exchange. A disconnect during the commit=0
dry run remains a hard error.

Signed-off-by: Zhirong Chen zhirongc@qti.qualcomm.com

@JohnSagaQuic
JohnSagaQuic requested a review from a team as a code owner September 15, 2026 22:33
Comment thread src/firehose.c Outdated
Comment thread src/firehose.c Outdated
@JohnSagaQuic JohnSagaQuic changed the title firehose: treat -EIO on commit=1 as success with an ux_info message firehose: treat -ENODEV on commit=1 as success after UFS provisioning Oct 1, 2026
@igoropaniuk

Copy link
Copy Markdown
Contributor

@JohnSagaQuic Thanks for the fix. The code LGTM; I only have comments on the commit message, please make it more concise, as it currently walks through the implementation step by step, a few lines on the problem and the key decision would be enough, for example:

firehose: treat -ENODEV on commit=1 as success after UFS provisioning

Some UFS programmers reset the device right after committing the
configuration descriptor, dropping the USB link before sending the
ACK, so qdl reports a failure although provisioning succeeded.

Map LIBUSB_ERROR_NO_DEVICE to -ENODEV in usb_read() and, when the
device disappears after commit=1, treat it as success and skip the
final reset. Any real descriptor error would already have been
NAKed during the earlier exchange. A disconnect during the commit=0
dry run remains a hard error.

Please also use full first and last name rather than the username (The DCO sign-off needs to identify the author by real name):

Signed-off-by: Firstname Lastname <zhirongc@qti.qualcomm.com>

Thanks!

@JohnSagaQuic

Copy link
Copy Markdown
Author

@JohnSagaQuic Thanks for the fix. The code LGTM; I only have comments on the commit message, please make it more concise, as it currently walks through the implementation step by step, a few lines on the problem and the key decision would be enough, for example:

firehose: treat -ENODEV on commit=1 as success after UFS provisioning

Some UFS programmers reset the device right after committing the
configuration descriptor, dropping the USB link before sending the
ACK, so qdl reports a failure although provisioning succeeded.

Map LIBUSB_ERROR_NO_DEVICE to -ENODEV in usb_read() and, when the
device disappears after commit=1, treat it as success and skip the
final reset. Any real descriptor error would already have been
NAKed during the earlier exchange. A disconnect during the commit=0
dry run remains a hard error.

Please also use full first and last name rather than the username (The DCO sign-off needs to identify the author by real name):

Signed-off-by: Firstname Lastname <zhirongc@qti.qualcomm.com>

Thanks!

@igoropaniuk , updated as suggested. Thanks

Some UFS programmers reset the device right after committing the
configuration descriptor, dropping the USB link before sending the
ACK, so qdl reports a failure although provisioning succeeded.

Map LIBUSB_ERROR_NO_DEVICE to -ENODEV in usb_read() and, when the
device disappears after commit=1, treat it as success and skip the
final reset. Any real descriptor error would already have been
NAKed during the earlier exchange. A disconnect during the commit=0
dry run remains a hard error.

Signed-off-by: Zhirong Chen <zhirongc@qti.qualcomm.com>
@igoropaniuk
igoropaniuk force-pushed the UFS_Provisioning_EID branch from 8552a75 to 3797094 Compare October 2, 2026 17:50

@igoropaniuk igoropaniuk left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@igoropaniuk
igoropaniuk merged commit e7f8f2f into linux-msm:master Oct 2, 2026
17 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants