scd: Fix suspend/resume handling for CCID driver.

* scd/ccid-driver.c (intr_cb): Try submitting INTERRUPT urb
to see if it's suspend/resume.

--

Upon suspend/resume, LIBUSB_TRANSFER_NO_DEVICE is returned, since all
URBs are cancelled.  We need to see if it's real NODEV error or its by
suspend/resume.  We can distinguish by sending URB again.

Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
This commit is contained in:
NIIBE Yutaka 2018-03-15 23:59:22 +09:00
parent c84bae69e9
commit fd23a0524d
1 changed files with 2 additions and 1 deletions

View File

@ -1467,7 +1467,8 @@ intr_cb (struct libusb_transfer *transfer)
DEBUGOUT_1 ("CCID: interrupt callback %d\n", transfer->status);
if (transfer->status == LIBUSB_TRANSFER_TIMED_OUT)
if (transfer->status == LIBUSB_TRANSFER_TIMED_OUT
|| transfer->status == LIBUSB_TRANSFER_NO_DEVICE)
{
int err;