Commit 7c00af4
Ocean: Filter by endpoint address on the SuperSpeed companion-descriptor path too
Summary:
Inside the per-endpoint loop of `determineIsochronousTransferLayout()` only the fallback branch checked the endpoint address. The SuperSpeed branch assigned `endpointPacketSize = endpointCompanionDescriptor->wBytesPerInterval` for whichever endpoint it was looking at, with no address check and no `break`.
On a SuperSpeed link every endpoint carries a companion descriptor, so that branch is the one taken for all of them and the loop simply kept overwriting the value. The packet size therefore came from the *last* endpoint of the altsetting rather than from the one whose `bEndpointAddress` matches the requested `endpointAddress`, which the header documents as "The address of the endpoint on which the transfer will happen".
The address filter is now applied once, ahead of both branches, and the loop breaks after either has determined the size. With the usual single-endpoint UVC altsetting nothing changes, which is why this stayed unnoticed; it matters when a streaming altsetting also exposes a still-image endpoint.
___
Differential Revision: D115344628
fbshipit-source-id: 41b3ec4272c51f2322bec198b86325f3b8c56d821 parent 2c5ecf0 commit 7c00af4
1 file changed
Lines changed: 16 additions & 11 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
549 | 549 | | |
550 | 550 | | |
551 | 551 | | |
| 552 | + | |
| 553 | + | |
| 554 | + | |
| 555 | + | |
| 556 | + | |
| 557 | + | |
| 558 | + | |
552 | 559 | | |
553 | 560 | | |
554 | 561 | | |
| |||
559 | 566 | | |
560 | 567 | | |
561 | 568 | | |
562 | | - | |
563 | | - | |
564 | | - | |
565 | | - | |
| 569 | + | |
| 570 | + | |
566 | 571 | | |
567 | | - | |
| 572 | + | |
568 | 573 | | |
569 | | - | |
570 | | - | |
| 574 | + | |
| 575 | + | |
571 | 576 | | |
572 | | - | |
| 577 | + | |
573 | 578 | | |
574 | | - | |
575 | | - | |
576 | | - | |
| 579 | + | |
577 | 580 | | |
| 581 | + | |
| 582 | + | |
578 | 583 | | |
579 | 584 | | |
580 | 585 | | |
| |||
0 commit comments