mirror of https://github.com/xemu-project/xemu.git
usb-ehci: add missing usb_packet_init() call
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
This commit is contained in:
parent
e59a8cf1eb
commit
0cc6a0f19e
|
@ -501,6 +501,7 @@ void usb_packet_set_state(USBPacket *p, USBPacketState state)
|
||||||
void usb_packet_setup(USBPacket *p, int pid, USBEndpoint *ep)
|
void usb_packet_setup(USBPacket *p, int pid, USBEndpoint *ep)
|
||||||
{
|
{
|
||||||
assert(!usb_packet_is_inflight(p));
|
assert(!usb_packet_is_inflight(p));
|
||||||
|
assert(p->iov.iov != NULL);
|
||||||
p->pid = pid;
|
p->pid = pid;
|
||||||
p->ep = ep;
|
p->ep = ep;
|
||||||
p->result = 0;
|
p->result = 0;
|
||||||
|
|
|
@ -664,6 +664,7 @@ static EHCIQueue *ehci_alloc_queue(EHCIState *ehci, int async)
|
||||||
|
|
||||||
q = g_malloc0(sizeof(*q));
|
q = g_malloc0(sizeof(*q));
|
||||||
q->ehci = ehci;
|
q->ehci = ehci;
|
||||||
|
usb_packet_init(&q->packet);
|
||||||
QTAILQ_INSERT_HEAD(head, q, next);
|
QTAILQ_INSERT_HEAD(head, q, next);
|
||||||
trace_usb_ehci_queue_action(q, "alloc");
|
trace_usb_ehci_queue_action(q, "alloc");
|
||||||
return q;
|
return q;
|
||||||
|
|
Loading…
Reference in New Issue