BridgeManager: skip libusb_set_interface_alt_setting if altsetting=0
Some (older) devices seem to have a problem with this: https://github.com/Benjamin-Dobell/Heimdall/issues/497 As far as I can see from logs, alt_setting is always 0, so with this change libusb_set_interface_alt_setting will probably never be run. tests: flash and boot recovery onto SM-G955
This commit is contained in:
parent
6317e88503
commit
2ecc98020c
|
@ -259,9 +259,16 @@ bool BridgeManager::ClaimDeviceInterface(void)
|
|||
|
||||
bool BridgeManager::SetupDeviceInterface(void)
|
||||
{
|
||||
// if altSettingIndex is 0 there should be no need
|
||||
// to set alt_setting(?)
|
||||
if (altSettingIndex == 0)
|
||||
return (true);
|
||||
|
||||
Interface::Print("Setting up interface...\n");
|
||||
|
||||
int result = libusb_set_interface_alt_setting(deviceHandle, interfaceIndex, altSettingIndex);
|
||||
int result = libusb_set_interface_alt_setting(deviceHandle,
|
||||
interfaceIndex,
|
||||
altSettingIndex);
|
||||
|
||||
if (result != LIBUSB_SUCCESS)
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue