Fixed bug #714.
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/branches/stable_16.1.x@8971 35acf78f-673a-0410-8e92-d51de3d6d3f4
This commit is contained in:
parent
93060d8617
commit
d615ac19db
|
@ -309,6 +309,7 @@ void usbStart(USBDriver *usbp, const USBConfig *config) {
|
||||||
* @api
|
* @api
|
||||||
*/
|
*/
|
||||||
void usbStop(USBDriver *usbp) {
|
void usbStop(USBDriver *usbp) {
|
||||||
|
unsigned i;
|
||||||
|
|
||||||
osalDbgCheck(usbp != NULL);
|
osalDbgCheck(usbp != NULL);
|
||||||
|
|
||||||
|
@ -319,6 +320,19 @@ void usbStop(USBDriver *usbp) {
|
||||||
"invalid state");
|
"invalid state");
|
||||||
usb_lld_stop(usbp);
|
usb_lld_stop(usbp);
|
||||||
usbp->state = USB_STOP;
|
usbp->state = USB_STOP;
|
||||||
|
|
||||||
|
/* Resetting all ongoing synchronous operations.*/
|
||||||
|
for (i = 0; i <= (unsigned)USB_MAX_ENDPOINTS; i++) {
|
||||||
|
if (usbp->epc[i] != NULL) {
|
||||||
|
if (usbp->epc[i]->in_state != NULL) {
|
||||||
|
osalThreadResumeI(&usbp->epc[i]->in_state->thread, MSG_RESET);
|
||||||
|
}
|
||||||
|
if (usbp->epc[i]->out_state != NULL) {
|
||||||
|
osalThreadResumeI(&usbp->epc[i]->out_state->thread, MSG_RESET);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
osalOsRescheduleS();
|
||||||
osalSysUnlock();
|
osalSysUnlock();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -74,6 +74,8 @@
|
||||||
|
|
||||||
*** 16.1.4 ***
|
*** 16.1.4 ***
|
||||||
- ALL: Startup files relicensed under Apache 2.0.
|
- ALL: Startup files relicensed under Apache 2.0.
|
||||||
|
- HAL: Fixed usbStop does not resume threads suspended in synchronous calls
|
||||||
|
to usbTransmit (bug #714).
|
||||||
- VAR: Fixed state check in lwIP when SYS_LIGHTWEIGHT_PROT is disabled
|
- VAR: Fixed state check in lwIP when SYS_LIGHTWEIGHT_PROT is disabled
|
||||||
(bug #713).
|
(bug #713).
|
||||||
- RT: Fixed race condition in RT registry (bug #712).
|
- RT: Fixed race condition in RT registry (bug #712).
|
||||||
|
|
Loading…
Reference in New Issue