From c0fde76241eef992919efae235311eb32dab9128 Mon Sep 17 00:00:00 2001 From: Kristian Sloth Lauszus Date: Tue, 16 Jul 2013 18:36:07 +0200 Subject: [PATCH] Make sure it doesn't try to init a driver twice --- Usb.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/Usb.cpp b/Usb.cpp index 6d4e8db5..31d9bb9b 100644 --- a/Usb.cpp +++ b/Usb.cpp @@ -708,6 +708,7 @@ uint8_t USB::Configuring(uint8_t parent, uint8_t port, bool lowspeed) { for (devConfigIndex = 0; devConfigIndex < USB_NUMDEVICES; devConfigIndex++) { if (!devConfig[devConfigIndex]) continue; if (devConfig[devConfigIndex]->GetAddress()) continue; // consumed + if (devConfig[devConfigIndex]->VIDPIDOK(vid, pid) || devConfig[devConfigIndex]->DEVCLASSOK(klass)) continue; // If this is true it means it must have returned USB_DEV_CONFIG_ERROR_DEVICE_NOT_SUPPORTED above rcode = AttemptConfig(devConfigIndex, parent, port, lowspeed); //printf("ERROR ENUMERATING %2.2x\r\n", rcode);