usb_drv: raw session fixes

- use the correct memory free functions on errors
- report packet submit errors
- rename 'Usb::Packet_descriptor::transfer.timeout' as
 'Usb::Packet_descriptor::transfer.polling_interval'

Fixes #2135
This commit is contained in:
Christian Prochaska
2016-10-17 14:13:51 +02:00
committed by Christian Helmuth
parent 44d4bf7a1b
commit 82e228a715
6 changed files with 60 additions and 43 deletions

View File

@ -139,7 +139,7 @@ struct Usb::Pl2303_driver : Completion
Packet_descriptor p = iface.alloc(num_bytes);
memcpy(iface.content(p), dst, num_bytes);
iface.bulk_transfer(p, ep, 0, false, this);
iface.bulk_transfer(p, ep, false, this);
return num_bytes;
}
@ -196,7 +196,7 @@ struct Usb::Pl2303_driver : Completion
Usb::Endpoint &ep = iface.endpoint(IN);
for (int i = 0; i < PACKET_BUFFER; i++) {
p = iface.alloc(ep.max_packet_size);
iface.bulk_transfer(p, ep, 0, false, this);
iface.bulk_transfer(p, ep, false, this);
}
/* send signal to terminal client */