From 168702f7e13ca815273354fa307eb3e9edc4202c Mon Sep 17 00:00:00 2001 From: Gregory Nutt Date: Thu, 6 Jun 2013 15:00:18 -0600 Subject: [PATCH] Fix a backward conditional that cause the STM32 usb host driver to fail to detect disconnection events. From Scott --- ChangeLog | 14 ++++++-------- arch/arm/src/stm32/stm32_otgfshost.c | 4 ++-- 2 files changed, 8 insertions(+), 10 deletions(-) diff --git a/ChangeLog b/ChangeLog index 9eaff080ec..505f083570 100644 --- a/ChangeLog +++ b/ChangeLog @@ -4914,11 +4914,9 @@ register definitions for the SAM4L BMP and SCIF blocks (2013-6-6). * nuttx/arch/arm/src/sam34/sam4l_clockconfig.c: Now selects an optimal power scaling mode (2013-6-6). - * modified: nuttx/arch/arm/src/stm32/stm32_serial.c -# modified: nuttx/drivers/serial/Kconfig -# modified: nuttx/include/nuttx/serial/serial.h -# modified: nuttx/include/termios.h -A:wq\ - -A - + * nuttx/arch/arm/src/stm32/stm32_serial.c and nuttx/include/termios.h: + Change for hardware flow control support for STM32. It also fixes + incorrect operation of USART2 and UART5 in current master. Submitted + by Lorenz Meier but includes changes by Mike Smith (2013-6-6). + * nuttx/arch/arm/src/stm32/stm32_otgfshost.c: A backward conditional + prevent detection of disonnection events. Reported by Scott (2013-6-6). diff --git a/arch/arm/src/stm32/stm32_otgfshost.c b/arch/arm/src/stm32/stm32_otgfshost.c index 80a9392dc9..4b9eeb6c2d 100644 --- a/arch/arm/src/stm32/stm32_otgfshost.c +++ b/arch/arm/src/stm32/stm32_otgfshost.c @@ -1,7 +1,7 @@ /******************************************************************************* * arch/arm/src/stm32/stm32_otgfshost.c * - * Copyright (C) 2012 Gregory Nutt. All rights reserved. + * Copyright (C) 2012-2013 Gregory Nutt. All rights reserved. * Authors: Gregory Nutt * * Redistribution and use in source and binary forms, with or without @@ -2176,7 +2176,7 @@ static void stm32_gint_disconnected(FAR struct stm32_usbhost_s *priv) { /* Were we previously connected? */ - if (!priv->connected) + if (priv->connected) { /* Yes.. then we no longer connected */