aboutsummaryrefslogtreecommitdiff
path: root/scripts/qapi/schema.py
diff options
context:
space:
mode:
authorFinn Thain <fthain@telegraphics.com.au>2020-01-29 20:27:49 +1100
committerJason Wang <jasowang@redhat.com>2020-03-03 18:04:47 +0800
commit350e7d9a77d3b9ac74d240e4b232db1ebe5c05bc (patch)
treece5513fd8a167f350f787279f52310ef9fe40d84 /scripts/qapi/schema.py
parentea2270279bc2e1635cb6e909e22e17e630198773 (diff)
downloadqemu-350e7d9a77d3b9ac74d240e4b232db1ebe5c05bc.zip
qemu-350e7d9a77d3b9ac74d240e4b232db1ebe5c05bc.tar.gz
qemu-350e7d9a77d3b9ac74d240e4b232db1ebe5c05bc.tar.bz2
dp8393x: Pad frames to word or long word boundary
The existing code has a bug where the Remaining Buffer Word Count (RBWC) is calculated with a truncating division, which gives the wrong result for odd-sized packets. Section 1.4.1 of the datasheet says, Once the end of the packet has been reached, the serializer will fill out the last word (16-bit mode) or long word (32-bit mode) if the last byte did not end on a word or long word boundary respectively. The fill byte will be 0FFh. Implement buffer padding so that buffer limits are correctly enforced. Signed-off-by: Finn Thain <fthain@telegraphics.com.au> Tested-by: Laurent Vivier <laurent@vivier.eu> Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com> Signed-off-by: Jason Wang <jasowang@redhat.com>
Diffstat (limited to 'scripts/qapi/schema.py')
0 files changed, 0 insertions, 0 deletions