Huawei E3276 problem

Bjørn Mork bjorn at mork.no
Tue Nov 13 04:59:47 PST 2012


Tommy Cheng <tommy7765 at yahoo.com> writes:

> I will test unbinding tomorrow.  But I did notice that the system hung when I
> tried to unload cdc_ncm.ko.

Yes, that is one probable symptom if it doesn't work.

Although it looks like everything should work looking at the current usb
core.  usb_unbind_interface() start by setting 

	intf->condition = USB_INTERFACE_UNBINDING;

before it calls driver->disconnect(intf), and
usb_driver_release_interface() start by testing

	/* don't release from within disconnect() */
	if (iface->condition != USB_INTERFACE_BOUND)
		return;

so calling usb_driver_release_interface() from within the driver
disconnect() should be safe even if it is for the interface being
disconnected.

But nevermind. After thinking about it for a few more seconds, I
concluded that it is best to avoid the extra release call in any case to
make the bind and unbind code symmetrical and thereby easier to follow.
So I added a control == data conditional to unbind as well.

> By the way, the platform I tested on is MIPS SoC (Big Endian).  Maybe the
> system hung problem has something to do with the platform.  I will apply
> your patch and test it tomorrow.  Thanks a lot.

Make sure you use the last one then.  There is no need to lock up the
system to find out that we must handle the combined interface in unbind
after all.



Bjørn


More information about the libqmi-devel mailing list