osrusbfx2 step5: Add 40+ uncovered USB DDIs and fix URB allocation bug#1361
Draft
limitedge wants to merge 1 commit intomicrosoft:mainfrom
Draft
osrusbfx2 step5: Add 40+ uncovered USB DDIs and fix URB allocation bug#1361limitedge wants to merge 1 commit intomicrosoft:mainfrom
limitedge wants to merge 1 commit intomicrosoft:mainfrom
Conversation
- Fix BSOD 0x144: Use USBD_UrbAllocate instead of stack-allocated URBs for USBD_CLIENT_CONTRACT_VERSION_602 compliance - Add GET_BAR_GRAPH_DISPLAY, READ_SWITCHES, GET/SET_7_SEGMENT_DISPLAY, GET_CONFIG_DESCRIPTOR, RESET_DEVICE, REENUMERATE_DEVICE IOCTLs - Add vendor command defines and BAR_GRAPH_STATE/SWITCH_STATE structures - Renumber custom DDI-coverage IOCTLs to avoid index collisions - Tested on ARM64 with OSR USB-FX2 LK hardware
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR extends the
wdf_osrfx2_lab/kmdf/step5sample to demonstrate 40+ previously uncovered USB DDIs fromwdfusb.handusbdlib.h, and adds the missing IOCTLs needed by the test app.Bug Fix
USBD_UrbAllocate-allocated URBs forWdfUsbTargetDeviceSendUrbSynchronouslyandWdfUsbTargetDeviceFormatRequestForUrb, as required byUSBD_CLIENT_CONTRACT_VERSION_602.New DDIs Covered — wdfusb.h (19)
WdfUsbInterfaceGetNumEndpointsWdfUsbInterfaceGetEndpointInformationWdfUsbTargetPipeGetTypeWDF_USB_PIPE_DIRECTION_IN/_OUTWdfUsbTargetDeviceAllocAndQueryStringWdfUsbTargetDeviceSendUrbSynchronouslyWdfUsbTargetDeviceFormatRequestForUrbWdfUsbTargetDeviceFormatRequestForStringWdfUsbTargetDeviceFormatRequestForCyclePortWdfUsbTargetPipeFormatRequestForResetWdfUsbTargetPipeFormatRequestForAbortWdfUsbTargetPipeWriteSynchronouslyWDF_USB_CONTROL_SETUP_PACKET_INITWDF_USB_CONTROL_SETUP_PACKET_INIT_GET_STATUSWDF_USB_CONTROL_SETUP_PACKET_INIT_FEATUREWDF_USB_DEVICE_SELECT_CONFIG_PARAMS_INIT_DECONFIGWDF_USB_DEVICE_SELECT_CONFIG_PARAMS_INIT_URBWDF_USB_INTERFACE_SELECT_SETTING_PARAMS_INIT_URBWdfUsbTargetDeviceWdmGetConfigurationHandleNew DDIs Covered — usbdlib.h (13)
USBD_UrbAllocate/USBD_UrbFreeUSBD_IsochUrbAllocateUSBD_SelectConfigUrbAllocateAndBuildUSBD_SelectInterfaceUrbAllocateAndBuildUSBD_AssignUrbToIoStackLocationUSBD_CloseHandleUSBD_IsInterfaceVersionSupportedUSBD_GetInterfaceLengthUSBD_GetPdoRegistryParameterUSBD_CreateConfigurationRequestExUSBD_ValidateConfigurationDescriptorUSBD_ParseConfigurationDescriptorExGET_ISO_URB_SIZE/UsbBuildGetStatusRequestNew IOCTLs for Test App Compatibility (8)
IOCTL_OSRUSBFX2_GET_BAR_GRAPH_DISPLAY— Read LED bar graph stateIOCTL_OSRUSBFX2_READ_SWITCHES— Read DIP switch stateIOCTL_OSRUSBFX2_GET_7_SEGMENT_DISPLAY— Read 7-segment displayIOCTL_OSRUSBFX2_SET_7_SEGMENT_DISPLAY— Set 7-segment displayIOCTL_OSRUSBFX2_GET_CONFIG_DESCRIPTOR— Retrieve USB config descriptorIOCTL_OSRUSBFX2_RESET_DEVICE— Reset USB portIOCTL_OSRUSBFX2_REENUMERATE_DEVICE— Force device re-enumerationIOCTL_OSRUSBFX2_GET_INTERRUPT_MESSAGE— Stub (returns STATUS_NOT_SUPPORTED)Testing