On Oct 30, 2015, at 9:32 AM, lyf4 Science <[email protected]> wrote: > > Hi Experts, > > I had developed a sample USB driver in MAC OS X 10.10 to read from Interrupt > IN endpoint of a device. I registered callback with the Interrupt IN read() > api. > > On analysis with hardware USB analyzer the Interrupt IN data is read by host > from device and ACK is sent but the host driver dosen't invokes the callback. > > How to debug the issue ?
Apart from the end of transfer issue mentioned in another reply, this scenario is usually caused by data toggle mismatches. The correct response to a data toggle mismatch is for the host to receive the packet (ACK it) and then discard it, so you see exactly what you’re describing. One test of that would be for the device to continue sending packets. If the driver receives the second packet, and only the second packet, its a data toggle issue. If the driver eventually receives all packets including the first it’d be an end of transfer issue. Data toggle errors arise when both ends of the transfer (device and host controller) don’t agree on the data toggle which should be used for a data packet. One end has had its toggle cleared and the other hasn’t. It usually happens with userspace drivers which open the interface which had previously been used and the data toggle state is in an unknown state. Sending a ClearPipeStallBothEnds is a quick way to fix it. _______________________________________________ Do not post admin requests to the list. They will be ignored. Usb mailing list ([email protected]) Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/usb/archive%40mail-archive.com This email sent to [email protected]
