summaryrefslogtreecommitdiff
authorDan Williams <dcbw@redhat.com>2012-12-10 22:30:05 (GMT)
committer Dan Williams <dcbw@redhat.com>2012-12-10 22:33:05 (GMT)
commit5427f0d356c115814562cbe0483157a62de616cb (patch) (side-by-side diff)
treeacc102a83e20d7bcf5b94f78fefa48b2f6e3c816
parent26c19ff4741b1ec72b4e131dcb8439dfb9b4af0a (diff)
downloadModemManager-5427f0d356c115814562cbe0483157a62de616cb.zip
ModemManager-5427f0d356c115814562cbe0483157a62de616cb.tar.gz
sierra: restore longer CFUN=1 timeout for older devices
Turns out older devices (like the C885/AT&T Mercury) crash often when we don't wait for them to settle from CFUN=1. 5 seconds is too short, but the crashes go away when we wait for 10 seconds. Newer modems like the USB306 don't have this problem, so we just check to see if the modem is a DirectIP device (using sierra_net) and only use the shorter timeout for those newer devices. This is a separate problem from some older modems returning ERROR to valid commands that are sent too soon after CFUN=1, which was observed on really old devices like the PCMCIA 860.
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--plugins/sierra/mm-common-sierra.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/plugins/sierra/mm-common-sierra.c b/plugins/sierra/mm-common-sierra.c
index 65c3c02..a9d6f2e 100644
--- a/plugins/sierra/mm-common-sierra.c
+++ b/plugins/sierra/mm-common-sierra.c
@@ -58,13 +58,16 @@ full_functionality_status_ready (MMBaseModem *self,
return;
}
- /* Most Sierra devices return OK immediately in response to CFUN=1 but
- * need some time to finish powering up. Give more time for older devices
- * like the AC860, which aren't driven by the 'sierra' driver.
+ /* Many Sierra devices return OK immediately in response to CFUN=1 but
+ * need some time to finish powering up, otherwise subsequent commands
+ * may return failure or even crash the modem. Give more time for older
+ * devices like the AC860 and C885, which aren't driven by the 'sierra_net'
+ * driver. Assume any DirectIP (ie, sierra_net) device is new enough
+ * to allow a lower timeout.
*/
drivers = mm_base_modem_get_drivers (MM_BASE_MODEM (self));
for (i = 0; drivers[i]; i++) {
- if (g_str_equal (drivers[i], "sierra")) {
+ if (g_str_equal (drivers[i], "sierra_net")) {
is_new_sierra = TRUE;
break;
}