-
Notifications
You must be signed in to change notification settings - Fork 2.8k
MdeModulePkg/Bus/Usb/UsbMassStorageDxe: USBMass Storage Enhancements DXE #11202
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
base: master
Are you sure you want to change the base?
MdeModulePkg/Bus/Usb/UsbMassStorageDxe: USBMass Storage Enhancements DXE #11202
Conversation
Certain USB Mass Storage devices were experiencing command failures, initialization delays, and intermittent failures. These issues affected the compatibility and stability of the USB Mass Storage DXE phase. [Suggested Solution] USB Mass Storage Enhancements DXE Phase Error handling improvements were implemented to address command failures observed in specific USB Mass Storage devices. Additionally, device-specific timing adjustments were introduced to mitigate initialization delays and intermittent failures, improving overall compatibility and stability. Signed-off-by: karunakar_poosapalli <[email protected]>
[Suggested Solution] Fix uncrustify errors in CI build. Signed-off-by: karunakar_poosapalli <[email protected]>
// | ||
// Device fw issue. | ||
// There are no delay requirement from UsbMassBulk spec and USB spec. | ||
// DW316 need delay for UsbClearEndpointStall and there might be other devices also need this delay, |
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.
What means DW316? What problem will be resolved by this Delay?
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.
What means DW316? What problem will be resolved by this Delay?
Thanks for your response.
DW316 is a DELL optical drive and it looks like the clear endpoint stall will need some delay on it before the endpoint is usable.
Otherwise, the next transaction will be still failed to execute .
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.
Hi @lgao4 ,Can you please share your feedback if any ?
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 don't think it is the right way to add the delay for the specific device in the common UsbMassStorageDxe module.
@leiflindholm , could you share your comment for this change?
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.
@@ -39,6 +39,7 @@ extern USB_MASS_TRANSPORT mUsbBotTransport; | |||
// Usb Bot wait device reset complete, set by experience | |||
// | |||
#define USB_BOT_RESET_DEVICE_STALL (100 * USB_MASS_1_MILLISECOND) | |||
#define USB_BOT_CLR_STALL_EP_STALL (10 * USB_MASS_1_MILLISECOND) |
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 don't think such small delay works. The minimal delay should be 20 ms。
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 don't think such small delay works. The minimal delay should be 20 ms。
Thanks for your response.
I can NOT find the reference timing for clear endpoint stall.
So that I used the Reset Recovery timing for this.
If there is any specific value for it, please help to share it and then it might refactor with more proper value.
Thanks a lot.
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.
Hi @lgao4 ,Can you please share your feedback if any ?
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.
Are we absolutely sure what is needed is a delay and not a barrier/memory fence?
Certain USB Mass Storage devices were
experiencing command failures, initialization delays, and intermittent failures. These issues affected the compatibility and stability of the USB Mass Storage DXE phase.
[Suggested Solution]
USB Mass Storage Enhancements DXE Phase
Error handling improvements were implemented to address command failures observed in specific USB Mass Storage devices. Additionally, device-specific timing adjustments were introduced to mitigate initialization delays and intermittent failures, improving overall compatibility and stability.