scpi_usbtmc_libusb: disable all clear_halt for Rigol DS1000
This commit is contained in:
parent
50e6311a1b
commit
f589a6d499
|
@ -270,12 +270,12 @@ static int scpi_usbtmc_libusb_open(void *priv)
|
||||||
return SR_ERR;
|
return SR_ERR;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!uscpi->rigol_ds1000) {
|
||||||
if ((ret = libusb_clear_halt(usb->devhdl, uscpi->bulk_in_ep)) < 0) {
|
if ((ret = libusb_clear_halt(usb->devhdl, uscpi->bulk_in_ep)) < 0) {
|
||||||
sr_err("Failed to clear halt/stall condition for EP %d: %s.",
|
sr_err("Failed to clear halt/stall condition for EP %d: %s.",
|
||||||
uscpi->bulk_in_ep, libusb_error_name(ret));
|
uscpi->bulk_in_ep, libusb_error_name(ret));
|
||||||
return SR_ERR;
|
return SR_ERR;
|
||||||
}
|
}
|
||||||
if (!uscpi->rigol_ds1000)
|
|
||||||
if ((ret = libusb_clear_halt(usb->devhdl, uscpi->bulk_out_ep)) < 0) {
|
if ((ret = libusb_clear_halt(usb->devhdl, uscpi->bulk_out_ep)) < 0) {
|
||||||
sr_err("Failed to clear halt/stall condition for EP %d: %s.",
|
sr_err("Failed to clear halt/stall condition for EP %d: %s.",
|
||||||
uscpi->bulk_out_ep, libusb_error_name(ret));
|
uscpi->bulk_out_ep, libusb_error_name(ret));
|
||||||
|
@ -286,6 +286,7 @@ static int scpi_usbtmc_libusb_open(void *priv)
|
||||||
uscpi->interrupt_ep, libusb_error_name(ret));
|
uscpi->interrupt_ep, libusb_error_name(ret));
|
||||||
return SR_ERR;
|
return SR_ERR;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/* Get capabilities. */
|
/* Get capabilities. */
|
||||||
ret = libusb_control_transfer(usb->devhdl,
|
ret = libusb_control_transfer(usb->devhdl,
|
||||||
|
@ -528,16 +529,17 @@ static int scpi_usbtmc_libusb_close(void *priv)
|
||||||
if (!usb->devhdl)
|
if (!usb->devhdl)
|
||||||
return SR_ERR;
|
return SR_ERR;
|
||||||
|
|
||||||
|
if (!uscpi->rigol_ds1000) {
|
||||||
if ((ret = libusb_clear_halt(usb->devhdl, uscpi->bulk_in_ep)) < 0)
|
if ((ret = libusb_clear_halt(usb->devhdl, uscpi->bulk_in_ep)) < 0)
|
||||||
sr_err("Failed to clear halt/stall condition for EP %d: %s.",
|
sr_err("Failed to clear halt/stall condition for EP %d: %s.",
|
||||||
uscpi->bulk_in_ep, libusb_error_name(ret));
|
uscpi->bulk_in_ep, libusb_error_name(ret));
|
||||||
if (!uscpi->rigol_ds1000)
|
|
||||||
if ((ret = libusb_clear_halt(usb->devhdl, uscpi->bulk_out_ep)) < 0)
|
if ((ret = libusb_clear_halt(usb->devhdl, uscpi->bulk_out_ep)) < 0)
|
||||||
sr_err("Failed to clear halt/stall condition for EP %d: %s.",
|
sr_err("Failed to clear halt/stall condition for EP %d: %s.",
|
||||||
uscpi->bulk_out_ep, libusb_error_name(ret));
|
uscpi->bulk_out_ep, libusb_error_name(ret));
|
||||||
if ((ret = libusb_clear_halt(usb->devhdl, uscpi->interrupt_ep)) < 0)
|
if ((ret = libusb_clear_halt(usb->devhdl, uscpi->interrupt_ep)) < 0)
|
||||||
sr_err("Failed to clear halt/stall condition for EP %d: %s.",
|
sr_err("Failed to clear halt/stall condition for EP %d: %s.",
|
||||||
uscpi->interrupt_ep, libusb_error_name(ret));
|
uscpi->interrupt_ep, libusb_error_name(ret));
|
||||||
|
}
|
||||||
|
|
||||||
if ((ret = libusb_release_interface(usb->devhdl, uscpi->interface)) < 0)
|
if ((ret = libusb_release_interface(usb->devhdl, uscpi->interface)) < 0)
|
||||||
sr_err("Failed to release interface: %s.",
|
sr_err("Failed to release interface: %s.",
|
||||||
|
|
Loading…
Reference in New Issue