From 75eac1f57411e538096ce42eb938f4021a658eec Mon Sep 17 00:00:00 2001 From: Giovanni Di Sirio Date: Sun, 28 Feb 2016 09:35:43 +0000 Subject: [PATCH] Again bug #714. git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@8989 35acf78f-673a-0410-8e92-d51de3d6d3f4 --- os/hal/src/usb.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/os/hal/src/usb.c b/os/hal/src/usb.c index 8e557d14e..d5ada4230 100644 --- a/os/hal/src/usb.c +++ b/os/hal/src/usb.c @@ -323,6 +323,7 @@ void usbStop(USBDriver *usbp) { /* Resetting all ongoing synchronous operations.*/ for (i = 0; i <= (unsigned)USB_MAX_ENDPOINTS; i++) { +#if USB_USE_WAIT == TRUE if (usbp->epc[i] != NULL) { if (usbp->epc[i]->in_state != NULL) { osalThreadResumeI(&usbp->epc[i]->in_state->thread, MSG_RESET); @@ -331,6 +332,8 @@ void usbStop(USBDriver *usbp) { osalThreadResumeI(&usbp->epc[i]->out_state->thread, MSG_RESET); } } +#endif + usbp->epc[i] = NULL; } osalOsRescheduleS(); osalSysUnlock();