I'm working on the driver and application for USB device to update the firmware via DFU. I have USB device that worked correctly. After that I try to update the firmware of the device, and while downloading of the firmware I unplug the usb cable. Downloading is failed as expected. After that I plug the usb device and it is in DFU mode with product 0xffff, because the firmware is corrupted. I try to start update again and every call of IOUSBDevice::DeviceRequest returns 0xe000404f error (kIOUSBPipeStalled - Pipe has stalled, error needs to be cleared).
I have checked with USB Prober and device in DFU mode doesn't have any endpoints. I'm not sure how it works, but it looks like pipe zero is used while calling DeviceRequest. So maybe I should call something like ClearPipeStall of pipe zero to work with device in DFU mode with corrupted firmware? How can I do it? If my assumption is wrong, how can I resolve this issue? After plugging the device in DFU mode I don't perform any I/O operations, I just get pid/vid and find IOUSBDevice object and IOUSBInterface (DFU interface) objects as usual.
On El Capitan I use IOUSBHostInterface::deviceRequest() and it also returns an error (but the error code is different, I've lost the code and can't get it right now because I installed Mavericks on my Mac).