diff options
author | Andriy Gapon <avg@FreeBSD.org> | 2011-12-22 11:34:30 +0200 |
---|---|---|
committer | Gerd Hoffmann <kraxel@redhat.com> | 2012-01-06 12:36:14 +0100 |
commit | fd891c9318b112462e54ee1b3b16b074b8bec5b1 (patch) | |
tree | a2c97b4385d2b67d012c2cad9e023f79352fefcd /hw/usb-bt.c | |
parent | c75fead66e25b35b867b661ee92087dc245a48c9 (diff) |
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 <kraxel@redhat.com>
Diffstat (limited to 'hw/usb-bt.c')
0 files changed, 0 insertions, 0 deletions