* [Qemu-devel] [PATCH] hw/usb-ohci.c: Ignore writes to HcPeriodCurrentED register
@ 2011-06-07 19:02 Peter Maydell
2011-06-08 8:09 ` Gerd Hoffmann
0 siblings, 1 reply; 2+ messages in thread
From: Peter Maydell @ 2011-06-07 19:02 UTC (permalink / raw)
To: qemu-devel; +Cc: Gerd Hoffmann, patches
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
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2011-06-08 8:09 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-06-07 19:02 [Qemu-devel] [PATCH] hw/usb-ohci.c: Ignore writes to HcPeriodCurrentED register Peter Maydell
2011-06-08 8:09 ` Gerd Hoffmann
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).