Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions usb.c
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@ struct qdl_device_usb {
#define LIBUSB_ENDPOINT_TRANSFER_TYPE_BULK LIBUSB_TRANSFER_TYPE_BULK
#endif

static bool usb_is_edl_pid(uint16_t pid);

static bool usb_read_serial(struct libusb_device_handle *handle,
const struct libusb_device_descriptor *desc,
char *out, size_t out_len)
Expand Down Expand Up @@ -101,7 +103,7 @@ static int usb_try_open(libusb_device *dev, struct qdl_device_usb *qdl, const ch
/* Consider only devices with vid 0x0506 and known product id */
if (desc.idVendor != 0x05c6)
return 0;
if (desc.idProduct != 0x9008 && desc.idProduct != 0x900e && desc.idProduct != 0x901d)
if (!usb_is_edl_pid(desc.idProduct))
return 0;

ret = libusb_get_active_config_descriptor(dev, &config);
Expand Down Expand Up @@ -192,7 +194,7 @@ static int usb_try_open(libusb_device *dev, struct qdl_device_usb *qdl, const ch

static bool usb_is_edl_pid(uint16_t pid)
{
return pid == 0x9008 || pid == 0x900e || pid == 0x901d;
return pid == 0x9008 || pid == 0x900e || pid == 0x901d || pid == 0x90db;
}

static int usb_open(struct qdl_device *qdl, const char *serial)
Expand Down