Blame SOURCES/kvm-qga-linux-add-usb-support-to-guest-get-fsinfo.patch

ed5979
From 48f45171b89b8ed24f2b2484d63b00ea7818b5c3 Mon Sep 17 00:00:00 2001
ed5979
From: Kfir Manor <kfir@daynix.com>
ed5979
Date: Sun, 22 Jan 2023 17:33:07 +0200
ed5979
Subject: [PATCH 9/9] qga/linux: add usb support to guest-get-fsinfo
ed5979
ed5979
RH-Author: Kostiantyn Kostiuk <kkostiuk@redhat.com>
ed5979
RH-MergeRequest: 140: qga/linux: add usb support to guest-get-fsinfo
ed5979
RH-Bugzilla: 2149191
ed5979
RH-Acked-by: Miroslav Rezanina <mrezanin@redhat.com>
ed5979
RH-Acked-by: yvugenfi <None>
ed5979
RH-Commit: [1/1] bae929a2d0d0ad20e7308ede69c26499fc2119c7 (kostyanf14/redhat_centos-stream_src_qemu-kvm)
ed5979
ed5979
Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=2149191
ed5979
Upstream patch: https://patchew.org/QEMU/20230122153307.1050593-1-kfir@daynix.com/
ed5979
ed5979
Signed-off-by: Kfir Manor <kfir@daynix.com>
ed5979
Reviewed-by: Konstantin Kostiuk <kkostiuk@redhat.com>
ed5979
Signed-off-by: Konstantin Kostiuk <kkostiuk@redhat.com>
ed5979
---
ed5979
 qga/commands-posix.c | 6 +++++-
ed5979
 1 file changed, 5 insertions(+), 1 deletion(-)
ed5979
ed5979
diff --git a/qga/commands-posix.c b/qga/commands-posix.c
ed5979
index 32493d6383..f1b2b87c13 100644
ed5979
--- a/qga/commands-posix.c
ed5979
+++ b/qga/commands-posix.c
ed5979
@@ -877,7 +877,9 @@ static bool build_guest_fsinfo_for_pci_dev(char const *syspath,
ed5979
                        g_str_equal(driver, "sym53c8xx") ||
ed5979
                        g_str_equal(driver, "virtio-pci") ||
ed5979
                        g_str_equal(driver, "ahci") ||
ed5979
-                       g_str_equal(driver, "nvme"))) {
ed5979
+                       g_str_equal(driver, "nvme") ||
ed5979
+                       g_str_equal(driver, "xhci_hcd") ||
ed5979
+                       g_str_equal(driver, "ehci-pci"))) {
ed5979
             break;
ed5979
         }
ed5979
 
ed5979
@@ -974,6 +976,8 @@ static bool build_guest_fsinfo_for_pci_dev(char const *syspath,
ed5979
         }
ed5979
     } else if (strcmp(driver, "nvme") == 0) {
ed5979
         disk->bus_type = GUEST_DISK_BUS_TYPE_NVME;
ed5979
+    } else if (strcmp(driver, "ehci-pci") == 0 || strcmp(driver, "xhci_hcd") == 0) {
ed5979
+        disk->bus_type = GUEST_DISK_BUS_TYPE_USB;
ed5979
     } else {
ed5979
         g_debug("unknown driver '%s' (sysfs path '%s')", driver, syspath);
ed5979
         goto cleanup;
ed5979
-- 
ed5979
2.31.1
ed5979