From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:58472) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QU1Xv-0007V3-7X for qemu-devel@nongnu.org; Tue, 07 Jun 2011 15:02:37 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QU1Xt-0004OM-E7 for qemu-devel@nongnu.org; Tue, 07 Jun 2011 15:02:34 -0400 Received: from mnementh.archaic.org.uk ([81.2.115.146]:39252) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QU1Xt-0004OD-2r for qemu-devel@nongnu.org; Tue, 07 Jun 2011 15:02:33 -0400 From: Peter Maydell Date: Tue, 7 Jun 2011 20:02:29 +0100 Message-Id: <1307473349-25756-1-git-send-email-peter.maydell@linaro.org> Subject: [Qemu-devel] [PATCH] hw/usb-ohci.c: Ignore writes to HcPeriodCurrentED register List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Gerd Hoffmann , patches@linaro.org 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 --- 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