summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDan Williams <dcbw@redhat.com>2012-12-10 16:30:05 -0600
committerDan Williams <dcbw@redhat.com>2012-12-10 16:33:05 -0600
commit5427f0d356c115814562cbe0483157a62de616cb (patch)
treeacc102a83e20d7bcf5b94f78fefa48b2f6e3c816
parent26c19ff4741b1ec72b4e131dcb8439dfb9b4af0a (diff)
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.
-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 65c3c02b..a9d6f2eb 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;
}