From e1517a0981e6aea0734c9620addc154baee470d5 Mon Sep 17 00:00:00 2001 From: ZYH Date: Tue, 11 Jun 2019 15:32:37 +0800 Subject: [PATCH] [Components][USB][RNDIS] fix delay linkup using soft timer --- components/drivers/Kconfig | 1 + components/drivers/usb/usbdevice/class/rndis.c | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/components/drivers/Kconfig b/components/drivers/Kconfig index d0588a7b65..861d8cf118 100755 --- a/components/drivers/Kconfig +++ b/components/drivers/Kconfig @@ -644,6 +644,7 @@ menu "Using USB" if RT_USB_DEVICE_RNDIS config RNDIS_DELAY_LINK_UP bool "Delay linkup media connection" + select RT_USING_TIMER_SOFT default n endif diff --git a/components/drivers/usb/usbdevice/class/rndis.c b/components/drivers/usb/usbdevice/class/rndis.c index 793ecb49b5..ec61234947 100644 --- a/components/drivers/usb/usbdevice/class/rndis.c +++ b/components/drivers/usb/usbdevice/class/rndis.c @@ -1391,7 +1391,7 @@ ufunction_t rt_usbd_function_rndis_create(udevice_t device) timer_timeout, _rndis, RT_TICK_PER_SECOND * 2, - RT_TIMER_FLAG_ONE_SHOT); + RT_TIMER_FLAG_ONE_SHOT | RT_TIMER_FLAG_SOFT_TIMER); #endif /* RNDIS_DELAY_LINK_UP */ /* OUI 00-00-00, only for test. */