usbtmc: add the Siglent VID and reset USB devices in open

Add the Siglent's VID to a list of blacklisted USB TMC devices.
Unconditionally reset USB devices in the open routine.

This was taken from marchel's development for Siglent SDS. Though the
reset should probably be conditional, and only get applied to devices
which are known to need it.

The comment may need adjustment, maybe individual PID entries are
required. The VID probably not only applies to SDS devices, but could
be used for SDG and other gear as well. And lsusb output suggests the
VID is used by Atten, too.
This commit is contained in:
Gerhard Sittig 2018-02-11 16:30:34 +01:00 committed by Uwe Hermann
parent b33606718c
commit 9a4cc7dd38
1 changed files with 3 additions and 0 deletions

View File

@ -107,6 +107,7 @@ static struct usbtmc_blacklist blacklist_remote[] = {
{ 0x1ab1, 0x04b0 }, /* Rigol DS2000 series */
{ 0x0957, 0x0588 }, /* Agilent DSO1000 series (rebadged Rigol DS1000) */
{ 0x0b21, 0xffff }, /* All Yokogawa devices */
{ 0xf4ec, 0xffff }, /* All Siglent SDS devices */
ALL_ZERO
};
@ -370,6 +371,8 @@ static int scpi_usbtmc_libusb_open(struct sr_scpi_dev_inst *scpi)
return SR_ERR;
}
libusb_reset_device(usb->devhdl);
/* Get capabilities. */
ret = libusb_control_transfer(usb->devhdl, LIBUSB_ENDPOINT_IN |
LIBUSB_REQUEST_TYPE_CLASS | LIBUSB_RECIPIENT_INTERFACE,