aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNIIBE Yutaka <[email protected]>2020-09-29 04:27:19 +0000
committerNIIBE Yutaka <[email protected]>2020-10-06 02:45:45 +0000
commit33a2d4bd7ffc6ad10d7ddb0f29fe4e21609806f7 (patch)
treee1d635a9d41f7e49b28bf7d1eda90f77ebb37920
parentscd: Internal CCID driver: Call libusb_clear_halt at ccid_setup_intr. (diff)
downloadgnupg-33a2d4bd7ffc6ad10d7ddb0f29fe4e21609806f7.tar.gz
gnupg-33a2d4bd7ffc6ad10d7ddb0f29fe4e21609806f7.zip
scd: Internal CCID driver fix.
* scd/ccid-driver.c (intr_cb): More useful debug output. (ccid_slot_status): Remove redundant condition. -- Backport master commit of: 1444203ca32ccfa4bd5097d2d49565c4055c620b Signed-off-by: NIIBE Yutaka <[email protected]>
-rw-r--r--scd/ccid-driver.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/scd/ccid-driver.c b/scd/ccid-driver.c
index a508ac5cc..1736c3f2d 100644
--- a/scd/ccid-driver.c
+++ b/scd/ccid-driver.c
@@ -1496,7 +1496,8 @@ intr_cb (struct libusb_transfer *transfer)
{
ccid_driver_t handle = transfer->user_data;
- DEBUGOUT_1 ("CCID: interrupt callback %d\n", transfer->status);
+ DEBUGOUT_2 ("CCID: interrupt callback %d (%d)\n",
+ transfer->status, transfer->actual_length);
if (transfer->status == LIBUSB_TRANSFER_TIMED_OUT)
{
@@ -1523,6 +1524,8 @@ intr_cb (struct libusb_transfer *transfer)
if (len < 2)
break;
+ DEBUGOUT_1 ("CCID: NotifySlotChange: %02x\n", p[1]);
+
if ((p[1] & 1))
card_removed = 0;
else
@@ -2422,7 +2425,7 @@ ccid_slot_status (ccid_driver_t handle, int *statusbits, int on_wire)
{
/* Setup interrupt transfer at the initial call of slot_status
with ON_WIRE == 0 */
- if (handle->transfer == NULL && handle->ep_intr >= 0)
+ if (handle->transfer == NULL)
{
ccid_setup_intr (handle);
if (handle->id_vendor == VENDOR_SCM)