All of lore.kernel.org
 help / color / mirror / Atom feed
From: Gerd Hoffmann <kraxel@redhat.com>
To: Paul Zimmerman <pauldzim@gmail.com>
Cc: Sai Pavan Boddu <saipava@xilinx.com>,
	Peter Maydell <peter.maydell@linaro.org>,
	"qemu-devel@nongnu.org" <qemu-devel@nongnu.org>,
	Vikram Garhwal <fnuv@xilinx.com>
Subject: Re: Failure prints during format or mounting a usb storage device
Date: Wed, 8 Jul 2020 09:29:47 +0200	[thread overview]
Message-ID: <20200708072947.7hynrm53622tp3ha@sirius.home.kraxel.org> (raw)
In-Reply-To: <CADBGO79KSm3KV7=otOg=u7WjwBV=j3T7iU0fcTF-nGgtZvy+Aw@mail.gmail.com>

  Hi,

> > Why does 7ad3d51ebb8a522ffcad391c4bef281245739dde look at short-not-ok?
> 
> Because the patch changes dev-storage to terminate the transfer if a
> short packet is received, so I figured 'short-not-ok' should affect
> that behavior.

I don't think so.  dev-storage should not need to look at short-not-ok.

> I guess instead I could add another flag that only hcd-dwc2 sets. Does
> that sound OK to you?

Sounds like that'll be another workaround.  dev-storage should not need
to know what kind of host adapter is used ...

A usb-storage transfer looks like this:

  (1) out transfer with the command (USB_MSDM_CBW)
  (2) data transfer, might be:
      - out (USB_MSDM_DATAOUT) for writes, or
      - in (USB_MSDM_DATAIN) for reads, or
      - nothing.
      depending on the scsi command.
  (3) in transfer with the status (USB_MSDM_CSW).

(1) and (3) usually fit into a single usb packet.
(2) can be multiple usb packets.

The critical case seem to be reads, i.e. we have in transfers for
both (2) and (3), and the transition from USB_MSDM_DATAIN state to
USB_MSDM_CSW state.

What is the sequence of usb packets submitted by the guest to hcd-dwc2
for reads?  Where exactly does it expect a short transfer?

take care,
  Gerd



  reply	other threads:[~2020-07-08 23:35 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-04 18:21 Failure prints during format or mounting a usb storage device Sai Pavan Boddu
2020-07-04 18:24 ` Paul Zimmerman
2020-07-06 22:21   ` Paul Zimmerman
2020-07-06 23:12     ` Paul Zimmerman
2020-07-07  7:57       ` Gerd Hoffmann
2020-07-07 20:23         ` Paul Zimmerman
2020-07-08  7:29           ` Gerd Hoffmann [this message]
2020-07-08  7:57             ` Paul Zimmerman
2020-07-08 10:29               ` Gerd Hoffmann
2020-07-09  6:02                 ` Paul Zimmerman
2020-07-09  7:57                   ` Gerd Hoffmann
2020-07-09 21:55                     ` Paul Zimmerman

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200708072947.7hynrm53622tp3ha@sirius.home.kraxel.org \
    --to=kraxel@redhat.com \
    --cc=fnuv@xilinx.com \
    --cc=pauldzim@gmail.com \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-devel@nongnu.org \
    --cc=saipava@xilinx.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.