diff options
author | NIIBE Yutaka <gniibe@fsij.org> | 2020-09-29 06:25:14 +0200 |
---|---|---|
committer | NIIBE Yutaka <gniibe@fsij.org> | 2020-09-29 06:25:14 +0200 |
commit | 6af978713e4c69d7814f47e709f1dfb3fe9076d1 (patch) | |
tree | 45cc4102897ed242fa18a69600107cab8220091d /scd/ccid-driver.c | |
parent | scd: Internal CCID driver: Fix a failure path. (diff) | |
download | gnupg2-6af978713e4c69d7814f47e709f1dfb3fe9076d1.tar.xz gnupg2-6af978713e4c69d7814f47e709f1dfb3fe9076d1.zip |
scd: Internal CCID driver: Call libusb_clear_halt at ccid_setup_intr.
* scd/ccid-driver.c (ccid_setup_intr): Reset the endpoint.
(ccid_vendor_specific_init): Don't call libusb_clear_halt.
Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
Diffstat (limited to 'scd/ccid-driver.c')
-rw-r--r-- | scd/ccid-driver.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/scd/ccid-driver.c b/scd/ccid-driver.c index 8995fab22..1048c7840 100644 --- a/scd/ccid-driver.c +++ b/scd/ccid-driver.c @@ -1277,9 +1277,6 @@ ccid_vendor_specific_init (ccid_driver_t handle) * and SET_INTERFACE doesn't reset it. Make sure it works at the init. */ abort_cmd (handle, 0); - r = libusb_clear_halt (handle->idev, handle->ep_intr); - DEBUGOUT_1 ("libusb_clear_halt intr: %s\n", libusb_error_name (r)); - r = 0; } if (r != 0 && r != CCID_DRIVER_ERR_CARD_INACTIVE @@ -1571,6 +1568,7 @@ ccid_setup_intr (ccid_driver_t handle) struct libusb_transfer *transfer; int err; + libusb_clear_halt (handle->idev, handle->ep_intr); transfer = libusb_alloc_transfer (0); handle->transfer = transfer; libusb_fill_interrupt_transfer (transfer, handle->idev, handle->ep_intr, |