scd: Internal CCID driver: More fix for SPR532.

* scd/ccid-driver.c (bulk_in): Handle the case of missing intr_cb.

--

GnuPG-bug-id: 5065
Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
This commit is contained in:
NIIBE Yutaka 2020-09-30 10:56:38 +09:00
parent 862d9c6fac
commit 920f258eb6
1 changed files with 4 additions and 4 deletions

View File

@ -2136,11 +2136,11 @@ bulk_in (ccid_driver_t handle, unsigned char *buffer, size_t length,
* Communication failure by device side.
* Possibly, it was forcibly suspended and resumed.
*
* Only detect this kind of failure when interrupt transfer is
* not supported. For card reader with interrupt transfer
* support removal is detected by intr_cb.
* For card reader with interrupt transfer support, ideally,
* removal is detected by intr_cb, but some card reader
* (e.g. SPR532) has a case of missing report to intr_cb.
*/
if (handle->ep_intr < 0)
if (handle->ep_intr < 0 || handle->id_vendor == VENDOR_SCM)
{
DEBUGOUT ("CCID: card inactive/removed\n");
handle->powered_off = 1;