From patchwork Mon Sep 28 07:17:24 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: Problems with USB Mass Storage emulation Date: Sun, 27 Sep 2009 21:17:24 -0000 From: Gerd Hoffmann X-Patchwork-Id: 34369 Message-Id: <4AC06304.4050506@redhat.com> To: Dmitri Vorobiev Cc: qemu-devel@nongnu.org On 09/26/09 18:42, Dmitri Vorobiev wrote: > Hello, > > We tried to use an emulated USB Mass Storage device with my QEMU-emulated > system (Debian GNU/Linux, MIPS architecture, but the same problem is > present also for a similar x86 version). fdisk(1) works fine. However, > when formatting is going on or a big file is being copied into the > USB-MS partition, some errors occur and the system starts working > extremely slowly. qemu emulates usb 1.1, which *is* slow. Attached patch gets usb-storage going for me, but I'd classify it as 'hack', not as 'fix'. Fixing it for real would be adding usb 2.0 supprt to qemu. Or fix the linux kernel to deal with usb 1.1 more sanely, which is probably just adjusting the scsi timeouts to the device speed ... cheers, Gerd >From 540a948fed07ef3e686097083f078b4803939fb4 Mon Sep 17 00:00:00 2001 From: Gerd Hoffmann Date: Tue, 8 Sep 2009 13:53:15 +0200 Subject: [PATCH] make usb 1.1 go insane fast --- hw/usb-uhci.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/hw/usb-uhci.c b/hw/usb-uhci.c index 6807413..3a770e5 100644 --- a/hw/usb-uhci.c +++ b/hw/usb-uhci.c @@ -63,7 +63,7 @@ #define UHCI_PORT_CSC (1 << 1) #define UHCI_PORT_CCS (1 << 0) -#define FRAME_TIMER_FREQ 1000 +#define FRAME_TIMER_FREQ 100000 #define FRAME_MAX_LOOPS 100