Re: [PATCH v2 0/1] MR11355: winebus: Set HID product name from the USB descriptor interface, if any
On Tue Jul 28 15:20:26 2026 +0000, Connor McAdams wrote:
perhaps we can add a `get_device_subsystem_info(dev, "usb", NULL, &desc, &bus);` call before "usb_device" if that's what is causing us to skip to the parent. The particular sysattr value being queried here comes from the `usb` subsystem/`usb_iface` devtype, we already do some special behavior in `get_device_subsystem_info()` when `usb` is passed in. IMO if we're already doing special handling like:
if (!strcmp(subsystem, "usb") && *bus != BUS_BLUETOOTH) { if ((tmp = udev_device_get_sysattr_value(parent, "manufacturer"))) ntdll_umbstowcs(tmp, strlen(tmp) + 1, desc->manufacturer, ARRAY_SIZE(desc->manufacturer)); if ((tmp = udev_device_get_sysattr_value(parent, "product"))) ntdll_umbstowcs(tmp, strlen(tmp) + 1, desc->product, ARRAY_SIZE(desc->product)); if ((tmp = udev_device_get_sysattr_value(parent, "serial"))) ntdll_umbstowcs(tmp, strlen(tmp) + 1, desc->serialnumber, ARRAY_SIZE(desc->serialnumber)); }in there, we could potentially just add a `usb_iface = udev_device_get_parent_with_subsystem_devtype(dev, "usb", "usb_interface")` query inside of there, and if `udev_device_get_sysattr_value(usb_iface, "interface")` returns a string, use that for `desc->product` instead of `udev_device_get_sysattr_value(parent, "product")`? I can move this to `get_device_subsystem_info`, but @cmcadams has a rework for this whole area that fixes this problem, so not sure if there's a point if it's all about to be replaced anyways?
-- https://gitlab.winehq.org/wine/wine/-/merge_requests/11355#note_147008
participants (1)
-
Ryszard Knop (@DragoonAethis)