usb: ccid fix.
-----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.22 (GNU/Linux) iQIcBAABAgAGBQJZ7awMAAoJEEy22O7T6HE4WVQQAKe0qArhQCXrGA+MKgnOq3DB HTWQddtdySDr9If+sI0ooHPhPdI3XDy0TkTZpidpPgTdov4G0cgw67URbojralld 3hQtb3C7b518xYXRTd8/y/QmwQQyoHMOof5F/uvruUCx4k43muO0LUAsFl4MBERa +Sye+ZwxHOkkv3w78EBuetvE4NHcjOwb7YU0VFx/7UL426XsbxdVjFye+TYXuiH/ JoKGsC8hbLs7A+vanae59Fn4mXVAU3ZH9tHuVB7Nb9AegVcftUc0ogOOyEUl16sZ ePEIYL8/eC4gwrsVpYxHF1lwy/3P6W/r1hY0v8B5GBH+G9W+qINaXYGTnRnR+MJM 08k1s4y2emYt2hdiHJ+LgOsyv6IDXKoY0d7zYgRpu/q7hCnMdvLY8ALndoPVWad2 p0JM3BCwQUArJWMQJXY5dyCd53mctvN06bbFgvR5b+iOLlmTzPesi9owLlTzMgtP Ahg9lMT47ZIZ1mbM7cNprzcjbk7zm4aQdOI7XYqRiqN1zkdHcGyaAEiiaXJXaowb rC7zN3lrvqExWDo6VBTn8El+Py+c1/0RZTwkkFjku7DBrhX4Y/FavHumy8jEWqbG x1SxMkR6ewFeQgDrMKj3mgAD3EKbtqnNJEEXI98mdOb8YMs9vCSCLbA3e8TiDguk mr8UMedHBhk3hP/cPcga =N6p9 -----END PGP SIGNATURE----- Merge remote-tracking branch 'remotes/kraxel/tags/usb-20171023-pull-request' into staging usb: ccid fix. # gpg: Signature made Mon 23 Oct 2017 09:45:00 BST # gpg: using RSA key 0x4CB6D8EED3E87138 # gpg: Good signature from "Gerd Hoffmann (work) <kraxel@redhat.com>" # gpg: aka "Gerd Hoffmann <gerd@kraxel.org>" # gpg: aka "Gerd Hoffmann (private) <kraxel@gmail.com>" # Primary key fingerprint: A032 8CFF B93A 17A7 9901 FE7D 4CB6 D8EE D3E8 7138 * remotes/kraxel/tags/usb-20171023-pull-request: usb-ccid: remove needless migration state code Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
This commit is contained in:
commit
3d7196d43b
@ -270,11 +270,6 @@ typedef struct BulkIn {
|
|||||||
uint32_t pos;
|
uint32_t pos;
|
||||||
} BulkIn;
|
} BulkIn;
|
||||||
|
|
||||||
enum {
|
|
||||||
MIGRATION_NONE,
|
|
||||||
MIGRATION_MIGRATED,
|
|
||||||
};
|
|
||||||
|
|
||||||
typedef struct CCIDBus {
|
typedef struct CCIDBus {
|
||||||
BusState qbus;
|
BusState qbus;
|
||||||
} CCIDBus;
|
} CCIDBus;
|
||||||
@ -306,9 +301,6 @@ typedef struct USBCCIDState {
|
|||||||
CCID_ProtocolDataStructure abProtocolDataStructure;
|
CCID_ProtocolDataStructure abProtocolDataStructure;
|
||||||
uint32_t ulProtocolDataStructureSize;
|
uint32_t ulProtocolDataStructureSize;
|
||||||
uint32_t state_vmstate;
|
uint32_t state_vmstate;
|
||||||
uint32_t migration_target_ip;
|
|
||||||
uint16_t migration_target_port;
|
|
||||||
uint8_t migration_state;
|
|
||||||
uint8_t bmSlotICCState;
|
uint8_t bmSlotICCState;
|
||||||
uint8_t powered;
|
uint8_t powered;
|
||||||
uint8_t notify_slot_change;
|
uint8_t notify_slot_change;
|
||||||
@ -1243,9 +1235,6 @@ int ccid_card_ccid_attach(CCIDCardState *card)
|
|||||||
USBCCIDState *s = USB_CCID_DEV(dev);
|
USBCCIDState *s = USB_CCID_DEV(dev);
|
||||||
|
|
||||||
DPRINTF(s, 1, "CCID Attach\n");
|
DPRINTF(s, 1, "CCID Attach\n");
|
||||||
if (s->migration_state == MIGRATION_MIGRATED) {
|
|
||||||
s->migration_state = MIGRATION_NONE;
|
|
||||||
}
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1341,9 +1330,6 @@ static void ccid_realize(USBDevice *dev, Error **errp)
|
|||||||
s->intr = usb_ep_get(dev, USB_TOKEN_IN, CCID_INT_IN_EP);
|
s->intr = usb_ep_get(dev, USB_TOKEN_IN, CCID_INT_IN_EP);
|
||||||
s->bulk = usb_ep_get(dev, USB_TOKEN_IN, CCID_BULK_IN_EP);
|
s->bulk = usb_ep_get(dev, USB_TOKEN_IN, CCID_BULK_IN_EP);
|
||||||
s->card = NULL;
|
s->card = NULL;
|
||||||
s->migration_state = MIGRATION_NONE;
|
|
||||||
s->migration_target_ip = 0;
|
|
||||||
s->migration_target_port = 0;
|
|
||||||
s->dev.speed = USB_SPEED_FULL;
|
s->dev.speed = USB_SPEED_FULL;
|
||||||
s->dev.speedmask = USB_SPEED_MASK_FULL;
|
s->dev.speedmask = USB_SPEED_MASK_FULL;
|
||||||
s->notify_slot_change = false;
|
s->notify_slot_change = false;
|
||||||
@ -1379,13 +1365,6 @@ static int ccid_pre_save(void *opaque)
|
|||||||
USBCCIDState *s = opaque;
|
USBCCIDState *s = opaque;
|
||||||
|
|
||||||
s->state_vmstate = s->dev.state;
|
s->state_vmstate = s->dev.state;
|
||||||
if (s->dev.attached) {
|
|
||||||
/*
|
|
||||||
* Migrating an open device, ignore reconnection CHR_EVENT to avoid an
|
|
||||||
* erroneous detach.
|
|
||||||
*/
|
|
||||||
s->migration_state = MIGRATION_MIGRATED;
|
|
||||||
}
|
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
@ -1452,7 +1431,7 @@ static VMStateDescription ccid_vmstate = {
|
|||||||
VMSTATE_STRUCT_ARRAY(pending_answers, USBCCIDState,
|
VMSTATE_STRUCT_ARRAY(pending_answers, USBCCIDState,
|
||||||
PENDING_ANSWERS_NUM, 1, answer_vmstate, Answer),
|
PENDING_ANSWERS_NUM, 1, answer_vmstate, Answer),
|
||||||
VMSTATE_UINT32(pending_answers_num, USBCCIDState),
|
VMSTATE_UINT32(pending_answers_num, USBCCIDState),
|
||||||
VMSTATE_UINT8(migration_state, USBCCIDState),
|
VMSTATE_UNUSED(1), /* was migration_state */
|
||||||
VMSTATE_UINT32(state_vmstate, USBCCIDState),
|
VMSTATE_UINT32(state_vmstate, USBCCIDState),
|
||||||
VMSTATE_END_OF_LIST()
|
VMSTATE_END_OF_LIST()
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user