From da592731b351e8cacf323219873a55a4b8febb04 Mon Sep 17 00:00:00 2001 From: cdfrey Date: Sat, 24 Nov 2007 01:20:03 +0000 Subject: [PATCH] - added sleep to bcharge, before calling usb_reset()... the Blackberry 8830 behaves like a Pearl device in that it has mass storage support, but behaves like a Classic in that it resets itself... the usb_reset() seems to reset it back to 0006. The sleep allows the device to disappear via its own reset, and let usb_reset() fail naturally on these devices. This is not an ideal solution... mainly for testing. --- ChangeLog | 8 ++++++++ tools/bcharge.cc | 1 + 2 files changed, 9 insertions(+) diff --git a/ChangeLog b/ChangeLog index 1a80fe7d..7047ebd2 100644 --- a/ChangeLog +++ b/ChangeLog @@ -7,6 +7,14 @@ Release: version 0.10 - 2007/10/12 to call it if unnecessary. This allows us to run at the same time as usb_storage. Thanks to Martin Owens for not letting this issue go. :-) + - added sleep to bcharge, before calling usb_reset()... the + Blackberry 8830 behaves like a Pearl device in that + it has mass storage support, but behaves like a Classic + in that it resets itself... the usb_reset() seems + to reset it back to 0006. The sleep allows the device + to disappear via its own reset, and let usb_reset() + fail naturally on these devices. + This is not an ideal solution... mainly for testing. 2007/11/09 - added modprobe/blacklist-berry_charge as per Simon Ruggier's suggestion. Thanks also to Niels de Vos for a similar diff --git a/tools/bcharge.cc b/tools/bcharge.cc index 3f10574f..99a32f14 100644 --- a/tools/bcharge.cc +++ b/tools/bcharge.cc @@ -160,6 +160,7 @@ bool process(struct usb_device *dev, bool is_pearl) // the Blackberry Pearl doesn't reset itself after the above, // so do it ourselves if( is_pearl || force_dual ) { + sleep(1); if( usb_reset(handle) < 0 ) { printf("\nusb_reset failed: %s\n", usb_strerror()); } -- 2.11.4.GIT