From patchwork Tue Jun 7 19:02:29 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 1773 Return-Path: Delivered-To: unknown Received: from imap.gmail.com (74.125.159.109) by localhost6.localdomain6 with IMAP4-SSL; 08 Jun 2011 14:55:43 -0000 Delivered-To: patches@linaro.org Received: by 10.52.181.10 with SMTP id ds10cs126919vdc; Tue, 7 Jun 2011 12:02:33 -0700 (PDT) Received: by 10.227.148.136 with SMTP id p8mr1702452wbv.28.1307473352681; Tue, 07 Jun 2011 12:02:32 -0700 (PDT) Received: from mnementh.archaic.org.uk (mnementh.archaic.org.uk [81.2.115.146]) by mx.google.com with ESMTPS id p18si13414607wbh.40.2011.06.07.12.02.32 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 07 Jun 2011 12:02:32 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of pm215@archaic.org.uk designates 81.2.115.146 as permitted sender) client-ip=81.2.115.146; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of pm215@archaic.org.uk designates 81.2.115.146 as permitted sender) smtp.mail=pm215@archaic.org.uk Received: from pm215 by mnementh.archaic.org.uk with local (Exim 4.72) (envelope-from ) id 1QU1Xp-0006hr-JU; Tue, 07 Jun 2011 20:02:29 +0100 From: Peter Maydell To: qemu-devel@nongnu.org Cc: patches@linaro.org, Gerd Hoffmann Subject: [PATCH] hw/usb-ohci.c: Ignore writes to HcPeriodCurrentED register Date: Tue, 7 Jun 2011 20:02:29 +0100 Message-Id: <1307473349-25756-1-git-send-email-peter.maydell@linaro.org> X-Mailer: git-send-email 1.7.2.5 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;