|
|
9ae3a8 |
From deb3ccfc4df641110546b2af49e885101565143d Mon Sep 17 00:00:00 2001
|
|
|
9ae3a8 |
From: Gerd Hoffmann <kraxel@redhat.com>
|
|
|
9ae3a8 |
Date: Fri, 17 Jul 2015 11:55:40 +0200
|
|
|
9ae3a8 |
Subject: [PATCH 01/13] usb-ccid: add missing wakeup calls
|
|
|
9ae3a8 |
|
|
|
9ae3a8 |
Message-id: <1437134140-27898-2-git-send-email-kraxel@redhat.com>
|
|
|
9ae3a8 |
Patchwork-id: 67056
|
|
|
9ae3a8 |
O-Subject: [RHEL-7.2 qemu-kvm PATCH v2 1/1] usb-ccid: add missing wakeup calls
|
|
|
9ae3a8 |
Bugzilla: 1243731
|
|
|
9ae3a8 |
RH-Acked-by: Miroslav Rezanina <mrezanin@redhat.com>
|
|
|
9ae3a8 |
RH-Acked-by: Juan Quintela <quintela@redhat.com>
|
|
|
9ae3a8 |
RH-Acked-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
|
|
|
9ae3a8 |
|
|
|
9ae3a8 |
Properly notify the host adapter that we have
|
|
|
9ae3a8 |
data pending, so it doesn't has to poll us.
|
|
|
9ae3a8 |
|
|
|
9ae3a8 |
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
|
|
|
9ae3a8 |
(cherry picked from commit 86d7e214c224f939c897cfa3b6d597f7af4b5bba)
|
|
|
9ae3a8 |
Signed-off-by: Miroslav Rezanina <mrezanin@redhat.com>
|
|
|
9ae3a8 |
|
|
|
9ae3a8 |
Conflicts:
|
|
|
9ae3a8 |
hw/usb/dev-smartcard-reader.c [ slightly different context ]
|
|
|
9ae3a8 |
---
|
|
|
9ae3a8 |
hw/usb/dev-smartcard-reader.c | 5 +++++
|
|
|
9ae3a8 |
1 file changed, 5 insertions(+)
|
|
|
9ae3a8 |
---
|
|
|
9ae3a8 |
hw/usb/dev-smartcard-reader.c | 5 +++++
|
|
|
9ae3a8 |
1 file changed, 5 insertions(+)
|
|
|
9ae3a8 |
|
|
|
9ae3a8 |
diff --git a/hw/usb/dev-smartcard-reader.c b/hw/usb/dev-smartcard-reader.c
|
|
|
9ae3a8 |
index c1acf70..0e666e1 100644
|
|
|
9ae3a8 |
--- a/hw/usb/dev-smartcard-reader.c
|
|
|
9ae3a8 |
+++ b/hw/usb/dev-smartcard-reader.c
|
|
|
9ae3a8 |
@@ -284,6 +284,7 @@ typedef struct CCIDBus {
|
|
|
9ae3a8 |
typedef struct USBCCIDState {
|
|
|
9ae3a8 |
USBDevice dev;
|
|
|
9ae3a8 |
USBEndpoint *intr;
|
|
|
9ae3a8 |
+ USBEndpoint *bulk;
|
|
|
9ae3a8 |
CCIDBus bus;
|
|
|
9ae3a8 |
CCIDCardState *card;
|
|
|
9ae3a8 |
BulkIn bulk_in_pending[BULK_IN_PENDING_NUM]; /* circular */
|
|
|
9ae3a8 |
@@ -769,6 +770,7 @@ static void ccid_write_slot_status(USBCCIDState *s, CCID_Header *recv)
|
|
|
9ae3a8 |
h->b.bError = s->bError;
|
|
|
9ae3a8 |
h->bClockStatus = CLOCK_STATUS_RUNNING;
|
|
|
9ae3a8 |
ccid_reset_error_status(s);
|
|
|
9ae3a8 |
+ usb_wakeup(s->bulk, 0);
|
|
|
9ae3a8 |
}
|
|
|
9ae3a8 |
|
|
|
9ae3a8 |
static void ccid_write_parameters(USBCCIDState *s, CCID_Header *recv)
|
|
|
9ae3a8 |
@@ -789,6 +791,7 @@ static void ccid_write_parameters(USBCCIDState *s, CCID_Header *recv)
|
|
|
9ae3a8 |
h->bProtocolNum = s->bProtocolNum;
|
|
|
9ae3a8 |
h->abProtocolDataStructure = s->abProtocolDataStructure;
|
|
|
9ae3a8 |
ccid_reset_error_status(s);
|
|
|
9ae3a8 |
+ usb_wakeup(s->bulk, 0);
|
|
|
9ae3a8 |
}
|
|
|
9ae3a8 |
|
|
|
9ae3a8 |
static void ccid_write_data_block(USBCCIDState *s, uint8_t slot, uint8_t seq,
|
|
|
9ae3a8 |
@@ -810,6 +813,7 @@ static void ccid_write_data_block(USBCCIDState *s, uint8_t slot, uint8_t seq,
|
|
|
9ae3a8 |
}
|
|
|
9ae3a8 |
memcpy(p->abData, data, len);
|
|
|
9ae3a8 |
ccid_reset_error_status(s);
|
|
|
9ae3a8 |
+ usb_wakeup(s->bulk, 0);
|
|
|
9ae3a8 |
}
|
|
|
9ae3a8 |
|
|
|
9ae3a8 |
static void ccid_report_error_failed(USBCCIDState *s, uint8_t error)
|
|
|
9ae3a8 |
@@ -1311,6 +1315,7 @@ static int ccid_initfn(USBDevice *dev)
|
|
|
9ae3a8 |
usb_desc_init(dev);
|
|
|
9ae3a8 |
qbus_create_inplace(&s->bus.qbus, TYPE_CCID_BUS, &dev->qdev, NULL);
|
|
|
9ae3a8 |
s->intr = usb_ep_get(dev, USB_TOKEN_IN, CCID_INT_IN_EP);
|
|
|
9ae3a8 |
+ s->bulk = usb_ep_get(dev, USB_TOKEN_IN, CCID_BULK_IN_EP);
|
|
|
9ae3a8 |
s->bus.qbus.allow_hotplug = 1;
|
|
|
9ae3a8 |
s->card = NULL;
|
|
|
9ae3a8 |
s->migration_state = MIGRATION_NONE;
|
|
|
9ae3a8 |
--
|
|
|
9ae3a8 |
1.8.3.1
|
|
|
9ae3a8 |
|