From 2e08560fa03775aedeabbf8a81a86fb1ab09ff7a Mon Sep 17 00:00:00 2001 From: Gregory Nutt Date: Fri, 6 Jun 2014 10:34:58 -0600 Subject: [PATCH] Clear rxhead on disconnect to prevent data from being resent on re-connect --- drivers/usbdev/cdcacm.c | 1 + drivers/usbdev/pl2303.c | 1 + 2 files changed, 2 insertions(+) diff --git a/drivers/usbdev/cdcacm.c b/drivers/usbdev/cdcacm.c index 2243c769b0..91d1052269 100644 --- a/drivers/usbdev/cdcacm.c +++ b/drivers/usbdev/cdcacm.c @@ -1642,6 +1642,7 @@ static void cdcacm_disconnect(FAR struct usbdevclass_driver_s *driver, priv->serdev.xmit.head = 0; priv->serdev.xmit.tail = 0; + priv->rxhead = 0; irqrestore(flags); /* Perform the soft connect function so that we will we can be diff --git a/drivers/usbdev/pl2303.c b/drivers/usbdev/pl2303.c index 9788734c5b..102160725e 100644 --- a/drivers/usbdev/pl2303.c +++ b/drivers/usbdev/pl2303.c @@ -1907,6 +1907,7 @@ static void usbclass_disconnect(FAR struct usbdevclass_driver_s *driver, priv->serdev.xmit.head = 0; priv->serdev.xmit.tail = 0; + priv->rxhead = 0; irqrestore(flags); /* Perform the soft connect function so that we will we can be