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
Showing
- src/ccid_serial.c 15 additions, 0 deletionssrc/ccid_serial.c
- src/ccid_serial.h 2 additions, 0 deletionssrc/ccid_serial.h
- src/ccid_usb.c 28 additions, 0 deletionssrc/ccid_usb.c
- src/ccid_usb.h 1 addition, 0 deletionssrc/ccid_usb.h
- src/defs.h 2 additions, 0 deletionssrc/defs.h
- src/ifdhandler.c 28 additions, 1 deletionsrc/ifdhandler.c
Loading