X-Git-Url: https://sigrok.org/gitweb/?a=blobdiff_plain;f=src%2Fscpi%2Fscpi_usbtmc_libusb.c;h=3dd622a2e44829c007fda3670103508e4ff5eb1d;hb=refs%2Fheads%2Flibsigrok-0.4.x;hp=d7b7ef999b08bf9c3d2fbd558eb80a047f51141d;hpb=938bdc25b766125350ba1fd46f5f95fdc813fb32;p=libsigrok.git diff --git a/src/scpi/scpi_usbtmc_libusb.c b/src/scpi/scpi_usbtmc_libusb.c index d7b7ef99..3dd622a2 100644 --- a/src/scpi/scpi_usbtmc_libusb.c +++ b/src/scpi/scpi_usbtmc_libusb.c @@ -106,6 +106,7 @@ static struct usbtmc_blacklist blacklist_remote[] = { { 0x1ab1, 0x0588 }, /* Rigol DS1000 series */ { 0x1ab1, 0x04b0 }, /* Rigol DS2000 series */ { 0x0957, 0x0588 }, /* Agilent DSO1000 series (rebadged Rigol DS1000) */ + { 0x0b21, 0xffff }, /* All Yokogawa devices */ ALL_ZERO }; @@ -192,7 +193,8 @@ static int check_usbtmc_blacklist(struct usbtmc_blacklist *blacklist, int i; for (i = 0; blacklist[i].vid; i++) { - if (blacklist[i].vid == vid && blacklist[i].pid == pid) + if ((blacklist[i].vid == vid && blacklist[i].pid == 0xFFFF) || + (blacklist[i].vid == vid && blacklist[i].pid == pid)) return TRUE; } @@ -622,26 +624,11 @@ static int scpi_usbtmc_libusb_close(struct sr_scpi_dev_inst *scpi) { struct scpi_usbtmc_libusb *uscpi = scpi->priv; struct sr_usb_dev_inst *usb = uscpi->usb; - struct libusb_device *dev; - struct libusb_device_descriptor des; int ret; if (!usb->devhdl) return SR_ERR; - dev = libusb_get_device(usb->devhdl); - libusb_get_device_descriptor(dev, &des); - if (des.idVendor == 0x1ab1 && des.idProduct == 0x0588 - && scpi->firmware_version >= 24) { - /* Rigol DS1000 with firmware > 0.2.4 needs this. */ - if ((ret = libusb_clear_halt(usb->devhdl, uscpi->bulk_in_ep)) < 0) - sr_err("Failed to clear halt/stall condition for EP %d: %s.", - uscpi->bulk_out_ep, libusb_error_name(ret)); - if ((ret = libusb_clear_halt(usb->devhdl, uscpi->bulk_out_ep)) < 0) - sr_err("Failed to clear halt/stall condition for EP %d: %s.", - uscpi->bulk_out_ep, libusb_error_name(ret)); - } - scpi_usbtmc_local(uscpi); if ((ret = libusb_release_interface(usb->devhdl, uscpi->interface)) < 0)