fix(usb): scrub qemu strings from usb-net descriptors
This commit is contained in:
+1
-1
@@ -42,7 +42,7 @@ Against QEMU v11.1.2. Apply in numeric order.
|
|||||||
| `02-disk-identity` | `VIRTUAL_DISK`, `DISK_SERIAL` - `QEMU HARDDISK`, empty serials, SCSI inquiry strings |
|
| `02-disk-identity` | `VIRTUAL_DISK`, `DISK_SERIAL` - `QEMU HARDDISK`, empty serials, SCSI inquiry strings |
|
||||||
| `03-pci-ids` | `PCI_VENDOR`, `DEVICES` - Red Hat/QEMU vendor and subsystem IDs, ICH9 layout |
|
| `03-pci-ids` | `PCI_VENDOR`, `DEVICES` - Red Hat/QEMU vendor and subsystem IDs, ICH9 layout |
|
||||||
| `04-fw-cfg` | `QEMU_FW_CFG` - the fw_cfg device signature |
|
| `04-fw-cfg` | `QEMU_FW_CFG` - the fw_cfg device signature |
|
||||||
| `05-usb-hid` | `QEMU_USB` - USB HID descriptor strings |
|
| `05-usb-identity` | `QEMU_USB` - USB HID descriptor strings, and the usb-net CDC/RNDIS device-identity strings (keeps the `0525:a4a1` CDC id so generic CDC-ECM drivers still bind it) |
|
||||||
| `06-audio` | `DEVICES` - HDA codec and controller identity |
|
| `06-audio` | `DEVICES` - HDA codec and controller identity |
|
||||||
| `07-edid` | none. Carried for other detectors; VMAware does not read EDID. |
|
| `07-edid` | none. Carried for other detectors; VMAware does not read EDID. |
|
||||||
| `08-cpu-misc` | none. CPU feature plumbing and one upstream backport. |
|
| `08-cpu-misc` | none. CPU feature plumbing and one upstream backport. |
|
||||||
|
|||||||
@@ -1,11 +1,15 @@
|
|||||||
Subject: [PATCH] usb-hid: QEMU_USB
|
Subject: [PATCH] usb: QEMU_USB
|
||||||
|
|
||||||
Targets VMAware check: QEMU_USB
|
Targets VMAware check: QEMU_USB
|
||||||
|
|
||||||
USB HID descriptors carrying QEMU vendor strings and product IDs.
|
USB device identity strings that name QEMU: the HID descriptors (dev-hid.c)
|
||||||
|
and the usb-net CDC/RNDIS descriptors plus its RNDIS vendor-description and
|
||||||
|
product_desc (dev-network.c). The usb-net VID/PID (0525:a4a1, a real Linux
|
||||||
|
USB Ethernet Gadget id) is left intact so the device stays CDC-class and the
|
||||||
|
guest's generic CDC-ECM driver (e.g. macOS AppleUSBEthernet) still binds it.
|
||||||
|
|
||||||
Applies to QEMU v11.1.2. Apply from the source root with:
|
Applies to QEMU v11.1.2. Apply from the source root with:
|
||||||
patch -p1 < 05-usb-hid.patch
|
patch -p1 < 05-usb-identity.patch
|
||||||
|
|
||||||
---
|
---
|
||||||
diff --git a/hw/usb/dev-hid.c b/hw/usb/dev-hid.c
|
diff --git a/hw/usb/dev-hid.c b/hw/usb/dev-hid.c
|
||||||
@@ -109,3 +113,49 @@ index ae19d60..9fe1223 100644
|
|||||||
dc->vmsd = &vmstate_usb_kbd;
|
dc->vmsd = &vmstate_usb_kbd;
|
||||||
device_class_set_props(dc, usb_keyboard_properties);
|
device_class_set_props(dc, usb_keyboard_properties);
|
||||||
set_bit(DEVICE_CATEGORY_INPUT, dc->categories);
|
set_bit(DEVICE_CATEGORY_INPUT, dc->categories);
|
||||||
|
|
||||||
|
diff --git a/hw/usb/dev-network.c b/hw/usb/dev-network.c
|
||||||
|
--- a/hw/usb/dev-network.c
|
||||||
|
+++ b/hw/usb/dev-network.c
|
||||||
|
@@ -99,15 +99,15 @@
|
||||||
|
#define ETH_FRAME_LEN 1514 /* Max. octets in frame sans FCS */
|
||||||
|
|
||||||
|
static const USBDescStrings usb_net_stringtable = {
|
||||||
|
- [STRING_MANUFACTURER] = "QEMU",
|
||||||
|
- [STRING_PRODUCT] = "RNDIS/QEMU USB Network Device",
|
||||||
|
+ [STRING_MANUFACTURER] = "Linux",
|
||||||
|
+ [STRING_PRODUCT] = "USB Ethernet",
|
||||||
|
[STRING_ETHADDR] = "400102030405",
|
||||||
|
- [STRING_DATA] = "QEMU USB Net Data Interface",
|
||||||
|
- [STRING_CONTROL] = "QEMU USB Net Control Interface",
|
||||||
|
- [STRING_RNDIS_CONTROL] = "QEMU USB Net RNDIS Control Interface",
|
||||||
|
- [STRING_CDC] = "QEMU USB Net CDC",
|
||||||
|
- [STRING_SUBSET] = "QEMU USB Net Subset",
|
||||||
|
- [STRING_RNDIS] = "QEMU USB Net RNDIS",
|
||||||
|
+ [STRING_DATA] = "CDC Ethernet Data",
|
||||||
|
+ [STRING_CONTROL] = "CDC Ethernet Control",
|
||||||
|
+ [STRING_RNDIS_CONTROL] = "RNDIS Communications Control",
|
||||||
|
+ [STRING_CDC] = "CDC Ethernet",
|
||||||
|
+ [STRING_SUBSET] = "CDC Subset Ethernet",
|
||||||
|
+ [STRING_RNDIS] = "RNDIS Ethernet",
|
||||||
|
[STRING_SERIALNUMBER] = "1",
|
||||||
|
};
|
||||||
|
|
||||||
|
@@ -717,7 +717,7 @@
|
||||||
|
|
||||||
|
/* mandatory */
|
||||||
|
case OID_GEN_VENDOR_DESCRIPTION:
|
||||||
|
- pstrcpy((char *)outbuf, outlen, "QEMU USB RNDIS Net");
|
||||||
|
+ pstrcpy((char *)outbuf, outlen, "USB Ethernet");
|
||||||
|
return strlen((char *)outbuf) + 1;
|
||||||
|
|
||||||
|
case OID_GEN_VENDOR_DRIVER_VERSION:
|
||||||
|
@@ -1417,7 +1417,7 @@
|
||||||
|
USBDeviceClass *uc = USB_DEVICE_CLASS(klass);
|
||||||
|
|
||||||
|
uc->realize = usb_net_realize;
|
||||||
|
- uc->product_desc = "QEMU USB Network Interface";
|
||||||
|
+ uc->product_desc = "USB Ethernet Adapter";
|
||||||
|
uc->usb_desc = &desc_net;
|
||||||
|
uc->handle_reset = usb_net_handle_reset;
|
||||||
|
uc->handle_control = usb_net_handle_control;
|
||||||
Reference in New Issue
Block a user