@@ -874,10 +874,14 @@ static void get_single_disk_info(int disk_number,
* if that doesn't hold since that suggests some other unexpected
* breakage
*/
- disk->pci_controller = get_pci_info(disk_number, &local_err);
- if (local_err) {
- error_propagate(errp, local_err);
- goto err_close;
+ if (disk->bus_type == GUEST_DISK_BUS_TYPE_USB) {
+ disk->pci_controller = get_empty_pci_address();
+ } else {
+ disk->pci_controller = get_pci_info(disk_number, &local_err);
+ if (local_err) {
+ error_propagate(errp, local_err);
+ goto err_close;
+ }
}
if (disk->bus_type == GUEST_DISK_BUS_TYPE_SCSI
|| disk->bus_type == GUEST_DISK_BUS_TYPE_IDE