qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Hans de Goede <hdegoede@redhat.com>
To: Gerd Hoffmann <kraxel@redhat.com>
Cc: Hans de Goede <hdegoede@redhat.com>, Alon Levy <alevy@redhat.com>,
	qemu-devel@nongnu.org
Subject: [Qemu-devel] [PATCH 2/2] usb-smartcard-reader: Properly NAK interrupt eps when we've no events
Date: Sat, 17 Nov 2012 12:15:02 +0100	[thread overview]
Message-ID: <1353150902-24987-3-git-send-email-hdegoede@redhat.com> (raw)
In-Reply-To: <1353150902-24987-1-git-send-email-hdegoede@redhat.com>

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>
---
 hw/usb/dev-smartcard-reader.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/hw/usb/dev-smartcard-reader.c b/hw/usb/dev-smartcard-reader.c
index 190fcd6..de955b7 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:
-- 
1.8.0

      parent reply	other threads:[~2012-11-17 11:13 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-11-17 11:15 [Qemu-devel] [USB fixes for 1.3] Fix some interrupt eps not properly nak-ing Hans de Goede
2012-11-17 11:15 ` [Qemu-devel] [PATCH 1/2] usb-bt: Return NAK instead of STALL when interrupt ep has no data Hans de Goede
2012-11-17 11:15 ` Hans de Goede [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1353150902-24987-3-git-send-email-hdegoede@redhat.com \
    --to=hdegoede@redhat.com \
    --cc=alevy@redhat.com \
    --cc=kraxel@redhat.com \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).