aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/isdn/gigaset
diff options
context:
space:
mode:
authorTilman Schmidt <tilman@imap.cc>2012-04-25 09:02:20 -0400
committerDavid S. Miller <davem@davemloft.net>2012-05-07 22:37:56 -0400
commite055d03dc088a990fe5ea24a2d64033a168da23c (patch)
treeece413271c28c34b5907689cdb6ecb13d672313e /drivers/isdn/gigaset
parent62a1cfe052346b96a552b6a9178d412c709711bb (diff)
isdn/gigaset: improve error handling querying firmware version
An out-of-place "OK" response to the "AT+GMR" (get firmware version) command turns out to be, more often than not, a delayed response to a previous command rather than an actual error, so continue waiting for the version number in that case. Signed-off-by: Tilman Schmidt <tilman@imap.cc> CC: stable <stable@kernel.org> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/isdn/gigaset')
-rw-r--r--drivers/isdn/gigaset/ev-layer.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/isdn/gigaset/ev-layer.c b/drivers/isdn/gigaset/ev-layer.c
index 624a8256a77f..685638ac1161 100644
--- a/drivers/isdn/gigaset/ev-layer.c
+++ b/drivers/isdn/gigaset/ev-layer.c
@@ -190,6 +190,7 @@ struct reply_t gigaset_tab_nocid[] =
190 ACT_INIT} }, 190 ACT_INIT} },
191 {RSP_OK, 121, 121, -1, 0, 0, {ACT_GOTVER, 191 {RSP_OK, 121, 121, -1, 0, 0, {ACT_GOTVER,
192 ACT_INIT} }, 192 ACT_INIT} },
193 {RSP_NONE, 121, 121, -1, 120, 0, {ACT_GETSTRING} },
193 194
194/* leave dle mode */ 195/* leave dle mode */
195 {RSP_INIT, 0, 0, SEQ_DLE0, 201, 5, {0}, "^SDLE=0\r"}, 196 {RSP_INIT, 0, 0, SEQ_DLE0, 201, 5, {0}, "^SDLE=0\r"},
@@ -1314,8 +1315,9 @@ static void do_action(int action, struct cardstate *cs,
1314 s = ev->ptr; 1315 s = ev->ptr;
1315 1316
1316 if (!strcmp(s, "OK")) { 1317 if (!strcmp(s, "OK")) {
1318 /* OK without version string: assume old response */
1317 *p_genresp = 1; 1319 *p_genresp = 1;
1318 *p_resp_code = RSP_ERROR; 1320 *p_resp_code = RSP_NONE;
1319 break; 1321 break;
1320 } 1322 }
1321 1323