OSDN Git Service

usb-mtp: Reallocate buffer in multiples of MTP_WRITE_BUF_SZ
authorBandan Das <bsd@redhat.com>
Tue, 29 Jan 2019 13:19:06 +0000 (08:19 -0500)
committerGerd Hoffmann <kraxel@redhat.com>
Wed, 30 Jan 2019 05:47:52 +0000 (06:47 +0100)
commit179fcf8a83a91c74e323b1fe1b5397520a8af047
tree2548aca0f2af6bcba6f1b1a89df89013f43bf606
parentb4329d1a2a42d3c49ac4b76ec86b6c9db19ea1e9
usb-mtp: Reallocate buffer in multiples of MTP_WRITE_BUF_SZ

This is a "pre-patch" to breaking up the write buffer for
MTP writes. Instead of allocating a mtp buffer equal to size
sent by the initiator, we start with a small size and reallocate
multiples (of that small size) as needed.

Signed-off-by: Bandan Das <bsd@redhat.com>
Message-id: 20190129131908.27924-2-bsd@redhat.com
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
hw/usb/dev-mtp.c