qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Failure prints during format or mounting a usb storage device


From: Gerd Hoffmann
Subject: Re: Failure prints during format or mounting a usb storage device
Date: Thu, 9 Jul 2020 09:57:02 +0200

> Starting at line 1746 is the first CBW, it's for an Inquiry command.
> 
> Starting at line 1759 is the response, notice at line 1761 the MSD debug
> says "Data in 64/36", which is strange.

Not really.  First is the packet size, second is the (remaining) data
size.  Inquiry data is 36 bytes, and dwc2 uses 64 byte instead of 36
byte transfers.

> Then the MSD defers the packet, even though the full 36 bytes has
> already been received.

Yes, and this is the problem.  The condition checks whenever there is
room left in the usb packet.  But we should also check whenever there
is actually more data pending, so how about this:

    if (p->actual_length < p->iov.size && s->mode == USB_MSDM_DATAIN) {
        DPRINTF("Deferring packet %p [wait data-in]\n", p);

take care,
  Gerd




reply via email to

[Prev in Thread] Current Thread [Next in Thread]