]> sigrok.org Git - libsigrok.git/commitdiff
scpi_usbtmc_libusb: remove libusb_clear_halt() hack which is not useful anymore
authorAurelien Jacobs <redacted>
Tue, 22 Sep 2015 22:30:06 +0000 (00:30 +0200)
committerUwe Hermann <redacted>
Sat, 24 Oct 2015 20:11:38 +0000 (22:11 +0200)
src/scpi/scpi_usbtmc_libusb.c

index d7b7ef999b08bf9c3d2fbd558eb80a047f51141d..9f49dd1d2ea8ec2e8f2fd7446b4df1852eb232c0 100644 (file)
@@ -622,26 +622,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)