From 009eee331faa33701c21cbb9c03adc3694f53fcd Mon Sep 17 00:00:00 2001 From: Gregory Nutt Date: Thu, 3 Jul 2014 13:06:28 -0600 Subject: [PATCH] SAMA5 OHCI: Fix an error in a DEBUGASSERT statement. Caused assertion to fire inappropriately when a low- or full-speed device is removed and CONFIG_DEBUG=y --- arch/arm/src/sama5/sam_ohci.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/arch/arm/src/sama5/sam_ohci.c b/arch/arm/src/sama5/sam_ohci.c index cdf040adca..e05806e210 100644 --- a/arch/arm/src/sama5/sam_ohci.c +++ b/arch/arm/src/sama5/sam_ohci.c @@ -2510,7 +2510,7 @@ errout: * Input Parameters: * drvr - The USB host driver instance obtained as a parameter from the call to * the class create() method. - * ep - The endpint to be freed. + * ep - The endpoint to be freed. * * Returned Values: * On success, zero (OK) is returned. On a failure, a negated errno value is @@ -2535,8 +2535,7 @@ static int sam_epfree(FAR struct usbhost_driver_s *drvr, usbhost_ep_t ep) /* There should not be any pending, real TDs linked to this ED */ ed = eplist->ed; - DEBUGASSERT((ed->hw.headp & ED_HEADP_ADDR_MASK) == - sam_physramaddr((uintptr_t)rhport->ep0.tail)); + DEBUGASSERT((ed->hw.headp & ED_HEADP_ADDR_MASK) == ed->hw.tailp); /* We must have exclusive access to the ED pool, the bulk list, the periodic list * and the interrupt table.