From b7b2a60b01036c6e7c21e7dc41829c7b5f6011b4 Mon Sep 17 00:00:00 2001 From: Gerd Hoffmann Date: Thu, 24 Jun 2021 12:38:33 +0200 Subject: usb: drop usb_host_dev_is_scsi_storage hook Introduce an usb device flag instead, set it when usb-host looks at the device descriptors anyway. Also set it for emulated storage devices, for consistency. Add an inline helper function to check the flag. Signed-off-by: Gerd Hoffmann Acked-by: David Gibson Reviewed-by: Jose R. Ziviani Message-Id: <20210624103836.2382472-32-kraxel@redhat.com> Signed-off-by: Paolo Bonzini --- hw/usb/dev-storage-bot.c | 1 + 1 file changed, 1 insertion(+) (limited to 'hw/usb/dev-storage-bot.c') diff --git a/hw/usb/dev-storage-bot.c b/hw/usb/dev-storage-bot.c index 6aad026d11..68ebaca10c 100644 --- a/hw/usb/dev-storage-bot.c +++ b/hw/usb/dev-storage-bot.c @@ -32,6 +32,7 @@ static void usb_msd_bot_realize(USBDevice *dev, Error **errp) usb_desc_create_serial(dev); usb_desc_init(dev); + dev->flags |= (1 << USB_DEV_FLAG_IS_SCSI_STORAGE); if (d->hotplugged) { s->dev.auto_attach = 0; } -- cgit 1.4.1