« Previous | Next » 

Revision fd891c93

IDfd891c9318b112462e54ee1b3b16b074b8bec5b1

Added by Andriy Gapon over 12 years ago

usb-ohci: td.cbp incorrectly updated near page end

The current code that updates the cbp value after a transfer looks like this:
td.cbp += ret;
if ((td.cbp & 0xfff) + ret > 0xfff) {
<handle page overflow>
because the 'ret' value is effectively added twice the check may fire too early
when the overflow hasn't happened yet.

Below is one of the possible changes that correct the behavior:

Signed-off-by: Gerd Hoffmann <>

Files

  • added
  • modified
  • copied
  • renamed
  • deleted

View differences