aboutsummaryrefslogtreecommitdiff
path: root/hw/usb/dev-smartcard-reader.c
diff options
context:
space:
mode:
authorHans de Goede <hdegoede@redhat.com>2012-11-17 12:15:02 +0100
committerGerd Hoffmann <kraxel@redhat.com>2012-11-21 14:55:54 +0100
commitc4020746ff49b2156b4f98672c077d1a3b86fa8b (patch)
tree86b12f396a59e0e59b241a31d39ecdbc4c824eff /hw/usb/dev-smartcard-reader.c
parent33c1a6856f06fccd7cbfe53e06f9ebbe95bd565f (diff)
usb-smartcard-reader: Properly NAK interrupt eps when we've no events
When we've no data to return from the interrupt endpoint, return NAK rather then a 0 length packet. CC: Alon Levy <alevy@redhat.com> Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Diffstat (limited to 'hw/usb/dev-smartcard-reader.c')
-rw-r--r--hw/usb/dev-smartcard-reader.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/hw/usb/dev-smartcard-reader.c b/hw/usb/dev-smartcard-reader.c
index 190fcd62d4..de955b709f 100644
--- a/hw/usb/dev-smartcard-reader.c
+++ b/hw/usb/dev-smartcard-reader.c
@@ -1002,6 +1002,8 @@ static void ccid_handle_data(USBDevice *dev, USBPacket *p)
"handle_data: int_in: notify_slot_change %X, "
"requested len %zd\n",
s->bmSlotICCState, p->iov.size);
+ } else {
+ p->status = USB_RET_NAK;
}
break;
default: