summaryrefslogtreecommitdiffstats
path: root/scd
diff options
context:
space:
mode:
authorWerner Koch <wk@gnupg.org>2024-03-07 13:29:56 +0100
committerWerner Koch <wk@gnupg.org>2024-03-07 13:44:00 +0100
commit1682ca9f012a72e97ed20b9b33e100501b9b94cf (patch)
tree7da079469f011a7c68cb93f00decea3bcb9bb32a /scd
parentscd: Let the CCID module auto detach the kernel driver. (diff)
downloadgnupg2-1682ca9f012a72e97ed20b9b33e100501b9b94cf.tar.xz
gnupg2-1682ca9f012a72e97ed20b9b33e100501b9b94cf.zip
scd: Add support for ACR-122U
* scd/ccid-driver.h (VENDOR_ACR, ACR_122U): New. * scd/ccid-driver.c (ccid_open_usb_reader): Do not call libsub_set_interface_alt_setting for this reader. -- Co-authored-by: markus.montkowski@gnupg.com
Diffstat (limited to 'scd')
-rw-r--r--scd/ccid-driver.c6
-rw-r--r--scd/ccid-driver.h2
2 files changed, 7 insertions, 1 deletions
diff --git a/scd/ccid-driver.c b/scd/ccid-driver.c
index 7319ada41..39e45a0ab 100644
--- a/scd/ccid-driver.c
+++ b/scd/ccid-driver.c
@@ -1805,7 +1805,10 @@ ccid_open_usb_reader (const char *spec_reader_name,
}
/* Submit SET_INTERFACE control transfer which can reset the device. */
- rc = libusb_set_interface_alt_setting (idev, ifc_no, set_no);
+ if ((*handle)->id_vendor == VENDOR_ACR && (*handle)->id_product == ACR_122U)
+ rc = 0; /* Not supported by this reader. */
+ else
+ rc = libusb_set_interface_alt_setting (idev, ifc_no, set_no);
if (rc)
{
#ifdef USE_NPTH
@@ -1820,6 +1823,7 @@ ccid_open_usb_reader (const char *spec_reader_name,
npth_protect ();
#endif
+ /* Perform any vendor specific intialization. */
rc = ccid_vendor_specific_init (*handle);
leave:
diff --git a/scd/ccid-driver.h b/scd/ccid-driver.h
index 18cbc87f0..bac5fac07 100644
--- a/scd/ccid-driver.h
+++ b/scd/ccid-driver.h
@@ -70,6 +70,7 @@ enum {
VENDOR_FSIJ = 0x234b,
VENDOR_VASCO = 0x1a44,
VENDOR_NXP = 0x1fc9,
+ VENDOR_ACR = 0x072f
};
@@ -88,6 +89,7 @@ enum {
#define VEGA_ALPHA 0x0008
#define CYBERJACK_GO 0x0504
#define CRYPTOUCAN 0x81e6
+#define ACR_122U 0x2200 /* NFC Reader */
#endif /*CCID_DRIVER_INCLUDE_USB_IDS*/