From 2d4e9c1eae794b047aeae9971bb8a34db8774856 Mon Sep 17 00:00:00 2001 From: Gregory Nutt Date: Mon, 23 Apr 2018 07:21:20 -0600 Subject: [PATCH] arch/arm/sc/lpc16xx: Extends commit 456a258c23de53b578419d66b631507aefb7ba06: Freeing endpoints should be set the same allocations as when endpoint was allocated. --- arch/arm/src/lpc17xx/lpc17_usbdev.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/arm/src/lpc17xx/lpc17_usbdev.c b/arch/arm/src/lpc17xx/lpc17_usbdev.c index 05e69e7f2b9..22ebf184b4a 100644 --- a/arch/arm/src/lpc17xx/lpc17_usbdev.c +++ b/arch/arm/src/lpc17xx/lpc17_usbdev.c @@ -3077,10 +3077,10 @@ static void lpc17_freeep(FAR struct usbdev_s *dev, FAR struct usbdev_ep_s *ep) if (priv && privep) { - /* Mark the endpoint as available */ + /* Mark the IN/OUT endpoint as available */ flags = enter_critical_section(); - priv->epavail |= (1 << privep->epphy); + priv->epavail |= (3 << (privep->epphy & ~1)); leave_critical_section(flags); } }