usb: abort control data in/out on reset or when receiving another SETUP.
This removes the horrible timeout hack.
This commit is contained in:
@ -295,7 +295,13 @@ impl<C: driver::ControlPipe> ControlPipe<C> {
|
||||
.chain(need_zlp.then(|| -> &[u8] { &[] }));
|
||||
|
||||
while let Some(chunk) = chunks.next() {
|
||||
self.control.data_in(chunk, chunks.size_hint().0 == 0).await;
|
||||
match self.control.data_in(chunk, chunks.size_hint().0 == 0).await {
|
||||
Ok(()) => {}
|
||||
Err(e) => {
|
||||
warn!("control accept_in failed: {:?}", e);
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -147,7 +147,7 @@ pub trait ControlPipe {
|
||||
type DataOutFuture<'a>: Future<Output = Result<usize, ReadError>> + 'a
|
||||
where
|
||||
Self: 'a;
|
||||
type DataInFuture<'a>: Future<Output = ()> + 'a
|
||||
type DataInFuture<'a>: Future<Output = Result<(), WriteError>> + 'a
|
||||
where
|
||||
Self: 'a;
|
||||
|
||||
|
Reference in New Issue
Block a user