diff mbox

Problems with USB Mass Storage emulation

Message ID 4AC06304.4050506@redhat.com
State Superseded
Headers show

Commit Message

Gerd Hoffmann Sept. 28, 2009, 7:17 a.m. UTC
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 <kraxel@redhat.com>
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 mbox

Patch

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