Skip to content
Snippets Groups Projects
Commit b0cb37f1 authored by Ludovic Rousseau's avatar Ludovic Rousseau
Browse files

Avoid logging errors when a reader is removed

Add support of TAG_IFD_DEVICE_REMOVED
This tag has been introduced in pcsc-lite version 1.9.5.

When the driver receives the tag TAG_IFD_DEVICE_REMOVED it marks the
USB device as disconnected and will not try to talk to it any more.

So when a USB CCID reader is remove we do not have these errors in the
logs any more:
00000000 [140295925790464] ccid_usb.c:871:WriteUSB() write failed (1/22): -4 LIBUSB_ERROR_NO_DEVICE
00000506 [140295934183168] ccid_usb.c:871:WriteUSB() write failed (1/22): -4 LIBUSB_ERROR_NO_DEVICE

The first error is because IFDHICCPresence() sends the CCID command
PC_to_RDR_GetSlotStatus to know if a card is present.

The second error is because IFDHCloseChannel() sends the CCID command
PC_to_RDR_IccPowerOff to power off the card.

But since the USB device has been removed these 2 CCID commands will
fail and log the error.

Thanks to Jakub Jelen for the bug report
" Reader disconnects are noisy in journal/logs #110 "
https://github.com/LudovicRousseau/PCSC/issues/110

See also https://bugzilla.redhat.com/show_bug.cgi?id=2011128
parent daadc580
No related branches found
No related tags found
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment