static void usbredir_buffered_bulk_in_complete_raw(USBRedirDevice *dev,
    USBPacket *p, uint8_t ep)
{
    struct buf_packet *bulkp;
    int count;

    while ((bulkp = QTAILQ_FIRST(&dev->endpoint[EP2I(ep)].bufpq)) &&
           p->actual_length < p->iov.size && p->status == USB_RET_SUCCESS) {
        count = bulkp->len - bulkp->offset;
        if (count > (p->iov.size - p->actual_length)) {
            count = p->iov.size - p->actual_length;
        }
        usbredir_buffered_bulk_add_data_to_packet(dev, bulkp, count, p, ep);
    }
}
static void usbredir_buffered_bulk_in_complete_raw(USBRedirDevice *dev,
    USBPacket *p, uint8_t ep)
{
    struct buf_packet *bulkp;
    int count;

    while ((bulkp = QTAILQ_FIRST(&dev->endpoint[EP2I(ep)].bufpq)) &&
           p->actual_length < p->iov.size && p->status == USB_RET_SUCCESS) {
        count = bulkp->len - bulkp->offset;
        if (count > (p->iov.size - p->actual_length)) {
            count = p->iov.size - p->actual_length;
        }
        usbredir_buffered_bulk_add_data_to_packet(dev, bulkp, count, p, ep);
    }
}