From d23afb598093c2b2c78c909d5894b63dffdc094c Mon Sep 17 00:00:00 2001 From: Keith Mok Date: Wed, 25 Jan 2017 15:07:31 -0800 Subject: [PATCH] fastboot: Workaround for touchbar hang on MBP 2016 fastboot will try to set usb configuration on connected usb devices. When it tries to change the usb configuration on iBridge device on MBP 2016 model, it hangs, and frozen the touchbar. Skip set usb configuration. Bug: https://code.google.com/p/android/issues/detail?id=231129 Change-Id: Ib055fc0524d26092555fc135588fa362e70eeb39 --- fastboot/usb_osx.cpp | 8 -------- 1 file changed, 8 deletions(-) diff --git a/fastboot/usb_osx.cpp b/fastboot/usb_osx.cpp index ee5d57530..032ae3187 100644 --- a/fastboot/usb_osx.cpp +++ b/fastboot/usb_osx.cpp @@ -92,7 +92,6 @@ static int try_interfaces(IOUSBDeviceInterface182 **dev, usb_handle *handle) { HRESULT result; SInt32 score; UInt8 interfaceNumEndpoints; - UInt8 configuration; // Placing the constant KIOUSBFindInterfaceDontCare into the following // fields of the IOUSBFindInterfaceRequest structure will allow us to @@ -102,13 +101,6 @@ static int try_interfaces(IOUSBDeviceInterface182 **dev, usb_handle *handle) { request.bInterfaceProtocol = kIOUSBFindInterfaceDontCare; request.bAlternateSetting = kIOUSBFindInterfaceDontCare; - // SetConfiguration will kill an existing UMS connection, so let's - // not do this if not necessary. - configuration = 0; - (*dev)->GetConfiguration(dev, &configuration); - if (configuration != 1) - (*dev)->SetConfiguration(dev, 1); - // Get an iterator for the interfaces on the device kr = (*dev)->CreateInterfaceIterator(dev, &request, &iterator);