summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArnon Gilboa <agilboa@redhat.com>2012-04-25 11:01:21 +0300
committerArnon Gilboa <agilboa@redhat.com>2012-04-25 11:01:21 +0300
commit972e1e215a6d39343719e4f6637b151fa571b708 (patch)
tree84c69a19366f1ad309ce631ff14a97d3cf7644db
parent7be8b54dae290400ddde39764d37b80771e9a354 (diff)
usbclerk: increase driver install max retries, decrease interval between retries
-rw-r--r--usbclerk.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/usbclerk.cpp b/usbclerk.cpp
index 206310e..22e383d 100644
--- a/usbclerk.cpp
+++ b/usbclerk.cpp
@@ -17,7 +17,7 @@
#define USB_CLERK_PIPE_BUF_SIZE 1024
#define USB_DRIVER_PATH "%Swdi_usb_driver"
#define USB_DRIVER_INFNAME_LEN 64
-#define USB_DRIVER_INSTALL_RETRIES 3
+#define USB_DRIVER_INSTALL_RETRIES 7
#define USB_DRIVER_INSTALL_INTERVAL 1000
class USBClerk {
@@ -376,9 +376,9 @@ bool USBClerk::install_winusb_driver(int vid, int pid)
for (int t = 0; t < USB_DRIVER_INSTALL_RETRIES; t++) {
r = wdi_install_driver(wdidev, _wdi_path, infname, &wdi_inst_opts);
if (r == WDI_ERROR_PENDING_INSTALLATION) {
- vd_printf("Another driver is installing, retry in %d seconds",
- t * USB_DRIVER_INSTALL_INTERVAL);
- Sleep(t * USB_DRIVER_INSTALL_INTERVAL);
+ vd_printf("Another driver is installing, retry in %d ms",
+ USB_DRIVER_INSTALL_INTERVAL);
+ Sleep(USB_DRIVER_INSTALL_INTERVAL);
} else {
/* break on success or any error other than pending installation */
break;