From: Peter Maydell <peter.maydell@linaro.org>
To: qemu-devel@nongnu.org
Cc: Gerd Hoffmann <kraxel@redhat.com>, patches@linaro.org
Subject: [Qemu-devel] [PATCH] hw/usb-ohci.c: Ignore writes to HcPeriodCurrentED register
Date: Tue, 7 Jun 2011 20:02:29 +0100 [thread overview]
Message-ID: <1307473349-25756-1-git-send-email-peter.maydell@linaro.org> (raw)
HcPeriodCurrentED is read-only, but Linux writes to it anyway; silently
ignore this rather than printing a warning message.
(Specifically, drivers/usb/host/ohci-hub.c:ohci_rh_resume() writes a
0, in at least kernels 2.6.25 through 2.6.39.)
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
---
LXR reference for your convenience:
http://lxr.free-electrons.com/source/drivers/usb/host/ohci-hub.c#L209
I'm not sure what the consensus is for cases like this where QEMU's correct
to warn about dodgy device access but a popular operating system(tm) does
them anyway. Suppressing the warning seems a bit more user-friendly to
the average QEMU user...
hw/usb-ohci.c | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
diff --git a/hw/usb-ohci.c b/hw/usb-ohci.c
index 347814e..23a5e66 100644
--- a/hw/usb-ohci.c
+++ b/hw/usb-ohci.c
@@ -1591,6 +1591,10 @@ static void ohci_mem_write(void *ptr, target_phys_addr_t addr, uint32_t val)
ohci->hcca = val & OHCI_HCCA_MASK;
break;
+ case 7: /* HcPeriodCurrentED */
+ /* Ignore writes to this read-only register, Linux does them */
+ break;
+
case 8: /* HcControlHeadED */
ohci->ctrl_head = val & OHCI_EDPTR_MASK;
break;
--
1.7.1
next reply other threads:[~2011-06-07 19:02 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-06-07 19:02 Peter Maydell [this message]
2011-06-08 8:09 ` [Qemu-devel] [PATCH] hw/usb-ohci.c: Ignore writes to HcPeriodCurrentED register Gerd Hoffmann
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=1307473349-25756-1-git-send-email-peter.maydell@linaro.org \
--to=peter.maydell@linaro.org \
--cc=kraxel@redhat.com \
--cc=patches@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).