From 76ff0fce861f074acf2d49e23a7ff3e846c5d692 Mon Sep 17 00:00:00 2001 From: Gregory Nutt Date: Sat, 25 Apr 2015 11:17:37 -0600 Subject: [PATCH] Add missing logic to destroy a class when the device is no longer connected to the hub port --- arch/arm/src/lpc17xx/lpc17_usbhost.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/arch/arm/src/lpc17xx/lpc17_usbhost.c b/arch/arm/src/lpc17xx/lpc17_usbhost.c index 4f082f313ad..11543bb92e6 100644 --- a/arch/arm/src/lpc17xx/lpc17_usbhost.c +++ b/arch/arm/src/lpc17xx/lpc17_usbhost.c @@ -931,6 +931,12 @@ static inline int lpc17_remctrled(struct lpc17_usbhost_s *priv, prev->hw.nexted = ed->hw.nexted; } + + /* Just in case the hardware happens to be processing this ed now... + * it should go back to the control list head. + */ + + ed->hw.nexted = 0; } return OK;