Marcel Holtmann wrote:
Hi David,


the bfusb Bluetooth driver for the AVM BlueFRITZ! USB uses two different
configurations. One for loading the firmware and the other for normal
operation. The firmware is loaded through request_firmware() in the
probe() routine and therefor I need to change the current configuration.

But not do a USB reset? In that case, schedule_work() to change the config. Then succeed in binding (this isn't the DFU model!) and in a moment, you'll disconnect(), then presumably re-probe() to the new config.


is an USB reset really needed to change the configuration?

Not at all. But it's part of the other firmware update models I've gotten familiar with, and it's relatively well guaranteed to reset all the significant state on both host and device.


In 2.4 the call of usb_set_configuration() from probe() works, but in
2.6 it is not possible. Faking this through a control message worked
until now, but they changed the firmware size and so it seems the USB
Data Toogle will not be reseted. Any ideas how this can be fixed?

That is, the firmware should reset all toggles, but doesn't? Does that problem go away if you reset the device? I think that probe() should be able to call __usb_reset_device() today, but I'm not sure whether the device re-enumerates properly yet. If you go that route, then I suspect you'll need patches from Alan Stern.


If I add the following two lines after the control message

        udev->toggle[0] = udev->toggle[1] = 0;
        udev->halted[0] = udev->halted[1] = 0;

everything is working as before.

I wouldn't rely on it for a minute. Thing is, there's state inside usbcore that only gets properly adjusted by usb_set_configuration(). It's not limited to endpoint halt and toggle status, there's also driver model state. Even if you happen to fall into a special case that doesn't involve oopsing (for now), why risk it?

Is there some problem calling usb_set_configuration() from keventd
as I suggested?

- Dave





-------------------------------------------------------
This SF.Net email is sponsored by: GNOME Foundation
Hackers Unite!  GUADEC: The world's #1 Open Source Desktop Event.
GNOME Users and Developers European Conference, 28-30th June in Norway
http://2004/guadec.org
_______________________________________________
[EMAIL PROTECTED]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel

Reply via email to