mirror of
https://github.com/genodelabs/genode.git
synced 2025-06-19 23:53:55 +00:00
committed by
Christian Helmuth
parent
463b39fc73
commit
133c46a784
@ -226,6 +226,11 @@ class Usb::Worker
|
|||||||
p.succeded = true;
|
p.succeded = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (err >= 0
|
||||||
|
&& p.control.request == USB_REQ_CLEAR_FEATURE
|
||||||
|
&& p.control.value == USB_ENDPOINT_HALT) {
|
||||||
|
usb_reset_endpoint(_device->udev, p.control.index);
|
||||||
|
}
|
||||||
kfree(buf);
|
kfree(buf);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -249,6 +254,10 @@ class Usb::Worker
|
|||||||
urb->actual_length);
|
urb->actual_length);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (urb->status == -EPIPE) {
|
||||||
|
p.error = Packet_descriptor::STALL_ERROR;
|
||||||
|
}
|
||||||
|
|
||||||
_ack_packet(p);
|
_ack_packet(p);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -76,6 +76,10 @@ struct Usb::Packet_descriptor : Genode::Packet_descriptor
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
enum Error { NO_ERROR, STALL_ERROR };
|
||||||
|
|
||||||
|
Error error = NO_ERROR;
|
||||||
|
|
||||||
bool is_read_transfer() { return transfer.ep & ENDPOINT_IN; }
|
bool is_read_transfer() { return transfer.ep & ENDPOINT_IN; }
|
||||||
|
|
||||||
Packet_descriptor(off_t offset = 0, size_t size = 0)
|
Packet_descriptor(off_t offset = 0, size_t size = 0)
|
||||||
|
Reference in New Issue
Block a user