FCC authentication with QMI over MBIM; try 1 -- Logs

Bjørn Mork bjorn at mork.no
Fri Jul 1 12:57:08 UTC 2016


Aleksander Morgado <aleksander at aleksander.es> writes:

> Didn't check yet myself, but this device does work reliably in Windows
> in MBIM mode, right? I mean, Lenovo doesn't switch it to QMI in the
> Windows driver they use, I assume?

I don't know, but I assume it is mostly reliable in Windows.  They have
probably tested that :)

I have now tried adding all sorts of resets in different parts of the
driver without any noticable success rate improvement.  And I have
verified that I can reproduce the same problem with different MBIM
tools, using different timings and request sequences.  Then I started
adding a few sleeps here and there, and that seemed to improve things.
Removing and reducing the total amount of sleep time, I ended up with
this which still seems to work:

diff --git a/drivers/net/usb/cdc_ncm.c b/drivers/net/usb/cdc_ncm.c
index 53759c315b97..b22eab07db29 100644
--- a/drivers/net/usb/cdc_ncm.c
+++ b/drivers/net/usb/cdc_ncm.c
@@ -854,6 +854,9 @@ int cdc_ncm_bind_common(struct usbnet *dev, struct usb_interface *intf, u8 data_
 	if (cdc_ncm_init(dev))
 		goto error2;
 
+	/* experimental fix(?) for EM7455/MC7455 */
+	usleep_range(10000, 20000);
+
 	/* configure data interface */
 	temp = usb_set_interface(dev->udev, iface_no, data_altsetting);
 	if (temp) {



It could still just be pure luck, though.  I've only tested it a couple
of times using that delay so far.  It would be good to get broader
testing, if any of you with a problematic EM7455 could try adding a line
like that. And please test other values if it doesn't seem to work at
first.  I started out with msleep(1000), reducing it gradually down to
usleep_range(1000, 2000). Which didn't work.  The (10000, 20000) looks
like a reasonable minimum to me, but it could be too little. I don't
know.

The point of reducing this as much as possible is to be able to apply it
unconditionally. This might be necessary for lots of other MDM9x30
devices, and I don't want another device ID list to maintain.

Or maybe I am completely off the target again, and all this is just
another irrelevant coincidence.


Bjørn


More information about the libmbim-devel mailing list