mirror of
git://git.gnupg.org/gnupg.git
synced 2025-01-21 14:47:03 +01:00
scd: internal driver: Submit SET_INTERFACE control transfer.
* scd/ccid-driver.c (ccid_open_usb_reader): Alway submit SET_INTERFACE control transfer. -- This handling is not mondatory, but it's better to do so, because there are card reader with pinpad and token with ack button, which support user interaction. User interaction status should be reset at open time. The status should be reset when the session is closed/stopped. In practice, since cleanup routine in a driver may not be called properly, it's good to submit SET_INTERFACE at open time. Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
This commit is contained in:
parent
c1000c6738
commit
611faf1579
@ -1653,15 +1653,13 @@ ccid_open_usb_reader (const char *spec_reader_name,
|
||||
goto leave;
|
||||
}
|
||||
|
||||
if (set_no != 0)
|
||||
/* Submit SET_INTERFACE control transfer which can reset the device. */
|
||||
rc = libusb_set_interface_alt_setting (idev, ifc_no, set_no);
|
||||
if (rc)
|
||||
{
|
||||
rc = libusb_set_interface_alt_setting (idev, ifc_no, set_no);
|
||||
if (rc)
|
||||
{
|
||||
DEBUGOUT_1 ("usb_set_interface_alt_setting failed: %d\n", rc);
|
||||
rc = CCID_DRIVER_ERR_CARD_IO_ERROR;
|
||||
goto leave;
|
||||
}
|
||||
DEBUGOUT_1 ("usb_set_interface_alt_setting failed: %d\n", rc);
|
||||
rc = CCID_DRIVER_ERR_CARD_IO_ERROR;
|
||||
goto leave;
|
||||
}
|
||||
|
||||
rc = ccid_vendor_specific_init (*handle);
|
||||
|
Loading…
x
Reference in New Issue
Block a user