On Tue, Jan 12, 2010 at 03:58:34PM -0800, Greg KH wrote: > On Tue, Jan 12, 2010 at 04:32:54PM -0500, Chris Frey wrote: > > I should take this offline with you though, as you may be able to help > > improve berry_charge. > > Please do, I'm tired of berry_charge and would love to delete it (note, > I wrote it in the first place...) Hi Greg, Finally got some time to get to this. Transplanting this from the libusb mailing list. I'm curious what makes you eager to delete berry_charge. Some background on bcharge / berry_charge: In the Barry project, we use a blacklist entry to prevent berry_charge from loading if the barry-utils package is installed. This package installs udev rules to run the bcharge program as soon as the device is plugged in. Nearly always, this results in the Blackberry resetting itself. Sometimes this confuses usb_storage, or maybe the device itself gets confused. But I've had good success with this setup. Bcharge has been maintained more than the kernel module, merely due to the facts that I'm busy, and that I'm not as comfortable hacking about in kernel space. For example: Snippet from bcharge.cc: if( is_pearl || force_dual ) { // // It has been observed that the 8830 behaves both like // a Pearl device (in that it has mass storage + // database modes) as well as a Classic device in // that it resets itself and doesn't need an explicit // reset call. // // In order to deal with this, we insert a brief sleep. // If it is an 8830, it will reset itself and the // following reset call will fail. If it is a Pearl, // the reset will work as normal. // sleep(1); if( usb_reset(handle) < 0 ) { printf("\nusb_reset failed: %s\n", usb_strerror()); } I see other drivers using ssleep(), but not sure if that is good kernel etiquette. If we found a reliable way to handle the udev rules, then the berry_charge kernel module could go away. But with a little help, I could also update berry_charge to bcharge's current knowledge, and then it would be the user's choice. It's probably best anyway to leave it up to the user. - Chris -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html