All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Alex Bennée" <alex.bennee@linaro.org>
To: David Hubbard <dmamfmgm@gmail.com>
Cc: qemu-devel@nongnu.org,  Peter Maydell <peter.maydell@linaro.org>,
	Philippe Mathieu-Daude <philmd@linaro.org>,
	 Michael Tokarev <mjt@tls.msk.ru>,
	 Gerd Hoffmann <kraxel@redhat.com>
Subject: Re: [PATCH] hw/usb/hcd-ohci: Fix ohci_service_td: accept valid TDs
Date: Thu, 30 May 2024 20:14:50 +0100	[thread overview]
Message-ID: <87ikyvcdsl.fsf@draig.linaro.org> (raw)
In-Reply-To: <20240520232634.317988-1-dmamfmgm@gmail.com> (David Hubbard's message of "Mon, 20 May 2024 18:26:34 -0500")

David Hubbard <dmamfmgm@gmail.com> writes:

> From: Cord Amfmgm <dmamfmgm@gmail.com>
>
> This changes the way the ohci emulation handles a Transfer Descriptor with
> "Current Buffer Pointer" set to "Buffer End" + 1.
>
> The OHCI spec 4.3.1.2 Table 4-2 allows td.cbp to be one byte more than td.be
> to signal the buffer has zero length. Currently qemu only accepts zero-length
> Transfer Descriptors if the td.cbp is equal to 0, while actual OHCI hardware
> accepts both cases.

Which version of the OHCI spec is this? I can't find it in the one copy
Google throws up:

  http://download.microsoft.com/download/1/6/1/161ba512-40e2-4cc9-843a-923143f3456c/ohci_11.pdf

> The qemu ohci emulation has a regression in ohci_service_td. Version 4.2
> and earlier matched the spec. (I haven't taken the time to bisect exactly
> where the logic was changed.)
>
> With a tiny OS[1] that boots and executes a test, the issue can be seen:
>
> * OS that sends USB requests to a USB mass storage device
>   but sends td.cbp = td.be + 1
> * qemu 4.2
> * qemu HEAD (4e66a0854)
> * Actual OHCI controller (hardware)
<snip>

-- 
Alex Bennée
Virtualisation Tech Lead @ Linaro


  parent reply	other threads:[~2024-05-30 19:15 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-05-20 23:26 [PATCH] hw/usb/hcd-ohci: Fix ohci_service_td: accept valid TDs David Hubbard
2024-05-30 15:05 ` Peter Maydell
2024-05-30 19:14 ` Alex Bennée [this message]
2024-05-30 21:14   ` Cord Amfmgm
2024-05-31 13:59 ` Alex Bennée
2024-06-12 17:17   ` Cord Amfmgm
2024-06-12 19:36     ` Alex Bennée
2024-06-12 19:48       ` Cord Amfmgm
2024-06-21 15:20       ` Peter Maydell
2024-06-21 16:24         ` Cord Amfmgm
2024-06-21 17:16           ` Peter Maydell
2024-05-31 14:03 ` Peter Maydell
2024-05-31 18:16   ` Cord Amfmgm
2024-06-07 13:23     ` Peter Maydell
2024-06-08 15:19       ` Cord Amfmgm
  -- strict thread matches above, loose matches on Subject: below --
2024-05-20 23:24 David Hubbard
2024-05-20 23:26 ` Cord Amfmgm

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=87ikyvcdsl.fsf@draig.linaro.org \
    --to=alex.bennee@linaro.org \
    --cc=dmamfmgm@gmail.com \
    --cc=kraxel@redhat.com \
    --cc=mjt@tls.msk.ru \
    --cc=peter.maydell@linaro.org \
    --cc=philmd@linaro.org \
    --cc=qemu-devel@nongnu.org \
    /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.