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: Paul Zimmerman
Subject: Re: Failure prints during format or mounting a usb storage device
Date: Wed, 8 Jul 2020 23:02:47 -0700



On Wed, Jul 8, 2020 at 3:30 AM Gerd Hoffmann <kraxel@redhat.com> wrote:
  Hi,

> IIRC, without the dev-storage patch, the very first SCSI command
> would get stuck waiting for the CSW, because the CSW is not a
> multiple of MPS. I will have to work on getting a debug trace for
> you, I'll get back to you with that.

Hmm, dev-storage should be fine with the packet being larger than
needed.  It'll actually do a short transfer then.  So I suspect the
patch just papers over the underlying issue.

Can you post a trace of this?

(dev-storage has no trace support, so I think tracing usb_dwc2* to
 stderr and enable DEBUG_MSD in dev-storage.c works best)

take care,
  Gerd


Attached is the log with the dev-storage patch reverted. The full log
was *huge*, so I had to strip out a lot of the content manually.

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. Then the MSD defers the packet,
even though the full 36 bytes has already been received.

Starting at line 1781 (I trimmed out a bunch of lines with no activity
on the MSD here) I think the guest USB driver times out the transfer and
does a reset of the MSD. Notice a few lines later the packet status
return value is USB_RET_STALL.

After this, there is no further activity on the MSD.

Thanks,
Paul

Attachment: stderr.log.gz
Description: application/gzip


reply via email to

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