From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=60385 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PgEjH-0000lh-1v for qemu-devel@nongnu.org; Fri, 21 Jan 2011 06:00:34 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PgEjD-0004By-E0 for qemu-devel@nongnu.org; Fri, 21 Jan 2011 06:00:31 -0500 Received: from mtagate3.uk.ibm.com ([194.196.100.163]:46127) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PgEjD-0004B2-5p for qemu-devel@nongnu.org; Fri, 21 Jan 2011 06:00:27 -0500 Received: from d06nrmr1707.portsmouth.uk.ibm.com (d06nrmr1707.portsmouth.uk.ibm.com [9.149.39.225]) by mtagate3.uk.ibm.com (8.13.1/8.13.1) with ESMTP id p0LB0Pk2018241 for ; Fri, 21 Jan 2011 11:00:25 GMT Received: from d06av05.portsmouth.uk.ibm.com (d06av05.portsmouth.uk.ibm.com [9.149.37.229]) by d06nrmr1707.portsmouth.uk.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id p0LB0R4a1318966 for ; Fri, 21 Jan 2011 11:00:27 GMT Received: from d06av05.portsmouth.uk.ibm.com (loopback [127.0.0.1]) by d06av05.portsmouth.uk.ibm.com (8.14.4/8.13.1/NCO v10.0 AVout) with ESMTP id p0LB0OH0031613 for ; Fri, 21 Jan 2011 04:00:24 -0700 From: Stefan Hajnoczi Date: Fri, 21 Jan 2011 11:00:05 +0000 Message-Id: <1295607609-21091-1-git-send-email-stefanha@linux.vnet.ibm.com> Subject: [Qemu-devel] [PATCH v3 0/4] usb-msd: Add usb-storage, removable=on|off property List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Kevin Wolf , Christoph Hellwig , "Justin M. Forbes" Allow overriding the SCSI INQUIRY removable (RMB) bit for scsi-disk and usb-msd devices. In particular this addresses the problem that some usb-msd devices have the bit set while other do not have it set. Now the user can choose and get desired guest behavior. qemu -usb -drive if=none,file=test.img,cache=none,id=disk0 -device usb-storage,drive=disk0,removable=on The default is off. v3: * Document removable property in qdev-device-use.txt * Use bit number 0 instead of bit 1 for the qdev property v2: * Rewritten to override the bit at the scsi-disk level docs/qdev-device-use.txt | 13 +++++++++++-- hw/pci-hotplug.c | 2 +- hw/scsi-bus.c | 8 ++++++-- hw/scsi-disk.c | 3 +++ hw/scsi.h | 3 ++- hw/usb-msd.c | 4 +++- 6 files changed, 26 insertions(+), 7 deletions(-)