So annoying. The iphone doesn't charge in pre-2.6.19 kernels properly. I was running a 2.6.18-5 (stock debian) kernel until this morning. The flippin USB device driver subsystem changed between 2.6.18 and 2.6.19 and (of course) the iPhone requires a special device driver to send it a magic command to initiate charging when you plug it in via USB. And, of course, this device driver only works with the post 2.6.18 USB kernel device driver api. The 2.6.19 USB core now exports "usb_driver_set_configuration()". It's funny, reading the patch for this feature in the kernel source states that a device needing to reset it's configuration is a violation of the whole model and is akin to a device telling the kernel that it is now somehow a different type of device than it was when originally plugged in:
(from the backport of this feature to 2.6.18, drivers/usb/core/message.c)
* Device interface drivers are not allowed to change device configurations.
* This is because changing configurations will destroy the interface the
* driver is bound to and create new ones; it would be like a floppy-disk
* driver telling the computer to replace the floppy-disk drive with a
* tape drive!
*
* Still, in certain specialized circumstances the need may arise. This
* routine gets around the normal restrictions by using a work thread to
* submit the change-config request.
Originally, the change was implemented for a TI brand USB device and apparently Crackberries have the same problem. Well, to be fair, I can't really say it's a problem with the device as opposed to the kernel subsystem design, but plenty of other peripherals work just fine without special kernel device driver modules. As you might have judged from the title of this post, I think it's criminal to have to upgrade my kernel just to charge a particular device via USB.
Anyhow, so to get my friggin iPhone to charge I had to upgrade my kernel, recompile and load the 3rd party iphone module, and configure hald to ignore my device (it kept popping open a photo import window every few minutes). I upgraded to 2.6.23-8, which went surprisingly well. I had doubts about "make oldconfig" using the .config file from my 2.6.18-5 debian stock source but it went without a hitch! Below is the /etc/hal/fdi/preprobe/1-iphone.fdi control file to stop those annoying popups (credit to gadgetgirl):
<?xml version="1.0" encoding="UTF-8"?> <!-- -*- SGML -*- -->
<deviceinfo version="0.2">
<device>
<match key="usb.vendor_id" int="1452">
<match key="usb.product_id" int="4752">
<merge key="info.ignore" type="bool">true</merge>
</match>
</match>
</device>
</deviceinfo>
The only good news is that I learned a little more about hald. Another good discussion on a similar hald-related topic is here.
Recent Comments