diff options
author | Dan Williams <dcbw@redhat.com> | 2012-12-10 16:30:05 -0600 |
---|---|---|
committer | Dan Williams <dcbw@redhat.com> | 2012-12-10 16:33:05 -0600 |
commit | 5427f0d356c115814562cbe0483157a62de616cb (patch) | |
tree | acc102a83e20d7bcf5b94f78fefa48b2f6e3c816 | |
parent | 26c19ff4741b1ec72b4e131dcb8439dfb9b4af0a (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.c | 11 |
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, | |||
58 | return; | 58 | return; |
59 | } | 59 | } |
60 | 60 | ||
61 | /* Most Sierra devices return OK immediately in response to CFUN=1 but | 61 | /* Many Sierra devices return OK immediately in response to CFUN=1 but |
62 | * need some time to finish powering up. Give more time for older devices | 62 | * need some time to finish powering up, otherwise subsequent commands |
63 | * like the AC860, which aren't driven by the 'sierra' driver. | 63 | * may return failure or even crash the modem. Give more time for older |
64 | * devices like the AC860 and C885, which aren't driven by the 'sierra_net' | ||
65 | * driver. Assume any DirectIP (ie, sierra_net) device is new enough | ||
66 | * to allow a lower timeout. | ||
64 | */ | 67 | */ |
65 | drivers = mm_base_modem_get_drivers (MM_BASE_MODEM (self)); | 68 | drivers = mm_base_modem_get_drivers (MM_BASE_MODEM (self)); |
66 | for (i = 0; drivers[i]; i++) { | 69 | for (i = 0; drivers[i]; i++) { |
67 | if (g_str_equal (drivers[i], "sierra")) { | 70 | if (g_str_equal (drivers[i], "sierra_net")) { |
68 | is_new_sierra = TRUE; | 71 | is_new_sierra = TRUE; |
69 | break; | 72 | break; |
70 | } | 73 | } |