| 509 | } |
| 510 | |
| 511 | bool BrcmPatchRAM::continuousRead() |
| 512 | { |
| 513 | IOReturn result; |
| 514 | |
| 515 | if ((result = mInterruptPipe.read(mReadBuffer, 0, 0, mReadBuffer->getLength(), &mInterruptCompletion)) != kIOReturnSuccess) { |
| 516 | AlwaysLog("[%04x:%04x]: continuousRead - Failed to queue read (0x%08x)\n", mVendorId, mProductId, result); |
| 517 | /* |
| 518 | * As a retry of the read operation has never been successful |
| 519 | * in case of an error during my tests, it's better to give up |
| 520 | * immediately, so that the next attempt can start all over. |
| 521 | */ |
| 522 | if (result == kIOUSBPipeStalled) |
| 523 | mInterruptPipe.clearStall(); |
| 524 | |
| 525 | return false; |
| 526 | } |
| 527 | return true; |
| 528 | } |
| 529 | |
| 530 | void BrcmPatchRAM::readCompletion(void* target, void* parameter, IOReturn status, uint32_t bytesTransferred) |
| 531 | { |
nothing calls this directly
no test coverage detected