aboutsummaryrefslogtreecommitdiff
path: root/hw/usb
diff options
context:
space:
mode:
authorKevin Wolf <kwolf@redhat.com>2024-01-31 14:06:07 +0100
committerKevin Wolf <kwolf@redhat.com>2024-02-07 15:25:13 +0100
commit3089637461693837cafd2709ef36d0cf6a4a8ed8 (patch)
treea1ff7ba7bdacc0fe4d7141577f922a3accb62ddf /hw/usb
parentb3d9bb9a560316b125dae5fb18924523d004d3dd (diff)
downloadqemu-3089637461693837cafd2709ef36d0cf6a4a8ed8.zip
qemu-3089637461693837cafd2709ef36d0cf6a4a8ed8.tar.gz
qemu-3089637461693837cafd2709ef36d0cf6a4a8ed8.tar.bz2
scsi: Don't ignore most usb-storage properties
usb-storage is for the most part just a wrapper around an internally created scsi-disk device. It uses DEFINE_BLOCK_PROPERTIES() to offer all of the usual block device properties to the user, but then only forwards a few select properties to the internal device while the rest is silently ignored. This changes scsi_bus_legacy_add_drive() to accept a whole BlockConf instead of some individual values inside of it so that usb-storage can now pass the whole configuration to the internal scsi-disk. This enables the remaining block device properties, e.g. logical/physical_block_size or discard_granularity. Buglink: https://issues.redhat.com/browse/RHEL-22375 Signed-off-by: Kevin Wolf <kwolf@redhat.com> Message-ID: <20240131130607.24117-1-kwolf@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Diffstat (limited to 'hw/usb')
-rw-r--r--hw/usb/dev-storage-classic.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/hw/usb/dev-storage-classic.c b/hw/usb/dev-storage-classic.c
index 84d1975..50a3ad6 100644
--- a/hw/usb/dev-storage-classic.c
+++ b/hw/usb/dev-storage-classic.c
@@ -67,10 +67,7 @@ static void usb_msd_storage_realize(USBDevice *dev, Error **errp)
scsi_bus_init(&s->bus, sizeof(s->bus), DEVICE(dev),
&usb_msd_scsi_info_storage);
scsi_dev = scsi_bus_legacy_add_drive(&s->bus, blk, 0, !!s->removable,
- s->conf.bootindex, s->conf.share_rw,
- s->conf.rerror, s->conf.werror,
- dev->serial,
- errp);
+ &s->conf, dev->serial, errp);
blk_unref(blk);
if (!scsi_dev) {
return;