Replace hard-coded USB vendor ID with macro definition.

This commit is contained in:
Martin Whitaker
2025-08-14 18:57:41 +01:00
parent dc16c99b2d
commit 01d924b27a
2 changed files with 5 additions and 1 deletions
+4
View File
@@ -87,6 +87,10 @@
#define HUB_PORT_LOW_SPEED 0x00000200
#define HUB_PORT_HIGH_SPEED 0x00000400
// Vendor IDs
#define USB_VID_AMERICAN_MEGATRENDS 0x046b
// Data structures.
typedef struct __attribute__((packed)) {
+1 -1
View File
@@ -170,7 +170,7 @@ static bool build_hub_info(const usb_hcd_t *hcd, const usb_hub_t *parent, int po
static void add_hub_quirks(const usb_device_desc_t *device, usb_hub_t *hub)
{
if ((device->vendor_id == 0x046b) && (device->product_id == 0xff01)) {
if ((device->vendor_id == USB_VID_AMERICAN_MEGATRENDS) && (device->product_id == 0xff01)) {
// add quirk for AMI Virtual Hub - see issue #523
hub->quirks |= USB_HUB_DONT_DISABLE_PORTS;
}