mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-03 07:43:54 -06:00
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 <kraxel@redhat.com> Acked-by: David Gibson <david@gibson.dropbear.id.au> Reviewed-by: Jose R. Ziviani <jziviani@suse.de> Message-Id: <20210624103836.2382472-32-kraxel@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
This commit is contained in:
parent
f0e48cbd79
commit
b7b2a60b01
7 changed files with 17 additions and 36 deletions
|
@ -219,6 +219,7 @@ enum USBDeviceFlags {
|
|||
USB_DEV_FLAG_IS_HOST,
|
||||
USB_DEV_FLAG_MSOS_DESC_ENABLE,
|
||||
USB_DEV_FLAG_MSOS_DESC_IN_USE,
|
||||
USB_DEV_FLAG_IS_SCSI_STORAGE,
|
||||
};
|
||||
|
||||
/* definition of a USB device */
|
||||
|
@ -465,7 +466,6 @@ void usb_generic_async_ctrl_complete(USBDevice *s, USBPacket *p);
|
|||
|
||||
/* usb-linux.c */
|
||||
void hmp_info_usbhost(Monitor *mon, const QDict *qdict);
|
||||
bool usb_host_dev_is_scsi_storage(USBDevice *usbdev);
|
||||
|
||||
/* usb ports of the VM */
|
||||
|
||||
|
@ -561,6 +561,11 @@ const char *usb_device_get_product_desc(USBDevice *dev);
|
|||
|
||||
const USBDesc *usb_device_get_usb_desc(USBDevice *dev);
|
||||
|
||||
static inline bool usb_device_is_scsi_storage(USBDevice *dev)
|
||||
{
|
||||
return dev->flags & (1 << USB_DEV_FLAG_IS_SCSI_STORAGE);
|
||||
}
|
||||
|
||||
/* quirks.c */
|
||||
|
||||
/* In bulk endpoints are streaming data sources (iow behave like isoc eps) */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue